Repository navigation
Conversation
Add optional atomic staging, directory metadata, and conditional file mutation contracts. ZIP, unzip, and csplit use committed receipts to reject replacement races during publication and cleanup. Bound csplit buffering and retain its error, cancellation, keep-file, and empty-output behavior. Tests cover replacement races, stale receipts, scope routing, read-only denial, ZIP extraction metadata, csplit byte counts, buffered limits, and cancellation. Validation: independent source review passed. Focused runtime qualification is pending the existing private dependency installation queue.
Declare the receipt at its single assignment while retaining the deferred cleanup closure and cancellation assertions. Addresses the actual CI prefer-const finding; runtime qualification remains pending.
Include csplit in the portable capability declaration inventory and assert read-only denial. Include conditional removal in the retained cleanup view and propagate early callback failure instead of awaiting an unresolved gate. Both mismatches were observed in CI; deadlines and runtime sources are unchanged.
Pass create intent when ZIP, unzip, and csplit query capabilities for outputs that may not exist yet. Preserve support on backends that distinguish reads of missing entries from creating them. Add create-sensitive archive roundtrip and split byte-output regressions. Focused execution remains pending the existing filesystem/build sequence.
Forward creation intent in scoped, mounted, and device-backed capability checks for new conditional files, directories, and staging. Keep existing entry and cleanup checks unchanged. Add three wrapper regressions for create-sensitive backend support, exact published bytes, and deletion queries without creation intent. The archive regression exposed this missing layer in actual Node22 CI.
Integrate reviewed PR #721 conditional filesystem mutations and owned staging. Preserve foreign replacements during archive publication, cleanup, and split writes. Retain current LLM browser coverage and register the ZIP ownership regression explicitly. Focused tests, normal build, consumer and root types, and repository lint pass. Full committed-candidate tests and packed-consumer qualification remain pending before delivery.
|
Integrated reviewed PR head Tests-first validation reproduced seven ZIP ownership failures and 37 SafeFS failures. The implemented candidate passed 82 focused SafeFS tests, 693 focused Bash tests, and 106 inventory checks. All 26 maintained consumer-type groups, root types, workflow lint, and guarded ESLint passed; ESLint covered all 10,778 configured files with zero errors or warnings. The complete maintained unit command passed: shared 22,501; Python 29; Bash runner 313, reviewed parallel 125, serial 31,142; SafeJS 21,663; terminal 288; root posttest 2. Maintained skips remain disclosed in the committed qualification plan. The normal post-test build and all 35 current packed-consumer stages passed, with identical source/path inventories and clean diffs before and after. Closing as integrated directly into main, without a duplicate merge commit. Publication is verified: All workflows succeeded: main release, scoped safe packages, and Pages. Published release. |
ZIP and csplit currently check an output entry and then mutate its path separately. A replacement between those operations can make publication, append, metadata updates, or cleanup affect a different entry.
This change adds optional filesystem operations that compare the expected entry and parent inside the mutation and return the committed entry receipt. ZIP uses owned staging for publication and cleanup; unzip also conditions directory creation and metadata updates. Csplit uses conditional writes/removal and bounded buffering, preserving keep-file, cancellation, empty-output, and byte-count behavior. Unsupported adapters fail closed.
The source is reconciled against the published 0.1.543 source (
ede5985e5e2b35b38eebd0faaeb3ed6a390493e9). Existing atomic resize, device comparison authority, curl response intent, and declaration inventory fixes are preserved. The separate output-drain change in #719 is outside this PR.Validation at
50dfdb95baa73b28ea20d07e780ee9f4b048392d:co, and coverage-demo replay). The 22,543-pass/one-failure summary belongs only to the shared process, not the entire job. No timeout was increased, and no cause or flake classification is claimed.This is ready for source review while qualification continues. Downstream platform integration and release pinning remain blocked on qualification and a verified upstream release. No package publication or merge is performed by this PR.