fix(coding-agent): harden compaction lifecycle ownership#325
Closed
minpeter wants to merge 10 commits into
Closed
Conversation
Contributor
Author
|
Superseded by the actual upstream merge of #310 plus its one-commit follow-up #326: #326. PR #310 advanced and merged while this replacement was being verified, already incorporating the lifecycle/overflow/hook review fixes; #326 contains only the remaining merged-main compaction-attempt regression. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mainPreCompactdiagnostics without accepting unrelated concurrent source mutationThis branch incorporates the complete maintainer
review/pr-310lifecycle/fallback review line without its merged-maincommit. The final overflow regression and implementation are one GREEN commit; no commit in this PR intentionally
leaves the focused suite RED.
Why replace #310
PR #310 contains the original two commits, but the upstream review branch added seven tightly coupled lifecycle,
queue-admission, fallback-window, and resumed-compaction corrections. Updating the old branch without a merge commit
would require rewriting its published history. This replacement preserves reviewable atomic commits, starts from
current
main, and has no stacked dependency.Reported failures covered
PreCompactdiagnostics being mistaken for unrelated stale-source mutationRED -> GREEN
reason: "overflow"reason: "threshold"skip-next-thresholdstate with retry-window provenancestopReason: "error"provider overflow remains requiredPreCompactdiagnostic causedstale-revisionsenpi.hookand pending message_end appends with matching revision deltas are operation-ownedVerification
npm run check: passedgit diff --check: passed--help: exit 0installinput: exit 1 with usageThe four-worker full coding-agent suite completed 557/558 files and 4,584/4,585 tests. Its only failure was the
unrelated app-server
StdioClient.close()process-group regression timing out under suite load; that exact file passeddirectly at 11/11. Earlier higher-parallel runs produced different MCP/app-server timeout/resource failures which also
passed directly. No failing compaction/lifecycle test remains.
PR topology
mainSummary by cubic
Hardens the compaction lifecycle to own each generation, reject stale updates, and gate provider admissions to prevent races and bad queue drains. Stabilizes retries, preserves overflow semantics, and keeps interactive input safe after compaction.
New Features
Agent.suppressQueuedMessageDrain()to keep steering/follow-up queues afteragent_endwithout aborting.AbortSignalthroughbeginCompaction,updateCompaction,endCompaction, andapplyCompaction; superseded feedback is ignored.prepareCompactioncan force progress and allow summary-only.Bug Fixes
PreCompactdiagnostics as operation-owned while rejecting unrelated source mutations asstale-revision; preserved compaction boundaries to avoid double-counting.Written for commit 3549278. Summary will update on new commits.