fix(compact): preserve active skill recovery state - #1744
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a8cd360d7
ℹ️ 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".
3b31ba8 to
dac7dfe
Compare
|
Thanks for continuing to dig into the post-compaction stall class — the replay-safety core here (treating completed
Suggestion: extract the |
|
Status check: the 08-16 verdict was effectively 'split this PR' — that's a restructure decision, not a mechanical rebase, and it's been quiet since. Are you up for extracting the replay-safety core into its own PR, or should we close this one and track the pieces separately? |
dac7dfe to
ac91091
Compare
|
Warning Review limit reached
Next review available in: 10 minutes Limit details: You’ve used all 3 included reviews currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
Comment |
Rebased onto current main; squashed the branch's review-iteration commits. Dropped the branch's account-neutral owner-switch slice: main now pins account-neutral recovery and file-pinned requests to their owner (Soju06#1680, Soju06#1761), and this branch reversed that. The compaction, tool-search pair and replay-projection work is unchanged.
ac91091 to
1bb423d
Compare
|
Thanks for the rebase — CI is green and the branch is clean against current main now, so I've removed the needs-rebase label. The replay-safety core (compaction self-containment, the pre-compaction boundary guard, the tool-search pair handling, and the pending-tool-manifest safe-context extension) still looks solid and well tested. However, most of the 08-16 review items survive verbatim at this head, so I can't merge it as-is:
Concretely: narrow this PR to the replay_safety.py work plus its unit tests and the pending-tool-manifest wiring in |
Summary
<skill>...</skill>blocks as compact-trimming state anchorsRoot Cause
Remote compaction can return only the encrypted compaction item. Active skill mode is runtime state carried in
<skill>...</skill>blocks, so trimming or normalizing compact output without that state leaves the next turn aware of the skill catalog but not of the currently active skill.Validation
python -m pytest -q tests/unit/test_openai_requests.py -k 'active_skill_context_anchor or plain_skill_catalog_mentions or preserves_codex_goal_context_anchor or poisoned_local_compact or compaction'python -m pytest -q tests/integration/test_proxy_compact.py -k 'normalizes_summary_output_for_codex_remote_v2 or adds_active_skill_recovery_context'python -m pytest -q tests/integration/test_proxy_responses.py -k 'compaction_trigger'codex-lbemitssource="remote_compaction_v2_recovery",A remote compaction just happened,<active_skill_context>, and<name>grill-me</name>for an active grill-me compact payload