Skip to content

fix(update): mark budget-deferred doctor lint as advisory - #170381

Closed
DonnieFi wants to merge 2 commits into
openclaw:mainfrom
DonnieFi:fix/170333-lint-advisory
Closed

DonnieFi wants to merge 2 commits into
openclaw:mainfrom
DonnieFi:fix/170333-lint-advisory

Conversation

@DonnieFi

@DonnieFi DonnieFi commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A passing doctor-lint report that still deferred inspections is incomplete, including a partial run. The step is advisory (!), activation continues, and the final report repeats the deferral. A report with no deferred inspection stays a plain pass. A failing lint exit stays a failure.

This adopts the broader status rule: any successful report that contains update-inspection-deferred warnings is advisory, for checksRun 0 and for a partial run. The per-command inspection window (giving each validation command its own budget after a slow state snapshot) stays in #170374. This PR does not change that budget anchor.

Related #170333
Related #170374

Decision

Deferred lint is advisory whenever a successful report still carries update-inspection-deferred warnings, not only when zero checks ran. Budget anchoring remains #170374.

Production baseline — October 12 update

Captured from the real npm-global update on October 12, 2026 (Halifax time): Debian 13, Node v24.16.0, 2026.10.5-beta.1 (f283c3c) → 2026.10.5-beta.2 (467e83d), using openclaw update --channel beta --tag 2026.10.5-beta.2 --yes. The saved terminal capture and read-only update-run record agree that the run finished with phase: finished, status: succeeded. Private paths and capture identifiers are redacted; unrelated logs are omitted.

The real candidate lint step displayed a pass while reporting that two agent scopes were deferred with no inspection allowance remaining. Activation still completed and the final summary repeated the warning:

Selected terminal lines, with unrelated output omitted:

✓ candidate-doctor-lint (7.36s)
Doctor lint warning [core/doctor/lint-inspection]: update-validation-budget: Doctor lint inspection deferred until after activation: 2 agent scopes need a 4000ms inspection allowance, with 0ms remaining in the validation inspection window (validation-ledger).: Run `openclaw doctor --fix` after activation to complete deferred checks and repairs.
Gateway: restarted and verified.
✅ OpenClaw updated to 2026.10.5-beta.2 (from 2026.10.5-beta.1).
Warning: Doctor lint warning [core/doctor/lint-inspection]: update-validation-budget: Doctor lint inspection deferred until after activation: 2 agent scopes need a 4000ms inspection allowance, with 0ms remaining in the validation inspection window (validation-ledger).: Run `openclaw doctor --fix` after activation to complete deferred checks and repairs.
Update safety checks ran in the candidate updater (2026.10.5-beta.2).
Recorded verification: service running (2026.10.5-beta.2); version verified; channels ready; HTTP ready.

The update-run ledger records candidate-doctor-lint as completed, exitCode: 0. The observed terminal step took 7.36s, and its warning states that two agent scopes needed a 4000ms allowance with 0ms remaining. This supports the incomplete-coverage display concern; the original run still passed its required readiness checks.

Remaining proof gap: This was the official unpatched beta update. It does not show the PR's ! rendering, establish the lint report's exact checksRun count, or demonstrate both zero-check and partial-check cases through a patched installed updater. The maintainer display decision also remains pending. The patched canary cases below remain the after-change evidence.

Proof

No live Gateway update was rerun. The patched candidate canary (validateUpdateCandidateCanary) drove a lint child that exited 0 with one update-inspection-deferred warning. Gateway readiness was healthy. For zero checks:

! candidate-doctor-lint (30ms)
  Doctor lint warning [core/doctor/agent-scopes]: update-validation-budget: Agent scopes deferred until after activation.: Run `openclaw doctor --fix` after activation.
  Doctor deferred 1 inspection until after activation (0 ran). Run `openclaw doctor --fix` after the update.
✅ OpenClaw updated.
Warning: Doctor deferred 1 inspection until after activation (0 ran). Run `openclaw doctor --fix` after the update.

The same run with checksRun 3 printed ! candidate-doctor-lint and "Doctor deferred 1 inspection until after activation (3 ran)." Both runs finished status: ok. The update-run ledger finished succeeded, and the rendered report included the deferral sentence.

Base / head

The same unit test against the previous classifier on this branch failed (exit 1):

  • checksRun 0 still set an advisory, but the message was "Doctor lint inspection did not run. This advisory check was skipped because the validation window had no remaining allowance. Activation continues. Run openclaw doctor --fix after activation to complete it."
  • checksRun 1 left advisory undefined.
  • A passing report with no deferred warning still left advisory undefined.

Head of that unit test passed (3 tests, exit 0). Head of the canary cases passed (0 checks and 3 checks, exit 0).

Test

  • update-doctor-lint.test.ts — checksRun 0 and 1 set the advisory, exit stays 0, and the step is not failed. A passing report with an empty warning list does not set advisory.
  • update-candidate-canary.lint.test.ts — checksRun 0 and 3 render ! candidate-doctor-lint, finish ok, record ledger status succeeded, and include the deferral sentence in the report.

A validation window with no remaining allowance made doctor lint exit 0
after running no checks, and the progress line showed a pass. That report
now sets the existing advisory mark. Activation still continues.

Refs: openclaw#170333
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Oct 12, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR marks successful Doctor lint reports containing deferred inspections as advisory and repeats a deferral summary in update warnings.

Example: Candidate Doctor lint exits 0 after running 3 checks and deferring 1 inspection.

  • Before: Progress shows ✓ candidate-doctor-lint and retains the deferral warning.
  • After: Progress shows ! candidate-doctor-lint, explains that 1 inspection was deferred, and lets activation continue.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused with no definite introduced defect, but after-change evidence remains mocked and product direction awaits an owner decision.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Preference · Worth it: Needs a maintainer decision · Fix scope: Partial
User problem: A green lint progress mark can suggest complete inspection coverage even when optional checks were deferred.
Reason: This changes the presentation of intentional behavior; the linked report's inspection-budget expectation remains outside this PR.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open: it offers a focused display improvement that current main lacks, and the overlapping draft is not a proven replacement.

Priority: P3
Reviewed head: 8e97d4dd9666d33261b1a68f383a0fa4cbe327d5
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should every successful Doctor lint report with deferred inspections show !, including partial runs and intentional scope deferrals?
  • Recommendation: Approve advisory rendering for all deferrals: Show incomplete inspection coverage as advisory while preserving the successful update outcome.
  • Why: The existing behavior was confirmed as intentional, and neither this PR nor its linked issue contains written approval of the broader display rule.

Before merge

  • Add real behavior proof - The new real npm-global beta transcript shows the unpatched baseline only. Patched output exercises the classifier, renderer, and ledger with fake child processes and stubbed readiness. Provide redacted terminal output, logs, or terminal screenshots from a patched installed updater showing zero and partial deferrals as !, successful activation, and the final warning; remove IPs, keys, phone numbers, and non-public endpoints. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

None.

Tests

  • Low-value test src/infra/update-doctor-lint.test.ts: Remove the duplicated zero-check and partial-deferral helper cases already covered through the canary, renderer, and ledger boundary; retain or relocate the distinct no-deferral control.
  • Missing end-to-end proof: Missing a patched installed-updater run covering zero and partial deferrals; the reported baseline comparison uses the earlier branch classifier rather than the pinned merge-base.
Agent review details

How this fits together

The installed updater consumes candidate Doctor JSON and converts it into step outcomes, progress output, and persisted update warnings.

flowchart TD
  A[Installed updater] --> B[Candidate Doctor lint]
  B --> C[Lint JSON report]
  C --> D[Update step classifier]
  D --> E[Progress output]
  D --> F[Update ledger and report]
Loading

Technical review

Best possible solution:

Use one owner-approved advisory rule for deferred lint while preserving successful activation and keeping budget changes separately scoped.

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

The official beta transcript and inspected producer, current-main classifier, and progress renderer establish the pass-with-warning path; no target code or tests were executed.

Is this the best way to solve the issue?

The existing classifier is the appropriate owner for a display-only change, and the patch consistently handles zero and partial deferrals without changing budgets or required checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 01cb0b065422.

Provenance checked

  • Update lint classification and warning retention keeps the original intent (1e48d0c: Keep optional inspections and policy advisories visible without blocking valid updates, while preserving required failures and physical exit facts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 1e48d0c adds src/infra/update-doctor-lint.ts:128 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1e48d0cff2e7; files: src/infra/update-doctor-lint.ts)
  • Donnie Fiander: Raw commit 0e29319 adds src/infra/update-doctor-lint.ts:45 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 0e29319a6a3d; files: src/infra/update-doctor-lint.ts)

PR surface

Source +13, Tests +113. Total +126 across 3 files. Added test files: 1.

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

Root-cause cluster

Relationship: partial_overlap
Canonical: #170333
Summary: The closed report records the observed display concern; the two open PRs overlap on advisory rendering while only the other PR changes budget anchoring.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: Updates already succeed and retain deferral warnings; the proposed change improves status presentation.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-12T23:31:26.082Z sha c39fdfb :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-13T00:31:49.655Z sha 8e97d4d :: needs real behavior proof before merge. :: none

Reviewed October 12, 2026, 9:43 PM ET / October 13, 2026, 01:43 UTC (Revision 3).

A passing lint report that deferred any inspection, including a partial
run, uses the advisory mark and repeats that sentence on the final report.
Activation still continues. The per-command inspection window stays in openclaw#170374.

Refs: openclaw#170333
@DonnieFi

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor

Thank you @DonnieFi! Budget-deferred Doctor lint is now advisory on main via #170374 (c7dd7b9): applyUpdateDoctorLintReport marks successful budget-deferred reports as advisory, including partial runs, while failed exits still fail. Closing since current main already covers this; please reopen with a reproduction on a build that includes it if you still see the problem.

@steipete steipete closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants