Repository navigation
fix(ui): retire stale MCP feedback across context changes - #128490
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 8:01 AM ET / 12:01 UTC. ClawSweeper reviewWhat this changesThe PR makes MCP settings controls discard pending busy, success, and error feedback when a retained Control UI card or Plugins page changes runtime configuration context. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open as a correct, proof-backed fix: its generation fence resets UI-owned feedback at the runtime-config lifecycle boundary and prevents an earlier mutation or load completion from affecting the replacement context. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI reads saved MCP server definitions from the active runtime configuration and lets an administrator mutate them. Its MCP card and Plugins page convert those operations into row controls and operator feedback. flowchart LR
A[Application context] --> B[Runtime configuration]
B --> C[MCP settings card]
B --> D[Plugins MCP controller]
C --> E[Feedback generation check]
D --> E
E --> F[Current controls and status]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +21, Tests +119. Total +140 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the two owner-local generation fences and focused lifecycle regressions; a shared subscription controller should not absorb component-specific busy and message ownership. Do we have a high-confidence way to reproduce the issue? Yes: the supplied exact-head evidence describes an isolated Gateway run that changes context while a config mutation is pending, then observes whether the retained UI shows old feedback or locks its current control. Is this the best way to solve the issue? Yes: fencing completion at each feedback owner's runtime-config cleanup boundary fixes the stale producer result without changing MCP configuration, protocol, or Gateway behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a590cc31e12f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
358754f to
fe27cee
Compare
fe27cee to
f617357
Compare
|
Thanks @Alix-007! Proof: A branch-built Control UI called a real isolated Gateway while an MCP mutation crossed an application-context change. Current main showed the old feedback in the retained card; the merged head kept the current control enabled with no stale alert or status.
CI run
All checks that cover the changed Control UI source, tests, types, lint, internationalization, build, and performance passed. Exact-head Autoreview reported no actionable findings. |
* commit '13b1f71c7010baaf2394555198e2fc04bef03586': (283 commits) fix(ui): retire stale MCP feedback across context changes (#128490) fix(agents): clarify set-identity workspace output (#126320) fix(auth): preserve OAuth metadata during session SDK refresh (#127988) fix(agents): recover catalog worker after generation mismatch (#127712) fix(memory-wiki): reject out-of-range claim confidence (#125656) ci: remove redundant contract runs and costly test work (#137220) fix(release): assert the Codex CLI pin the candidate declares (#137136) test(voice-call): reuse shared guards and deferred gates (#137262) fix(cron): isolate scheduler-disabled shared-store writes (#131733) fix(telegram): surface allowed custom reactions in react guidance (#129817) test(infra): reuse the shared npm call presence guard (#137254) fix: generated images disappear after failed tool calls (#131226) fix(docs): match source anchor checks to published sections (#137157) fix(backup): preserve audit capture across slow snapshots (#130962) fix(release): preserve legacy gh log reads (#137016) fix(memory-core): make forget rewrites atomic (#131383) fix(agents): write settings atomically (#131431) fix(plugins): keep the memory indexing runtime with the selected slot owner (#131779) fix(ci): pin iOS screenshot evidence to workflow revision (#136334) test(logging): remove redundant stderr spy casts (#137238) ... # Conflicts: # scripts/e2e/lib/codex-release-package-assertions.mjs
…28490) ## Problem An MCP settings mutation could finish after its Control UI owner entered a new application context. The old completion then locked the current controls or published stale success or error feedback. ## Root cause The MCP settings card and the Plugins MCP controller owned their busy and message state, but they did not retire pending async work at their runtime-config subscription cleanup boundary. The card's initial config load also used only connection and source checks, which allowed an old rejection after reconnect with the same source. ## Fix - Retire MCP busy and message state when the runtime-config lifecycle ends. - Fence mutation and initial-load completions with the owning feedback generation. - Apply the same invariant to the Plugins MCP controller, including connector-row busy state. - Preserve current main's exact-array deletion behavior and queued-write coverage. ## Proof - Current-main red: a branch-built Control UI called a real isolated Gateway, changed application context while `config.patch` was pending, and then displayed the old Gateway error in the retained card. - Exact-head green: the same flow on `6874b6d8c9fa8978247b989da78b4750a82b8542` kept the current control enabled and showed no stale status or alert. - Focused tests: 50 passed across the MCP settings card and Plugins page. - Regression red: the new tests produced three intended failures on the pre-fix production code. Production delta: +21 net lines. The growth records and enforces lifecycle ownership in both MCP feedback owners. Tests add direct card, load-error, and Plugins regressions. ## Review disposition ClawSweeper's production-growth line-item is accepted. The 21 lines keep busy and message ownership inside the two MCP UI owners; the generic subscription controller cannot own component-specific feedback. The repair also removes the Plugins controller's redundant local catch/finally path. Config, protocol, schema, security, and upgrade impact: none. AI disclosure: Codex assisted with the repair and validation. Alix-007 remains the accountable contributor. Co-authored-by: Ayaan Zaidi <[email protected]>
Problem
An MCP settings mutation could finish after its Control UI owner entered a new application context. The old completion then locked the current controls or published stale success or error feedback.
Root cause
The MCP settings card and the Plugins MCP controller owned their busy and message state, but they did not retire pending async work at their runtime-config subscription cleanup boundary. The card's initial config load also used only connection and source checks, which allowed an old rejection after reconnect with the same source.
Fix
Proof
config.patchwas pending, and then displayed the old Gateway error in the retained card.6874b6d8c9fa8978247b989da78b4750a82b8542kept the current control enabled and showed no stale status or alert.Production delta: +21 net lines. The growth records and enforces lifecycle ownership in both MCP feedback owners. Tests add direct card, load-error, and Plugins regressions.
Review disposition
ClawSweeper's production-growth line-item is accepted. The 21 lines keep busy and message ownership inside the two MCP UI owners; the generic subscription controller cannot own component-specific feedback. The repair also removes the Plugins controller's redundant local catch/finally path.
Config, protocol, schema, security, and upgrade impact: none.
AI disclosure: Codex assisted with the repair and validation. Alix-007 remains the accountable contributor.