test: drop route copies of the script ancestry matrix

Merged
TH
9d ago
+458-884

Summary

Removes route-level copies of the path-shape matrix that #4584 added. host-kit's destination rule owns those shapes. Touches 5 files.

  • Daemon writer suite: 20 cases down to 9, parameterized over force and exposure.
  • Remote suite: 15 cases down to 13, parameterized over force, version and how the parent changes.
  • Each kept route case catches a change that only the route can make: canonicalizing or folding the caller's spelling, creating directories early or after approval, staging, committing or confirming on any publish branch, or disclosing the failure.
  • Adds two host-kit tests: creating a missing level under a sticky directory, and under umask 0200.
  • Adds two refusal cases outside the ancestry suites: an active session save-script, and a completed repair, each to a shared directory.

Validation

Mutations ran on this patch in a disposable checkout on macOS, Vitest unit-core. The route, handler and repair cases skip on win32. In host-kit, the 15 decision cases and the parent suite's relative-path case also run on Windows. No CI lane runs Windows.

Planted regressionRetained detector
host-kit rule: modes, owners, hint, links, .., umask 002, sticky creation, confirm, staging, file modehost-kit ancestry/parent/decisions
host-kit: no chmod after mkdirparent umask 0200 (EACCES)
writer: realpath (always or forced); forced writes through the generic publisherdaemon shared-link refusal (force Ɨ2)
writer: approve, then stage through the generic publisher (always or forced)daemon link-.. (force Ɨ2, staged)
writer: folded-parent mkdir after approvaldaemon link-.. (home/y stays absent)
writer: early or normalized mkdir, fold, bypass, rewrapped errordaemon backtrack, missing-parent, link-..
writer: hint strippedmissing-parent (Ɨ2, chmod g-w <dir>)
writer: active save through the generic publisherhandler active-save refusal
writer: completed repair through the generic publisherwriter complete-repair refusal
remote: realpath at record creationprivate link, foreign hop, replacement
remote: early, normalized or folded-parent mkdir, before or after approval; fetch firstbacktrack, missing-parent (fetches), sticky folded-parent
remote: preflight judges the nearest existing directorysticky folded-parent (success expected)
remote: spelled staging or commit on any branch (first, forced, replacement); link becomes renamestaging race (force Ɨ2, swaps, staged, bytes)
remote: confirmation skipped on any branchdownload race (first, forced, replacement; earlier bytes survive)
remote: confirmation skipped when the spelled parent matches the prepared directorydownload race (parent recreated at the same path, parent made group-writable)
remote: reason changed, cause, warning or replaced hint droppedevery refusal, via readScriptDeliveryFailure

pnpm typecheck, pnpm lint, pnpm check:production-exports and pnpm check:fallow pass. pnpm exec vitest run --project unit-core over the two route suites, the handler suite, the writer suite, the three host-kit suites, and the hostile-daemon and download suites gives 187 passed. CI validates the pushed head.

šŸ¤– Generated with Claude Code