Skip to content

refactor(status): remove redundant report section wrappers - #117777

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-cron-hooks-wave9-2d45
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-cron-hooks-wave9-2d45

Conversation

@steipete

@steipete steipete commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The status report assembly had a 205-line one-use wrapper module around the existing text renderer and table builders. That extra ownership layer duplicated section descriptors, callbacks, and empty-state policy, making the real report flow harder to follow and maintain.

Why This Change Was Made

Inline the exact section descriptors at their two report assembly owners, while retaining the canonical renderer, channel-row builder, and table-column helpers. This removes the redundant abstraction without merging independent owners or changing output, ordering, truncation, colors, defaults, or empty-state behavior.

The JSON status path returns before this text-report assembly and is unaffected.

Production LOC: 77 added, 265 removed, net -188. Tests: no line-count change.

User Impact

No user-visible behavior change. Maintainers get a shorter, more direct status-report implementation with one fewer internal layer.

Evidence

Real terminal behavior

Built exact head 2c825edc049c5adc0fb7a87e3bf363b19faf0557 on a fresh Blacksmith Testbox, then ran both real CLI paths with a disposable empty HOME, state directory, and config path. The fixture was removed afterward. Wrapper result: exitCode=0, runStatus=succeeded, Testbox tbx_01kz09cp8x0hm0ge1sqfew3xcp: https://github.com/openclaw/openclaw/actions/runs/30731256493

Representative redacted output from openclaw status (populated Overview and empty Channels/Sessions sections):

OpenClaw status

Overview
┌──────────────────────┬────────────────────────────────────────────────────┐
│ Item                 │ Value                                              │
├──────────────────────┼────────────────────────────────────────────────────┤
│ OS                   │ linux 6.6.141 (x64) · node 24.18.1                 │
│ Gateway              │ local · ws://127.0.0.1:18789 · unreachable        │
│ Agents               │ 0 · no workspaces bootstrapping · sessions 0      │
│ Plugin compatibility │ none                                               │
│ Events               │ none                                               │
│ Tasks                │ none                                               │
│ Sessions             │ 0 active · default unknown · unknown              │
└──────────────────────┴────────────────────────────────────────────────────┘

Security audit
Skipped in fast status. Full report: openclaw security audit
Deep probe: openclaw status --deep

Channels
No channels configured

Sessions
No sessions

Representative redacted output from openclaw status --all (populated Overview/Diagnosis and empty Channels/Agents tables):

OpenClaw status --all

Overview
┌────────────────────┬──────────────────────────────────────────────────────┐
│ Item               │ Value                                                │
├────────────────────┼──────────────────────────────────────────────────────┤
│ Version            │ 2026.7.2                                             │
│ OS                 │ linux 6.6.141 (x64)                                  │
│ Node               │ 24.18.1                                              │
│ Config             │ <temp>/state/openclaw.json                           │
│ Gateway            │ local · ws://127.0.0.1:18789 · unreachable          │
│ Gateway service    │ systemd user not installed                           │
│ Agents             │ 0 total · 0 bootstrapping · 0 active · 0 sessions   │
│ Secrets            │ none                                                 │
└────────────────────┴──────────────────────────────────────────────────────┘

Channels
┌──────────┬─────────┬────────┬──────────────────────────────────────────────┐
│ Channel  │ Enabled │ State  │ Detail                                       │
├──────────┼─────────┼────────┼──────────────────────────────────────────────┤
└──────────┴─────────┴────────┴──────────────────────────────────────────────┘

Agents
┌────────────┬────────────────┬──────────┬──────────┬────────────────────────┐
│ Agent      │ Bootstrap file │ Sessions │ Active   │ Store                  │
├────────────┼────────────────┼──────────┼──────────┼────────────────────────┤
└────────────┴────────────────┴──────────┴──────────┴────────────────────────┘

Diagnosis (read-only)
✓ Secret diagnostics (0)
✓ Restart sentinel: none
✓ Port 18789
✓ Plugin compatibility (none)
✓ Agent activity: 0 active in 30m · 0 sessions
Gateway health:
  gateway unreachable

No changelog entry: this is an internal behavior-preserving refactor.

@steipete steipete self-assigned this Aug 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: M maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 11:36 PM ET / August 2, 2026, 03:36 UTC.

ClawSweeper review

What this changes

The branch deletes the status-report section-wrapper module and constructs the same typed report sections directly in the standard and expanded status report assemblers.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

The patch is a coherent behavior-preserving cleanup: it removes a one-use wrapper while retaining the shared text renderer and row/table builders. Keep this PR open for the protected maintainer review path and add direct after-fix terminal evidence for both status report forms before merge.

Priority: P3
Reviewed head: 2c825edc049c5adc0fb7a87e3bf363b19faf0557
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation is a focused, source-supported cleanup, but its supplied proof is limited to tests and CI rather than observed command behavior.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body cites focused tests and CI, but no redacted after-fix terminal output or other observed real command behavior is available for the two changed status-report paths. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body cites focused tests and CI, but no redacted after-fix terminal output or other observed real command behavior is available for the two changed status-report paths. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current main preserves the wrapper layer: Current main still calls the report-section builders from both report assembly sites, so the central cleanup is not already implemented on main.
PR retains the renderer contract: The branch constructs the same table, lines, and raw section objects consumed by the shared renderer, preserving the renderer-owned heading, empty-section, column-copy, and trailer behavior.
Current-main drift check: No touched status-report path changed between the PR base and current main, so the PR is behind only because of unrelated main-branch work rather than a conflicting rewrite of its target surface.
Findings None None.
Security None None.

How this fits together

The openclaw status and openclaw status --all commands assemble report data into typed text sections, then pass them to one shared renderer that controls headings, table rendering, empty-section suppression, and trailers. This PR changes only the assembly layer; the shared renderer and report-data builders continue to produce terminal output.

flowchart LR
  A[Status command inputs] --> B[Standard report assembly]
  A --> C[Expanded report assembly]
  B --> D[Typed report sections]
  C --> D
  D --> E[Shared text renderer]
  E --> F[Terminal status output]
Loading

Decision needed

Question Recommendation
Should this protected maintainer-labeled refactor be merged after direct terminal evidence confirms that both status report variants retain their current output behavior? Merge after terminal proof: Accept the cleanup once a redacted before/after or post-change terminal capture demonstrates openclaw status and openclaw status --all with representative configured and empty sections.

Why: The source comparison supports the cleanup, but the protected label requires explicit maintainer handling and the supplied evidence is test/CI-only rather than an observed after-fix command run.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body cites focused tests and CI, but no redacted after-fix terminal output or other observed real command behavior is available for the two changed status-report paths. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The PR body reports focused tests and a changed gate, but it does not include after-fix output from the actual status and status --all command paths; tests and CI alone do not demonstrate identical terminal behavior for this external contribution.
  • Complete next step (P2) - The protected maintainer label and missing observed terminal proof require normal human review rather than an automated repair.
Agent review details

Security

None.

PR surface

Source -188. Total -188 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 77 265 -188
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 3 77 265 -188

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shared renderer and report-table helpers, land the direct assembly cleanup after a maintainer confirms the protected review path and a redacted terminal capture shows unchanged output for both status commands.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the shared renderer and report-table helpers, land the direct assembly cleanup after a maintainer confirms the protected review path and a redacted terminal capture shows unchanged output for both status commands.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR is an internal refactor, and current tests already define the report ordering and empty-section behavior that must remain unchanged.

Is this the best way to solve the issue?

Yes. Inlining one-use section wrappers at their two real assembly owners while preserving the shared renderer and report-data helpers is the narrowest maintainable cleanup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against f21ac5a73632.

Labels

Label changes:

  • add P3: This is an internal refactor with no demonstrated user-facing behavior change or urgent regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body cites focused tests and CI, but no redacted after-fix terminal output or other observed real command behavior is available for the two changed status-report paths. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is an internal refactor with no demonstrated user-facing behavior change or urgent regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body cites focused tests and CI, but no redacted after-fix terminal output or other observed real command behavior is available for the two changed status-report paths. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current main preserves the wrapper layer: Current main still calls the report-section builders from both report assembly sites, so the central cleanup is not already implemented on main. (src/commands/status-all/report-lines.ts:74, f21ac5a73632)
  • PR retains the renderer contract: The branch constructs the same table, lines, and raw section objects consumed by the shared renderer, preserving the renderer-owned heading, empty-section, column-copy, and trailer behavior. (src/commands/status-all/text-report.ts:75, 2c825edc049c)
  • Current-main drift check: No touched status-report path changed between the PR base and current main, so the PR is behind only because of unrelated main-branch work rather than a conflicting rewrite of its target surface. (src/commands/status.command-report.ts:43, f21ac5a73632)
  • Existing regression coverage: Current-main tests assert the ordered standard report output, optional-section omission, and empty channel/session behavior; the PR retains those assembly inputs and renderer calls. (src/commands/status.command-report.test.ts:10, f21ac5a73632)
  • Feature-history provenance: The current status-report wrapper layer appears to date to the most recent main-branch change on these paths, which introduced the shared status-report structure before this cleanup proposal. (src/commands/status-all/report-sections.ts:1, b2278f3d1059)

Likely related people:

  • WhatsSkiLL: The latest current-main commit touching all three status-report paths introduced the wrapper-based report structure that this PR simplifies. (role: recent area contributor; confidence: high; commits: b2278f3d1059; files: src/commands/status-all/report-lines.ts, src/commands/status-all/report-sections.ts, src/commands/status.command-report.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Post redacted terminal output from openclaw status and openclaw status --all after the change, including representative populated and empty report sections.

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.

@steipete
steipete merged commit 8623391 into main Aug 2, 2026
201 of 211 checks passed
@steipete
steipete deleted the codex/goal100k-cron-hooks-wave9-2d45 branch August 2, 2026 03:59
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant