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 20, 2026, 8:07 PM ET / 00:07 UTC.

Summary
The branch adds a ClawHub handoff block to clawhub close comments, updates the review prompt with self-serve package guidance, and adjusts focused tests.

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 patch 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 affected review surfaces have targeted regression coverage.

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; the branch has no concrete code defect and can proceed through 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 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 1566ad6a0a5b.

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-fix 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-fix live output from the built close-comment renderer showing the new ClawHub handoff block.
Evidence reviewed

What I checked:

  • Repository policy: AGENTS.md was present and read fully; its narrow, automation-safe ClawSweeper review guidance applies to this PR review. (AGENTS.md:1, 1566ad6a0a5b)
  • Current main behavior: Current main's clawhub close outro only asks contributors to upload or publish an installable community skill and has no separate self-serve handoff block. (src/clawsweeper.ts:8674, 1566ad6a0a5b)
  • Renderer change: The PR adds a reason-gated closeClawHubHandoffBlock helper and inserts it before the clawhub close outro in renderCloseComment. (src/clawsweeper.ts:8689, bca188259c83)
  • Prompt policy change: The PR extends the review prompt so clawhub closes describe package shape, manifest/checklist basics, and the no-cross-repo-work boundary. (prompts/review-item.md:409, bca188259c83)
  • Targeted coverage: The PR updates the ClawHub close-comment test and adds a prompt-policy test for the new self-serve handoff requirements. (test/clawsweeper.test.ts:823, bca188259c83)
  • Proof and checks: The PR body includes copied live output from the built close-comment renderer showing the new handoff block, and GitHub reports the main CI and CodeQL checks successful on the PR head. (bca188259c83)

Likely related people:

  • steipete: GitHub commit metadata and blame tie the current close-comment renderer, existing ClawHub close copy, review prompt policy, and ClawHub close-comment test to the v0.3.0 release snapshot. (role: introduced behavior; confidence: medium; commits: dc824915bb6c; files: src/clawsweeper.ts, prompts/review-item.md, test/clawsweeper.test.ts)
  • RomneyDa: Recent merged PRs touched review-comment rendering/status behavior and prompt-policy test surfaces near the same review automation area. (role: recent adjacent contributor; confidence: medium; commits: 4e5c4d47c83f, b75626e4df03, 4cab87ce3b9b; 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