refactor(test): deduplicate filesystem fixtures - #121
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 4, 2026, 6:22 PM ET / 22:22 UTC. ClawSweeper reviewWhat this changesConsolidates duplicated TAR, temporary-directory, permission, lock, and path test fixtures while preserving filesystem safety regression cases. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain Keep open: the refactor appears to retain the previously flagged serializer-failure regression coverage, but it still needs inspectable real-checkout proof and resolution of the failing Node 22 coverage check before merge. Priority: P2 Review scores
Verification
How this fits togetherThe test suite exercises fs-safe’s guarded archive, file-store, lock, permission, and path primitives across JavaScript and native backends. Its fixtures create adversarial filesystem inputs and assert that the public APIs fail safely. flowchart LR
A[Archive and filesystem scenarios] --> B[Shared test fixtures]
B --> C[Guarded filesystem primitives]
C --> D[JavaScript backend]
C --> E[Native backend]
D --> F[Safety regression assertions]
E --> F
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared fixture layer, then provide redacted execution proof from the final branch and resolve the coverage failure before landing. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a test-fixture refactor rather than a report of broken user behavior; the relevant verification is execution of the refactored safety suite. Is this the best way to solve the issue? Unclear: the shared fixtures are a maintainable direction and the prior serializer-coverage concern is retained, but final-head execution proof and the failing coverage job must establish that coverage remains equivalent. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fe009ad3422a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
2b6b100 to
0a5da75
Compare
|
Landed as Verification performed on exact head
The first coverage attempt hit one 5-second timeout in |
What Problem This Solves
Reduces duplicated test infrastructure accumulated during the recent filesystem stress work. Three separate TAR encoders and repeated native, temporary-directory, open-handle, and matrix setup made the suite harder to review without adding distinct behavioral proof.
Why This Change Was Made
One shared TAR fixture now owns archive construction, existing temporary-directory fixtures own cleanup, and repeated mode and error cases are data-driven. The repair on current
maindeliberately preserves the distinct FileStore serializer-failure, private-file mode, durable-queue mode, and readable-by-others permission regressions identified during review.The final branch changes tests only. There is no public API or runtime behavior change.
User Impact
No user-visible behavior changes. The patch removes 377 lines and adds 194 across nine test files while retaining the security, durability, native, archive, lock, and concurrency behavior checks.
Evidence
pnpm check: 100 files passed, 1,033 tests passed, 61 platform or optional skips; build, docs, package, filesystem-boundary, and file-size checks passed.git diff --checkpassed.Codex autoreview of the repair and complete branch: TruffleHog clean; no accepted or actionable findings (0.99).
Exact-head CI: full platform, native, Cargo, package-smoke, and workflow checks passed.
CodeQL and benchmarks passed.
Native-enabled coverage passed on retry. The first attempt hit a single 5-second timeout in
native-publish-equivalence.test.ts; the unchanged exact head passed on rerun.Distinct regression coverage retained
Security and compatibility impact considered
Changelog intentionally unchanged because behavior is unchanged
No credentials, private paths, private hosts, or sensitive contents included