Repository navigation
refactor(status): share plugin health section assembly - #155390
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 1:28 AM ET / 05:28 UTC (Revision 2). ClawSweeper reviewWhat this changesConsolidates six plugin-health report sections into a private helper and adds formatter tests preserving existing text, ordering, counts, and row limits. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, behavior-preserving cleanup absent from current main. The reviewed patch has no actionable correctness or security findings, and the prior review identifies no unresolved follow-up. Priority: P3 Review scores
Verification
How this fits togetherThe plugin-health formatter converts installed and running plugin diagnostics into the chat reply for /status plugins. The command handler controls access and collects the snapshot before formatting it. flowchart TD
A[Status plugins command] --> B[Authorization and command settings]
B --> C[Installed and runtime health snapshot]
C --> D[Sort and classify health records]
D --> E[Shared bounded section assembly]
E --> F[Detailed chat reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -19, Tests +167. Total +148 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep section assembly private to the existing formatter while preserving category-specific text and the established bounded output contract. Do we have a high-confidence way to reproduce the issue? Not applicable: this refactor reports no broken behavior; source comparison and formatter cases establish the preservation contract. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes: the local helper removes repeated assembly policy without introducing another owner, changing callers, or expanding the public API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 162b956ad90f. LabelsLabel changes: No label changes. Label 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.
|
* commit '80b9608a25e191a17e1466d750c2f76a38a38507': fix(tooling): declare tsx CLI shim exports test(gateway): reuse session PR access state fixtures (#155626) test(heartbeat): await wake registration before advancing coalescing time refactor(status): share plugin health section assembly (#155390) fix: CLI and MCP tool completions skip plugin hooks (#155206) fix(update): preserve failures and retain running worker code (#153764) fix(sqlite): drain idle coordinators at lifecycle teardown fix(test): prepare SQLite compile-cache probes before launch fix(test): preserve owned compiler caches in Vitest workers fix(ios): assistant files are not downloadable in chat (#155195) fix(heartbeat): avoid timeouts for busy scheduled polls (#148333) test(gateway): hold SSH approval until pending assertions finish test(update): cover launcher permission rollback on Linux (#155615) fix(edit): avoid duplicate replacements from legacy arguments (#155513) feat(browser): support Lightpanda connection-scoped CDP replies (#154342) improve(ci): speed up compatible Control UI tests with Bun (#154585) test(gateway): prepare remaining approval fixtures before requests (#155589) fix(doctor): exclude retained agents from automatic session import
Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Six plugin-health status categories repeat the same rule: omit empty sections, report the full count, and render only the first eight rows.
User Impact
No user-visible change is intended. Section and row ordering, full counts, the eight-row limit, and category-specific text remain unchanged. Empty sections do not format rows, and entries beyond the limit are not formatted. Diagnostics placement and disabled-plugin grouping retain their existing behavior.
Why This Change Was Made
Keep the repeated section-assembly policy in one private
appendSectionhelper inside the existing status formatter. Each category keeps its own row formatter and defaults. No public API, imports, configuration, or stored shape changes are introduced.Production changes are +36/−55 lines, net −19. Tests add 167 lines across three public-formatter cases. This is a mechanical internal refactor; no changelog entry is required.
Evidence
src/status/status-plugin-health.test.tssuite with identical expanded tests: 23 baseline and 23 candidate cases passed, for 46 test executions. The canonical gate forsrc/status/status-plugin-health.tsandsrc/status/status-plugin-health.test.tspassed all 31 checks.0b4cf2f0e5d7dc72b33c15d8405cc2be3cd6a575: all 130 jobs were terminal, with 113 successful and 17 skipped. The tested merge checkout wase6cd9637eb69942f7de04cbee0389409e7bbc952; this is separate from the paired proof above.0b4cf2f0e5d7dc72b33c15d8405cc2be3cd6a575and landing squash commit0ed077d468ce. This does not change the historical controller limitation above.