Land R-I1 through R-I5 and R-I7 of Cut 1's fifth fix batch
Soul's fifth pass on Cut 1 could not falsify the fourth batch's mechanism; what it left was a bill of seven rulings. This lands six of them (R-I6, the HTTPS resolve() rig, follows separately): R-I1: delete the dead per-component canonicalize() in open_frozen_symlink_frame's Normal-step match (frame.resolved is already canonical there), and pin the O(k^3) term can't come back with a component-count timing test. R-I2: two hand-checked fixtures for the traversal budget, the resolver's only termination guarantee -- a two-link cycle and 41 distinct links, both must refuse. R-I3: digest coverage tests for the symlink target and the executable bit, the two terms hash_frozen_source_tree already hashes but nothing had pinned. R-I4: fix materialize_tree_raw's symlink-target guard off-by-one (<= PATH_MAX admitted a 4096-byte target the kernel's own symlink() refuses with ENAMETOOLONG; now < PATH_MAX, refusing exactly what the kernel refuses) and pin it against a real kernel boundary. R-I5: declare the 40-traversal ceiling (matches the kernel's own ELOOP limit) and name the link and count reached in its error, a deliberate narrow departure from "keep S6's behaviour exactly". R-I7: drop FrozenSymlinkFrame's symlink_path Option (only ever constructed Some) and its backwards doc comment; delete two of the three "redundant" containment checks Soul proved redundant by deletion. The third -- the unconditional check at the bottom of the resolver's loop -- turns out load-bearing once the other two are gone: a symlink whose whole target is ".." at the root has no later Normal step to trip that arm's own check, so nothing else catches the escape. Traced by hand, pinned with a new test, and kept rather than deleted as a documented deviation from the map's "delete all three" reading. Also deletes the 189-line resolve_style_fetch_then_freeze_exact_refuses_hostile_trees test (its lone assertion sits in an Ok(_) arm pass 4 showed is never taken, and freeze_exact_refuses_already_local_hostile_objects_via_its_own_fsck already runs the same fixtures plus four more through a harder path), and collapses the hash_object/literal_tree/dotgit_lookalike/git_owned/ chown_to_source_identity boilerplate the three surviving hostile-tree fixture tests duplicated into module-level test helpers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
8da8e99a0b
commit
f52cefc4e0
1 changed files with 528 additions and 478 deletions
1004
src/drivers.rs
1004
src/drivers.rs
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue