Skip to content

fix(agents): resolve scheduled account policy in the caller registry - #184164

Open
igs-rogenlo wants to merge 4 commits into
openclaw:mainfrom
igs-rogenlo:fix/scoped-channel-account-policy
Open

igs-rogenlo wants to merge 4 commits into
openclaw:mainfrom
igs-rogenlo:fix/scoped-channel-account-policy

Conversation

@igs-rogenlo

@igs-rogenlo igs-rogenlo commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Related: #150278, #178677.

What Problem This Solves

Fixes scheduled jobs reporting an available named account as unavailable when their channel plugin exists only in the current runtime registry scope.

User Impact

Scheduled account checks and group tool policy use the current channel implementation. A scoped account removal continues to deny the run even if the process-root implementation still lists that account. No configuration, stored-job or credential migration is added. Legacy jobs without authenticated creator origin still require native reauthorization; this does not repair their missing provenance.

Why This Change Was Made

Use the existing channel registration resolver with loadedOnly: true instead of the process-root lookup. This retains loaded-only behavior and the existing account guard without adding a registry, cache or fallback. Distinct native registry owners cover the policy regression, and three additional isolated product cases exercise the scheduler through actual message execution and cancellation.

Evidence

Update 2026-11-25: rebased onto main at 79e42e0877d9. On the rebased head, agent-tools.policy.test.ts passes 20/20 locally (18/20 with main's unmodified policy file; main added two tests to that file), the three Gateway product cases pass, and the mock-export and test-line ratchets pass. The test counts, commit ids and hosted-CI statements below describe earlier heads.

The existing policy suite has 17 passing tests: the two registry regressions fail on base 925d43df5722e6f3aa2abdce4912042b2753f3eb while the 15 existing tests pass. Those policy tests remain unchanged in this follow-up.

The added product suite passes all three cases through the real Gateway, admitted local automation creation, scheduler, embedded agent and Discord message-action path:

  • With the account available in both the prepared scoped registry and the Gateway registry, the scheduled tool reads the expected synthetic message through metadata and /messages GETs.
  • With the scoped Discord registration retained but its account roster missing work, while root still lists it, the scheduler rejects before any model or provider request.
  • Holding the metadata GET response, disabling the active job through native cron.update, then releasing the response ends the occurrence as disabled by operator. No /messages request is sent.

The test hooks select the prepared runtime registry and supply account rosters; this does not validate production prepared-registry acquisition itself. The model HTTP endpoint and Discord HTTP responses are also synthetic. Policy decisions, registration custody/read authority, occurrence admission, agent execution and dispatch are native. The local creator is a harness-admitted principal, not a live human channel session. Discord credential-only reads delegate to the Gateway, so successful execution also requires the account in the Gateway owner. These cases do not claim that a scoped-only account bypasses that second owner.

This is provider read-effect evidence, not live Discord, send/write, notification, production-deployment or hosted-CI proof. The earlier isolated published-2026.10.7 policy/cron probes remain separate pre-execution evidence and are not substituted for these source product tests. Normal current-head maintainer/security review is still required before landing.

Validation of this follow-up on commit 0ced7be2a363c7ed259929f43146d594e1fa10f1:

  • Native Gateway product suite: 3/3 passed; the wrapper and final source verification completed successfully.
  • Native formatting, typed lint for both added files, and the gateway-server TypeScript project check passed.
  • Independent local canonical review of the full candidate against 925d43df5722e6f3aa2abdce4912042b2753f3eb completed through P2 with no actionable findings; its final source verification passed. This was a static review, separate from the executed tests above.

Recorded runtime output

The three recorded scenario traces and complete redacted terminal log show the authorized metadata/message GETs, the scoped-account rejection with zero recorded model/provider requests, and active disablement before the message-list request. The attachment preserves observed event order and native completion fields, separately labels assertion explanations, and binds the original artifact hashes and five source-file hashes to this published content.

This is the existing execution of the frozen staged candidate subsequently committed unchanged as 0ced7be2a363c7ed259929f43146d594e1fa10f1, not a post-commit rerun. Synthetic endpoints, identities, credentials and private local paths are redacted. The original retained-namespace warning is included; the log is not presented as a blanket descendant-cleanup guarantee. Maintainer security authorization is still required before landing.

CI repair follow-up

The incremental test-only correction is committed as 46cbc61b97ef5669fa71c6a4f197c7ab6ef7805b, directly on the previously published head above.

  • Use the existing cancellation-aware withinTest / awaitGateBeforeSettlement helpers and Vitest's native it.for test signal, retaining the existing assertions and 300-second case timeout.
  • Preserve the original node-exec-availability exports in the partial mock.
  • Remove exactly one obsolete mock-baseline tuple identified by the ratchet; no baseline allowance is added.
  • Re-executed all three product cases under the repository's supported CI=1 mode with an isolated Node 24.22.1 toolchain: 3/3 passed, including scoped-account removal and active revocation. Endpoint/principal limitations above still apply.
  • Timeout-race ratchet passed. The mock-export ratchet passed with 6,882 grandfathered factories against exact published head 0ced7be2a363c7ed259929f43146d594e1fa10f1 (--no-merge-base). This is validation of the incremental repair, not a current-main merge or hosted-CI result.

Independent read-only P0–P3 review of this exact incremental commit found no actionable defects; it did not rerun tests or grant security-policy approval.

Production code is unchanged by this follow-up. Current-head maintainer/security authorization is still required before landing.

Test-line allocation and current CI limits

The native scheduled-account acceptance adds 577 test/support lines in total. The current trusted CI checker supports per-change allocations under config/test-lines-allocations; this PR requests exactly 577 lines there. The global baseline and checker remain unchanged. This allocation retains the real Gateway/SQLite success, scoped-account removal and active-revocation cases rather than replacing the owning runtime with mocks. The three product cases passed on the previously published test revision; their code and assertions are unchanged by the allocation.

The latest run of that published revision passed the mock-export and timeout-race ratchets but failed the separate test-line ceiling (556 over the merged-tree ceiling, net +577). The allocation addresses that accounting failure only. A separate Darwin tooling workflow checked out this older PR branch and requested test/scripts/pr-dependency-cache.test.ts, which does not exist on that branch. That workflow failure and the required maintainer/security approval are not reported as green.

Additional current-stable policy-owner probe — 2026-11-05

Executed the real published OpenClaw 2026.10.10 group-policy function with native registry scopes, without starting jobs or sending channel traffic. The baseline rejects an account available only in the scoped channel, accepts a root account removed from the scoped channel, and returns the root policy instead of the scoped policy. Substituting the exact two-line resolver change fixes all three scenarios: the scoped account is accepted, the removed account is rejected, and the scoped deny: [exec] policy is returned.

The candidate probe uses a process-local module load hook; the installed package remains unchanged. An initial strict assertion incorrectly treated an explicit allow: undefined property as a policy difference; assertions were corrected to check both policy fields, and both baseline and candidate runs then completed. This is policy-owner execution with synthetic channel registrations, not a repeat of the product Gateway suite or a live scheduled-channel acceptance.

Hosted status remains separate: Darwin is still failed at Test dependency cache lifetime, ci-gate still reports failure, and security-sensitive review is pending. The current job metadata confirms the failed step; the CLI returned no retained log lines for that job in this check, so that absence is not evidence of a passing run. No hosted green, production deployment, or maintainer authorization is claimed.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Resolve scheduled account availability and group tool policy through the caller’s loaded channel registry.

Example: The caller’s WhatsApp registry contains account work, while the process-root registry has no WhatsApp registration.

  • Before: The scheduled policy check rejects work as unavailable.
  • After: The check finds work and applies the scoped plugin’s group policy.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused repair with bounded production-path harness evidence and no actionable findings; synthetic runtime inputs limit broader deployment confidence.
Proof confidence 🦐 gold shrimp (3/6) Sufficient (logs): Recorded native Gateway/scheduler/agent dispatch reaches real transport-client GETs against synthetic endpoints, rejects the nearest forbidden scoped account before I/O, and stops message retrieval after operator disablement; source hashes bind the execution to this head. Prepared-registry acquisition and account rosters are fixture inputs, and the evidence claims no live Discord or write coverage.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A scheduled job can reject an available creator account or use group policy from the wrong runtime registration.
Reason: The repair aligns policy with the caller’s existing runtime scope while preserving account ownership and loaded-only behavior.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR fixes a current registry-scope mismatch with no actionable code findings; draft status and current-head maintainer security approval remain.

Priority: P2
Reviewed head: 0ced7be2a363c7ed259929f43146d594e1fa10f1

Before merge

  • Await maintainer action - A maintainer must review head 0ced7be and provide the repository-required security approval before landing.

Findings

None.

Agent review details

How this fits together

Agent tool-policy resolution consumes session identity, account identity, configuration, and channel registrations to return group restrictions or reject unavailable scheduled authority.

flowchart TD
  A[Scheduled job] --> B[Caller runtime scope]
  B --> C[Group tool policy]
  C --> D[Loaded channel registration]
  D --> E[Account roster and group restrictions]
  E --> F[Agent tool execution]
  F --> G[Gateway provider read]
Loading

Technical review

Best possible solution:

Use the existing scoped registration resolver while retaining loaded-only lookup, named-account rejection, and final-effect authority checks.

Do we have a high-confidence way to reproduce the issue?

Current-main source deterministically consults the process-root plugin rather than the scoped registration; the contributor reports both focused registry regressions fail on the pinned base and pass with the fix.

Is this the best way to solve the issue?

This is the smallest complete production repair: change the lookup at the shared policy owner without introducing another registry, fallback, cache, or configuration option.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 92415c1e5fe7.

Provenance checked

  • Loaded channel lookup keeps the original intent (87ef32c: Avoid bundled channel cold-loads in hot paths; the original patch was verified through GitHub after local historical blob access failed.)
  • Scheduled named-account authority keeps the original intent (5d21ba0: Bind scheduled authority to the immutable creator account and retain current non-sender restrictions.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 7a2f433 adds src/agents/agent-tools.policy.ts:555 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7a2f433410ed; files: src/agents/agent-tools.policy.ts)
  • joshavant: Raw commit 5d21ba0 adds src/agents/agent-tools.policy.ts:509 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5d21ba0a2a85; files: src/agents/agent-tools.policy.ts)

PR surface

Source 0, Tests +682. Total +682 across 4 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 3 693 11 +682
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 695 13 +682

Review metrics

Metric Value Why it matters
Production versus test changes Production +2/-2 lines; tests and fixtures +693/-11 lines Production reuses the existing owner; added coverage exercises distinct scoped selection, account rejection, and active cancellation boundaries.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Repairs scheduled tool access for a limited runtime-registry configuration without evidence of a broad urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-26T03:52:56.452Z sha 1f8ed66 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-26T09:35:44.214Z sha 0ced7be :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-26T10:16:57.757Z sha 0ced7be :: blocked before merge. :: none

Reviewed October 26, 2026, 6:24 AM ET / 10:24 UTC (Revision 4).

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: L and removed size: S labels Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated head: 0ced7be2a363c7ed259929f43146d594e1fa10f1.

Added three native Gateway/scheduler-to-agent/provider-read cases: an authorized account reaches the expected Discord message read; a root-present account removed from the scoped roster is rejected before model/provider I/O; disabling an active occurrence prevents the pending message read. The product suite, formatting, typed lint, gateway-server types and independent static review passed.

The PR body separates the synthetic model/HTTP responses and prepared-registry hooks from native policy, admission and dispatch. It also documents the separate Gateway account-owner requirement and the read-only effect. Current-head maintainer/security approval is still required before landing.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Recorded scheduler-to-tool evidence for PR #184164

Published content: 0ced7be2a363c7ed259929f43146d594e1fa10f1. These are existing runtime artifacts from the frozen staged candidate on parent 1f8ed66e264c861ab62db755003575aa01c031eb, subsequently committed unchanged. This is not a claim of a post-commit rerun. Current Git blobs, run-manifest hashes and original artifacts were checked without rerunning tests or changing source.

The append traces below were written during the actual isolated execution. The HTTP arrays, model observations and completion fields were captured by that same fixture; they are not manufactured from assertions. Account/channel/message identities use aliases, credentials and local paths are removed, and provider paths retain only their shape. The original artifact hashes appear below. This is a redacted projection, not a byte-identical copy of the originals.

The positive path needs the account in both the prepared scoped registry and the Gateway registry. Prepared registry acquisition and account rosters are test hooks; registration custody/read grants, scheduler admission, agent execution and message dispatch remain native. The model and Discord HTTP servers are synthetic. Effects shown are Discord read GETs, not send/write, live Discord or production behavior.

Authorized read

Observed data: The append stream records two tool-http arrivals and a tool-result returned to the model continuation. The separate captured HTTP array records GET for the channel metadata and message-list routes, with authorizationMatches=true. Recorded completion is ok.

Append trace (original order and millisecond timestamps retained; redacted):

{"kind":"fixture-start","at":1793002965185}
{"kind":"registry-install-start","at":1793002993975}
{"kind":"gateway-start","at":1793003000690}
{"kind":"gateway-ready","at":1793003026738}
{"kind":"prepared-runtime-ready","at":1793003026839}
{"kind":"job-created","at":1793003045521}
{"kind":"native-registry-authority","at":1793003045539,"rootHasAccount":true,"scopedHasAccount":true,"rootReadCurrent":true,"scopedReadCurrent":true}
{"kind":"scheduler-dispatch","at":1793003045539,"mode":"success"}
{"kind":"model-request","at":1793003055876}
{"kind":"tool-http","path":"<provider-prefix>/channels/<channel-A>","at":1793003061931}
{"kind":"tool-http","path":"<provider-prefix>/channels/<channel-A>/messages","at":1793003061945}
{"kind":"model-request","at":1793003062048}
{"kind":"tool-result","at":1793003062049,"text":"{\"ok\":true,\"channelId\":\"<channel-A>\",\"messages\":[{\"id\":\"<message-A>\",\"channel_id\":\"<channel-A>\",\"author\":\"<author-A; identifying fields redacted>\",\"content\":\"<synthetic message content redacted>\",\"attachments\":[],\"embeds\":[],\"type\":0,\"timestamp\":\"<synthetic timestamp redacted>\"}]}"}
{"kind":"finished","at":1793003062396,"status":"ok"}

Recorded HTTP/model/completion fields (redacted):

{
  "recordedHttpRequests": [
    {
      "method": "GET",
      "path": "<provider-prefix>/channels/<channel-A>",
      "authorizationMatches": true
    },
    {
      "method": "GET",
      "path": "<provider-prefix>/channels/<channel-A>/messages",
      "authorizationMatches": true
    }
  ],
  "recordedModelObservation": {
    "requests": 2,
    "messageToolAdvertised": true,
    "toolOutput": {
      "ok": true,
      "channelId": "<channel-A>",
      "messages": [
        {
          "id": "<message-A>",
          "channel_id": "<channel-A>",
          "author": "<author-A; identifying fields redacted>",
          "content": "<synthetic message content redacted>",
          "attachments": [],
          "embeds": [],
          "type": 0,
          "timestamp": "<synthetic timestamp redacted>"
        }
      ]
    }
  },
  "recordedCompletion": {
    "action": "finished",
    "status": "ok",
    "completionStatus": "succeeded",
    "deliveryStatus": "not-requested",
    "runAtMs": 1793003046584,
    "durationMs": 15784
  }
}

Assertion/interpretation boundary: The test separately asserts the expected returned message and native owner/policy bindings; those assertions are not additional trace events.

Scoped account absent while root retains it

Observed data: The recorded registry facts are rootHasAccount=true and scopedHasAccount=false, with both read-custody checks current. The trace ends with the unavailable-account error. The recorded HTTP array is empty and model.requests is 0.

Append trace (original order and millisecond timestamps retained; redacted):

{"kind":"fixture-start","at":1793003062640}
{"kind":"registry-install-start","at":1793003064872}
{"kind":"gateway-start","at":1793003064883}
{"kind":"gateway-ready","at":1793003076123}
{"kind":"prepared-runtime-ready","at":1793003076158}
{"kind":"job-created","at":1793003081397}
{"kind":"native-registry-authority","at":1793003081413,"rootHasAccount":true,"scopedHasAccount":false,"rootReadCurrent":true,"scopedReadCurrent":true}
{"kind":"scheduler-dispatch","at":1793003081413,"mode":"scoped-removed"}
{"kind":"finished","at":1793003083082,"status":"error","error":"Scheduled account \"<account-A>\" is unavailable. Re-add it to the channel configuration, or recreate this automation from the intended account."}

Recorded HTTP/model/completion fields (redacted):

{
  "recordedHttpRequests": [],
  "recordedModelObservation": {
    "requests": 0,
    "messageToolAdvertised": false
  },
  "recordedCompletion": {
    "action": "finished",
    "status": "error",
    "completionStatus": "failed",
    "deliveryStatus": "not-requested",
    "runAtMs": 1793003082468,
    "durationMs": 576,
    "error": "Scheduled account \"<account-A>\" is unavailable. Re-add it to the channel configuration, or recreate this automation from the intended account."
  }
}

Assertion/interpretation boundary: The test keeps the scoped Discord registration, removes only the scoped account roster entry, and asserts denial before model/provider I/O. Zero recorded requests applies to this bounded fixture observation window.

Disable active occurrence before the message-list read

Observed data: The append stream records metadata tool-http, pre-read-barrier, revoke-requested, revoked, pre-read-released, then finished with the operator-disabled error. The captured HTTP array contains only the metadata GET and model.requests is 1. No message-list request is recorded.

Append trace (original order and millisecond timestamps retained; redacted):

{"kind":"fixture-start","at":1793003084976}
{"kind":"registry-install-start","at":1793003087505}
{"kind":"gateway-start","at":1793003087516}
{"kind":"gateway-ready","at":1793003098888}
{"kind":"prepared-runtime-ready","at":1793003098926}
{"kind":"job-created","at":1793003103938}
{"kind":"native-registry-authority","at":1793003103952,"rootHasAccount":true,"scopedHasAccount":true,"rootReadCurrent":true,"scopedReadCurrent":true}
{"kind":"scheduler-dispatch","at":1793003103952,"mode":"active-revocation"}
{"kind":"model-request","at":1793003111057}
{"kind":"tool-http","path":"<provider-prefix>/channels/<channel-A>","at":1793003111372}
{"kind":"pre-read-barrier","at":1793003111373}
{"kind":"revoke-requested","at":1793003111373}
{"kind":"revoked","at":1793003111436}
{"kind":"pre-read-released","at":1793003111436}
{"kind":"finished","at":1793003111458,"status":"error","error":"Cron job disabled by operator."}

Recorded HTTP/model/completion fields (redacted):

{
  "recordedHttpRequests": [
    {
      "method": "GET",
      "path": "<provider-prefix>/channels/<channel-A>",
      "authorizationMatches": true
    }
  ],
  "recordedModelObservation": {
    "requests": 1,
    "messageToolAdvertised": true
  },
  "recordedCompletion": {
    "action": "finished",
    "status": "error",
    "completionStatus": "failed",
    "deliveryStatus": "not-requested",
    "runAtMs": 1793003104963,
    "durationMs": 6450,
    "error": "Cron job disabled by operator."
  }
}

Assertion/interpretation boundary: The revoked marker is emitted after native cron.update returns enabled=false; its exact response is asserted but not separately serialized. The barrier/release markers are fixture instrumentation. This proves the tested disablement interleaving, not arbitrary in-flight revocation timing or outbound sends.

Terminal excerpt

Selected terminal lines from the same execution, with local paths redacted. Build warnings and most lifecycle cleanup lines are omitted here; terminal.redacted.log retains the full redacted log. The retained-namespace warning is preserved and is not converted into a cleanup guarantee.

 RUN  v5.0.5 <checkout>
 ✓ |gateway-server (gateway-server-parallel)| src/gateway/server.scoped-account-authority.product.test.ts > scheduled message actions > real scoped scheduled success 97451ms
 ✓ |gateway-server (gateway-server-parallel)| src/gateway/server.scoped-account-authority.product.test.ts > scheduled message actions > real scoped scheduled scoped-removed 22337ms
 ✓ |gateway-server (gateway-server-parallel)| src/gateway/server.scoped-account-authority.product.test.ts > scheduled message actions > real scoped scheduled active-revocation 26826ms
 Test Files  1 passed (1)
      Tests  3 passed (3)
   Start at  16:18:25
   Duration  406.12s (transform 57%, tests 36%, import 4%, worker 2%)
[vitest] retained temporary namespace <retained-test-namespace>; descendant completion is unverified on this non-group launch. Stop the remaining writers before removing this exact directory.
[vitest-workers] verifying completed generation before cleanup
[vitest-workers] retained completed compiler outputs for reuse
[test] passed 1 Vitest shard in 424.60s

Provenance

All digests are SHA-256 of the original, unredacted retained artifact bytes. Redacted bytes necessarily have different digests. No private local path is required to identify these source artifacts.

Original artifact SHA-256
active-revocation-trace.jsonl 6d8b24253876c05f8f6cc2ce1dd9e4349491e784ad48ea131f6e5e00834f0ecc
active-revocation.json cae9dc9d0c22429ee53fbdfdaf411640624a03ff1a0a793cc03587e202e5385b
scoped-removed-trace.jsonl 0fbee1a600a221d48e199958fac96f5c7663afd285cfb12db2317af12c1d9d53
scoped-removed.json 9da2dae39360638c172d4777bc7e008541f8eafbc9a2e24df5b3256a8a6f3ebc
success-trace.jsonl e2885a223fb171f18d4ea8dd2c699715923da281b588ee7ca25250fa7a3718b5
success.json 24b7f1e30d7a17fb203d331d7b7fa492bcaba5d9cf6e8c340037634508d9a0de
final-worktree-product.log 303e8d41ae623327f0819b3985fc12be1ea6d143d94db3c186f70024e79a5c46
final-worktree-product-validation.json 7dfa31afe6805bdfca5470d85dbad4760f44b9c8b2f6589fbe8fbc79331bd791
final-worktree-initial.json 8f7b7df064aff2b9dc04e04a437aa95fc454312fcf2cc7d39e397b866f7171be

Source binding to published content:

Repository path SHA-256
src/gateway/server.scoped-account-authority.product.test.ts 4007e0ecd2a79d188e1ea1a8bc6de2edf9f7e2af2ce67669ce588c778f4f5c14
test/helpers/cron/scoped-acceptance-runtime.ts bd45bbad240d43d1a1357da92372b7c6515262189fb02a1c53c9b3981c9b7fd5
src/agents/agent-tools.policy.ts e57f4b3fcb1fa82a2dc538a534fc9fccfb2cf691077ffc49a41cb3afc7fa908e
src/agents/agent-tools.policy.test.ts 154a40d29b51363efec8dfd71de906850f13d6094c65b56dfbdbc70ceb97b041
test/helpers/scheduled-message-read-model.ts 896dbe2635d5dc19dd61fc74b8bd2b3186dcb28f0b3682a25c1e06b0d363f488

The two added test files match the pre-run manifest and published blobs. The policy, original policy tests and model helper match both parent and published blobs. Each append JSONL also equals its scenario JSON trace array before redaction. The native wrapper completed its source verification. This is local runtime evidence, separate from the earlier 17 policy regressions and hosted CI. Maintainer authorization and security review remain required; this attachment grants neither.


Full redacted terminal log for PR #184164

This is the already recorded native test-wrapper log from the frozen staged candidate later committed unchanged as 0ced7be2a363c7ed259929f43146d594e1fa10f1; no post-commit rerun is claimed. Only local absolute paths and build-documentation URLs were replaced. Warnings, timings, all three test results and the retained-temporary-namespace limitation remain.

Original retained log SHA-256: 303e8d41ae623327f0819b3985fc12be1ea6d143d94db3c186f70024e79a5c46.
Redacted log SHA-256: 538bbd88935b2e42f7acb881d98b0d76df57f047609d04889864d1676a3a7179.

Complete redacted terminal output
[test] starting test/vitest/vitest.gateway-server.config.ts
[openclaw] Bun fork unavailable (unsupported platform win32-x64); using Node. Set OPENCLAW_VITEST_RUNTIME=node to silence.
下午4:18:15 [vite] (inline) warning: 
<checkout>/scripts/lib/tsx-cli-shim.mjs
76 |  export async function registerToolingTsx() {
77 |    configureToolingTsx();
78 |    await import(resolveTsxImport(SHIM_CHECKOUT_ROOT));
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 |  }
80 |  
The above dynamic import cannot be analyzed by Vite.
See <build-documentation-link> for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.

  Plugin: vite:import-analysis
  File: <checkout>/scripts/lib/tsx-cli-shim.mjs
下午4:18:23 [vite] (inline) warning: 
<checkout>/scripts/lib/tsx-cli-shim.mjs
76 |  export async function registerToolingTsx() {
77 |    configureToolingTsx();
78 |    await import(resolveTsxImport(SHIM_CHECKOUT_ROOT));
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79 |  }
80 |  
The above dynamic import cannot be analyzed by Vite.
See <build-documentation-link> for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.

  Plugin: vite:import-analysis
  File: <checkout>/scripts/lib/tsx-cli-shim.mjs

 RUN  v5.0.5 <checkout>

[vitest-workers] local cache miss after 17093ms
[vitest] still running with no output for 30000ms.
[vitest] still running with no output for 60000ms.
[vitest] still running with no output for 90000ms.
[INEFFECTIVE_DYNAMIC_IMPORT] packages/memory-host-sdk/src/host/session-files.ts is dynamically imported by packages/memory-host-sdk/src/host/openclaw-runtime-session.ts but also statically imported by packages/memory-host-sdk/src/engine-sessions.ts, dynamic import will not move module into another chunk.

[PLUGIN_TIMINGS] JavaScript callbacks ran for 61.6s of this 86.9s build (71%).
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
  - plugin openclaw:worker-build-inputs load (56%, 48.6s, 15501 calls)
  - plugin openclaw:discord-voice-package-boundary resolveId (4%, 3.3s, 212586 calls)
  - plugin openclaw:quickjs-package-boundary resolveId (1%, 1.3s, 212592 calls)
  - plugin openclaw:lancedb-package-boundary resolveId (1%, 1.3s, 212589 calls)
Additional callback time came from the callbacks below and from callbacks under 1s.
1 callback is listed without a time. Its calls overlapped, so the time inside one call includes work from other calls. To find its cost, profile the build with `node --cpu-prof`:
  - plugin tsdown:deps resolveId (32232 calls)
See <build-documentation-link> for more details.

[vitest] still running with no output for 120000ms.
[PLUGIN_TIMINGS] JavaScript callbacks ran for 4.0s of this 4.3s build (92%).
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
  - plugin openclaw:worker-build-inputs load (48%, 2.1s, 2142 calls)
Additional callback time came from the callbacks below and from callbacks under 1s.
1 callback is listed without a time. Its calls overlapped, so the time inside one call includes work from other calls. To find its cost, profile the build with `node --cpu-prof`:
  - plugin tsdown:deps resolveId (2616 calls)
See <build-documentation-link> for more details.

[PLUGIN_TIMINGS] JavaScript callbacks ran for 5.6s of this 6.0s build (94%).
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
  - plugin openclaw:worker-build-inputs load (44%, 2.6s, 2369 calls)
Additional callback time came from the callbacks below and from callbacks under 1s.
1 callback is listed without a time. Its calls overlapped, so the time inside one call includes work from other calls. To find its cost, profile the build with `node --cpu-prof`:
  - plugin tsdown:deps resolveId (3240 calls)
See <build-documentation-link> for more details.

[vitest] still running with no output for 150000ms.
node_modules\.pnpm\@[email protected][email protected]\node_modules\@mdx-js\mdx\lib\util\resolve-evaluate-options.js (48:0) [MODULE_LEVEL_DIRECTIVE] The semantics of the module level directive "" in "node_modules/.pnpm/@[email protected][email protected]/node_modules/@mdx-js/mdx/lib/util/resolve-evaluate-options.js" may not be preserved when bundling.
    ╭─[ node_modules/.pnpm/@[email protected][email protected]/node_modules/@mdx-js/mdx/lib/util/resolve-evaluate-options.js:48:1 ]
    │
 48 │ ''
    │ ─┬  
    │  ╰── module level directive may not be preserved
    │ 
    │ Help: For more information, see <build-documentation-link>
────╯

node_modules\.pnpm\@[email protected][email protected]\node_modules\@mdx-js\mdx\lib\util\estree-util-is-declaration.js (11:0) [MODULE_LEVEL_DIRECTIVE] The semantics of the module level directive "" in "node_modules/.pnpm/@[email protected][email protected]/node_modules/@mdx-js/mdx/lib/util/estree-util-is-declaration.js" may not be preserved when bundling.
    ╭─[ node_modules/.pnpm/@[email protected][email protected]/node_modules/@mdx-js/mdx/lib/util/estree-util-is-declaration.js:11:1 ]
    │
 11 │ ''
    │ ─┬  
    │  ╰── module level directive may not be preserved
    │ 
    │ Help: For more information, see <build-documentation-link>
────╯

node_modules\.pnpm\@[email protected][email protected]\node_modules\@mdx-js\mdx\lib\util\estree-util-create.js (6:0) [MODULE_LEVEL_DIRECTIVE] The semantics of the module level directive "" in "node_modules/.pnpm/@[email protected][email protected]/node_modules/@mdx-js/mdx/lib/util/estree-util-create.js" may not be preserved when bundling.
   ╭─[ node_modules/.pnpm/@[email protected][email protected]/node_modules/@mdx-js/mdx/lib/util/estree-util-create.js:6:1 ]
   │
 6 │ ''
   │ ─┬  
   │  ╰── module level directive may not be preserved
   │ 
   │ Help: For more information, see <build-documentation-link>
───╯

node_modules\.pnpm\[email protected][email protected]\node_modules\hast-util-to-estree\lib\handlers\text.js (9:0) [MODULE_LEVEL_DIRECTIVE] The semantics of the module level directive "" in "node_modules/.pnpm/[email protected][email protected]/node_modules/hast-util-to-estree/lib/handlers/text.js" may not be preserved when bundling.
   ╭─[ node_modules/.pnpm/[email protected][email protected]/node_modules/hast-util-to-estree/lib/handlers/text.js:9:1 ]
   │
 9 │ ''
   │ ─┬  
   │  ╰── module level directive may not be preserved
   │ 
   │ Help: For more information, see <build-documentation-link>
───╯

node_modules\.pnpm\[email protected][email protected]\node_modules\hast-util-to-estree\lib\handlers\comment.js (12:0) [MODULE_LEVEL_DIRECTIVE] The semantics of the module level directive "" in "node_modules/.pnpm/[email protected][email protected]/node_modules/hast-util-to-estree/lib/handlers/comment.js" may not be preserved when bundling.
    ╭─[ node_modules/.pnpm/[email protected][email protected]/node_modules/hast-util-to-estree/lib/handlers/comment.js:12:1 ]
    │
 12 │ ''
    │ ─┬  
    │  ╰── module level directive may not be preserved
    │ 
    │ Help: For more information, see <build-documentation-link>
────╯

[vitest] still running with no output for 180000ms.
[vitest-workers] prepared 63006a5fa3a2 in 183913ms (17964 inputs, 22642 outputs)
[vitest] still running with no output for 30000ms.
[vitest] still running with no output for 60000ms.
[vitest] still running with no output for 90000ms.
[gateway] startup phase: gateway.server-start-import starting total=296184.7ms
[gateway] startup phase: gateway.server-start-import 4071.2ms total=300255.9ms start=296184.7ms
[vitest] still running with no output for 30000ms.
 ✓ |gateway-server (gateway-server-parallel)| src/gateway/server.scoped-account-authority.product.test.ts > scheduled message actions > real scoped scheduled success 97451ms
[gateway] startup phase: gateway.server-start-import starting total=358764.9ms
[gateway] startup phase: gateway.server-start-import 0.1ms total=358764.9ms start=358764.9ms
 ✓ |gateway-server (gateway-server-parallel)| src/gateway/server.scoped-account-authority.product.test.ts > scheduled message actions > real scoped scheduled scoped-removed 22337ms
[gateway] startup phase: gateway.server-start-import starting total=381400.8ms
[gateway] startup phase: gateway.server-start-import 0.1ms total=381400.9ms start=381400.8ms
stderr | unknown test
 ✓ |gateway-server (gateway-server-parallel)| src/gateway/server.scoped-account-authority.product.test.ts > scheduled message actions > real scoped scheduled active-revocation 26826ms
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.agentDatabaseReaders
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.sqliteWalCheckpointListeners
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDatabaseLifecycle
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateSnapshotOwners
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateReadWorkers
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.plugin-state
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.pluginStatePublication
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.pluginStateObservationCache
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.sqliteWorkerBroker
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.personal-model-credentials
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.auth-profile-credentials
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.agentDatabaseLifecycle
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.sharedStateWorkerOwner
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.github-publication
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.repository-workspace
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.sessionDiskBudgetWorkers
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.exec-approvals
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.sessionStateNotices
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.workspace-state
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.stateDomainPublication.sandbox-registry
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.sessionGroupCatalog
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.devicePairSetupChanges
[sqlite-test-lifecycle] src\gateway\server.scoped-account-authority.product.test.ts: retiring openclaw.devicePairingPublications


 Test Files  1 passed (1)
      Tests  3 passed (3)
   Start at  16:18:25
   Duration  406.12s (transform 57%, tests 36%, import 4%, worker 2%)

[vitest] retained temporary namespace <retained-test-namespace>; descendant completion is unverified on this non-group launch. Stop the remaining writers before removing this exact directory.
[vitest-workers] verifying completed generation before cleanup
[vitest-workers] retained completed compiler outputs for reuse
[test] passed 1 Vitest shard in 424.60s

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The existing recorded runtime evidence requested by the latest review is now attached: three scenario traces plus the complete redacted terminal log. The PR body links it. Head remains 0ced7be2a363c7ed259929f43146d594e1fa10f1; no source changes or test rerun were needed.

The attachment includes the observed authorized GETs, scoped rejection with zero recorded requests, and active disablement before message retrieval, with original hashes and source-content binding. It distinguishes observed records from assertions and retains the fixture, read-effect and cleanup limitations. Maintainer authorization remains required.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@igs-rogenlo
igs-rogenlo marked this pull request as ready for review October 26, 2026 10:26
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Maintainer security review required

This external contributor PR changes sensitive security components. A maintainer must review these changes before merging.

Current SHA: e57553b0766c3eb49163e1903ff122791a1ac4f8

These sensitive security changes were made:

  • src/agents/agent-tools.policy.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

After reviewing the changes, post a new PR comment containing only approval commands, each on its own line:

/allow-security-sensitive-change

A later push requires a fresh approval comment.

@igs-rogenlo
igs-rogenlo force-pushed the fix/scoped-channel-account-policy branch from 73960b1 to e57553b Compare November 25, 2026 07:49
@igs-rogenlo

Copy link
Copy Markdown
Contributor Author

This is ready for the maintainer security review of src/agents/agent-tools.policy.ts (a two-line production change). ClawSweeper's review of 0ced7be2 reported no findings and rated the proof sufficient; its only open item was this security approval. Since then, the branch gained only two test-only commits (a regression-ratchet alignment and a test-line allocation) and this rebase.

GitHub reported a conflict with main, so I rebased onto 79e42e0877d9. The only conflict was the generated config/test-mock-exports-baseline.txt: main and this branch each removed a different grandfathered entry for agent-tools.policy.test.ts, and neither entry is needed after the rebase. The production lines and tests are unchanged. On the rebased head, agent-tools.policy.test.ts passes 20/20 locally (18/20 with main's unmodified policy file), and the three Gateway product cases and the mock-export and test-line ratchets pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-review-required security-sensitive-changed size: L status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant