Skip to content

fix(cron): preserve Codex trigger exec authority - #126496

Closed
jalehman wants to merge 9 commits into
mainfrom
fix/cron-trigger-codex-exec-alias
Closed

jalehman wants to merge 9 commits into
mainfrom
fix/cron-trigger-codex-exec-alias

Conversation

@jalehman

@jalehman jalehman commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Related: #92238

What Problem This Solves

Fixes cron triggers created from a Codex-backed turn failing with Unknown tool id: exec when they use the documented exec(...) 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 exec or process only when that validated binding is present. Reconstructed exec remains pinned to host: gateway; host, node, security, and approval overrides are removed from its schema and ignored at runtime. A raw or colliding gateway_exec name without the producer-bound binding fails closed.

The original four-key authority_json shape remains unchanged for older readers. Bindings are stored in a nullable tool_bindings_json TEXT sidecar 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 toolBindings are 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 recording recovery_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-8479b1cf279d recorded five consecutive trigger-evaluation failures with Unknown tool id: exec; no payload turn ran.

Validation on commit 0a478dac8df:

  • Focused persistence, trigger, read-only compatibility, and Codex capture suites: 109/109 tests passed.
  • A shipped four-key predecessor row loads without bindings in both read-only and writable paths.
  • An unsealed predecessor row containing inline toolBindings is durably retired with recovery_required = 1; the trigger cannot resolve exec, and filesystem verification returns ENOENT for the forbidden marker.
  • The predecessor-schema recovery regression failed before the repair with table cron_job_runtime_authorities has no column named tool_bindings_json; after the repair it adds the sidecar and durably records recovery.
  • Sealed persisted-authority final-effect proof: the allowed restored binding executed Gateway-pinned exec and wrote an allowed marker. After changing persisted authority_json so the sidecar seal no longer matched, reload removed runtime authority and recorded recovery; rerunning the same gateway_exec-capped job returned exec is not defined, and filesystem verification returned ENOENT for the forbidden marker.
  • Core production typecheck passed.
  • Targeted core lint passed with 0 warnings/errors; focused formatting and diff checks passed.
  • pnpm check:changed -- src/cron/store/runtime-authority-store.ts src/cron/store.test.ts passed 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.ts could not find the pako declaration. The changed tests compile and pass under Vitest.
  • Exact rebased branch autoreview reported no accepted/actionable findings and rated the patch correct at 0.97 confidence; TruffleHog was clean.

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/codex 0.148.0 source: tag rust-v0.148.0, commit 3ba0f711642a888aec92a611a3f3b2211157ff89.

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.

@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@jalehman
jalehman marked this pull request as ready for review August 20, 2026 00:55
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 20, 2026
@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 24, 2026, 9:44 PM ET / August 25, 2026, 01:44 UTC.

ClawSweeper review

What this changes

This PR carries a host-created Codex Gateway shell alias into cron authority storage and projects it back to script-facing exec for eligible trigger scripts.

Regression provenance

Possible 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 ../codex is absent.

Priority: P1
Reviewed head: 179cb1b4cbc9f59aefec4c3d745526b728e235fb

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch has thoughtful focused coverage, but its sensitive authority path has not been proven in the real managed Codex and Gateway flow.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Authority-chain proof required: focused tests exercise constructed authority rows and trigger effects, but the PR body contains no inspectable managed-Gateway run beginning with a Codex-created binding and showing a forbidden colliding issuer stopped before filesystem I/O. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Authority-chain proof required: focused tests exercise constructed authority rows and trigger effects, but the PR body contains no inspectable managed-Gateway run beginning with a Codex-created binding and showing a forbidden colliding issuer stopped before filesystem I/O. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 9 items Current trigger path: The branch maps a validated saved alias to exec and pins that reconstructed tool to Gateway execution.
Gateway caller propagation: Gateway cron evaluation passes each stored job's runtime authority into trigger evaluation.
Host-bound issuer: The capability factory accepts only exec/process tools created by the exact active host capability before creating a scheduled projection.
Findings None None.
Security Needs attention Prove the managed Codex authority chain: The changed test constructs runtimeAuthority directly, so it does not establish that a real Codex producer binding is captured, persisted, and rejected for the nearest colliding issuer before shell I/O.

Live Verification

Command: pnpm openclaw cron --help

Result: PASS (completed)

pnpm openclaw cron --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126496-Bz5Mrj/target$ pnpm openclaw cron --help
$ node scripts/run-node.mjs cron --help
pnpm openclaw cron --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 107.19 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https:/
… output truncated …
eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 14.5s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 4453ms (slowest: built plugin control-plane loads 3633ms)
│
◇

OpenClaw 2026.8.1 (179cb1b) — All your chats, one OpenClaw.

Usage: openclaw cron|automations [options] [command]

Manage automations (via Gateway)

Options:
  --expect-final         Wait for final response (agent) (default: false)
  -h, --help             Display help for command
  --password ‹password›  Gateway password (if required)
  --port ‹port›          Local Gateway port
  --timeout ‹ms›         Timeout in ms (default: "30000")
  --token ‹token›        Gateway token (if required)
  --url ‹url›            Gateway WebSocket URL (defaults to gateway.remote.url when configured)

Commands:
  add                    Add an automation
  disable                Disable an automation
  edit                   Edit an automation (patch fields)
  enable                 Enable an automation
  get                    Get an automation as JSON
  list                   List automations
  rm                     Remove an automation
  run                    Run an automation now (debug)
  runs                   Show automation run history
  scratch                Read or replace an automation's private scratch
  show                   Show an automation
  status                 Show automations scheduler status

Docs: docs.openclaw.ai/cli/cron
Upgrade tip: run ˋopenclaw doctor --fixˋ to normalize legacy automation storage.

runner@runnervm76f27:/tmp/clawsweeper-live-proof-126496-Bz5Mrj/target$ pnpm openclaw cron --help


Assertions:

  • PASS expect_output: cron

How this fits together

Codex 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]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Authority-chain proof required: focused tests exercise constructed authority rows and trigger effects, but the PR body contains no inspectable managed-Gateway run beginning with a Codex-created binding and showing a forbidden colliding issuer stopped before filesystem I/O. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve security concern: Prove the managed Codex authority chain - The changed test constructs runtimeAuthority directly, so it does not establish that a real Codex producer binding is captured, persisted, and rejected for the nearest colliding issuer before shell I/O.
  • Resolve merge risk (P1) - A persisted binding can authorize Gateway shell execution after a later cron trigger, but no inspectable managed-Codex-to-cron run proves the allowed and nearest forbidden paths before filesystem I/O.
  • Resolve merge risk (P1) - The additive SQLite sidecar changes downgrade and recovery behavior for existing cron authority rows; focused tests cover cases, but an upgrade-path run remains unproven.
  • Resolve merge risk (P1) - The branch adds net production code for a bug fix across the host capability, SDK, cron storage, and trigger layers; that scope needs the authority proof to establish that the added boundary is necessary.
  • Resolve merge risk (P1) - The required direct inspection of the pinned Codex source could not be completed because the sibling checkout is unavailable; PR-body links are useful context but do not satisfy repository policy for this review.
  • Complete next step (P2) - This maintainer-labeled PR needs human review of the managed authority proof and direct Codex contract audit; no narrow automated repair can manufacture that evidence.

Findings

  • [medium] Prove the managed Codex authority chain — src/cron/trigger-script.test.ts:95
Agent review details

Security

Needs 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 surface

Source +684, Tests +676, Generated +1, Other -1. Total +1360 across 33 files.

View PR surface stats
Area Files Added Removed Net
Source 21 935 251 +684
Tests 10 901 225 +676
Docs 0 0 0 0
Config 0 0 0 0
Generated 1 1 0 +1
Other 1 0 1 -1
Total 33 1837 477 +1360

Review metrics

Metric Value Why it matters
Production versus test LOC production +935/-251 (net +684); tests +901/-225 (net +676); generated/baseline +1/-1 This is substantial production growth for a bug fix spanning an authority and persistence boundary, so end-to-end proof is material before merge.

Stored data model

Persistent data-model change detected: serialized state: src/cron/runtime-authority-input.ts, serialized state: src/cron/service/state.ts, serialized state: src/cron/store.test.ts, serialized state: src/state/openclaw-state-db.generated.d.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #92238
Summary: This PR is a candidate fix for the reported Codex-backed isolated-cron exec failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Add managed authority-chain proof (recommended)
    Run the real Codex host, cron creation, persistence reload, and trigger path for an allowed binding and the nearest colliding issuer, with redacted final-effect evidence.
  2. Pause for source-contract review
    Do not merge until a reviewer directly inspects the pinned Codex dynamic-tool protocol and confirms the captured producer identity cannot be recovered later.

Technical review

Best 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 gateway_exec as an allowlist name into the trigger tool construction without projecting it to the core exec tool, while the branch adds that projection.

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.

Labels

Label justifications:

  • P1: The linked report describes an isolated cron workflow that cannot use its expected shell capability.
  • merge-risk: 🚨 compatibility: The PR adds a same-version SQLite sidecar and changes how existing cron authority rows are loaded, retained, and retired.
  • merge-risk: 🚨 security-boundary: Saved tool metadata can determine whether a later cron trigger receives Gateway-pinned shell execution.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Authority-chain proof required: focused tests exercise constructed authority rows and trigger effects, but the PR body contains no inspectable managed-Gateway run beginning with a Codex-created binding and showing a forbidden colliding issuer stopped before filesystem I/O. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Prove the managed Codex authority chain — src/cron/trigger-script.test.ts:95
    The changed test constructs runtimeAuthority directly, so it does not establish that a real Codex producer binding is captured, persisted, and rejected for the nearest colliding issuer before shell I/O.
    Confidence: 0.94

What I checked:

Likely related people:

  • joshavant: Authored a prior main-branch migration of cron scheduled-authority provenance. (role: prior scheduled-authority contributor; confidence: high; commits: bd559a98edc3; files: src/cron/trigger-script.ts, src/cron/store/runtime-authority-store.ts)
  • steipete: Has substantial sampled history in the affected cron and agent execution paths, including recent cron runtime work. (role: recent cron-area contributor; confidence: medium; commits: 2abe2e29bb46, 98742bc2c7f2; files: src/cron/trigger-script.ts, src/agents/harness/host-capability.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Post redacted managed-Gateway evidence for a Codex-created job reaching Gateway-pinned exec after persistence reload.
  • In the same proof, show the nearest same-name non-Codex source cannot reach filesystem I/O.
  • Complete direct inspection of the exact pinned Codex source before treating the protocol claim as merge-ready.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-21T18:41:35.766Z sha ab8c3398bbca18d0fde2a5195cd9f14b79c0a42e :: found issues before merge. :: [P1] Preserve scheduled bindings through tool normalization
  • reviewed 2026-08-21T19:01:20.453Z sha 5bbf4d1 :: found issues before merge. :: [P1] Preserve scheduled bindings through schema normalization
  • reviewed 2026-08-24T19:22:43.161Z sha 62f63c3a328fe346a210cb40c6b513ab51173fcc :: needs changes before merge. :: [P1] Read legacy authority rows without selecting the new column
  • reviewed 2026-08-24T19:55:53.427Z sha 91c2627943916336bdb05932558867338139e818 :: needs real behavior proof before merge. :: [P1] Ensure the sidecar before retiring legacy authority
  • reviewed 2026-08-24T20:13:36.541Z sha 884df9dd3674f3f6a56187ff451b68e1653c349f :: needs real behavior proof before merge. :: [P1] Reject unsealed bindings from predecessor authority rows
  • reviewed 2026-08-24T20:57:14.439Z sha 0a478da :: needs real behavior proof before merge. :: [P1] Keep scheduled exec binding host-minted
  • reviewed 2026-08-24T23:13:22.966Z sha 46312a4 :: needs real behavior proof before merge. :: [P1] Bind sealed projections to the source execution
  • reviewed 2026-08-24T23:56:18.564Z sha 46312a4 :: needs real behavior proof before merge. :: [P1] Keep scheduled-tool sealing private to the Codex host path

@jalehman
jalehman force-pushed the fix/cron-trigger-codex-exec-alias branch from 913c0c4 to a94e330 Compare August 21, 2026 00:53
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M and removed size: S labels Aug 21, 2026
@jalehman jalehman changed the title fix(cron): prevent exec failures in Codex-created triggers fix(cron): preserve Codex trigger exec authority Aug 21, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jalehman
jalehman force-pushed the fix/cron-trigger-codex-exec-alias branch from a94e330 to f96d3e7 Compare August 21, 2026 17:27
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: L and removed size: M labels Aug 21, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

Addressed the producer-binding finding in f96d3e72eae.

  • Codex Gateway aliases now carry a host-owned scheduled-tool binding from the concrete tool object.
  • Cron persists that binding in the existing private runtime-authority envelope.
  • Trigger projection requires the persisted binding; a raw or colliding gateway_exec name fails closed.
  • Added collision and durable round-trip regression coverage.
  • Post-rebase focused suite: 118 passed. check:changed, build, autoreview, and TruffleHog are clean.
  • Direct Codex registration/dispatch contract inspected at 97729885d4707a123db31ae80f5fb0eeda6b7706.

Please re-review the current head, especially the producer-bound authority path.

@jalehman jalehman self-assigned this Aug 21, 2026
@jalehman
jalehman force-pushed the fix/cron-trigger-codex-exec-alias branch from f96d3e7 to ab8c339 Compare August 21, 2026 18:34
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed both P1 merge risks on ab8c3398bbc.

  • Downgrade compatibility: authority_json retains the original four-key shape. Bindings moved to a bare nullable sidecar column sealed to the exact authority JSON. The older upsert shape preserves valid bindings; any older authority rewrite makes the seal fail and retires authority.
  • Exact Codex proof: inspected pinned @openai/codex 0.148.0 at tag rust-v0.148.0, commit 3ba0f711642a888aec92a611a3f3b2211157ff89. Registration and dispatch preserve name/optional namespace only; no producer identity crosses the protocol.
  • Lint CI: removed the unnecessary boolean literal comparison. Full core and extension lint pass with 0 warnings/errors.
  • Validation: 164 focused tests, build, generated schema checks, remaining database/import guards, and P1 branch autoreview pass.

Please re-review the current head, especially downgrade-era stale-binding rejection and the exact Codex contract evidence in the PR body.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Aug 21, 2026
@jalehman
jalehman force-pushed the fix/cron-trigger-codex-exec-alias branch from ab8c339 to d47c8b0 Compare August 21, 2026 18:47
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated head d47c8b00d20538646204aa23ffc16a5820f0971f also fixes the CI regression exposed by the new first-use authority sidecar column. The read-only compatibility fixture now skips additive-column downgrades for tables absent from the historical base shape, matching production compatibility semantics.

Fresh proof:

  • the two previously failing src/claws/read-only-state-compat.test.ts cases pass;
  • focused authority/storage/trigger/Codex/read-only suites pass;
  • core test typecheck and focused lint/format pass;
  • P1 autoreview is clean.

Please review the exact new head, including the downgrade sidecar seal and direct Codex rust-v0.148.0 source proof documented in the PR body.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 24, 2026
@jalehman
jalehman force-pushed the fix/cron-trigger-codex-exec-alias branch from 91c2627 to 884df9d Compare August 24, 2026 20:07
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 884df9dd36796d239b53f355ef9101ea1d6091a9.

Both current findings are addressed:

  • Predecessor-schema recovery now adds tool_bindings_json in the writable recovery transaction before the fail-closed recovery upsert. The regression failed before the fix with no column named tool_bindings_json and now proves the row is durably retired with recovery_required = 1.
  • Final-effect authority proof now starts from persisted authority: the allowed binding creates the expected file through Gateway-pinned exec; after persisted authority invalidation, reload revokes the binding, the same job cannot resolve exec, and the forbidden file remains absent (ENOENT).
  • The PR body now links the exact pinned Codex rust-v0.148.0 source at commit 3ba0f711642a888aec92a611a3f3b2211157ff89, showing registration and dispatch retain namespace/name/arguments but no producer identity.

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.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jalehman
jalehman force-pushed the fix/cron-trigger-codex-exec-alias branch from 884df9d to 0a478da Compare August 24, 2026 20:52
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Exact head: 0a478dac8df6e7686c3e5deee25ca5b4af470384.

Resolved the new P1:

  • Removed the no-sidecar conversion that trusted inline toolBindings.
  • Predecessor tables now accept only the shipped four-key authority envelope; unsealed inline bindings fail closed and are durably retired.
  • Added final-effect rejection proof: the unsealed binding cannot expose exec, and its forbidden marker remains absent.
  • Retained sealed-sidecar allowed/invalidation proof and predecessor-column recovery coverage.
  • Personally re-inspected exact pinned Codex 0.148.0 source at 3ba0f711642a888aec92a611a3f3b2211157ff89; public permalinks remain in the PR body.

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.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@jalehman
jalehman requested a review from a team as a code owner August 24, 2026 23:07
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 24, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 25, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

Superseded by #130579, which replaces the sealed-binding approach with capture-time canonicalization: Codex gateway shell aliases are recorded in the persisted toolsAllow cap under their canonical tool names (exec/process) via an object-identity projection registry, plus a restrict-only toolsAllowExecTarget pin that needs no integrity seal and no SQLite schema change. The successor carries a full managed-gateway live proof (real Codex-backed creator turn, persisted-row inspection, gateway-pinned trigger effect, and a fail-closed colliding-issuer case) and the direct Codex source audit at the currently pinned rust-v0.149.1. Leaving this PR open for the author to close.

@jalehman jalehman closed this Aug 27, 2026
@RomneyDa
RomneyDa deleted the fix/cron-trigger-codex-exec-alias branch October 22, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant