Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 24, 2026, 9:44 PM ET / August 25, 2026, 01:44 UTC. ClawSweeper reviewWhat this changesThis PR carries a host-created Codex Gateway shell alias into cron authority storage and projects it back to script-facing Regression provenancePossible regression — suspected (reproduction). No predecessor PR is attributed. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 7 items remain Keep open: the branch addresses the reported cron failure, but its authority-chain proof is still insufficient for a Gateway-pinned shell capability and the required direct Codex source audit could not run because Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherCodex exposes runtime-specific dynamic tools during an agent turn, while cron persists a restricted tool allowance and later rebuilds a trigger-script runtime. The new binding is intended to preserve only a creator-approved Gateway shell projection across that boundary. flowchart LR
A[Codex agent turn] --> B[Host-created shell alias]
B --> C[Cron authority capture]
C --> D[SQLite authority record]
D --> E[Cron trigger runtime]
E --> F[Validate saved binding]
F --> G[Gateway-pinned exec]
F --> H[Reject unbound alias]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The code fails closed in several constructed cases, but the authority-bearing Codex-to-cron final-effect boundary lacks real managed-runtime proof. PR surfaceSource +684, Tests +676, Generated +1, Other -1. Total +1360 across 33 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Demonstrate one managed Codex-created cron job through persistence and trigger execution, showing Gateway-pinned success and rejection of the nearest same-name non-Codex issuer before any filesystem side effect, then complete the exact pinned Codex source audit. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main passes Is this the best way to solve the issue? Unclear: the host-issued capture and sealed persistence are a plausible owner-boundary repair, but the best-fix claim remains unproven until a real Codex-created binding survives the full cron path and its nearest forbidden counterpart is rejected. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b840a3c84e2c. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
913c0c4 to
a94e330
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
a94e330 to
f96d3e7
Compare
|
Addressed the producer-binding finding in
Please re-review the current head, especially the producer-bound authority path. |
f96d3e7 to
ab8c339
Compare
|
@clawsweeper re-review Addressed both P1 merge risks on
Please re-review the current head, especially downgrade-era stale-binding rejection and the exact Codex contract evidence in the PR body. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
ab8c339 to
d47c8b0
Compare
|
@clawsweeper re-review Updated head Fresh proof:
Please review the exact new head, including the downgrade sidecar seal and direct Codex |
|
🦞👀 Re-review progress:
|
91c2627 to
884df9d
Compare
|
@clawsweeper re-review Exact head: Both current findings are addressed:
Validation: 108/108 focused tests, core production typecheck, targeted lint, formatting, and branch autoreview passed. Please review this exact head, especially predecessor-schema recovery and the allowed/invalidated final-effect boundary. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
884df9d to
0a478da
Compare
|
@clawsweeper re-review Exact head: Resolved the new P1:
Validation on the exact rebased head: 109/109 focused tests, core typecheck, targeted lint/format, diff checks, TruffleHog, and branch autoreview passed. The PR body accurately records that an unmanaged standalone runtime attempt was inconclusive and is not claimed as proof. Please review this exact head, especially rejection of unsealed predecessor bindings. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Superseded by #130579, which replaces the sealed-binding approach with capture-time canonicalization: Codex gateway shell aliases are recorded in the persisted |
Related: #92238
What Problem This Solves
Fixes cron triggers created from a Codex-backed turn failing with
Unknown tool id: execwhen they use the documentedexec(...)contract.It also preserves the creator's execution boundary: a Codex Gateway alias must remain Gateway-pinned, and an unrelated tool that happens to use the same name must not acquire shell authority.
Why This Change Was Made
Codex exposes constrained shell capabilities under runtime-specific names such as
gateway_exec. Creator capture records a host-owned scheduled-tool binding from the concrete Codex alias object.At trigger evaluation, cron projects a runtime-specific name to script-facing
execorprocessonly when that validated binding is present. Reconstructed exec remains pinned tohost: gateway; host, node, security, and approval overrides are removed from its schema and ignored at runtime. A raw or collidinggateway_execname without the producer-bound binding fails closed.The original four-key
authority_jsonshape remains unchanged for older readers. Bindings are stored in a nullabletool_bindings_json TEXTsidecar column and sealed to the exact authority JSON with SHA-256. Older upserts omit and preserve that column. If an older writer replaces the authority, the seal no longer matches and the new reader retires the authority instead of attaching stale shell authority.Predecessor tables without the sidecar load only the shipped four-key authority envelope. Inline
toolBindingsare rejected as unsealed input and trigger fail-closed recovery; they are never converted into executable authority. Writable recovery adds the nullable column in the recovery transaction before recordingrecovery_required. Read-only loads never mutate the database.Node and sandbox aliases remain unavailable because their exact creator-time bindings cannot be reconstructed safely.
This PR is AI-assisted. I reviewed the implementation and validation results and understand the change.
User Impact
Cron triggers created from a Gateway-pinned Codex session can call
exec(...)without manually widening the job's tool allowlist. The command remains pinned to the Gateway even when cron's configured default exec host differs. Same-name non-Codex tools, unsealed predecessor bindings, stale downgrade-era bindings, node aliases, and sandbox aliases fail closed.Evidence
Before the fix, automation
9fed2dac-f5fc-431d-903f-8479b1cf279drecorded five consecutive trigger-evaluation failures withUnknown tool id: exec; no payload turn ran.Validation on commit
0a478dac8df:toolBindingsis durably retired withrecovery_required = 1; the trigger cannot resolveexec, and filesystem verification returnsENOENTfor the forbidden marker.table cron_job_runtime_authorities has no column named tool_bindings_json; after the repair it adds the sidecar and durably records recovery.execand wrote anallowedmarker. After changing persistedauthority_jsonso the sidecar seal no longer matched, reload removed runtime authority and recorded recovery; rerunning the samegateway_exec-capped job returnedexec is not defined, and filesystem verification returnedENOENTfor the forbidden marker.pnpm check:changed -- src/cron/store/runtime-authority-store.ts src/cron/store.test.tspassed every lane through core-test typechecking. Its aggregate core-test typecheck was blocked by this worktree's pre-existing shared dependency mismatch:ui/vite.config.tscould not find thepakodeclaration. The changed tests compile and pass under Vitest.A standalone unmanaged production-module attempt was discarded: trigger shell execution did not complete without the managed Gateway lifecycle. No result from that attempt is claimed as proof.
Direct Codex contract inspection used the exact pinned
@openai/codex0.148.0 source: tagrust-v0.148.0, commit3ba0f711642a888aec92a611a3f3b2211157ff89.dynamic_tools.rs:21-55defines registration with name/description/schema/defer and call delivery with call ID, turn ID, optional namespace, tool name, and arguments—no producer identity.thread_processor.rs:326-351validates exact names and rejects duplicates within a namespace.dynamic.rs:50-81constructs the runtime tool identity from namespace and name;dynamic.rs:135-142dispatches that identity.dynamic.rs:171-204reduces the event to namespace, name, and arguments;bespoke_event_handling.rs:991-999forwards those same fields.The exact pinned runtime therefore does not carry OpenClaw producer identity after registration. OpenClaw must capture the binding from the concrete producer tool before the protocol reduces it to name/namespace.