Skip to content

refactor(health): skip unused verbose account projection - #152108

Merged
steipete merged 1 commit into
mainfrom
codex/perf-health-verbose-projection-20260918
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/perf-health-verbose-projection-20260918

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: XS maintainer Maintainer-authored PR labels Sep 18, 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: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 3:54 PM ET / 19:54 UTC (Revision 2).

ClawSweeper review

What this changes

The 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
Reviewed head: a7ad63407f72b2c342f5fa9f53ff4db64d0dda61

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported simplification with no actionable correctness or security findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored internal cleanup is exempt from external-contributor proof requirements. The captured body reports command-and-formatter equivalence with synthetic Gateway boundaries; that supports output preservation without establishing live Gateway performance.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored internal cleanup is exempt from external-contributor proof requirements. The captured body reports command-and-formatter equivalence with synthetic Gateway boundaries; that supports output preservation without establishing live Gateway performance.
Evidence reviewed 10 items Verified introduced change: The merge-base-to-head diff only adds the verbose short circuit, normalizes an empty projection to undefined, and consolidates the formatter call.
Formatter establishes equivalence: The formatter explicitly ignores accountIdsByChannel when accountMode is all. Optional access also treats an omitted property and an undefined property identically. Default-mode ordered selection remains unchanged.
Existing behavioral contract: The CLI documentation specifies bound-account ordinary output, all-account verbose output, and full-snapshot JSON. Existing formatter tests cover explicit account scoping, verbose inclusion, inactive preferred accounts, and account ordering; these were inspected, not executed.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -2. Total -2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 8 10 -2
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 8 10 -2

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is internal cleanup preserving documented health output, with no demonstrated urgent user-facing defect.
  • 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 maintainer-authored internal cleanup is exempt from external-contributor proof requirements. The captured body reports command-and-formatter equivalence with synthetic Gateway boundaries; that supports output preservation without establishing live Gateway performance.

Evidence

What I checked:

  • Verified introduced change: The merge-base-to-head diff only adds the verbose short circuit, normalizes an empty projection to undefined, and consolidates the formatter call. (src/commands/health.ts:308, a7ad63407f72)
  • Formatter establishes equivalence: The formatter explicitly ignores accountIdsByChannel when accountMode is all. Optional access also treats an omitted property and an undefined property identically. Default-mode ordered selection remains unchanged. (src/commands/health-format.ts:156, a7ad63407f72)
  • Existing behavioral contract: The CLI documentation specifies bound-account ordinary output, all-account verbose output, and full-snapshot JSON. Existing formatter tests cover explicit account scoping, verbose inclusion, inactive preferred accounts, and account ordering; these were inspected, not executed. (src/commands/health-format.test.ts:287, a7ad63407f72)
  • Current-main necessity: Fetched main still builds the projection unconditionally and retains both formatter call branches. Its formatter is unchanged relative to the reviewed head. (src/commands/health.ts:307, 02d716ba5b73)
  • Latest-release check: The supplied latest release also retains the unconditional projection; this cleanup is not already present there. (src/commands/health.ts:307, 3a9d69db306c)
  • Merge-result ownership: Raw test-merge parents match the pinned base followed by the exact PR head. Comparing that merge against its base reproduces the narrow health-command change, with no evidence of base-only work being removed. (src/commands/health.ts:308, a44844935e25)

Likely related people:

  • steipete: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-18T19:48:02.541Z sha a7ad634 :: needs real behavior proof before merge. :: none

@steipete
steipete marked this pull request as ready for review September 18, 2026 19:50
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 18, 2026
@steipete
steipete merged commit 5617334 into main Sep 18, 2026
283 checks passed
@steipete
steipete deleted the codex/perf-health-verbose-projection-20260918 branch September 18, 2026 20:48
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…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)
  ...
vincentkoc added a commit that referenced this pull request Sep 18, 2026
…of-20260918

* origin/main:
  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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations 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: XS 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