Skip to content

test: split prompt proof label policy coverage - #327

Merged
steipete merged 1 commit into
mainfrom
dallin/split-next-policy-tests
Jun 19, 2026
Merged

steipete merged 1 commit into
mainfrom
dallin/split-next-policy-tests

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

  • move review prompt and media-proof policy assertions into test/review-prompt-policy.test.ts
  • move bot proof/proof-nudge policy coverage into test/proof-nudge-policy.test.ts
  • move PR rating, status, priority, impact, merge-risk, and issue advisory label coverage into test/pr-label-policy.test.ts
  • remove the moved block and now-unused imports from test/clawsweeper.test.ts

LOC

  • test/review-prompt-policy.test.ts: 492 lines
  • test/proof-nudge-policy.test.ts: 647 lines
  • test/pr-label-policy.test.ts: 975 lines
  • test/clawsweeper.test.ts: 14,904 lines after extraction

Tests

  • node --test test/review-prompt-policy.test.ts test/proof-nudge-policy.test.ts test/pr-label-policy.test.ts
  • pnpm run check

@RomneyDa
RomneyDa marked this pull request as ready for review June 19, 2026 00:47
@clawsweeper

clawsweeper Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 9:05 PM ET / 01:05 UTC.

Summary
The branch moves prompt/media-proof tests, proof-nudge/bot-proof tests, and PR/issue label policy tests out of test/clawsweeper.test.ts into three focused test files.

Reproducibility: not applicable. This PR reorganizes tests rather than reporting a runtime bug. The relevant validation is the targeted Node test command plus pnpm run check, and GitHub shows pnpm check succeeded for the PR head.

Review metrics: 2 noteworthy metrics.

  • Diff scope: 3 added, 1 changed, 0 removed; 4 test files affected. The changed surface is bounded to test organization and does not touch runtime code, workflows, dependencies, or release files.
  • Moved tests: 72 deleted and 72 added test declarations. The declaration parity check supports that existing policy coverage was moved rather than lost.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

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

Rank-up moves:

  • none.

Next step before merge

  • No automated repair lane is needed because there is no discrete code defect; this member-authored cleanup is ready for maintainer review.

Security
Cleared: The diff only reorganizes tests and imports, with no workflow, dependency, package script, secret, generated artifact, or production code changes.

Review details

Best possible solution:

Land the focused test split after ordinary maintainer review, keeping coverage grouped by prompt, proof-nudge, and label policy areas.

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

Not applicable; this PR reorganizes tests rather than reporting a runtime bug. The relevant validation is the targeted Node test command plus pnpm run check, and GitHub shows pnpm check succeeded for the PR head.

Is this the best way to solve the issue?

Yes; extracting these policy clusters into focused test files is the narrow maintainable solution because it reduces the monolithic suite without changing production code.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P3: This is low-risk test organization cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external contributor real-behavior proof gate does not apply to this member-authored test-only cleanup PR.
Evidence reviewed

What I checked:

  • Repository policy supports the direction: AGENTS.md says test coverage should go in the narrowest matching test file instead of growing test/clawsweeper.test.ts; this PR follows that cleanup direction. (AGENTS.md:11, a811372b8fd0)
  • PR diff scope is test-only: gh pr view reports four changed files, all under test/: one modified monolithic test file and three added focused policy test files; the pnpm check status check is successful for the PR head. (9729e6453b9f)
  • Moved-test declaration parity: Patch analysis found 72 deleted and 72 added test declarations with no missing names, supporting that the change relocates coverage rather than dropping it. (9729e6453b9f)
  • Review-prompt policy extraction: The added review-prompt policy file contains the extracted prompt, media-proof, Mantis recommendation, and proof-label assertions from the removed block. (test/review-prompt-policy.test.ts:1, 9729e6453b9f)
  • Proof-nudge policy extraction: The added proof-nudge policy file contains the extracted bot-proof and proof-nudge candidate, eligibility, and comment coverage. (test/proof-nudge-policy.test.ts:1, 9729e6453b9f)
  • PR and issue label policy extraction: The added PR label policy file contains the extracted PR rating, status, priority, impact, merge-risk, Telegram-visible proof, and issue advisory label coverage. (test/pr-label-policy.test.ts:1, 9729e6453b9f)

Likely related people:

  • RomneyDa: Recent current-main commits split adjacent ClawSweeper test areas into narrower files, matching the organization pattern used by this PR. (role: recent area contributor; confidence: high; commits: a811372b8fd0, 6035f230849b; files: test/clawsweeper.test.ts, test/pr-review-labels.test.ts, test/pr-proof-automation.test.ts)
  • steipete: Blame and string history for the existing monolithic prompt, proof, and label policy tests point to the v0.3.0 release commit touching the central coverage now being split. (role: adjacent owner; confidence: medium; commits: dc824915bb6c; files: test/clawsweeper.test.ts, prompts/review-item.md, schema/clawsweeper-decision.schema.json)
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: 🐚 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. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jun 19, 2026
@steipete
steipete merged commit 4cab87c into main Jun 19, 2026
10 checks passed
@steipete
steipete deleted the dallin/split-next-policy-tests branch June 19, 2026 11:34
@steipete

Copy link
Copy Markdown
Contributor

Landed after maintainer verification.

Proof:

  • Structured Codex autoreview against origin/main: clean, no accepted/actionable findings.
  • Local pnpm run check: passed.
  • Unit suite: 526 passed, 0 failed.
  • Repair suite: 557 passed, 0 failed.
  • Changed/full coverage gates and formatting check: passed.
  • GitHub CI and CodeQL were green on the reviewed head.

Landed commit: 4cab87ce3d7fea17c615037f54dad7aa28387038

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: 🐚 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants