Skip to content

[codex] improve ClawHub diversion handoff#342

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

[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 21, 2026, 9:44 PM ET / 01:44 UTC.

Summary
The PR adds self-serve ClawHub handoff guidance to clawhub close comments and updates the review prompt plus focused tests for that behavior.

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 live 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 close-comment renderer and prompt-policy change.
  • Test surface: 1 renderer test updated, 1 prompt-policy test added. Both changed review surfaces have targeted 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.

Next step before merge

  • No ClawSweeper repair job is needed because the branch has no concrete code defect and can remain 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 remains out of creating or publishing 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 live 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 855cffa7c7ae.

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 live output from the built close-comment renderer showing the new ClawHub handoff block.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes after-change live output from the built close-comment renderer 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 keeps review proposal-only. (AGENTS.md:1, 855cffa7c7ae)
  • Current main behavior: Current main still has the older clawhub close outro that says installable community skill and has no closeClawHubHandoffBlock helper or handoff section. (src/clawsweeper.ts:8674, 855cffa7c7ae)
  • Renderer implementation: The PR adds a reason-gated closeClawHubHandoffBlock helper and inserts the handoff block before the clawhub close outro in renderCloseComment. (src/clawsweeper.ts:8689, bca188259c83)
  • Prompt policy coverage: The PR extends the clawhub close guidance so reviews identify package shape, manifest/checklist basics, and the no-cross-repo-work boundary. (prompts/review-item.md:409, bca188259c83)
  • Targeted tests: The branch updates the existing ClawHub close-comment test and adds a prompt-policy test for the new self-serve handoff wording. (test/clawsweeper.test.ts:823, bca188259c83)
  • Real behavior proof: The PR body includes live rendered output from the built close-comment path showing validation.ok=true, action=proposed_close, and the new ClawHub handoff block. (bca188259c83)

Likely related people:

  • steipete: Blame attributes the current close-comment renderer, existing ClawHub close copy, review prompt policy, and related ClawHub close-comment test to the v0.3.0 release snapshot; GitHub commit metadata 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)
  • RomneyDa: Recent merged commits touched nearby review-comment rendering, label synchronization, and prompt-policy test surfaces in the same automation area. (role: recent adjacent contributor; confidence: medium; commits: 4cab87ce3d7f, b75626e4df03, 4e5c4d47c83f; files: src/clawsweeper.ts, test/clawsweeper.test.ts, test/review-prompt-policy.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

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