.be kind tests, creators, row-0 readersOpus sweep over be/ (beagle-ext) and jab/ bindings, 2026-07-24.
Every path that tests .be's kind (dir vs file), assumes dir⇒store /
file⇒flat wt, creates .be, or parses the row-0 store reference.
storeOf(anchor): composes the shard root as <x>/.be;
a flat wt's shard-less .be/ still composes as a store root.anchors(dir): THE kind test — kind==="dir" ⇒ "own
store in .be/", return true; kind==="reg" ⇒ parse row-0 of
the file, anchor iff a first-row URI exists. A flat .be/ dir
is adopted as own-store and never reaches the redirect branch.ulog.each(be,…) row-0 parse of the .be FILE.shard==="" ⇒ the .be dir holds packs directly.row0Row(bePath): wtlog row-0 store-anchor
parse. L33–34 the BE/WTLOG literals.resolveAnchor(wt): the kind fork —
reg ⇒ store+project from the row-0 redirect (L106–116);
else ⇒ bePath=<wt>/.be/wtlog, storePath=wt (L116–128). A
flat .be/ dir wrongly gets storePath=wt here.repoFromBe, L72–81 projectFromPath:
split on the /.be/ literal (row-0 pivot).open(be): drains be.bePath (correctness
depends on resolveAnchor's member-file choice). L223–233
anchor()/repo(): return row-0 as the store anchor.shardDir(storePath, project): readdir(<store>/.be)
enumerates subdirs as project shards; a flat .be/ (no shards)
scans to a bogus/empty shard. L166–178 packs() readdir for
.keeper files. L649–679 createShard/set/tombstone/ensureShard
mkdir + seed refs under the store .be.classify + L57–59 servePath; L512–516
serveReader flat-store retry (GIT-020).serveStore: .be path kind==="reg" ⇒
WORKTREE (resolve store via discover.treeAt); else open as
store/.be-dir/shard — the same reg⇒wt / dir⇒store fork.resolveLocalStore: kind==="reg" ⇒
worktree source, follow row-0 redirect; L143–146 a path ending
.be marks a store source; L268/365–367 sibling shards land
under the parent's .be/.mount: WRITES the sub anchor
<sub>/.be as a FILE (redirect+track rows); L399 rollback via
io.unlink — assumes a file. L50–59 currentSubPin reads the
anchor FILE's rows for the #sha pin..be creators)resolveLocalSource: kind!=="reg" ⇒ store
as-is; "reg" ⇒ worktree, row-0 redirect (L177–185).oldTipOf(bePath): reads .be file rows for #sha.seedLocal: CREATES the flat-wt .be FILE
(redirect + tip row) — the site the dir-ification replaces.seedRemote: CREATES the own-store shape — mkdir
.be/, ingest.clone shard, write .be/wtlog.isRemoteSeed: path ends .be ⇒ remote store seed.
L362–429 handleWtSeed writes the .be file for //X clones..be present ⇒ io.rmdir(full,true)
of the whole sub. L1499 default bePath=<wt>/.be.listWork: lists ONLY dirs whose .be is a FILE — a
flat-dir wt drops off the work list.isMount: .be FILE ⇒ mount; dir ⇒ mount iff
.be/wtlog is reg (the SUBS-049 half-recognition).storeDisp/mountAnnot: colocated iff store==wt..be reg OR dir
with .be/wtlog reg (SUBS-049); L516–517 isMetaPath skip..be/.git, presence-only), util/path.js L48–50 (safeRel
rejects .be), stage.js L56, post/fold-decide.js L50–51.isWtPath: .be kind==="reg" ⇒ wt —
a kind fork, NOT kind-agnostic.authorIdent: reads <store>/.be/config
(store-dir shape).home_anchor_resolve: REG ⇒ secondary (row-0
redirect); L699–737 else ⇒ primary, h->root = h->wt. The C
mirror of the core break. L716–722 comment: "a .be/ dir is a
repo even with an empty wtlog".home_ensure_markers: CREATES .be/ dir +
wtlog (already the flat-dir shape, but rw-bootstrap only).home_be_subdirs/home_dir_shieldlike/
home_single_shard: count .be/ subdirs ⇒ shield vs store;
L818–851+ home_shard_title/home_resolve_project_dir
enumerate shards, read each refs row-0 title.HOMEOpen (project from single shard),
L310–327 config mmap, L549–561 home_peek_repo_uri (row-0
peek, file or .be/wtlog).HOMEBeDir/HOMEMakeBeDir/HOMEProjectExists/
HOMEBranchDir: compose <root>/.be/<shard>; L37–53/107–115
doc the dir=store invariant. DPATH.h L45, ULOG.h L351 notes..be/wtlog)resolve_hash.js:67; discover.js:85–91,106–127; wtlog.js:223–233; get.js:145–153,177–185,205–217; submount.js:50–59,225–231; HOME.c:549–561,661–697,723–735.
.be kind / structure (be/test/**).be/ DIR = own-store anchor form");
statusfast.js:58–59 (.be/wtlog primary form); lib/reanchor.js
(rewrites the /.be/ row-0 prefix, throws without it);
stage_guard.js:49; submount_guard.js:38; put/mtimeinv.js:29–32;
wtlog_track.js:106; submountstamp.js:68; uri/resolvehash/
check.js:28,45 (asserts store === <proj>/.be/).<dir>/.be/<proj>): store.js:35,107,161;
ingest.js:32; resolve.js:28,52–54; packlog.js:27; ulog.js:47–66;
idxmaint.js:33; packsalvage.js:36; wire_stream.js:111–162;
dag/remoteindex; graf/{cache,parity}; relate/verdict;
list/fuse.js:27; wire/saveremote; log/nonspine.js:25;
bro/context + bro/barectx.