test: drop route copies of the script ancestry matrix
Merged
TH
9d ago+458+458+012345678901234567890123456789-884-884-012345678901234567890123456789
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 regression | Retained detector |
|---|---|
host-kit rule: modes, owners, hint, links, .., umask 002, sticky creation, confirm, staging, file mode | host-kit ancestry/parent/decisions |
host-kit: no chmod after mkdir | parent umask 0200 (EACCES) |
writer: realpath (always or forced); forced writes through the generic publisher | daemon 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 approval | daemon link-.. (home/y stays absent) |
writer: early or normalized mkdir, fold, bypass, rewrapped error | daemon backtrack, missing-parent, link-.. |
| writer: hint stripped | missing-parent (Ć2, chmod g-w <dir>) |
| writer: active save through the generic publisher | handler active-save refusal |
| writer: completed repair through the generic publisher | writer complete-repair refusal |
remote: realpath at record creation | private link, foreign hop, replacement |
remote: early, normalized or folded-parent mkdir, before or after approval; fetch first | backtrack, missing-parent (fetches), sticky folded-parent |
| remote: preflight judges the nearest existing directory | sticky folded-parent (success expected) |
| remote: spelled staging or commit on any branch (first, forced, replacement); link becomes rename | staging race (force Ć2, swaps, staged, bytes) |
| remote: confirmation skipped on any branch | download race (first, forced, replacement; earlier bytes survive) |
| remote: confirmation skipped when the spelled parent matches the prepared directory | download race (parent recreated at the same path, parent made group-writable) |
remote: reason changed, cause, warning or replaced hint dropped | every 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