fix(commitments): isolate extraction batches by agent#104426
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21a3627178
ℹ️ 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".
|
|
||
| ### Fixes | ||
|
|
||
| - **Commitment extraction agent isolation:** partition background extraction batches by agent so prompts, provider credentials, extractor sessions, and terminal-failure cooldowns never cross agent boundaries. |
There was a problem hiding this comment.
Remove the normal-fix changelog entry
For a normal code fix, this CHANGELOG.md edit trips the repo's release-owned changelog gate: scripts/pr-lib/common.sh keeps changelogs optional for changed files, and scripts/pr-lib/gates.sh exits on any root changelog update unless OPENCLAW_ALLOW_ROOT_CHANGELOG_PR=1 is set for explicit release automation or maintainer release closeout. Put this release-note text in the commit/PR body instead so standard prepare/merge runs do not fail.
Useful? React with 👍 / 👎.
|
Codex review: stale review; fresh review needed. Summary Next step |
|
Land-ready proof:
Known proof gaps: none for the changed queue/runtime contract. |
|
Merged via squash.
|
* fix(commitments): isolate extraction batches by agent * chore: leave release notes to release workflow
Closes #104425
What Problem This Solves
Fixes an issue where operators using commitment extraction with multiple agents could have one agent's conversation included in an extraction prompt executed and persisted under another agent's identity when turns completed in the same debounce window.
Why This Change Was Made
The background drain now selects up to the configured batch limit from the first queued agent only, preserving other agents' queue order. Terminal model or authentication failures remain scoped to the failing agent and re-arm the drain when unaffected agents still have queued work.
User Impact
Commitment extraction prompts, provider credentials, workspaces, extractor session files, and terminal-failure cooldowns no longer cross agent boundaries. Commitments remain opt-in.
Evidence
tbx_01kx8dd1pzazvc53t9d73rwgwx:corepack pnpm test src/commitments/runtime.test.ts— 14/14 passed.corepack pnpm check:changed— passed core and core-test typechecks, changed-file lint, import-cycle, database-first, and guard checks.oxfmt --check— passed.gpt-5.5, high): first pass found the timer re-arm gap; fixed and re-proven. Final pass: no accepted/actionable findings.AI-assisted: yes. The implementation and proof were inspected and understood by the maintainer agent.