.be/ dir for flat worktrees — kill the dir⇒own-store proxy in anchor classificationToday a flat (Edwardian) worktree carries .be as a FILE (the wtlog,
row-0 referencing the store elsewhere) and a .be/ DIR means "own
store here" — ANNO-001 wants a flat wt to carry a .be/ DIR too
(wtlog + LSM index runs, NO shards), so every site using .be's kind
as the store-vs-flat proxy misclassifies. Full path inventories from
the code audit: js-audit (be/ + jab bindings) and c-audit
(beagle/ native). Two load-bearing classifiers own the decision —
resolve_hash.js anchors() and its native twin dog/HOME.c
home_anchor_resolve — with ~40 downstream sites inheriting it.
resolve_hash.js anchors() (.be/" and never consults a row-0
redirect; discover.js resolveAnchor (storePath = wt — a flat .be/ dir gets store==wt, wrong.dog/HOME.c home_anchor_resolve (637–708)
dir ⇒ h->root = h->wt; home_walk_up (938–964) anchors a
.be/+wtlog dir as primary-store-here. Same wrong root..be/ expecting shards:
store.shardDir readdirs subdirs as project shards;
home_be_subdirs/home_single_shard classify shield vs store;
serve.serveStore, submount.resolveLocalStore,
get.resolveLocalSource, fetchleg.isWtPath all fork on
reg⇒wt / dir⇒store.sniff/SUBS.c
SNIFFSubIsMount (1120–47) and sniff/AT.c dirty-scan prune
(932–40) mark a mount by a .be FILE — a flat-dir sub is not
pruned/listed; subs_path_is_be_store (332–37) calls any
.be-dir a store; beagle/SUBS.c unmount FILEUnLinks the
anchor (510–24) — cannot remove a dir..be-FILE worktrees (work.js
listWork 72–86); keeper/RECV.c (487–95) gates the colocated
be get ? advance on .be/wtlog being a regular file — a flat
.be/ dir would pass it with a REMOTE store..be FILE's first row; for the dir shape that row lives in
.be/wtlog — full list in both audits..be/ dir with a
wtlog member (classify.js 93–97, work.js isMount,
home_walk_up 946–55) — but those branches still anchor
store==wt, which is exactly the broken half..be/ references are STORE-side (shard dirs,
.graf.idx/.keeper runs via HOMEBeDir) — unaffected except
through HOME's root resolution. graf/DAG.h 16–21 layout
comment is stale (branch dirs retired, see GRAF.c 42/164).dog/git/IGNO.c igno_is_meta skips .be by NAME (kind-
agnostic — survives); its ..be.idx sidecar rule goes dead for
dir-shaped flat wts (the index moves inside .be/)..be/ as a DIR (wtlog + index runs,
no shards) and classify as the Edwardian anchor EVERYWHERE:
resolvers, store openers, work view, submounts, wire serve,
native and JS in lockstep. Store root comes from the row-0
reference in .be/wtlog..be FILE worktrees keep working unchanged; own-store
.be/ dirs keep working unchanged.resolve_hash.js + the ONE native twin
(HOME.c); consumers must not grow their own kind tests..be/ dir needs a RULING — candidates:
(a) shard presence: any non-dotted SUBDIR in .be/ ⇒ own store,
none ⇒ flat; (b) the .be/wtlog row-0 URI: references elsewhere
⇒ flat, self/absent ⇒ own store; (c) an explicit marker member.
(a) is cheapest and matches home_be_subdirs; (b) is the
semantic truth but taxes every stat with a row read..be/
dirs (subdir scan vs wtlog row-0 vs marker member).resolve_hash.js,
discover.resolveAnchor, and dog/test/HOME.c's kinds
table (extend K_DIR/K_FILE with K_FLATDIR) — failing first.anchors() + resolveAnchor learn
the flat-dir branch; store root from .be/wtlog row 0; the
~12 row-0 readers routed through the one reader.store.shardDir,
serve.serveStore, submount.resolveLocalStore,
get.resolveLocalSource, fetchleg.isWtPath stop kind-
forking and ask the resolver.work.js listWork/isMount accept
flat-dir wts; submount.mount/rollback and get's sub
unmount handle dir anchors (recursive rm, not unlink).home_anchor_resolve + home_walk_up flat-
dir branch (root from wtlog row 0); RECV.c colocated gate
re-derives the store instead of trusting wtlog-is-reg.BE.cli.c source/cwd classify (788–849,
2541–56, 3378–88), sniff/AT.c + sniff/SUBS.c submount
checks, beagle/SUBS.c unmount, subs_path_is_be_store.DOG.h 100–144 layout doc, stale graf/DAG.h 16–21
comment, wiki Worktree/Store pages.