Skip to content

test: split apply policy tests - #363

Merged
RomneyDa merged 1 commit into
mainfrom
dallin/split-apply-tests
Jun 24, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
dallin/split-apply-tests

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jun 24, 2026 •

Copy link
Copy Markdown
Member

Part of a series on not having 10k+ line test files

Summary

  • Move apply work-plan artifact tests into test/work-plan-artifacts.test.ts.
  • Move apply label/comment sync gate tests into test/apply-label-sync.test.ts.
  • Move legacy apply close retry/pair-close tests into test/apply-close-retry-policy.test.ts.
  • Promote shared apply report/mock helpers into test/helpers.ts for this and future splits.

LOC

  • test/work-plan-artifacts.test.ts: 172
  • test/apply-label-sync.test.ts: 936
  • test/apply-close-retry-policy.test.ts: 384
  • test/helpers.ts: 732
  • test/clawsweeper.test.ts: 11966

Validation

  • node --test test/work-plan-artifacts.test.ts test/apply-label-sync.test.ts test/apply-close-retry-policy.test.ts test/clawsweeper.test.ts
  • pnpm run check

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

clawsweeper Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 3:29 PM ET / 19:29 UTC.

Summary
The PR moves apply work-plan artifact, label/comment sync, and close retry policy tests from test/clawsweeper.test.ts into three focused test files while promoting shared apply report/mock helpers into test/helpers.ts.

Reproducibility: not applicable. This PR reorganizes existing test coverage and shared helpers rather than reporting a reproducible product bug.

Review metrics: 3 noteworthy metrics.

  • Changed files: 5 files: 3 added tests, 1 helper modified, 1 monolith reduced. The review surface is a focused test reorganization rather than runtime behavior.
  • Line movement: +1,935 / -1,937. The near-neutral size supports that this is mostly extraction rather than new logic.
  • Moved tests: 14 test declarations moved. The moved tests map cleanly to work-plan artifacts, label sync, and close retry policy areas.

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

  • [P2] No repair job is needed because no concrete patch defect was found; maintainer review and normal CI are the remaining gates.

Security
Cleared: The diff only moves tests and shared test helpers; it does not touch workflows, dependencies, secrets handling, release scripts, or runtime code.

Review details

Best possible solution:

Land the split after normal maintainer review and green CI, keeping future apply-policy coverage in the narrower files and shared helpers.

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

Not applicable. This PR reorganizes existing test coverage and shared helpers rather than reporting a reproducible product bug.

Is this the best way to solve the issue?

Yes. Moving existing apply-policy tests into narrower files and centralizing shared helpers is the maintainable shape the repository policy calls for, and I did not find a duplicate path or concrete patch defect.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P3: This is low-risk test-suite organization work with no runtime 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: Not applicable because this is a maintainer-authored test-only cleanup; the PR body lists validation commands but the external contributor proof gate does not apply.
Evidence reviewed

What I checked:

Likely related people:

  • RomneyDa: Recent merged history shows repeated work splitting and maintaining test policy coverage in the same test surface, including the current main commit that split scheduler and review comment tests. (role: recent test-split area contributor; confidence: high; commits: 929e605da559, 4cab87ce3d7f, a811372b8fd0; files: test/clawsweeper.test.ts, test/helpers.ts)
  • steipete: Blame on the moved work-plan/apply tests points to the release baseline, and nearby history includes repair/apply behavior work that these tests exercise. (role: original and adjacent apply-test owner; confidence: medium; commits: dc824915bb6c, 2076396b9562, 9730c72c1cd0; files: test/clawsweeper.test.ts, src/clawsweeper.ts)
  • vincentkoc: Recent commits touch apply-token renewal, CI fanout, and workflow pressure areas adjacent to the apply-policy tests being split. (role: adjacent apply and automation contributor; confidence: medium; commits: f94588d89c2f, f69d9debf487, 1566ad6a0a5b; files: test/clawsweeper.test.ts, src/clawsweeper.ts, .github/workflows/sweep.yml)
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 24, 2026
@RomneyDa
RomneyDa merged commit e73fecd into main Jun 24, 2026
10 checks passed
@RomneyDa
RomneyDa deleted the dallin/split-apply-tests branch June 24, 2026 19:37
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
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.

1 participant