fix(cli): stop unchanged progress feedback loops [risk:high] - #461
Merged
Conversation
Skip unchanged progress before entering Mirror, which notifies subscribers even for no-op updates. Cover nested A -> B -> C reconciliation with real Mirror subscriptions. Model: gpt-6
Move connection-lifetime explanations to README while retaining binding constraints in AGENTS. Model: gpt-6
zxch3n
marked this pull request as ready for review
September 7, 2026 09:26
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.
Risk: 🔴 high | Confidence: high — changes CRDT history write behavior; real-Mirror regression tests and independent review cover convergence and subsequent progress updates.
Related issue
Same-repository fix; no separate tracking issue.
Problem / pressure
Nested create operations (A → B → C) can keep the CLI coordinator reconciling indefinitely. Updating B's progress notifies A's target subscription even when progress has not changed: returning the original history inside
Mirror.setStatestill emits notifications.Summary
Skip unchanged or absent progress before entering
updateHistory. Recompute actual writes against the latest history. Preserve duplicate-ID recovery and monotonic status merging. Add real-Mirror coverage and keep the notification invariant in AGENTS; move explanatory connection-lifetime material into the adjacent README to respect the document size limit.Before / after
Test plan
pnpm checkpassed on the implementation commit: workspace typechecks, lint, tests, i18n and boundary checks.bad3c75; the old implementation failed both new regression cases.pnpm run docs check --base origin/main,pnpm format:check,pnpm typecheck, andpnpm check:quick. Document maintenance and formatting are separate frompnpm check.Context handoff
Instructions for reviewing agents
operation-progress-history.tsand the real-Mirror nested coordinator regression for stable-state quiescence and subsequent completion updates.Authoring context