Repository navigation
fix(update): retain admission warnings in compacted history - #160430
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 9:50 AM ET / 13:50 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch preserves seven named update warning and failure steps in bounded SQLite history, extends a database compaction test, and documents the history behavior. Merge readiness⛔ Blocked before merge - 4 items remain Current main still loses the reported warning identities under history pressure, and this PR addresses that gap. Keep it open because the durable retention priority needs recorded maintainer acceptance and the published-updater upgrade path remains unverified. Priority: P2 Review scores
Verification
How this fits togetherThe installed updater records update phases, warnings, and failures in a shared SQLite ledger. The ledger limits stored steps before CLI reports and recovery checks read that history. flowchart LR
A[Installed updater] --> B[Steps and warnings]
B --> C[Retention rule]
D[Step and byte limits] --> C
C --> E[SQLite update history]
E --> F[CLI reports and recovery checks]
Decision needed
Why: Selecting what survives compaction changes a stored retention contract, and the PR discussion does not record the acceptance required by the repository's storage guidance. Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +15, Docs +3. Total +26 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep exact-name retention in the ledger once its storage owner accepts the priority and a published-driver upgrade cell confirms that existing history remains readable and the warning survives compaction. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main omits the fallback warning keys from retention while the writer evicts nonretained steps at its limits. The PR reports a failing pre-fix regression, but this read-only review did not execute it. Is this the best way to solve the issue? Yes, the shared ledger codec is the narrow owner of eviction, and exact names avoid retaining an unbounded warning namespace. The storage decision and upgrade proof are still needed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3a300c650a5b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
CI note: d59db07 failed only |
…warning-steps-retained
|
CI note: f71d5ca failed only |
|
Merged via squash.
|
What Problem This Solves
Fixes admission fallback warnings disappearing from update history after long or verbose runs, including the unsupported-target assertion in the 2026.9.6 first-hop compatibility lane (release run).
User Impact
Update reports keep the identity, status, and timestamps of both installed-admission warnings and the additional lifecycle/failure steps checked by upgrade-survivor. Diagnostic text and failure facts remain compactable under the existing byte limit. No migration or operator action is required; admission decisions and update execution are unchanged.
Why This Change Was Made
The codec's retention predicate owns both 128-step eviction and 16 KiB compaction. Extend its exact-name list with the two admission fallback warnings, managed-service membership and plugin-deadline warnings, both npm installation attempts, and candidate Doctor lint. This adds at most seven unique retained entries because writes upsert by step name. A blanket warning prefix would be unsafe: arbitrary result steps can each emit up to 32 warnings.
The existing candidate-admission and finalization retention stays in place. Extend the shared real-database regression across step-count pressure, diagnostic-byte pressure, retained-step-byte pressure, and database reopen, including generic warning churn that must remain evictable.
Evidence
warning:update-admission-unsupported-targetstep (42.70s command wall).pnpm test src/infra/update-run-ledger.compaction.test.ts src/infra/update-run-ledger.test.ts --maxWorkers=1: 33 tests passed; 73.94s command wall. The changed compaction file used 2.565s of test execution; its 49.08s shard included 40.047s of worker preparation.pnpm test src/infra/update-run-ledger.compaction.test.ts --maxWorkers=1passed all 3 tests in 36.73s command wall (4.052s test execution; 8.731s cached worker preparation). CI timings are not yet available.pnpm exec oxfmt --check src/infra/update-run-codec.ts src/infra/update-run-ledger.compaction.test.ts docs/cli/update.md: passed.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/infra/update-run-codec.ts src/infra/update-run-ledger.compaction.test.ts: passed.pnpm tsgo:core: passed (12.77s wall).pnpm check:docsandgit diff --check: passed.The full published-driver × candidate compatibility lane was not rerun. No CI jobs were dispatched or rerun for proof. Candidate-provided arbitrary warning codes remain governed by existing diagnostic retention; this fix retains the two installed-admission fallback warning identities explicitly.