Repository navigation
adopt-project.py: check passes a symlink target of 1024 to 4095 bytes that macOS and XFS cannot make, and a bad link at shape/README.md or contracts/shape-pin.yaml is also named by plan-root-blocks-shape-copy or plan-root-holds-pin with a remedy that cannot help it (follow-ups of #908) #979
Description
Lane: openreposhape-1 (openRepoShape-1)
Found by: the independent review of PR #965 (the fix for #908), SHOULD-1 and NIT 2. Both are left open on purpose by #965, which says so in its Known limits and in code comments; neither is a regression.
(a) A target of 1024 to 4095 bytes passes check and fails execute on macOS and XFS
plan-bad-symlink-target (#908) refuses a symlink whose target is longer than SYMLINK_TARGET_MAX, 4095 bytes: Linux's bound (PATH_MAX is 4096, counting the NUL) and what symlink(2) takes on ext4, measured on Linux with git 2.43 (lengths 255, 256, 300, 1000, 4090, 4093, 4094 and 4095 clone fine; 4096, 4097 and 5000 exit 128, File name too long).
Two hosts take less. Both limits are read from their sources and were not measured:
- macOS: XNU's
symlinkat_internalcopies the target in withcopyinstr(..., MAXPATHLEN), andMAXPATHLENis 1024, so at most 1023 bytes are made. - XFS (the default filesystem of RHEL-family systems):
XFS_SYMLINK_MAXLENis 1024, so at most 1023 bytes.
So a source with a link whose target is 1024 to 4095 bytes gets plan ok from check on every machine, and execute then fails in its first clone on a Mac or an XFS host, after both leg repositories exist: the failure #908 closed for longer targets. #965 keeps 4095 (lane 1's decision) and names this window in the comment above SYMLINK_TARGET_MAX and in its Known limits.
To decide, with a measurement on each host first:
- Measure the real maximum on a Mac and on an XFS mount (clone a source whose link target is 1023, 1024 and 1025 bytes, with
core.symlinks=true): 1023 and the error text. - Then either lower
SYMLINK_TARGET_MAXto 1023, with the macOS and XFS sentence in the finding (the repo already asks the case-folding disk on every machine, because the assembly is cloned on Macs; the cost is refusing, on every machine, a link of 1024 to 4095 bytes that ext4 makes, so the finding must say the limit is macOS's and XFS's), or keep 4095 and say in the remediation that a Mac or XFS clone may fail below it. checkreads the tree and never the disk, so asking the host's own limit is not an option: one plan would get two answers.
tests/test_adopt_symlink_target_bytes.py::test_git_makes_a_link_of_the_limit_and_not_one_byte_more already skips where the disk takes less than 4095 bytes.
(b) A bad link at shape/README.md or contracts/shape-pin.yaml gets a second finding whose remedy cannot help it
#965 makes a bad link at project.yaml one finding: _leg_findings hands named_links to _root_shape_findings, which leaves out plan-root-blocks-manifest for a link plan-empty-symlink or plan-bad-symlink-target already names one by one (L1-80). The same defect stands at two other paths the shape writes, outside L1-80's wording:
- a bad link at
shape/README.md, withshape/andREADME.mdkept in the root, is named byplan-bad-symlink-targetand again byplan-root-blocks-shape-copy; - a bad link at
contracts/shape-pin.yaml, withcontracts/kept in the root, is named byplan-bad-symlink-targetand again byplan-root-holds-pin.
The second finding's remedy ("send it to a leg, drop it, or rename it in the source") cannot help a link no clone makes: no answer in the plan does, which is the point of #908's remediation, printed once after the findings.
To do: decide for each of the two codes whether a named link is left out of it as it is for the manifest (for plan-root-blocks-shape-copy, the review's mutant M04 is that change: the skip in _root_shape_findings then applies to any code; plan-root-holds-pin comes from the pin findings, which M04 does not touch and which need their own skip), or whether each gets its own tail, as project.yaml does (_at_the_manifest). Then say it in _named_symlinks' docstring, which now says the other findings do not leave a named link out.
test_only_the_manifest_finding_leaves_a_named_link_out pins today's behaviour for both paths, so lifting the limit means changing that test, on purpose.
- Comment wording in adopt-project.py:
checknames a symlink target with a NUL after its first byte, or over 4095 bytes, asplan-bad-symlink-targetbefore any leg exists, one finding names a link atproject.yaml, and the targets are read in one batch (#908) #965's code (r908's round-2 N1-N3, ate349d83e, adopt-project.py:checknames a symlink target with a NUL after its first byte, or over 4095 bytes, asplan-bad-symlink-targetbefore any leg exists, one finding names a link atproject.yaml, and the targets are read in one batch (#908) #965 issuecomment-6253967738):adopt-project.py:7926: "GIT'S AND LINUX'S" should be "LINUX'S", since git sets no bound of its own.:7929: "a target over 4095 bytes is made on no host" should be "on no Linux or macOS host", since NTFS is thought to take longer targets (:7940).:7938and:8158: name this issue.
Filed in v1.2.0 as #908's follow-up (#965); lane 3, the release owner, may place it otherwise.
Activity
adopt-project.py: `check` names a symlink target with a NUL after its…
brettheap commentedon Oct 20, 2026
CLAIMED — lane openRepoShape-1, session 300f8f46-004a-4e72-8587-4f192be2e108@Eagle, 2026-10-20T15:53:51Z, for #979
Logged in
lanes/log/openRepoShape-1.mdatbd9a75608ddeea026d1bec1c83e5f382d1011300.The three reads (lane-collision-protocol Rule 1):
adopt-project.py: a bad link that `plan-empty-symlink` or `plan-bad-s…
adopt-project.py: a bad link that `plan-empty-symlink` or `plan-bad-s…
brettheap commentedon Oct 21, 2026
(lane openRepoShape-1, 2026-10-21T01:29:09Z) Part (b) and the comment-wording checklist have landed in PR #1070 (
de75bf02). Part (a) stays open, and lane 1 no longer holds it.plan-empty-symlinkorplan-bad-symlink-targetnames is no longer named again byplan-root-blocks-shape-copyat a copy undershape/, or byplan-root-holds-pinat a pin's file. The adopt-project.pycheck: a symlink target with a NUL after its first byte, or longer than the platform takes, passescheckand fails after both legs exist #908 comments now say Linux's bound and name this issue.plan-empty-symlinkorplan-bad-symlink-targetnames is no longer named again byplan-root-blocks-shape-copyorplan-root-holds-pin, so it gets one finding, and the #908 comments say Linux's bound (#979) #1070's review are adopt-project.py and tests/test_adopt_symlink_target_bytes.py: follow-ups of PR #1070 (#979) from its review: three behaviours of the named-link skips that no test holds (mutants M12-M14), and three wording gaps #1089: three behaviours no test holds yet, and three wording gaps.Lane: openreposhape-1 (openRepoShape-1)
tests: a named bad link left out of the copy and pin findings no long…
adopt-project.py: `check` names what the clone's `.git` holds as git …
brettheap commentedon Oct 22, 2026
(lane openRepoShape-3, 2026-10-22T12:08:46Z) Ruling: part (a) leaves v1.2.0 as a known limit.
Brett Heap, 2026-10-22T12:01:22Z: "take your recommendations on #979, #917 and #921".
SYMLINK_TARGET_MAXto 1023, which would also refuse targets that Linux makes.checkpasses a symlink target of 1024 to 4095 bytes that macOS and XFS cannot make, and a bad link atshape/README.mdorcontracts/shape-pin.yamlis also named byplan-root-blocks-shape-copyorplan-root-holds-pinwith a remedy that cannot help it (follow-ups of #908) #979 leaves the v1.2.0 milestone and stays open for it, because closing it needs a measurement on a Mac and on an XFS mount.plan-empty-symlinkorplan-bad-symlink-targetnames is no longer named again byplan-root-blocks-shape-copyorplan-root-holds-pin, so it gets one finding, and the #908 comments say Linux's bound (#979) #1070 (de75bf02).--familyrefusal path, "nothing is created", three ruledbumplimits and aseed/scaffoldre-run are unsaid or slightly wrong #921, and its Known limits section names part (a).Lane: openreposhape-3 (openRepoShape-3)
docs/release-notes/v1.2.0.md: the v1.2.0 release notes: what changed …
adopt-project.py, shape_materialize.py and tests: a named bad link le…