Repository navigation
refactor(diagnostics): remove retired pressure-bundle writer - #130754
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 2:29 AM ET / 06:29 UTC. ClawSweeper reviewWhat this changesThe PR removes the retired automatic memory-pressure bundle writer and its private data collectors while retaining diagnostic events, old-bundle reading, sanitization, CLI rendering, and support export. Merge readinessNo blocking correctness finding: the sole production heartbeat caller on current main explicitly disabled this writer, and the PR deletes that dormant path while retaining legacy-bundle parsing and manual/fatal bundle writers. This maintainer-labeled PR should remain open for its normal maintainer and exact-head CI handling. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe diagnostics heartbeat samples process memory and emits pressure events for Gateway operators. Stability bundles are separately written for manual or fatal-error cases, then read, sanitized, rendered, and exported by CLI support flows. flowchart LR
A[Diagnostics heartbeat] --> B[Memory sampler]
B --> C[Pressure event and warning]
D[Manual and fatal bundle writers] --> E[Stability bundle storage]
E --> F[Sanitized bundle reader]
F --> G[CLI rendering and support export]
Decision needed
Why: The source review supports the deletion, but the protected maintainer label requires explicit maintainer handling rather than automated closure. Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -350, Tests -124. Total -474 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one canonical diagnostics design: pressure sampling emits records and operator guidance, while manual and fatal-error paths remain the only bundle producers and old bundles stay readable. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a cleanup review; source inspection establishes the dormant production call path and preserved reader behavior. Is this the best way to solve the issue? Yes: deleting the unreachable producer at the diagnostics owner is cleaner than retaining dead collectors or adding another compatibility path, while the existing reader preserves prior bundle files. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3708934c637a. 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
|
|
Final verification for head Both independent Codex reviews completed with no actionable findings: the pre-commit pass and a distinct published-head pass over the complete five-file diff plus 18 complete source contexts. The published source and proof tree stayed unchanged afterward. The complete pinned Linux checks, SDK surface/full build, strict consumer of freshly generated public callback declarations, and four real isolated built CLI processes all passed. The SDK consumer preserves every optional field from the published stable callback and current baseline. The CLI checks preserve old heap/cgroup/resource/session evidence, redaction, and imported-file bytes through explicit/latest reads and support ZIP export. No live OOM or Gateway is claimed; the export records the expected offline health result. The hosted SDK API-report job deliberately skips PR events, so the separate built SDK consumer is the actual compatibility proof. Production is +19/-369, net -350 lines; tests are +27/-151, net -124 lines. Only the unreachable automatic writer and its exclusive collectors were removed. Generic/manual/fatal writers, old bundle readers/sanitizers, pressure events/logging, and the shipped callback contract remain. The original stale local dependency failure and the corrected untracked CLI-fixture typo remain documented in the PR body. The latest ClawSweeper review has no findings; its only Rank-up move was to wait for exact-head CI, now completed. This authorized maintainer workflow supplies its requested maintainer handling; no new product decision or approval-rule bypass is involved. Nonblocking follow-up from review: the unchanged |
|
Merged via squash.
|
…#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 #111382 and #130754, configuration deletion semantics, backup/write flow, and automatic startup repair ownership. Related: #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.
…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.
Related: #111382 (retirement of numeric configuration knobs).
Additional instructions
This same-repository branch is available for maintainer edits.
What Problem This Solves
The diagnostics runtime still carried an automatic memory-pressure bundle writer after its configuration was retired and its only production caller was changed to pass
writeCriticalBundle: false. Its V8, cgroup, active-resource, and session-file collectors were unreachable in production but kept a second bundle-producing path and obsolete enabling tests alive.Why This Change Was Made
Remove that private writer and its exclusive collectors at the diagnostics owner. Memory sampling, threshold/growth detection, pressure events, warning text, and repeat suppression remain unchanged. The generic/manual and fatal-error bundle writers remain, as do existing bundle readers, sanitizers, retention, CLI rendering, and support ZIP export.
The public
logging-coreheartbeat callback retains all optional input fields from the stable SDK. This is a type-only preservation of a shipped callback contract, not a runtime compatibility shim. No public configuration, migration, persistence schema, or protocol changes.User Impact
No intended behavior change. Operators can still inspect and safely export older memory-pressure bundles. Plugin authors keep the existing heartbeat callback input contract. AI-assisted maintainer-requested cleanup; no UI surface changed.
Evidence
Production: +19/-369, net -350 lines. Tests: +27/-151, net -124 lines. Three obsolete writer cases were removed; the retained import/redaction test now explicitly covers old heap, cgroup, and active-resource evidence.
tbx_01m10v203mdkg4z3d0x94grzsr, Node 24.19.0 / Vitest 4.1.11; all six focused files and 158 tests passed. The complete source patch, dependency fingerprint, package/build/manifests, and 774 workspace aliases were checked before execution.node scripts/check-changed.mjs --base a678ed6565c209023ceb962d849972fc962497f6 --staged,pnpm plugin-sdk:surface:check, andpnpm buildgates. All 147 public SDK subpaths were verified; runtime import cycles and unused-export scans stayed at zero.dist/plugin-sdk/logging-core.jsdeclarations checks all nine optional callback fields from the actual[email protected]published declarations, all thirteen fields from current baseline, unchanged return type, optional arguments, and callback assignability in both directions.latest, render text and JSON, and export a support ZIP. Heap, cgroup, active-resource, and session-file evidence survives; host, session-name, payload, and fixture-token fields are redacted. Offline status/health results are recorded, and the imported file is not modified.The local typed-lint attempt stopped in prerequisite SDK declaration generation on stale unrelated Google, markdown-it, and TUI dependency types; the complete pinned checks above passed. The first CLI probe used the wrong fixture field name (
spaceAvailableSizeBytesinstead of the existingspaceAvailableBytescontract). After correcting only that untracked fixture, the full probe passed; production source and assertions were not weakened.