✅ fresh
last synced 2026-10-20T11:44:45.791774+00:00 · coverage 100% (
git-root)Validation by Beadloom
doc_sync— same source assync-check.
Git Root (component)
Internal building block of the infrastructure domain.
Source: src/beadloom/infrastructure/git_root.py
Overview
Beadloom takes its project root from the current directory or --project and never searches upward. Git answers every question in paths relative to the root of its working tree. When .beadloom/ sits in a subfolder of a repository, the two frames disagree: sync-check --since reads git show <ref>:<path> with a path git does not hold at that place, both sides come back empty, and every pair is called fresh whatever changed (BDL-UX #325).
The owner ruled on 2026-10-12 that a nested root is a transition-period layout, so it is refused by name rather than supported. This component is the one reader every refusing surface asks, and it holds the one sentence they print: both roots, and the rule that the project root must be the git root.
The question goes to git (git rev-parse --show-cdup) rather than to a search for a .git above the directory, because git's answer is the one the other commands act on: a linked worktree, a submodule and GIT_CEILING_DIRECTORIES are git's to decide. The answer is a run of ../ segments, so no path git prints is decoded.
"Not nested" covers three answers: the project root is the git root, it is in no repository, or git could not answer. None of them is a layout this component refuses.
Public surface
nested_root(project_root)— aNestedRootwhen the git root lies above project_root,Noneotherwise.NestedRoot— the frozen pairproject_rootandgit_root, both resolved.NestedRoot.sentence()— the refusal, startingthe git root is above the project root.
Collaborators
application/doctor.py— thegit_rootrow:ERRORwhen nested, which fails the Gate'sdoctorstep and makesbeadloom doctorexit 1.services/commands/setup.py—initrefuses before any writer runs, in every mode.services/commands/docsync.py—sync-check --sincerefuses;sync-checkwithout--sincetranslates its paths through--show-prefixand is not refused.
Component doc (BDL-083 S2e). Public surface verified against
git_root.py.