Skip to content

refactor: import dashboard and planning presentation directly - #1907

Merged
obviyus merged 1 commit into
mainfrom
cleanup/row3-planning-status
Oct 10, 2026
Merged

obviyus merged 1 commit into
mainfrom
cleanup/row3-planning-status

Conversation

@obviyus

@obviyus obviyus commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Current main-based head

Current head: 282480fb9b21d398a1d6d182ee21ba22d9bcdc9d. Rebased directly onto origin/main at 0fc6d572bc (the squash merge of #1905), using git rebase --onto origin/main 271e40eec00ed12dc45ee5e91a3ac3a45b84de74. The rebase applied cleanly, carries only this slice's one commit, and adds no adapters.

Current-head validation and real behavior proof

Pueue 1723, bash handoffs/clawsweeper-row3/rebase-main-1906-1907.sh, completed successfully; full output inspected with pueue log 1723 --full:

  • Fresh pnpm run build:all for the immutable baseline and this exact candidate head.
  • 135/135 focused tests passed.
  • pnpm run lint and pnpm run format:check passed. The unchanged scheduler duplicate-candidate proof also passed; the focused tests include the audit memory regression.
  • The shipped-CLI comparison driver in slice6-proof/ passed 16/16 identical before/after cases, unchanged fixtures and assertions, against immutable baseline 75d3a7d2a2339171d31ec1f158e9399f673091b7.

Current build manifests, raw outputs, request traces and comparison summary: handoffs/clawsweeper-row3/rebase-main-1907-proof/. The claim, exercised CLI scenarios, normalization and limits are the same as the original proof below; this replay supersedes its candidate SHA. Native macOS arm64 / Node 24.21.0, controlled executable gh / filesystem fixtures (plus loopback HTTP for the comment proof), no live GitHub/Worker mutation. No merge or deployment.

What Problem This Solves

Row 3, narrowed slice 6: dashboard rendering and planning activity presentation still receive copies of pure formatting, policy, and link functions through factories.

Based directly on main; predecessor #1905 is already squash-merged. Independent of the comment-owner PR #1906.

User Impact

No intended dashboard, planning, audit, schema, or stored-format change.

Why This Change Was Made

Remove createDashboardPresentation and import pure dashboard/cadence/activity operations directly. Update every affected production and test caller. The existing planning-dashboard factory now owns only the retry-state overlay and its existing test wrapper.

Explicit scope decision: the lead deferred the selection-policy cutover. Inventory, hot intake, selection, their dependency seams and current runnable selection proofs remain unchanged. The later cutover first needs real-behavior tests covering the existing proof assertions. No new fixture infrastructure was added to this PR. Audit/status run ownership and report loading/retention are unchanged.

Diff against the stack base: 561 added / 697 removed = 136 net lines removed. git diff -w --stat: 182 added / 318 removed, 500 changed lines across 19 files.

OpenClaw Bay Impact

None. Public observer data, Worker routes, schemas and UI remain unchanged. This is an internal Markdown presentation composition change.

Documentation Impact

The existing dashboard/status contract remains accurate; added a changelog fragment and updated the Row-3 plan with the deferred selection work. Only these frozen proof drivers receive mechanical import/call migration:

  • docs/proof/forged-evidence-fields/run-proof.mjs
  • docs/proof/forged-rating-lists/run-proof.mjs
  • docs/proof/review-next-step-intent/replay.mjs

Their fixtures, assertions and narratives are unchanged. Historical baseline arms retain their original factory calls. scheduler-duplicate-candidate-stranding/run-proof.mjs, aggregate-review-recovery, hydration-watermarks and pr-read-model-kind drivers remain unchanged and runnable with current code.

Original Behavior Proof (historical; current-head replay above)

Claim: the shipped CLI produces identical plan/audit/dashboard output, request ordering and report-read behavior after the pure-presentation import cutover.

Before: 75d3a7d2a2339171d31ec1f158e9399f673091b7 (same runtime as the repaired stack base; its later change is test-only). After: 4815a538f1c1275e4b52ea23e6d17fe0229e159e.

Environment: native macOS arm64, Node 24.21.0; freshly built CLI in copied isolated roots, real report/retry-state files, executable gh fixtures and fixed wall clock. No live GitHub/Worker mutation.

Pueue 1702 passed 16/16 identical before/after comparisons: explicit, scanned and hot planning; complete, strict and truncated audit for both repositories; default multi-profile dashboard; and ClawHub → OpenClaw → ClawHub dashboard routing. Compared complete stdout/stderr, structured results, Markdown, ordered gh requests, and actual filesystem read/list order and bytes. Only temporary root paths are normalized; raw outputs remain.

Receipts, build/input manifests and traces: handoffs/clawsweeper-row3/slice6-proof/comparison-3/.

Limits: controlled process/filesystem proof, not live permissions or an asymptotic memory proof. No reader/loading/retention changes, so the full ~80k corpus gate is not triggered. The existing 2,048-report/64 MiB memory regression also passes.

Original Evidence (historical)

  • Pueue 1698: build:all, 135/135 focused dashboard/rendering/record/activity tests, including the audit memory regression; unchanged scheduler duplicate-candidate proof passed. Its subsequent lint finding was an unused import, now removed.
  • Pueue 1700: final build:all, lint and format:check passed.
  • Pueue 1701: fresh committed-head codex review --base origin/main found no actionable regressions. Model-catalog refresh warnings did not prevent completion.
  • No merge, deployment, production mutation or first-open re-review request.

@clawsweeper

clawsweeper Bot commented Oct 10, 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.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 10, 2026
@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces injected dashboard and planning presentation helpers with direct imports while preserving retry-state loading.

Example: Display cadence coverage for 8 current items out of 10.

  • Before: The factory-provided formatter renders “8/10 current (2 due, 80%)”.
  • After: The directly imported formatter renders the same text.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Source review supports the scoped refactor; the repository's runtime-proof gate remains uncleared.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: No runtime failure is claimed; redundant presentation dependency plumbing increases maintenance cost.
Reason: The supplied maintainer-authored direction supports this narrow simplification, which reduces code and explicitly defers selection-policy changes.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a useful, scoped refactor that current main does not implement, and source review found no actionable regression.

Priority: P3
Reviewed head: 282480fb9b21d398a1d6d182ee21ba22d9bcdc9d

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide accessible current-head CLI comparison output and traces covering planning, audit, dashboard rendering and repository routing.
Agent review details

How this fits together

The CLI combines saved review reports, repository snapshots and retry state into audit statistics and Markdown dashboards.

flowchart LR
  A[Saved review reports] --> C[Audit owner]
  B[Retry state] --> D[Retry overlay owner]
  D --> C
  C --> E[Presentation imports]
  E --> F[Markdown dashboard]
Loading

Technical review

Best possible solution:

Retain the focused direct-import cutover with unchanged dashboard output, retry-state loading and selection behavior.

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

No runtime bug is claimed; source inspection confirms the presentation factory indirection remains on current main.

Is this the best way to solve the issue?

Direct imports fit these unchanged pure helpers, the located callers are migrated, and retry-state I/O retains its existing owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0fc6d572bc2a.

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0036015 adds src/clawsweeper-review-planning.ts:8 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0036015e1dd0; files: src/clawsweeper-review-planning.ts)
  • Vincent Koc: Raw commit 6a56eee adds src/clawsweeper-review-planning.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 6a56eee17378; files: src/clawsweeper-review-planning.ts)

Review metrics

Metric Value Why it matters
Production footprint +497 / -622; net -125 lines The seven production files remove dependency plumbing; most remaining churn moves existing function bodies out of factories.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is internal maintenance with no intended change to user-visible output or review selection.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-10T15:46:17.576Z sha 4815a53 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-10T15:53:41.010Z sha 0ce6a13 :: needs maintainer review before merge. :: none

Reviewed October 10, 2026, 12:03 PM ET / 16:03 UTC (Revision 3).

@obviyus
obviyus force-pushed the cleanup/row3-planning-status branch from 4815a53 to 0ce6a13 Compare October 10, 2026 15:50
@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

Base automatically changed from cleanup/row3-github-imports to main October 10, 2026 15:56
@obviyus
obviyus force-pushed the cleanup/row3-planning-status branch from 0ce6a13 to 282480f Compare October 10, 2026 16:00
@obviyus

obviyus commented Oct 10, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus
obviyus merged commit 43205ee into main Oct 10, 2026
19 of 22 checks passed
@obviyus
obviyus deleted the cleanup/row3-planning-status branch October 10, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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