Skip to content

[codex] improve ClawHub diversion handoff#342

Open
brokemac79 wants to merge 1 commit into
openclaw:mainfrom
brokemac79:codex/clawhub-diversion-handoff
Open

[codex] improve ClawHub diversion handoff#342
brokemac79 wants to merge 1 commit into
openclaw:mainfrom
brokemac79:codex/clawhub-diversion-handoff

Conversation

@brokemac79

@brokemac79 brokemac79 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

This makes ClawSweeper's clawhub close path more useful when an OpenClaw issue or PR belongs in ClawHub rather than core.

  • Add a deterministic ClawHub handoff block to clawhub close comments with package scope, manifest/checklist basics, and an explicit self-serve boundary.
  • Update the review prompt so bestSolution and closeComment identify likely package shape and checklist details for skills, plugins, providers, channels, bundles, or MCP integrations.
  • Keep ClawSweeper from implying it will create cross-repo ClawHub work: the prompt now says not to open a ClawHub issue, PR, tracking issue, or publish the package on the contributor's behalf.

Why

The current close copy says to upload or publish through ClawHub, but it does not give the contributor enough practical next steps. This adds the useful part of a ClawHub diversion lane without making ClawSweeper mutate another repo or do the ClawHub packaging for the contributor.

Rendered Output Proof

Rendered through the built dist/clawsweeper.js close-comment path with reviewActionForDecision. The sample issue metadata is synthetic/redacted; the output below is produced by the real renderer on this branch.

validation.ok=true
action=proposed_close
--- rendered close comment ---
Thanks for the idea. I checked the current extension path, and this is a better fit for [ClawHub.com](https://clawhub.ai/) than OpenClaw core.

The branch adds an optional bundled skill and does not change required core behavior.

**ClawHub handoff**
If you want to carry this forward, package it as a self-serve ClawHub item rather than a core patch:

- Scope: choose the smallest skill, plugin, provider, channel, bundle, or MCP integration that matches the requested capability.
- Checklist: include package metadata/manifest, entrypoint, required permissions, secrets/config notes, install/update docs, example usage, and a smoke test or proof command.
- Boundary: ClawSweeper will not open a ClawHub issue or PR, create a tracking issue, or publish the package automatically; the contributor should create that ClawHub work separately.

So I’m closing this as a scope-fit item for the plugin/community path. Please upload or publish it through [ClawHub.com](https://clawhub.ai/) so it can live as an installable ClawHub package instead of a bundled OpenClaw core change.

Validation

  • pnpm install --frozen-lockfile
  • pnpm run build
  • pnpm exec oxfmt --check src/clawsweeper.ts test/clawsweeper.test.ts test/review-prompt-policy.test.ts
  • pnpm run lint:src
  • pnpm run lint:scripts
  • node --test --test-name-pattern "ClawHub closes a self-serve handoff|skill-only OpenClaw PRs can close through ClawHub" test\review-prompt-policy.test.ts test\clawsweeper.test.ts
  • codex -c 'service_tier="fast"' review --uncommitted returned no actionable findings.

Note: running the whole test/clawsweeper.test.ts file on this Windows worktree hit an unrelated CRLF-sensitive workflow fixture assertion. The two affected tests pass with the targeted test-name filter above.

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 23, 2026, 5:57 AM ET / 09:57 UTC.

Summary
The PR updates ClawSweeper’s ClawHub close-copy and review prompt so ClawHub-scope closes include a self-serve package handoff checklist.

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

Review metrics: 2 noteworthy metrics.

  • Diff size: 4 files changed, +31/-2. The branch is small enough to review as a focused renderer, prompt, and targeted-test change.
  • Test surface: 1 renderer test updated, 1 prompt-policy test added. Both changed review surfaces have direct regression coverage in the diff.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Risk before merge

  • [P1] The PR base predates current main, so maintainers should let the final merge/check gate verify the exact merge ref even though the local merge-tree check did not show conflicts.

Maintainer options:

  1. Decide the mitigation before merge
    Keep the narrow handoff in the existing ClawHub close path so contributors get package guidance while ClawSweeper stays out of cross-repo ClawHub work.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No ClawSweeper repair job is needed because the branch has no concrete code defect and can stay on ordinary maintainer review.

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

Review details

Best possible solution:

Keep the narrow handoff in the existing ClawHub close path so contributors get package guidance while ClawSweeper stays out of cross-repo ClawHub work.

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

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

Is this the best way to solve the issue?

Yes; a reason-gated render helper plus focused prompt and renderer tests is a narrow maintainable way to improve ClawHub close comments. Current main does not already provide this handoff block.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

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

What I checked:

  • AGENTS.md policy: Repository policy was read fully and applied; it calls for narrow, evidence-backed, automation-safe ClawSweeper changes and proposal-only review behavior. (AGENTS.md:1, f94588d89c2f)
  • Current main lacks handoff block: Search on current main finds the existing ClawHub outro still says installable community skill and has no closeClawHubHandoffBlock symbol. (src/clawsweeper.ts:8674, f94588d89c2f)
  • PR renderer change: The PR adds a reason-gated closeClawHubHandoffBlock helper for clawhub closes. (src/clawsweeper.ts:8689, bca188259c83)
  • PR insertion point: The handoff block is rendered before the ClawHub close outro and before the collapsed review details, matching the PR body's rendered-output proof. (src/clawsweeper.ts:13811, bca188259c83)
  • Renderer test coverage: The existing ClawHub close-comment test now asserts the handoff heading, package-scope wording, manifest checklist, and no-cross-repo-work boundary. (test/clawsweeper.test.ts:823, bca188259c83)
  • Prompt test coverage: The branch adds a prompt-policy test for the self-serve ClawHub handoff wording. (test/review-prompt-policy.test.ts:132, bca188259c83)

Likely related people:

  • steipete: Git blame points the current close-comment renderer, ClawHub close copy, prompt policy, and existing ClawHub close-comment test to the v0.3.0 release snapshot commit, and GitHub maps that commit to this handle. (role: introduced behavior; confidence: medium; commits: dc824915bb6c; files: src/clawsweeper.ts, prompts/review-item.md, test/clawsweeper.test.ts)
  • Dallin Romney: Recent commits in the same automation area touched review-comment rendering, label synchronization, and prompt-policy test surfaces. (role: recent adjacent contributor; confidence: medium; commits: 4cab87ce3d7f, b75626e4df03, 4e5c4d47c83f; files: src/clawsweeper.ts, test/clawsweeper.test.ts, test/review-prompt-policy.test.ts)
  • Vincent Koc: Current main includes recent cleanup and GitHub API pressure fixes touching src/clawsweeper.ts in the same review automation file surface. (role: recent area contributor; confidence: low; commits: babd6a435afb, 1566ad6a0a5b; files: src/clawsweeper.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
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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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.

2 participants