Repository navigation
fix(update): preserve serving state during candidate plugin maintenance - #208776
Conversation
- Preserve older serving state before configuration, index reads, or lifecycle leases. - Leave ordinary startup migration and post-ready plugin convergence unchanged.
|
🦞👀 ClawSweeper review completeClawSweeper finished reviewing this revision. |
|
Codex review: needs changes before merge. What this changesThis PR defers candidate plugin maintenance when shared state needs migration and no update trial is active. Example: An older updater invokes candidate plugin maintenance before stopping the serving Gateway.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: it addresses a concrete update-contract violation still present on main, but the introduced preservation test and directory traversal need repair. Reviewed head: Before merge
Findings
Agent review detailsHow this fits togetherThe candidate's update plugins command receives maintenance options, prepares configuration and installed-plugin records, and invokes the existing plugin maintenance owner. flowchart TD
A[Older updater] --> B[Candidate plugin command]
B --> C[Read existing schema]
C --> D[Return deferred warning]
C --> E[Existing plugin maintenance]
F[Activated Gateway readiness] --> E
Technical reviewBest possible solution: Retain the early schema guard in maintainPlugins and repair the preservation fixture and directory traversal without weakening artifact checks. Do we have a high-confidence way to reproduce the issue? Current main reaches configuration and lifecycle operations without checking the serving schema first; the linked acceptance failures and reported base regressions support that path, but this read-only review did not execute it. Is this the best way to solve the issue? The early guard uses existing schema, trial and warning owners at the correct maintenance boundary, with no parallel migration mechanism or new configuration. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6f1df2d5497f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +28, Tests +210. Total +238 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 29, 2026, 11:16 PM ET / November 30, 2026, 04:16 UTC. |
- Use the bounded sorted directory walker and path-keyed SHA-256 snapshots. - Keep the warning assertion at the serialized updater JSON boundary.
- Keep terminal success assertions unchanged and wait for the selected run after readiness. - Preserve the original prepared receipt and retain offline migration checks. - Cover immediate success, prepared success, failed activation, and settlement timeout.
|
Maintainer override: the only red CI job is the mock-isolation ratchet (checks-fast-baseline-ratchets#141641835082) on |
* commit 'c5c1dc278a6f789d739d70afe192c4d1e37058f5': fix(ci): include provider rejection text in PR tooling (#208891) feat: let plugins bring their own sidebar icon (#208885) docs: clarify node pairing and credentials on PostgreSQL gateways (#208850) fix(ui): show a confirmed subagent stop once in chat (#208533) fix(ui): keep collapsed work close to the reply in long chats (#207843) fix(update): finish failed recovery startup records (#208794) chore(ci): inventory media worker lifecycles (#208888) fix: use the same clock icon for Automations (#208539) improve(ci): reduce compiler round trips in database checks (#208878) fix(ci): preserve complete adaptive test observations (#208874) test(gateway): isolate usage context database fixtures (#208304) fix: avoid false worker cleanup failures (#208861) fix: let Git upgrade acceptance fetch its missing baseline (#208746) fix: isolate scheduled Processes reads in the Control UI config-change test (#208205) fix: make plugin hash worker tests independent of runner memory (#208860) fix(update): preserve serving state during candidate plugin maintenance (#208776) test(ui): preserve exact session keys in older chat links (#208873) docs(cli): say what bounds a yielded agent turn's subagent wait without --timeout (#208858)
* fix: restore managed worktrees from bare primary repositories Managed worktrees created from a linked checkout record its primary repository. Resolve that registration during inspection, removal, and snapshot restore while keeping new checkout creation strict. * Merge verified upstream CI repairs into managed worktree recovery * commit 'c5c1dc278a6f789d739d70afe192c4d1e37058f5': (64 commits) fix(ci): include provider rejection text in PR tooling (#208891) feat: let plugins bring their own sidebar icon (#208885) docs: clarify node pairing and credentials on PostgreSQL gateways (#208850) fix(ui): show a confirmed subagent stop once in chat (#208533) fix(ui): keep collapsed work close to the reply in long chats (#207843) fix(update): finish failed recovery startup records (#208794) chore(ci): inventory media worker lifecycles (#208888) fix: use the same clock icon for Automations (#208539) improve(ci): reduce compiler round trips in database checks (#208878) fix(ci): preserve complete adaptive test observations (#208874) test(gateway): isolate usage context database fixtures (#208304) fix: avoid false worker cleanup failures (#208861) fix: let Git upgrade acceptance fetch its missing baseline (#208746) fix: isolate scheduled Processes reads in the Control UI config-change test (#208205) fix: make plugin hash worker tests independent of runner memory (#208860) fix(update): preserve serving state during candidate plugin maintenance (#208776) test(ui): preserve exact session keys in older chat links (#208873) docs(cli): say what bounds a yielded agent turn's subagent wait without --timeout (#208858) test(ui): keep real exports in the channel settings distribution mock (#208855) test(normalization): preserve inline code in quoted previews (#208857) ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Older updaters can ask a candidate to maintain plugins while the old Gateway still serves. Acquiring the plugin lifecycle lease can then migrate live shared state ahead of activation, leaving that Gateway unable to read it. This broke both 2026.12.1-beta first-hop upgrade jobs in Package Acceptance 46335650023.
User Impact
Candidate plugin maintenance now returns the existing warning result when serving state needs a newer schema and no update trial is active. It preserves the database, sidecars, configuration, and plugin index; the activated build converges plugins after readiness. Missing/current state and active trials retain normal behavior. Unreadable state fails explicitly.
Why This Change Was Made
One artifact-preserving schema read at the maintenance entry prevents all configuration preparation, plugin-index reads, and lease acquisition on the deferred path. It uses existing schema, trial, and warning owners without changing global database/lease defaults, launcher formats, protocols, or dependencies.
The author simplification pass retained one runtime decision owner and no new update machinery. Net change: +28 runtime lines, +62 Docker harness lines, +281 test lines. Regression coverage stays in the existing host-broker-routed maintenance test file; the readiness test file was already at its line cap. The harness additionally activates a matching prepared trial before demanding terminal success, using the existing Gateway readiness path and twelve-minute settlement budget; terminal assertions are unchanged.
Evidence
ok).bash -ngreen.failed; the candidate is not declared ready. The launcher switches back and the baseline becomes ready. The remaining beta-cell red is this candidate/baseline version skew.The beta.1 Gateway log contains the following two lines (beta.2 has the same refusal naming
2026.12.1-beta.2):The stable baseline and
update-restart-authresults remain green: