Repository navigation
refactor: simplify Gateway health response parsing - #147834
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 3:43 AM ET / 07:43 UTC (Revision 3). ClawSweeper reviewWhat this changesSimplifies Gateway health diagnostic parsing with the existing record-validation helper and removes the obsolete type-assertion allowance. Merge readiness✅ Ready for maintainer review No blocking defect found. The refactor remains distinct from current main, and the maintainer’s assessment resolves the previous proof-scope decision. This protected PR can proceed through normal merge gates. Priority: P3 Review scores
Verification
How this fits togetherThe CLI reads Gateway health responses during restart verification. Plugin and channel errors feed restart health decisions and operator-facing diagnostics. flowchart LR
A[Gateway health response] --> B[Validate diagnostic records]
B --> C[Activated plugin errors]
B --> D[Channel probe errors]
C --> E[Restart health decision]
D --> E
E --> F[CLI diagnostics]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -21, Other -1. Total -22 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep diagnostic extraction on the shared record-validation owner while preserving restart decisions, messages, and update behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses internal parsing duplication, and no concrete behavioral regression was found during source review. Is this the best way to solve the issue? Yes: reusing the existing record helper removes assertions without adding a competing parser, public API, or compatibility path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0d081a0ee88a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* commit '8e6fe8e02ddb51bfec4e80071f0f2adcae4cf098': (47 commits) refactor: simplify Gateway health response parsing (#147834) fix: avoid Gateway stalls when renaming sessions (#147869) refactor(plugins): reuse worker optional-method validation (#147925) refactor(infra): remove unreachable firewall diagnostic fallback (#147882) fix(ui): open attached automations from session hovercards (#147749) refactor(reply): share usage-bar numeric coercion (#147863) fix(doctor): report warnings for keyed agent configs (#123058) perf(plugins): reuse complete registry comparisons (#147893) fix(workboard): await lifecycle sweep completion in tests (#147950) fix: reduce stalls when browsing large session inventories (#147911) refactor(onboard): share custom model definition (#147915) feat(ios): collapse completed chat work above replies (#148002) fix(voice-call): retain state runtime for deferred streams (#147689) test(qa): compare Telegram entities semantically (#147752) fix(plugins): preserve runtime scope for deferred CLI actions (#147688) test(qa): keep Slack progress marker visible (#147748) test(qa): finish channel picker prompts (#147730) test(tui): handle auth restriction prompt (#147729) fix(qa): retain onboarding prompts across redraw bursts (#147687) fix(qa): seed Teams ambiguous timeout deterministically (#147686) ...
* commit '069710f909f0a7158777d0fc0bf1eab84e20c699': (45 commits) refactor(infra): consolidate update campaign reset ownership (openclaw#146555) refactor: simplify Gateway health response parsing (openclaw#147834) fix: avoid Gateway stalls when renaming sessions (openclaw#147869) refactor(plugins): reuse worker optional-method validation (openclaw#147925) refactor(infra): remove unreachable firewall diagnostic fallback (openclaw#147882) fix(ui): open attached automations from session hovercards (openclaw#147749) refactor(reply): share usage-bar numeric coercion (openclaw#147863) fix(doctor): report warnings for keyed agent configs (openclaw#123058) perf(plugins): reuse complete registry comparisons (openclaw#147893) fix(workboard): await lifecycle sweep completion in tests (openclaw#147950) fix: reduce stalls when browsing large session inventories (openclaw#147911) refactor(onboard): share custom model definition (openclaw#147915) feat(ios): collapse completed chat work above replies (openclaw#148002) fix(voice-call): retain state runtime for deferred streams (openclaw#147689) test(qa): compare Telegram entities semantically (openclaw#147752) fix(plugins): preserve runtime scope for deferred CLI actions (openclaw#147688) test(qa): keep Slack progress marker visible (openclaw#147748) test(qa): finish channel picker prompts (openclaw#147730) test(tui): handle auth restriction prompt (openclaw#147729) fix(qa): retain onboarding prompts across redraw bursts (openclaw#147687) ...
* commit 'a08cdc50bc049074ed7ad2db9e18e0ed3f5415ec': (81 commits) perf: reuse stateless plugin scope defaults (#148080) fix(gateway): flush slow-consumer 1008 close frame before terminating socket (#147707) fix: keep model catalogs loading during other session updates (#147878) fix: show queued external chat messages and their source (#147848) refactor(chat): share math label configuration (#148073) perf(ui): trim eager debug overlay icon payload (#147954) improve(logbook): sample batch frame metadata in SQLite (#147999) fix(ui): dismiss suggested task cards without waiting (#148021) fix(maturity): cover governance, interoperability, fleet, and state (#143528) chore(ui): restore core lint and startup budget checks (#148010) fix: chat startup loads unnecessary session setup text (#147973) perf: speed up fresh cloud worker activation (#147945) fix: recover PR preparation after committed merge conflicts (#148063) test(plugins): isolate ClawHub Docker fixture identity (#148074) fix(release): acknowledge ClawHub risk on moving installs (#148041) fix: restore context reads for installed official Discord and Slack plugins (#143341) fix: identify source capsule filesystem failures (#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (#146049) refactor(infra): consolidate update campaign reset ownership (#146555) refactor: simplify Gateway health response parsing (#147834) ...
* commit '7d485aa2e89af7fdbd09e8ed0489b06d250b07e3': test(scripts): check the configurable ClawHub sweep spec fix: show queued external chat messages and their source (openclaw#147848) refactor(chat): share math label configuration (openclaw#148073) perf(ui): trim eager debug overlay icon payload (openclaw#147954) improve(logbook): sample batch frame metadata in SQLite (openclaw#147999) fix(ui): dismiss suggested task cards without waiting (openclaw#148021) fix(maturity): cover governance, interoperability, fleet, and state (openclaw#143528) chore(ui): restore core lint and startup budget checks (openclaw#148010) fix: chat startup loads unnecessary session setup text (openclaw#147973) perf: speed up fresh cloud worker activation (openclaw#147945) fix: recover PR preparation after committed merge conflicts (openclaw#148063) test(plugins): isolate ClawHub Docker fixture identity (openclaw#148074) fix(release): acknowledge ClawHub risk on moving installs (openclaw#148041) fix: restore context reads for installed official Discord and Slack plugins (openclaw#143341) fix: identify source capsule filesystem failures (openclaw#147778) fix(linux): keep Quick Chat widgets bound to their Gateway (openclaw#146049) refactor(infra): consolidate update campaign reset ownership (openclaw#146555) refactor: simplify Gateway health response parsing (openclaw#147834)
What Problem This Solves
The Gateway health reader repeats object checks and uses type assertions while extracting plugin and channel diagnostics.
User Impact
No user-visible behavior change. Health fields, diagnostic messages, restart/update timing, recovery decisions and service commands remain unchanged.
Why This Change Was Made
Use the existing record-coercion owner and construct typed plugin errors only after validating their fields. This removes seven assertions and 21 production lines. The obsolete seven-assertion allowance is removed from the ratchet baseline as exact shrink-only maintenance.
Evidence
The three existing mocked restart cases, formatting, all 30 sections of the selected changed-file gate and final diff checks passed. The unchanged production diff has clean independent P2 review; the subsequent metadata deletion was verified against the ratchet owner.
The published v2026.9.4 reader and candidate matched on 471 serialized JSON cases. The published-updater package cell also passed: exactly one 2026.9.3/base upgrade to this candidate, including automatic migration before Doctor, retained-state checks, startup, health/readiness and RPC. The package hash and source were verified. This cell uses manual restart; detailed recovery receipts were not uploaded, so it does not establish a clean first update attempt or updater-owned restart. No operator Gateway or service was modified.
The initial PR CI run failed an unchanged CUA process-cleanup test. A single isolated diagnostic passed through the real CUA/cleanup entry on the same Linux x86_64 and Node 24.19.0 runtime. Both process/output and extinction waits settled successfully; the original failure remains unexplained. The failed-job retry is tracked separately from the parser and package proof.
Maintainer assessment
The documented package-proof limits are acceptable for this bounded refactor. The changed code only extracts plugin and channel diagnostics from serialized health responses; authentication, restart/update orchestration, recovery and service commands are unchanged. Existing restart tests exercise the diagnostic decisions, 471 serialized cases establish reader parity, and the published 2026.9.3/candidate package cell passed migration, retained-state, startup, health/readiness and RPC checks.
Manual restart and the unavailable detailed recovery receipts remain explicit limits. They do not identify an introduced failure in the changed readers. The original CUA cleanup failure also remains unexplained; its matching-runtime diagnostic and CI retry passed. This assessment resolves ClawSweeper's merge-risk decision for the parser change, with normal native review and merge gates still required.