Skip to content

0.5.1: roots that overlap are refused, and a file root globs nothing beside it - #14

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/island-root-hygiene
Sep 8, 2026
Merged

0.5.1: roots that overlap are refused, and a file root globs nothing beside it#14
Sunrisepeak merged 1 commit into
mainfrom
fix/island-root-hygiene

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Completes 2026-09-08-island-boundary-names.md. The design record states that overlapping roots are refused, and 0.5.0 shipped without the check -- a requirement folded into a larger change, gone when that change shipped.

What was missing

roots = { "src/kernels", "src" } was accepted. A file reachable from both has two namespace paths, and which one it got depended on the order of the list; it was also read twice and merged with itself, so the entry looked like two implementations agreeing rather than one file counted twice. The result was plausible, which is worse than a refusal.

mcpp.tools.island: the roots `.../src` and `.../src/kernels` overlap.
  A file reachable from both has two namespace paths, and which one it got
  would depend on the order of this list. Roots are separate implementation trees.

And one imprecision beside it

The re-run glob was registered from a root's base directory, which for a single-file root is that file's parent. Globbing the parent made an unrelated file sitting beside it an input to the build program. The glob is now registered only for a directory root, and a root that is the package root itself no longer produces a ./**/* pattern.

Criteria

A new step perturbs the fixture to name src beside src/kernels and asserts the build fails naming both roots. The ten existing island steps were re-run locally against the released mcpp 2026.9.8.1 and all pass unchanged.

The floor does not move.

…beside it

The design record this implements states that overlapping roots are refused,
and 0.5.0 shipped without the check. A file reachable from two roots has two
namespace paths, and which one it got depended on the order of the list; it
was also read twice and merged with itself, so the entry looked like two
implementations agreeing. A misconfiguration that produces a plausible result
is worse than one that stops, and this is the shape of defect where a
requirement folded into a larger change disappears when that change ships.

The re-run glob is now registered only for a directory root. A single file is
its own root and its parent directory is not part of it, so globbing that
parent made an unrelated file beside it an input to the build program. A root
that is the package root itself no longer produces a `./**/*` pattern.

A CI step covers the refusal: the fixture is perturbed to name `src` beside
`src/kernels`, and the build fails naming both roots.
@Sunrisepeak
Sunrisepeak merged commit a402220 into main Sep 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant