Skip to content

test: split apply decision tests - #368

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

RomneyDa merged 1 commit into
mainfrom
dallin/split-apply-decision-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

  • split PR supersession promotion tests into test/apply-pr-supersession-promotion.test.ts
  • split product-direction apply policy tests into test/apply-product-direction-policy.test.ts
  • split same-author pair-close tests into test/apply-same-author-pair-close.test.ts

LOC

  • test/apply-pr-supersession-promotion.test.ts: 317
  • test/apply-product-direction-policy.test.ts: 469
  • test/apply-same-author-pair-close.test.ts: 949
  • test/clawsweeper.test.ts: 1905

Validation

  • pnpm run check

@clawsweeper

clawsweeper Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 7:03 PM ET / 23:03 UTC.

Summary
The branch moves apply-decision test cases out of test/clawsweeper.test.ts into three focused top-level test files without changing runtime code.

Reproducibility: not applicable. This PR reorganizes tests rather than reporting a runtime bug. I verified the moved test names and existing test runner path by source and PR-diff inspection.

Review metrics: 2 noteworthy metrics.

  • Changed files: 3 added, 1 modified, 0 removed. The diff is a bounded test reorganization rather than a runtime or workflow change.
  • Relocated tests: 13 apply-decision tests relocated. The useful review question is whether the split preserves the existing coverage while shrinking test/clawsweeper.test.ts.

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:

  • [P2] Wait for the in-progress pnpm check job to complete before merge.

Risk before merge

  • [P1] The pnpm check job was still in progress during review, so final merge should wait for the normal CI result.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused test split after normal maintainer review and green CI, keeping runtime behavior unchanged.
  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 is needed; this member-authored PR should continue through normal review and CI.

Security
Cleared: The diff only reorganizes unit tests and does not touch dependencies, workflows, secrets, package scripts, generated artifacts, or runtime code.

Review details

Best possible solution:

Land the focused test split after normal maintainer review and green CI, keeping runtime behavior unchanged.

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

Not applicable; this PR reorganizes tests rather than reporting a runtime bug. I verified the moved test names and existing test runner path by source and PR-diff inspection.

Is this the best way to solve the issue?

Yes. Splitting the large apply-decision coverage into focused top-level test files is the narrowest maintainable path and matches the repository’s test-organization guidance.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

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

Label justifications:

  • P3: This is a low-risk test-suite cleanup 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: The external real-behavior-proof gate does not apply to this member-authored test-only cleanup; the PR body reports pnpm run check.
Evidence reviewed

What I checked:

  • repository policy read: AGENTS.md was read fully; it directs new coverage to the narrowest matching test file and treats maintainer-authored items as non-closeable. (AGENTS.md:9, 1c19987cde97)
  • PR metadata: GitHub reports this as a member-authored PR with one commit, four changed test files, and no human review comments yet. (a00f50bcbf27)
  • test runner coverage: The unit-test command already runs top-level test/*.test.ts files, so the three new files stay on the existing test path. (package.json:76, 1c19987cde97)
  • diff shape: The patch adds three apply-decision test files and removes the corresponding large block from test/clawsweeper.test.ts; no source, workflow, dependency, or package metadata files are changed. (a00f50bcbf27)
  • moved test coverage accounted for: The 13 apply-decision test names removed from the current main file are present across the three new head files, while the shortened head test/clawsweeper.test.ts still contains the remaining tests. (test/clawsweeper.test.ts:192, a00f50bcbf27)
  • history and routing: Recent history shows an ongoing series of test-splitting commits in the same files, while git blame ties some original apply-decision helpers/tests to the older test suite introduction. (test/clawsweeper.test.ts:55, 1c19987cde97)

Likely related people:

  • RomneyDa: Recent merged commits repeatedly split large test groups out of test/clawsweeper.test.ts and moved helpers into test/helpers.ts; this PR continues that same current-main test organization work. (role: recent area contributor; confidence: high; commits: 1c19987cde97, f337079999cc, 8d8565bdea3b; files: test/clawsweeper.test.ts, test/helpers.ts)
  • Jason (Json): git blame and git log -S trace the original unconfirmed product-direction helper and same-author test block in test/clawsweeper.test.ts to c88270b. (role: introduced behavior; confidence: medium; commits: c88270b81889; files: test/clawsweeper.test.ts)
  • Vincent Koc: Recent commits by this author changed apply/review automation paths adjacent to the apply-decision tests being reorganized. (role: recent adjacent contributor; confidence: medium; commits: f94588d89c2f, 1566ad6a0a5b, f69d9debf487; files: src/clawsweeper.ts, test/clawsweeper.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: 🐚 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 323f7bd into main Jun 24, 2026
11 checks passed
@RomneyDa
RomneyDa deleted the dallin/split-apply-decision-tests branch June 24, 2026 23:10
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