Skip to content

Split context tests out of clawsweeper suite - #324

Merged
RomneyDa merged 2 commits into
mainfrom
github-syntax-highlighting
Jun 18, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
github-syntax-highlighting

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

episode 1 in a series on making clawsweeper tests not mostly a 20,000 line file, which breaks syntax highlighting and slows down models

Summary

  • move GitHub context-window and prior-review parsing coverage into test/context.test.ts
  • move close-decision, close-reason, and related PR-reference coverage into test/close-reasons.test.ts
  • add test/helpers.ts for shared test setup helpers instead of duplicating them across split files
  • remove the moved tests and unused imports from test/clawsweeper.test.ts
  • update AGENTS.md to steer future tests into narrower files

Tests

  • node --test test/context.test.ts test/clawsweeper.test.ts
  • node --test --test-name-pattern 'media proof preparation|invalid close semantics|referencingMergedPullRequestsForIssue' test/clawsweeper.test.ts test/close-reasons.test.ts\n- pnpm exec oxlint test/clawsweeper.test.ts test/close-reasons.test.ts test/helpers.ts --deny-warnings --report-unused-disable-directives -D correctness\n- pnpm run check

@clawsweeper

clawsweeper Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 6:45 PM ET / 22:45 UTC.

Summary
The PR moves GitHub context-window and prior-review parsing tests into a new focused context test file and updates repository test guidance.

Reproducibility: not applicable. This PR reorganizes tests and repository guidance rather than reporting a runtime bug.

Review metrics: 2 noteworthy metrics.

  • Moved test coverage: 459 removed, 464 added across 2 test files. The change is primarily relocation, so maintainers should verify equivalent coverage rather than new runtime behavior.
  • Touched surface: 3 files affected. Only repository guidance and tests are touched, keeping the merge surface small.

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 ClawSweeper repair work is needed because the patch is scoped and has no actionable review finding.

Security
Cleared: The diff only moves tests and updates repository guidance, with no dependency, workflow, secret, or code-execution surface changes.

Review details

Best possible solution:

Merge the focused test split through the normal maintainer and CI path if checks pass, keeping context coverage in test/context.test.ts and the updated test-layout guidance.

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

Not applicable; this PR reorganizes tests and repository guidance rather than reporting a runtime bug.

Is this the best way to solve the issue?

Yes; moving context-specific tests into test/context.test.ts is a narrow maintainability improvement, and the package test glob already includes that file.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is a low-risk test-suite organization cleanup rather than a user-facing runtime fix.
  • 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 maintainer-authored cleanup PR.

Label justifications:

  • P3: This is a low-risk test-suite organization cleanup rather than a user-facing runtime fix.
  • 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 maintainer-authored cleanup PR.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully; it identifies the current test location and says the review lane is proposal-only, which supports treating this as a normal maintainer PR review rather than an auto-close. (AGENTS.md:11, b75626e4df03)
  • Diff shape: The PR changes only AGENTS.md and tests, moving the context-related block from test/clawsweeper.test.ts into a new test/context.test.ts with 466 additions and 460 deletions. (test/context.test.ts:1, 73cacbd3ebe4)
  • Unit test discovery: The current package scripts run node --test test/*.test.ts for unit tests, so test/context.test.ts stays on the standard test path. (package.json:75, b75626e4df03)
  • Moved test provenance: Local blame attributes the moved context-window and prior-review test block in current main to the v0.3.0 release commit. (test/clawsweeper.test.ts:334, dc824915bb6c)
  • Adjacent feature provenance: The merged bounded review-context hydration work in perf: bound review context hydration #53 added the behavior and related unit coverage that this PR reorganizes, but it does not supersede this cleanup. (00b414fc16b0)

Likely related people:

  • stainlu: Merged history for perf: bound review context hydration #53 shows stainlu authored the bounded review-context hydration commits and related test coverage that this PR reorganizes. (role: feature introducer; confidence: high; commits: e74aa623ac8d, 00b414fc16b0; files: src/clawsweeper.ts, test/clawsweeper.test.ts)
  • Peter Steinberger: Current local blame attributes the moved test block to the v0.3.0 release commit in the shallow/grafted history. (role: release/import provenance; confidence: medium; commits: dc824915bb6c; files: test/clawsweeper.test.ts, src/clawsweeper.ts, AGENTS.md)
  • RomneyDa: Recent current-main history includes a commit by RomneyDa touching test/clawsweeper.test.ts, and this PR changes the same test area. (role: recent area contributor; confidence: medium; commits: b75626e4df03, 73cacbd3ebe4; files: test/clawsweeper.test.ts, test/context.test.ts, AGENTS.md)
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 18, 2026
@RomneyDa
RomneyDa force-pushed the github-syntax-highlighting branch from ba14b5d to 04af135 Compare June 18, 2026 22:59
@RomneyDa
RomneyDa merged commit 6035f23 into main Jun 18, 2026
7 checks passed
@RomneyDa
RomneyDa deleted the github-syntax-highlighting branch June 18, 2026 23:37
azaj01 pushed a commit to azaj01/clawsweeper that referenced this pull request Sep 21, 2026
* test: split context coverage from clawsweeper suite

* test: split close reason coverage
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