Repository navigation
Conversation
Step 3 of issue #7's ship order. Dir.entries(path) answers [".", ".."] ++ child-basenames and Dir.children(path) the basenames alone, in the stored (boot-sorted) order, over the same symbolic tree step 1 built. This also fixes a wrong answer step 1 left in place: entries/children were registered as instance methods on Dir in builtinMethods but omitted from the singleton install on Dir's eigenclass, so Dir.entries("/tmp") answered NoMethodError for class Dir -- a name inside the type-error family the validator claims to exclude, on an ordinary safe CRuby method. - allocStrArr allocates the answer Array with one fresh String per name, accumulating through the foldPair_frame shape so framing goes through. - runFS handles Dir#entries/Dir#children; a missing path (Errno::ENOENT) or a non-dir (Errno::ENOTDIR) gates by name, since Errno is step 7. - fsSingleton's Dir row gains entries/children. - allocStrArr_frame joins rootFrameLem (stated after foldPair_frame). Verified: lake build rubycore green; lake build shows the same 198 pre-existing passes (125/125); check-proofs.sh builds the metatheory on the standard three axioms.
sam-xif
force-pushed
the
nori/vfs-step1-file-read-write
branch
from
October 10, 2026 04:04
2da15f8 to
1fc30e4
Compare
sam-xif
force-pushed
the
nori/vfs-step3-dir-entries
branch
from
October 10, 2026 04:04
a4b5803 to
b01f239
Compare
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.
Summary
Implements step 3 of issue #7's ship order — directory listing — which continues the symbolic virtual filesystem after step 1 (PR #21).
Dir.entries(path)answers[".", ".."]followed by the child basenames, andDir.children(path)the basenames alone, in the stored (boot-sorted) order over the same boot fixture the step-1 operations use.This is stacked on #21 (step 1). The base branch is
nori/vfs-step1-file-read-write; the diff is step 3 only.Closes: part of #7 (step 3).
What changed
Model (
RubyCore/)allocStrArr(Builtins/FS.lean) allocates the answerArraywith one freshStringper name, accumulating through thefoldPair_frameshape.runFShandlesDir#entries/Dir#children: an absolute path that resolves to adiryields the names; a miss would raiseErrno::ENOENTand a non-dirErrno::ENOTDIR, both gated by name (step 7 ownsErrno).Prelude.boot'sfsSingletoninstallsentries/childrenonDir's eigenclass.allocStrArr_framejoinsrootFrameLem(stated afterfoldPair_frame, whose proof it uses).Bug this fixes
Step 1 registered
entries/children/mkdiras instance methods onDirinbuiltinMethodsbut omitted them from the singleton install onDir's eigenclass. SoDir.entries("/tmp")answeredon an ordinary, safe CRuby method — a wrong answer inside the type-error family the validator claims to exclude, not an honest gate.
entries/childrennow dispatch through ordinary lookup. (Dir.mkdiris still the same class of gap; it is outside #7 step 3, so it is left for a follow-up rather than scope-crept here — see the new issue.)Gating is honest
Unmodeled operations stay named
Unsupported.Dir.entries("/nope")andDir.entries("/tmp/readme.txt")gate on theErrnothey would raise rather than fabricating one (step 7 modelsErrno).Verification
lake build rubycoregreen.lake buildshows the same 198 pre-existing errors from main does not build: lean-gate is red (267 errors in Denote/ and Ratchet/) #9 as the base branch (danglingSubclassRuleimports + the in-progress semantic rebuild CI runs report-only) — verified by building the base branch untouched; this PR adds none.scripts/run_typed_ratchet.sh --clink-rebuild→CLINK REBUILD CHECKS PASS, 125 certified / 0 gated / 125 total.scripts/check-proofs.sh→ metatheory builds; headline theorems rest onpropext + Classical.choice + Quot.soundonly.scripts/check-isolation.sh→ OK.Dir.entries("/tmp")→[".", "..", "readme.txt", "vfsdata"]Dir.children("/tmp")→["readme.txt", "vfsdata"]Dir.entries("/")→[".", "..", "tmp"]Dir.entries("/tmp/vfsdata")→[".", "..", "nums.txt"]Dir.entries("/nope")→ gate (Errno::ENOENT);Dir.entries("/tmp/readme.txt")→ gate (Errno::ENOTDIR)The CRuby-materialized
"vfs"difftest envelope (which must reproduce the fixture byte-for-byte) remains the next step and is not claimed here.This PR was authored by Nori, an autonomous coding agent, on behalf of @sam-xif. The implementation, tests, and description above were produced by the agent; a human should review before merging.