Repository navigation
fix(writ): writ detects the Linux distribution; detectDistro reads /etc/os-release before it closes it - #986
Merged
David-Noble-at-work merged 3 commits intoSep 30, 2026
Conversation
detectDistro closes /etc/os-release before reading it, so DISTRO has been empty on every Linux host since 57a9fd2. The plan: readDistro(path) opens, defers the close, and scans; tests that go through the file and fail first; the adopt test that pinned the bug refuses a word no host detects; PR B's owed ticks. Lane 18 of #949; #944 follows as lane 19. Claude-Session: https://claude.ai/code/session_01DuNfZFyfxBoD9pdaiDEMrY
…tc/os-release before it closes it detectDistro closed /etc/os-release between the open and the scan, so every read failed and the DISTRO segment has been empty on every Linux host since 57a9fd2 (#288): no directory with a distribution suffix matched anywhere. It now calls readDistro(path), which defers the close straight after the open. The path is the seam the tests use: readDistro runs against os-release fixtures (Ubuntu with its ID_LIKE, Debian, a quoted ID, an unknown ID, no ID, no file), and TestDetectSegments checks DISTRO on a Linux host whose os-release carries an ID. Both failed against the old close and pass now. The adopt test that pinned the bug refused "Ubuntu", which is matched on Ubuntu now; it refuses NoSuchPlatform instead. DISTRO stays the ID field, capitalized: `debian` matches `.Debian`. The lineage, so that Ubuntu also matches `.Debian`, is #944, the next PR. PR B's plan takes its two owed ticks, the installers jobs on #984 and the site's sync, and is complete. Resolves #959 Claude-Session: https://claude.ai/code/session_01DuNfZFyfxBoD9pdaiDEMrY
…/959-writ-never-detects-the-linux
David-Noble-at-work
deleted the
fix/959-writ-never-detects-the-linux
branch
September 30, 2026 02:47
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
Lane 18 of #949, alone; #944 follows as lane 19 (ruled 2026-09-30: "we'll do lane 18 followed by lane 22. two prs and at the end we'll be done with selectors. we'll have common selectors for writ and lore.").
detectDistroclosed/etc/os-releasebefore scanning it, so the DISTRO segment has been empty on every Linux host since57a9fd20(Phase 8: the workflow-engine foundation for devlore operations #288), and no directory with a distribution suffix matched anywhere.detectDistrocallsreadDistro(path), which defers the close straight after the open. DISTRO is theIDfield, capitalized, as before:debianmatches.Debian.readDistroagainst six os-release fixtures, through the file, andTestDetectSegmentschecks DISTRO on Linux. Both failed against the old close and pass now. The adopt test that pinned the bug refusesNoSuchPlatforminstead ofUbuntu, which Ubuntu now matches.Ubuntuon Ubuntu, and a.Ubuntuproject deploys there;writ adopt --platform Ubuntuis accepted. The lineage (Ubuntu also matching.Debian) is One selector API: writ and lore detect the host and match platform selectors through the same code, along os-release's lineage #944.Also: PR B's plan takes its two owed ticks and is
complete.docs/plans/fix/959-writ-never-detects-the-linux.md. It staysactive: its last boxes are DANOBLE-UD24-1's convergence and telling the other session.Resolves #959
Test plan
TestReadDistro_Fixtures(4 of 5 cases) andTestDetectSegmentsfail; nothing else doesTestAdopt_Platformfails on "Ubuntu", as writ never detects the Linux distribution: detectDistro closes /etc/os-release before reading it, so no .Debian or .Ubuntu directory deploys anywhere #959's comment predicted; withNoSuchPlatform,make testpasses, 104 packagesgofmt;make vet-allandmake lint-allon linux, darwin and windows, 0 issues;star lint goDISTRO: Ubuntu, and no link is addedTime
Computed by the algorithm of noblefactor-ops#188 at merge.