Repository navigation
refactor(health): skip unused verbose account projection - #152108
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 18, 2026, 3:54 PM ET / 19:54 UTC (Revision 2). ClawSweeper reviewWhat this changesThe health command skips unused account-selection work in verbose mode and consolidates formatting calls while preserving output. Merge readiness✅ Ready for maintainer review No actionable defects found. This remains a useful, bounded cleanup absent from current main and the latest release. The previous external-contributor proof blocker does not apply to this maintainer-authored PR. Priority: P3 Review scores
Verification
How this fits togetherThe health command retrieves a Gateway health snapshot and formats channel, agent, and session diagnostics. Ordinary text output uses account bindings; verbose output includes all accounts, while JSON returns the snapshot directly. flowchart TD
A[Health command options] --> B[Gateway health snapshot]
B --> C{Output mode}
C -->|JSON| D[Full snapshot output]
C -->|Ordinary text| E[Bound account selection]
C -->|Verbose text| F[All accounts]
E --> G[Health formatter]
F --> G
G --> H[Terminal diagnostics]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -2. Total -2 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep account selection in the existing formatter and avoid constructing data it explicitly ignores, without promising an end-to-end speedup. Do we have a high-confidence way to reproduce the issue? Not applicable as a user-facing bug: source inspection confirms the discarded verbose projection, but this review did not execute runtime or performance checks. Is this the best way to solve the issue? Yes. The existing formatter already ignores this map in verbose mode, so skipping its construction is a narrow simplification that preserves the documented selection contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 02d716ba5b73. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…49075-c1-control-repair * commit 'dc5b321b5f89f9cf0e704ee202ea3059fb1ce63d': (79 commits) fix: start background context maintenance after durable turns (#151936) fix(models): avoid ambient state reads during prepared selection (#152119) feat: recover abandoned Crabbox source staging (#152006) chore(ui): refresh control ui locales (#152098) fix(ui): keep cloud startup prompts and progress in chat (#152024) fix: report completed subprocess cleanup after cancellation (#152107) perf(reply): reuse normalized inbound text (#152110) fix(cron): paused future one-shots disappear after Run now (#152126) perf(sessions): reuse rows and skip discarded terminal labels (#152109) fix(ui): keep keyboard-focused automation controls clear of sticky actions (#152135) fix(ui): load remote images in compact activity previews (#152045) refactor(health): skip unused verbose account projection (#152108) fix: restore dashboard test limits and SQLite test compilation (#152089) test(qa-lab): stabilize timeout recovery delivery proof (#152100) fix: probe SQLite when Node denies worker threads (#152075) perf(gateway): keep GitHub co-author trailer scans linear (#152115) fix(media): report CLI models with missing command or args (#151969) refactor: remove retired runtime code and duplicate helpers (#151973) perf(plugins): combine runtime and tool call scopes (#152101) test(memory): seed restart fixtures with the Gateway stopped (#152038) ...
What Problem This Solves
Verbose health output builds an account-selection projection that its formatter deliberately ignores.
User Impact
Health output, account selection, probes, identity logging and diagnostics remain unchanged. This removes discarded work; measurements do not establish a general health-command speedup.
Why This Change Was Made
Skip the channel/agent/account projection in verbose mode and consolidate the formatter call. Default-mode ordered deduplication and empty-map behavior stay unchanged. Binding preparation remains available for debug output and identity logging. Production shrinks by two lines, with no cache, configuration or migration change.
Evidence
All 160 selected tests and 30 maintained checks passed. Fresh managed Codex P2 review and independent source, output, numerical and closure audits passed.
Fixed baseline/candidate/candidate/baseline proof exercised the actual command, binding/account owners, formatter and serialization with synthetic Gateway/discovery boundaries. Complete outputs, parameters, callbacks, errors and inputs match across 20,736 calls plus 352 references, including default, verbose and JSON modes.
All mixed results remain visible: dense 64-agent verbose output was slower by 2.44%/0.36%; ordinary-eight verbose changed by −9.69%/+9.93%. Default one-bound output regressed 5.55%/18.03%, and unchanged reverse JSON controls also regressed. Across 112 comparisons, 33 wall and 35 CPU comparisons were adverse. No retiming or outlier removal occurred.
These are shared-host batch measurements excluding startup, network, database and terminal-sink latency. Retained harness inputs and output graphs prevent a memory-allocation claim. The value here is removal of an unused traversal and duplicate call structure, not a universal latency or memory promise.