Skip to content

fix(diagnostics): replace retired snapshot hints with usable guidance - #150894

Merged
steipete merged 1 commit into
mainfrom
upd/config-memory-pressure-snapshot
Sep 17, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/config-memory-pressure-snapshot

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #150864

What Problem This Solves

Critical memory-pressure warnings point operators at a retired snapshot setting, while Doctor removes that setting without naming it. Thanks @dom521 for reporting the confusing upgrade behavior.

User Impact

Critical pressure now produces one warning containing the existing measurements and supported next steps: diagnostics export, inspection of an existing stability bundle, or manual allocation profiling on Node. Doctor names the retired paths it actually removes, including explicit false values, in one notice.

The intentional retirement from #111382 and writer removal from #130754 remain in place. This adds no setting or capture capability and does not change which config values Doctor removes, its backup/write flow, or automatic startup repair ownership.

Why This Change Was Made

The obsolete memoryPressureSnapshot=disabled field and separate disabled-snapshot warning implied an operator could enable a removed knob. The diagnostics owner now provides current guidance once. The shared retired-path deletion helper records actual paths, including concrete wildcard entries, so both Doctor migration entry points use the same notice:

Removed retired runtime tuning knobs: diagnostics.memoryPressureSnapshot; built-in defaults now apply.

The migration reference explains the retirement, and troubleshooting no longer promises automatic pre-OOM bundles.

Release-note context: Clarify the retirement of diagnostics.memoryPressureSnapshot and automatic pre-OOM stability snapshots. Doctor now identifies removed tuning keys, and critical-memory warnings point to supported diagnostics export, existing bundle inspection, and manual Node allocation profiling. Thanks @dom521 for highlighting the unclear migration messaging.

Evidence

  • Before the fix, the regression failed because the removal notice omitted diagnostics.memoryPressureSnapshot; the no-retired-key case passed. The pressure-log regression also failed on the obsolete second warning.
  • Five focused suites passed: 350 tests covering the full registered migration chain, retired tuning paths, false/missing settings, concrete wildcard paths and one-line escaping, startup repair, and memory diagnostics.
  • Production: +31/-38 lines, net -7. No baseline changes, new suppressions, config options, dependencies, or changelog edits.
  • pnpm check:changed passed in full: config docs, line-cap and suppression ratchets, core and test typechecks, changed-file lint, all dead-export scans (zero entries), and runtime import cycles (zero).
  • A missing context argument in the new test helper was caught by typechecking and corrected; its three regression cases passed again before the final full check.
  • Tests exercise synthetic migration and pressure inputs; no operator Gateway or real OOM workload was used.
  • Fresh Codex autoreview, --mode branch --base origin/main --max-priority P1: scoped-clean, no findings.

Name retired config paths in Doctor notices and give current diagnostic next steps during critical memory pressure. Preserve the intentional retirement from #111382 and #130754. Reported by @dom521 in #150864.
@clawsweeper

clawsweeper Bot commented Sep 17, 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.

@steipete
steipete marked this pull request as ready for review September 17, 2026 12:41
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations size: S maintainer Maintainer-authored PR labels Sep 17, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 8:48 AM ET / 12:48 UTC.

ClawSweeper review

What this changes

Updates critical-memory warnings and troubleshooting guidance, and makes Doctor identify the retired configuration paths it removes.

Merge readiness

✅ Ready for maintainer review

Keep open: the misleading guidance remains on current main and in v2026.9.4. The patch preserves the intentional snapshot retirement, addresses the reporter’s clarification, and introduces no actionable correctness finding.

Priority: P3
Reviewed head: 32407adda08ca0d9c100e0a0c68af442a98b756f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused correction with relevant regression coverage, preserved behavior boundaries, and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository context identifies a maintainer-authored PR, so the external-contributor proof gate does not apply. Reported synthetic migration and pressure tests cover the changed notices; no real Gateway or published-driver upgrade run is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository context identifies a maintainer-authored PR, so the external-contributor proof gate does not apply. Reported synthetic migration and pressure tests cover the changed notices; no real Gateway or published-driver upgrade run is claimed.
Evidence reviewed 7 items Current main still needs the correction: Current main retains the literal memoryPressureSnapshot=disabled suffix and a second disabled-snapshot warning; neither represents a configurable runtime switch.
Latest release contains the misleading messages: The v2026.9.4 source contains memoryPressureSnapshot=disabled at line 331 and the separate disabled-snapshot warning at line 378. GitHub contents inspection succeeded after the local release blob was unavailable.
Shared migration preserves deletion behavior: The introduced changes retain the retired-path lists, own-property deletion checks, wildcard traversal, and empty-parent pruning. Both migration entry points now consume the same collected-path notice; other callers use the unchanged two-argument behavior.
Findings None None.
Security None None.

How this fits together

Gateway diagnostics turn process-memory measurements into pressure events and operator warnings. Doctor normalizes legacy configuration during repair; its notices explain which settings changed.

flowchart TD
  A[Process memory measurements] --> B[Pressure detection]
  B --> C[Pressure event and warning]
  C --> D[Supported diagnostic commands]
  E[Legacy configuration] --> F[Shared Doctor migration]
  F --> G[Normalized configuration]
  F --> H[Named removal notice]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -7, Tests +37, Docs +1. Total +31 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 5 31 38 -7
Tests 4 62 25 +37
Docs 2 13 12 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 106 75 +31

Review metrics

Metric Value Why it matters
Critical-pressure warnings 2 warnings become 1 The retained warning carries the memory measurements and current diagnostic guidance without the misleading duplicate.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor/shared/legacy-config-migrations.runtime.retired-media.ts, migration/backfill/repair: src/commands/doctor/shared/legacy-config-migrations.runtime.retired.ts, migration/backfill/repair: src/commands/doctor/shared/legacy-config-record-shared.ts, serialized state: src/commands/doctor/shared/legacy-config-migrations.runtime.retired-media.ts. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Technical review

Best possible solution:

Keep automatic capture retired while giving operators accurate diagnostic commands and precise notices through the existing diagnostics and Doctor owners.

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

Yes, from source: a critical pressure event emits both obsolete messages on current main, and retired-key migration emits a generic notice. No live Gateway or memory-pressure workload was executed.

Is this the best way to solve the issue?

Yes: the patch corrects the existing owners’ output and documentation while preserving configuration deletion semantics, pressure detection, and the intentional capture retirement.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3c0fb2025a1d.

Labels

Label changes:

  • add P3: This corrects operator guidance without changing pressure detection, capture capability, or which configuration settings are retired.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository context identifies a maintainer-authored PR, so the external-contributor proof gate does not apply. Reported synthetic migration and pressure tests cover the changed notices; no real Gateway or published-driver upgrade run is claimed.

Label justifications:

  • P3: This corrects operator guidance without changing pressure detection, capture capability, or which configuration settings are retired.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 supplied repository context identifies a maintainer-authored PR, so the external-contributor proof gate does not apply. Reported synthetic migration and pressure tests cover the changed notices; no real Gateway or published-driver upgrade run is claimed.

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)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit fedf378 into main Sep 17, 2026
278 checks passed
@steipete
steipete deleted the upd/config-memory-pressure-snapshot branch September 17, 2026 13:18
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
…openclaw#150894)

Clarify the retirement of diagnostics.memoryPressureSnapshot and automatic pre-OOM stability snapshots. Critical-memory warnings now emit the existing measurements once and point to supported diagnostics export, existing stability bundle inspection, and manual Node allocation profiling.

Doctor now names the retired tuning keys it actually removes, including explicit false values and concrete wildcard paths, through the shared migration owner. Preserve the intentional retirement from openclaw#111382 and openclaw#130754, configuration deletion semantics, backup/write flow, and automatic startup repair ownership.

Related: openclaw#150864. Thanks @dom521 for reporting the confusing upgrade messaging.

Validation: five focused suites (350 tests) and check:changed passed in the author lane; exact-head CI run 35222541964 is green. Approved Codex autoreview and ClawSweeper review found no actionable issues. Proof used synthetic inputs; no real Gateway or OOM workload was run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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