Skip to content

[codex] improve ClawHub diversion handoff - #342

Merged
steipete merged 2 commits into
openclaw:mainfrom
brokemac79:codex/clawhub-diversion-handoff
Jul 4, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
brokemac79:codex/clawhub-diversion-handoff

Conversation

@brokemac79

@brokemac79 brokemac79 commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • rewrite the ClawHub diversion handoff onto current main
  • explain the expected installable package shape, metadata, manifest basics, and self-service next steps
  • keep ClawSweeper inside its repository boundary: no creating ClawHub issues, PRs, or packages on a contributor's behalf
  • move the stale monolithic test into the current split policy suites and add prompt coverage
  • add an Unreleased changelog entry thanking @brokemac79

Current-main rewrite

The original branch conflicted only because test/clawsweeper.test.ts has since been split. The production behavior remains useful, and the assertions now live in test/review-close-policy.test.ts and test/review-prompt-policy.test.ts against current main.

Final diff: 5 files, +33/-2.

Proof

  • pnpm run build:all
  • node --test test/review-close-policy.test.ts test/review-prompt-policy.test.ts — 50/50 passed
  • pnpm run check — 600 unit tests and 596 repair tests passed
  • changed coverage — 100.00% lines, 89.17% branches, 100.00% functions
  • overall coverage — 76.64% lines, 70.59% branches, 83.86% functions
  • formatting — clean across 295 files
  • full-branch AutoReview — clean, confidence 0.91

Risk

Low. This changes only the explanatory close comment for the clawhub route and its review prompt; it does not create or publish cross-repository work.

@clawsweeper

clawsweeper Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 6:11 PM ET / 22:11 UTC.

Summary
The branch adds a ClawHub handoff block to clawhub close comments, updates review-prompt guidance, and adds focused renderer and prompt-policy tests.

Reproducibility: not applicable. This PR changes close-comment rendering and review prompt policy rather than reporting a reproducible bug. Source inspection and the PR body's rendered output establish the changed behavior.

Review metrics: 2 noteworthy metrics.

  • Diff size: 4 files changed, +31/-2. The code, prompt, and test changes are small enough to review as one focused close-comment improvement.
  • Merge state: CONFLICTING / DIRTY. The branch cannot land until it is rebased onto the current test layout on main.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebase onto current main and move the close-policy assertion updates from test/clawsweeper.test.ts to test/review-close-policy.test.ts.
  • Rerun the focused close-policy and prompt-policy checks after resolving conflicts.

Risk before merge

  • [P1] The branch is not mergeable in its current state because GitHub reports CONFLICTING/DIRTY; maintainers need a rebase or cherry-pick onto current main before normal merge checks can be trusted.

Maintainer options:

  1. Decide the mitigation before merge
    Rebase the narrow handoff onto current main, keeping the renderer helper and prompt guidance while moving the close-policy assertions into the current split test files.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • The remaining action is a branch rebase against current main’s split test layout, not a concrete code defect in the proposed handoff logic.

Security
Cleared: The diff changes renderer copy, prompt text, and tests only; it does not add dependencies, workflows, secrets handling, permissions, or new code-execution paths.

Review details

Best possible solution:

Rebase the narrow handoff onto current main, keeping the renderer helper and prompt guidance while moving the close-policy assertions into the current split test files.

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

Not applicable; this PR changes close-comment rendering and review prompt policy rather than reporting a reproducible bug. Source inspection and the PR body's rendered output establish the changed behavior.

Is this the best way to solve the issue?

Yes after rebase; a reason-gated renderer helper plus focused prompt and close-policy tests is a narrow maintainable way to improve ClawHub diversion comments. The safer next step is to apply it onto the current split test layout instead of merging the stale branch as-is.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.

Label justifications:

  • P3: This is low-risk close-comment copy, prompt policy, and focused test cleanup, with a rebase blocker rather than an urgent runtime defect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes after-fix live rendered output from the built close-comment path showing the new ClawHub handoff block.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-fix live rendered output from the built close-comment path showing the new ClawHub handoff block.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully and applies because this PR changes ClawSweeper review/close automation; the policy favors narrow, evidence-backed, automation-safe changes and release-owned CHANGELOG handling. (AGENTS.md:1, 44f0d7ac1222)
  • Current main lacks the requested handoff: Current main still has the ClawHub close outro ending with installable community skill wording and no closeClawHubHandoffBlock, ClawHub handoff, or self-serve boundary text. (src/clawsweeper.ts:9079, 44f0d7ac1222)
  • Current renderer insertion point: Current main renders the close outro directly after close details setup, so the PR’s handoff block remains a unique renderer change rather than already-implemented behavior. (src/clawsweeper.ts:14317, 44f0d7ac1222)
  • PR renderer change: The PR adds a reason-gated closeClawHubHandoffBlock helper and inserts it before the ClawHub close outro. (src/clawsweeper.ts:8686, bca188259c83)
  • PR prompt and tests: The PR adds prompt guidance for self-serve ClawHub handoffs and targeted assertions for renderer output and prompt policy. (prompts/review-item.md:406, bca188259c83)
  • Current-main test split creates rebase work: Current main moved the existing ClawHub close-policy test out of test/clawsweeper.test.ts into test/review-close-policy.test.ts, so the PR’s test update needs to be rebased onto the new file layout. (test/review-close-policy.test.ts:435, 1c19987cde97)

Likely related people:

  • RomneyDa: Git blame attributes the current close renderer, ClawHub close copy, and prompt policy lines to the review automation history, and test: split review policy tests #367 moved the relevant close-policy test surface on current main. (role: introduced behavior and recent adjacent contributor; confidence: high; commits: d9d50ab6f70d, 1c19987cde97, 4cab87ce3d7f; files: src/clawsweeper.ts, prompts/review-item.md, test/review-close-policy.test.ts)
  • steipete: GitHub maps the v0.3.0 release snapshot commit to this handle, which is relevant provenance for the older ClawSweeper review/close-comment surface before later grafted history. (role: release snapshot owner; confidence: medium; commits: dc824915bb6c; files: src/clawsweeper.ts, prompts/review-item.md, test/clawsweeper.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 19, 2026
Comment thread prompts/review-item.md
@@ -406,6 +406,7 @@ Close only when the evidence is strong and the repository policy allows it. Allo
- `mostly_implemented_on_main`: an older PR is more than 60 days old, current `main` already implements the central useful part of the PR, and no meaningful unique remainder should be merged from the branch. Use only for pull requests, not issues. The close comment must say what part is already on `main`, what leftover part is minor/obsolete/superseded or separately tracked, and why keeping the stale branch open is not useful.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not current mani report

@vincentkoc
vincentkoc marked this pull request as ready for review June 23, 2026 09:41
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Jun 30, 2026
@steipete steipete self-assigned this Jul 4, 2026
…on-handoff

# Conflicts:
#	test/clawsweeper.test.ts
@steipete
steipete merged commit 6060709 into openclaw:main Jul 4, 2026
7 checks passed
@steipete

steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Landed in 6060709d601d. Thank you, @brokemac79.

I rewrote the branch onto current main, preserved the ClawHub handoff, made the package/manifest and repository-boundary guidance explicit, and moved the stale monolithic assertion into the current split policy suites.

Final proof on exact head 883fcc92ae1fb4133e8228ebec47458d3448c564:

  • focused policy tests: 50/50 passed
  • full local check: 600 unit and 596 repair tests passed
  • changed coverage: 100.00% lines, 89.17% branches, 100.00% functions
  • full branch AutoReview: clean, confidence 0.91
  • required GitHub checks: all green, including pnpm check in 8m47s and Windows launcher

azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
Rewrite the ClawHub close path onto current main, give contributors a concrete installable-package handoff, preserve the cross-repository boundary, and move coverage into the current split policy suites.

Co-authored-by: brokemac79 <[email protected]>
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. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

3 participants