Repository navigation
feat(file): discover and resolve land; kind-honest activation; the ordering edge - #615
Merged
Merged
Conversation
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4, PR 3 of the resource-construction campaign (docs/plans/resource-construction.md) — the
explicit-conversion docket. Closes #611; phase 4's code completes with this merge.
The two actions (4-resource-management.md §5.7):
file.discover(path, kind?="entry", after?)—lstat, the entry itself, no follow — and
file.resolve(path, kind?="entry", after?)— stat, the fullchain, the TERMINUS's identity, confinement judged against the resolved root (macOS's symlinked temp
roots would otherwise false-refuse).
EntryKindis a named enum with explicit values and the fullmarshal surface; the
entryzero value is the permissive default; Stop-only throughout; results internas discoveries and activate through
VerifyExistence— a discovery of a claimed path reaches theclaimed entry (one identity, both doors).
The pure ordering edge (§5.7 rule 8):
after, typedop.OrderingEdge— the scenario's sharpassertion caught
after anysilently not ordering (an invocation bound to an any-typed parametercaptures the flow-combinator convention, not its promise); the dedicated type carries the contract and
discards the delivered value by type. En route the generator's defaults vocabulary was made uniform: a
nildefault always emits the bare-optional token (the old rule panicked the generator itself onstruct-kinded nil defaults; one bootstrap hand-patch of the gen file, then regeneration reproduced the
fix from the corrected generator).
The runtime grammar (§5.7 rules 3 and 9):
NormalizeRuntimePath— plan-space rules as authored,plus
fsroot.RelWithin's under-root rebase (the capability added to fsroot, where path/root questionslive); machine-absolute outside the root refuses as confinement; the leading-slash sharpening (the
machine reading wins at run time) is recorded as rule 9.
Kind-honest activation (door one of the false-claim taxonomy): per-kind
Exists— lstat plus kindtest on all three kinds;
SymbolicLink's lstat-only predicate was itself kind-blind. The writ audit'sfind: migrate's layer registration moved a DIRECTORY through a
*Regularclaim (the #585 C2 recordedkind-looseness) — retired by
file.MoveDirectory(a*Directory-claimed sibling over the sharedkind-agnostic move core), with writ migrate switched onto it.
The
Entry-slot refusal lands at the planner's binding seam (shaped: "a claim asserts a kind and aninterface asserts none");
t.symlinkjoins the harness as the OUT-OF-BAND actor (plain os.Symlink — noprovider, no catalog) that the kind-honest scenario needs at the starting line.
Acceptance — explicit-conversion suite items 4–13 all green: ten new judgment stars (the
discover-after-exec skip lifted) plus Go pins — the per-OS runtime-dialect table,
RelWithin,EntryKindround-trip and lstat-strict admits, and the kind-honestExistsmatrix whosesymlink-to-regular row is the door-one fix pinned. Authoring findings recorded:
$PWDis notWindows-portable through the star shell (item 9 split star/Go) and
shell.Resultdoes not convert tostring.
Refs #581, #586.
Gate:
make test103 ok / 0 fail;make vetclean under darwin, windows, and linux;gofmt -lclean.