Skip to content

test(root): merge split Root suites and share admission fixtures - #810

Closed
steipete wants to merge 1 commit into
mainfrom
steipete/deslop-r4-tests-root
Closed

steipete wants to merge 1 commit into
mainfrom
steipete/deslop-r4-tests-root

Conversation

@steipete

@steipete steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Several Root suites had been split into siblings to stay under the 500-line test-file limit instead of sharing their setup: complete-parent admission and its error cases, four walk option/filter files, and move source-authority and policy-snapshot files. The no-replace move adapter, selected-target admission machinery, and writable-open collision setup were also repeated across suites.

User Impact

No user-visible change; tests only (src/ and native/ byte-identical).

Why This Change Was Made

  • Five split siblings merge into their owners (root-shared-js-complete-parent, root-walk-options, root-move-source-authority) once their duplicated fixtures are shared; every merged file stays under 500 lines.
  • test/helpers/no-replace-adapter.ts and test/helpers/selected-target-admission.ts hold the shared move adapter and portable/Windows selected-target machinery; writable-open collision bodies run from a table.
  • Race injectors, policy differences, and stronger no-open/no-mkdir assertions stay explicit per case.

Net -267 lines, five fewer files.

Evidence

  • Expanded test counts: 168 before and after across all twelve affected files; no reference to the removed filenames remains.

  • Focused run: 247 passed, 16 Windows-only skips.

  • tsc, lint:file-size, lint:fs-boundary: pass. Codex autoreview (P0-P2): clean.

  • Tests added or updated when behavior changed

  • Security and compatibility impact considered

  • CHANGELOG.md updated when release-relevant

  • No credentials, private paths, private hosts, or sensitive contents included

@steipete
steipete requested a review from a team as a code owner October 1, 2026 14:08
@clawsweeper clawsweeper Bot added 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. labels Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 10:11 AM ET / 14:11 UTC.

ClawSweeper review

What this changes

The PR consolidates Root filesystem tests and shares fixtures for move adapters, selected-target admission checks, and writable-file identity collisions.

Merge readiness

✅ Ready for maintainer review

Keep open: this useful consolidation is absent from pinned main, and the reviewed changes preserve the existing safety scenarios without introducing a concrete defect.

Priority: P3
Reviewed head: ef07e67ee51e6ff737dd0ee59c21386d0d322b07

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test consolidation with preserved safety assertions and no concrete introduced defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Only test fixtures and suite organization change; no production authority or stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Only test fixtures and suite organization change; no production authority or stored-data contract changes.
Evidence reviewed 9 items Repository policy: Read the full root AGENTS.md and CONTRIBUTING.md. No nested AGENTS.md exists under test, and no maintainer-notes directory was found. Applied safety-regression and maintenance-only changelog guidance; did not execute autoreview or artifact-producing checks.
Introduced scope: The pinned base-to-head delta changes only test files: 948 lines added, 1215 removed. Production source, native code, package metadata, lockfile, and workflows have no delta.
Selected-target safety assertions: The extracted fixture preserves authorization-time policy retargeting and second-admission link replacement. Portable and Windows callers retain admission counts, callback rejection, unchanged target contents, and closed-handle assertions.
Findings None None.
Security None None.

How this fits together

Root provides filesystem operations confined to a chosen directory. These tests feed it temporary filesystem trees, policies, and injected races, then check returned errors, filesystem contents, and resource cleanup.

flowchart TD
  A[Temporary filesystem trees] --> C[Shared test fixtures]
  B[Policies and injected races] --> C
  C --> D[Root filesystem operations]
  D --> E[Admission and identity checks]
  E --> F[Filesystem results and errors]
  F --> G[Safety and cleanup assertions]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Code delta production 0; tests +948/-1215, net -267 The consolidation reduces test maintenance without expanding production behavior.
Test file consolidation 5 removed, 2 added; net 3 fewer files Shared helpers replace split sibling suites while merged owners remain below 500 lines.

Technical review

Best possible solution:

Keep the shared fixtures while preserving explicit race triggers, platform cases, denial ordering, and cleanup assertions in each owning suite.

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

Not applicable: this PR reorganizes existing tests and reports no user-facing bug; tests were not executed during the read-only review.

Is this the best way to solve the issue?

Yes: sharing duplicated setup and consolidating related scenarios is a bounded approach, with the reviewed assertions and platform distinctions preserved.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b01e327e938e.

Labels

Label changes:

  • add P3: This is test maintenance with no production or public-contract 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 supplied Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Only test fixtures and suite organization change; no production authority or stored-data contract changes.

Label justifications:

  • P3: This is test maintenance with no production or public-contract 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 supplied Repository State identifies a MEMBER-authored PR, so the external-contributor proof gate does not apply. Only test fixtures and suite organization change; no production authority or stored-data contract changes.

Evidence

What I checked:

  • Repository policy: Read the full root AGENTS.md and CONTRIBUTING.md. No nested AGENTS.md exists under test, and no maintainer-notes directory was found. Applied safety-regression and maintenance-only changelog guidance; did not execute autoreview or artifact-producing checks. (AGENTS.md:23, ef07e67ee51e)
  • Introduced scope: The pinned base-to-head delta changes only test files: 948 lines added, 1215 removed. Production source, native code, package metadata, lockfile, and workflows have no delta. (ef07e67ee51e)
  • Selected-target safety assertions: The extracted fixture preserves authorization-time policy retargeting and second-admission link replacement. Portable and Windows callers retain admission counts, callback rejection, unchanged target contents, and closed-handle assertions. (test/helpers/selected-target-admission.ts:20, ef07e67ee51e)
  • Consolidated failure coverage: Complete-parent preparation failures retain comparisons against the component-walk route and explicit no-open/no-mkdir assertions. The merged suite is 406 lines; walk options is 415 lines and move source authority is 258 lines. (test/root-shared-js-complete-parent.test.ts:371, ef07e67ee51e)
  • Walk scenario preservation: Compared all three removed walk suites with their consolidated destination. Async pruning, root/directory replacement, synchronous and pending-filter cancellation, entry budgets, and followed-link sizes remain covered with their prior platform distinctions. (test/root-walk-options.test.ts:1, ef07e67ee51e)
  • Existing public contract: Root documentation defines serial async filters, post-filter identity revalidation, cancellation waiting for pending filters, live mutation assertions, and move-policy snapshots. The reorganized tests continue exercising these established contracts. (docs/root.md:69, ef07e67ee51e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

steipete added a commit that referenced this pull request Oct 1, 2026
Merge five split Root test siblings back into their owners once their fixtures are shared, add shared no-replace adapter and selected-target admission helpers, and table writable-open collisions. 168 expanded tests before and after; tests only, net -267 lines and five fewer files.
@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Landed on main as 40aa221 through the batch PR #816 (rebase merge, one commit per original PR), to avoid ten serial up-to-date CI cycles. Content is identical to this PR's reviewed diff.

@steipete steipete closed this Oct 1, 2026
steipete added a commit that referenced this pull request Oct 1, 2026
Merge five split Root test siblings back into their owners once their fixtures are shared, add shared no-replace adapter and selected-target admission helpers, and table writable-open collisions. 168 expanded tests before and after; tests only, net -267 lines and five fewer files.
@steipete
steipete deleted the steipete/deslop-r4-tests-root branch October 1, 2026 17:08
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