Skip to content

fix(update): preserve snapshot size mismatch diagnostics - #177158

Merged
steipete merged 1 commit into
mainfrom
fix/update-generation-diagnostic
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/update-generation-diagnostic

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes update generation-verification reports that hide a SQLite snapshot size mismatch behind [redacted-diagnostic].

User Impact

Operators can see the safe failure cause in the update summary. Private paths, sizes, arbitrary diagnostic prose, and credentials remain excluded from public support summaries. Database verification and refusal behavior are unchanged.

Why This Change Was Made

#177082 (908d45c48795) intentionally reduced repeated database reads: its body states that the generation owner brackets an admitted private image with source-family checks and that the final double-read verifies the provisional observation. The existing concurrent-write fixture consequently fails in snapshot size verification before the later generation check. The public diagnostic owner recognized snapshot hash mismatches but omitted the equally fixed size-mismatch cause.

Recognize that one additional cause and update the real-worker regression to require its actual diagnostic. All source-scope, best-effort guidance, and refusal assertions remain intact. The existing support-redaction table also requires the cause without its private path or size details. Three lines added, two removed; no new helper or lifecycle mechanism.

Evidence

  • Reproduced the hourly 39218528567 / job 117948423313 failure on current main: the worker reports a snapshot size mismatch, but its summary is [redacted-diagnostic]. The target assertion completed before applying this patch; the baseline wrapper's final source-stability check then detected the edit, so it is not claimed as a clean full baseline run.
  • The added formatter case fails on unchanged production (64 pass, one fails) with [redacted-diagnostic] instead of the fixed cause.
  • Fixed focused run: 88/88 passed across the schema, update diagnostics, and support-redaction files with --maxWorkers=1 (101.62 seconds wrapper wall time, including compiled subprocess preparation). The changed schema file spends 38.37 seconds exercising real worker and SQLite behavior; the redaction shard completes in 0.753 seconds.
  • Targeted state-logging and services test type graphs, type-aware lint, formatting, and whitespace checks passed.
  • Independent P2 autoreview: scoped-clean, no actionable findings.
  • Full pnpm build passed in 5m20.1s, including runtime, declarations, 156 public SDK subpaths, and Control UI budgets. No timeout, suppression, schema, or dependency changes.
  • No CI reruns. PR CI is the remaining broad proof; the lead owns landing.

Recognize the fixed SQLite snapshot size mismatch cause in public update summaries without exposing its private path or size details. Align the real-worker regression with the snapshot refusal introduced by #177082 while retaining source-scope and best-effort guidance assertions.
@clawsweeper

clawsweeper Bot commented Oct 19, 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.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 1a5d73868a268ccc8771503d1ad7df507c4026e5
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/logging/diagnostic-support-redaction.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.

Carefully review these changes before merging.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T08:42:33.805654Z 1a5d738 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves the fixed SQLite snapshot size-mismatch cause in update diagnostics while excluding private details.

Example: Snapshot verification reports expected 4096 bytes but observes 4112 bytes for /private/example/a.sqlite.

  • Before: The public summary displays [redacted-diagnostic].
  • After: The public summary displays SQLite snapshot size mismatch, without the path or byte counts.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch is correct and worthwhile, with meaningful worker and redaction coverage; supplied behavioral evidence stops at the test boundary.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its supplied validation exercises the formatter and real SQLite worker, with no after-fix installed-updater output supplied.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Operators see a redaction placeholder instead of the safe reason that update snapshot verification failed.
Reason: The maintainer-authored direction restores an established diagnostic contract with a narrowly bounded change and no new settings.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a useful, maintainer-authored diagnostic fix that current main still needs, with no actionable correctness or security findings.

Priority: P2
Reviewed head: 1a5d73868a268ccc8771503d1ad7df507c4026e5

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show the size-mismatch cause through an installed updater's visible summary; the formatter baseline failure and focused passing worker tests are reported.
Agent review details

How this fits together

SQLite verification produces detailed worker errors; the shared support redactor extracts recognized causes for updater diagnostics and public failure summaries.

flowchart TD
  A[Update generation verification] --> B[SQLite snapshot verification]
  B --> C[Worker error output]
  C --> D[Inspection diagnostics]
  D --> E[Shared support redactor]
  E --> F[Update and support summaries]
Loading

Technical review

Best possible solution:

Extend the existing diagnostic allowlist with the fixed size-mismatch cause while retaining private-detail redaction and all refusal checks.

Do we have a high-confidence way to reproduce the issue?

The producer emits SQLite snapshot size mismatch, while current main's closed-cause matcher excludes it; the supplied formatter baseline also reports the resulting redaction failure, but this review executed no target code.

Is this the best way to solve the issue?

This is the smallest complete fix: the existing redactor remains the sole public-diagnostic owner, and both test changes protect distinct boundaries without adding machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 806334a94765.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a796d49 adds src/logging/diagnostic-support-redaction.ts:519 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a796d49410f3; files: src/logging/diagnostic-support-redaction.ts)
  • Donnie Fiander: Raw commit a647368 adds src/infra/update-candidate-state.schema.test.ts:103 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a647368bb41d; files: src/infra/update-candidate-state.schema.test.ts)

PR surface

Source 0, Tests +1. Total +1 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 2 2 1 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 3 2 +1

Labels

Label changes:

  • add P2: A real update-verification cause is hidden, reducing diagnostic usefulness without changing update availability or database safety.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A real update-verification cause is hidden, reducing diagnostic usefulness without changing update availability or database safety.
  • 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.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 4:55 AM ET / 08:55 UTC.

@steipete
steipete merged commit cdf3fc0 into main Oct 19, 2026
130 checks passed
@steipete
steipete deleted the fix/update-generation-diagnostic branch October 19, 2026 09:00
steipete added a commit that referenced this pull request Oct 19, 2026
The valid version-4 write introduced by #177130 happens after private snapshot acquisition. Its final generation check correctly refuses the changed family, not a snapshot-size mismatch from the earlier corruption fixture in #177158.

Serial exact CI merge and base replays reproduce the stale expectation. Keep the exact cause, both source paths, best-effort advice, and committed version assertion. All nine schema cases pass; targeted native types, lint and format pass. The suppression audit reports an unrelated main-owned UI helper allowlist mismatch (13 pass, 1 fail); this test-only change adds no suppression.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
…7158)

Recognize the fixed SQLite snapshot size mismatch cause in public update summaries without exposing its private path or size details. Align the real-worker regression with the snapshot refusal introduced by openclaw#177082 while retaining source-scope and best-effort guidance assertions.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
The valid version-4 write introduced by openclaw#177130 happens after private snapshot acquisition. Its final generation check correctly refuses the changed family, not a snapshot-size mismatch from the earlier corruption fixture in openclaw#177158.

Serial exact CI merge and base replays reproduce the stale expectation. Keep the exact cause, both source paths, best-effort advice, and committed version assertion. All nine schema cases pass; targeted native types, lint and format pass. The suppression audit reports an unrelated main-owned UI helper allowlist mismatch (13 pass, 1 fail); this test-only change adds no suppression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed 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