Skip to content

fix(update): retain admission warnings in compacted history - #160430

Merged
steipete merged 3 commits into
mainfrom
fix/update-admission-warning-steps-retained
Sep 28, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/update-admission-warning-steps-retained

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Regression on unchanged main: all three compaction cases failed on the missing warning:update-admission-unsupported-target step (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.
  • Standalone budget measurement: pnpm test src/infra/update-run-ledger.compaction.test.ts --maxWorkers=1 passed 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:docs and git diff --check: passed.
  • Isolated Codex autoreview: scoped-clean through P2, with no accepted/actionable findings.

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.

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 28, 2026, 9:50 AM ET / 13:50 UTC (Revision 3).

ClawSweeper review

What this changes

The 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
Reviewed head: ccfa796cc536fb1d4056ddaf918333534f48ec8f
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch and database regression are credible, while the published upgrade path and retention-contract evidence remain incomplete.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The member-authored PR is exempt from the ordinary contributor proof gate. Its reported real-SQLite test exercises the production ledger writer through compaction and reopen, but it does not show a published updater crossing to the candidate with an existing row; stored-state upgrade compatibility remains insufficient.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR is exempt from the ordinary contributor proof gate. Its reported real-SQLite test exercises the production ledger writer through compaction and reopen, but it does not show a published updater crossing to the candidate with an existing row; stored-state upgrade compatibility remains insufficient.
Evidence reviewed 9 items Introduced retention rule: The branch adds seven exact step names to the ledger's retained set; the same predicate governs byte compaction.
Current-main gap: The pinned main codec retains candidate admission but omits both named admission fallback warnings.
Shared writer boundary: The writer upserts by step name and evicts nonretained entries when a run exceeds 128 steps.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should these seven named update steps take durable priority over ordinary diagnostic steps within the existing history limits? Approve the bounded set: Record acceptance of the seven exact identities after the published-driver upgrade check establishes their behavior with existing state.

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

  • Resolve merge risk (P1) - Seven additional nondiscardable step identities change which diagnostics can survive the existing 128-step and 16 KiB limits; the required acceptance of that retention priority is not recorded.
  • Resolve merge risk (P1) - The after-fix published-updater-to-candidate run with existing SQLite history has not been shown, leaving the reported first-hop behavior and existing-state compatibility unverified.
  • Complete next step (P2) - Record maintainer acceptance of the seven retained identities and provide a published-driver × candidate upgrade result using existing SQLite history.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +8, Tests +15, Docs +3. Total +26 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 8 0 +8
Tests 1 26 11 +15
Docs 1 3 0 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 37 11 +26

Review metrics

Metric Value Why it matters
Protected step identities 7 added; 128-step and 16 KiB limits unchanged The added identities consume priority within the existing bounded history.

Merge-risk options

Maintainer options:

  1. Accept and prove retention (recommended)
    Record the storage owner's decision on the seven identities and show a published-driver upgrade using an existing ledger before merge.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs bounded update-history diagnostics without evidence that update execution itself changes.
  • merge-risk: 🚨 compatibility: The diff changes durable history retention during upgrades while published-driver compatibility remains unproven.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The member-authored PR is exempt from the ordinary contributor proof gate. Its reported real-SQLite test exercises the production ledger writer through compaction and reopen, but it does not show a published updater crossing to the candidate with an existing row; stored-state upgrade compatibility remains insufficient.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the storage owner's acceptance of the seven-step retention priority.
  • Show the published-driver-to-candidate cell with existing SQLite update history.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-28T12:09:04.892Z sha d59db07 :: blocked before merge. :: none
  • reviewed 2026-09-28T13:02:38.389Z sha f71d5ca :: blocked before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

CI note: d59db07 failed only src/cli/update-cli/update-command-service-maintenance-native.test.ts > enforces live handoff authority in the real LaunchAgent stop ("Update executor ownership is no longer current") in shard agentic-cli-hosted-1. This PR only adds retained step names to the run-ledger codec; the executor/LaunchAgent handoff path is untouched, and main just landed timing-race fixes for CLI/process fixtures (ee15d2b). Re-running the failed job once.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 28, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

CI note: f71d5ca failed only ui/src/e2e/session-progress-widget.e2e.test.ts > keeps target liveness when the selected agent scope changes (checks-ui-e2e 4/9), a known main-side Control UI failure currently being bisected by the red-main owner. This PR only touches the run-ledger codec. One recorded rerun of that job.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 28, 2026
@steipete steipete self-assigned this Sep 28, 2026
@steipete
steipete merged commit 8d57d3e into main Sep 28, 2026
228 checks passed
@steipete
steipete deleted the fix/update-admission-warning-steps-retained branch September 28, 2026 14:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant