fix: bind runnable Codex workspaces to the installed kit#562
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5319550148
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| workspace_id, run_id, request_workspace_prefix = self._submission_identities( | ||
| request_id, fingerprint | ||
| ) | ||
| authority = classify_workspace_authority(target) |
There was a problem hiding this comment.
Reject reused init-web request IDs before target writes
When the same request_id is submitted again with a changed workspace_target that points to a fresh directory, this target-only authority check skips the existing-store conflict path and proceeds to create_workspace, committing a second runnable workspace instead of returning submission_replay_conflict with zero writes. The old request-id guard rejected changed payloads before resolving the target, and the module contract still promises that same-request changed payloads conflict, so the replay/conflict record needs to be keyed by request namespace before any new target can be written.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9986ddcd5a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| WorkspaceBootstrap(args.workspace).install_codex_kit( | ||
| dry_run=dry_run | ||
| ), | ||
| *( |
There was a problem hiding this comment.
Defer writes until all runtime kits are validated
When runtime install --runtime all is run and a later phase cannot be planned or written (for example, a packaged install without source-clone OpenCode/Claude assets, or a user-owned Claude file conflict), this first list element eagerly installs the Codex kit before the subsequent installers run, so the command returns 1 after already modifying the workspace. The previous single installer path validated all planned writes before applying any, so all should preserve that zero-write-on-failure behavior by planning/validating every runtime before materializing earlier kits.
AGENTS.md reference: AGENTS.md:L142-L147
Useful? React with 👍 / 👎.
Summary
init --forcebefore any workspace write when SQLite authority already existsInvariant
A committed runnable-workspace receipt is returned only after the workspace Codex kit has been materialized, exact-inventory verified, bound into SQLite from those workspace bytes, and reverified after commit.
Non-goals
Focused evidence