js/ is JABC — a thin, anti-bloat JavaScriptCore binding (stock libjavascriptcore; bindings "hold no memory"; JS owns the buffers, no shared custody). Tickets here cover exposing ABC primitives/containers to JS and the binding surface. The fix-and-land method is Issues.
The jab status "hang" on the journal store is fixed end-to-end: JS-056 stops the per-open O(all-objects) index rebuild (9352 ms → 9 ms / locate), JS-055 makes the one >pack-sized resolve that broke the fast path succeed. Both via the Issues loop.
1c70e9d8: git.pack scratch now sizes off the record's
declared pk.size and grows on NOROOM (a _grow wrapper), so a >pack-sized object (the 46 MB tree-sitter parser.c) resolves/scans; js/pack.hpp throws NOROOM vs REF_DELTA distinctly (no more "ref-delta? out full?" guess). Repro pack.js/packidx.js; JABC 29/29 green.
c4c912e9 (beagle bin/lib) + 3cad15fb (*beagle-ext*
be/lib, the copy jab runs): store.js locate() mmaps the on-disk keeper.idx LSM runs (abc.index({dir,ext}), decode offset=val>>24|file_id=(val>>4)&0xfffff) instead of rebuilding the in-RAM index by scanning every object — in-RAM build kept as the no-idx fallback. Real jab status 10.9 s → 1.5 s. NB the lib is mirrored in two shards; landing only beagle/bin does NOT change the running command (it runs ~/beagle-journal/be).
A 4-dimension multi-agent review of the jab repo (C++ bindings + embedded JS bundles, ~6.8k lines) with 2-skeptic adversarial verification per finding: 24 raw findings, 15 confirmed (9 refuted). Tickets are proposals awaiting user triage; each carries file:line evidence.
Native KEEPLookup is index-only (no pack scan) so an unindexed pack is invisible → be post of a locally-committed tip fails as a BOGUS non-FF (KEEPFAIL/WIRECLNFF); jab hides it via store.js's scan fallback. Repro shard: 12 packs, 2 .keeper.idx runs. Read-side twin JS-056; orphan-pack sibling JS-077. Concept: Indices.
A 13-agent quality/correctness review of be/ (this beagle-ext branch @ 5ab7f838) found resource leaks in the git-wire PUSH path added by the landed GIT-019 receive-pack-session rework: on any throw after the FF gate the receive-pack child (stdin+stdout fds, pid) is never closed/reaped, accumulating in the resident jab loop (JSQUE-020). Plus an uncertain ulog reader-map item. The same review also re-found the still-OPEN JS-076/JS-085 leaks (neither is in jab log on this branch).
pushRemote (post.js:334-339) + pushSession (wire.js:571-599) leak the receive-pack child on a post-FF-gate throw (buildPushPack/send, or the advert drain) → resident-loop fd/zombie accumulation; + uncertain ulog.js reader abc.mmap never abc.close'd. New (GIT-019 code); JS-076/JS-085 tracked separately.jab get aborts the whole checkout on a committed .be/.git tree entry (checkout: unsafe path .be) — should skip it silently like native POST-015. Split from JS-096; filed 2026-06-28.da0c12c3: host-less be: local clone never worked (wire.js classify routed it to ssh) — fixed to a local keeper exec; merged WITH DIS-058 2026-06-29.beagle/test/get store-INTERNALS cases (21/25/26-cached/
26-remote-shard-refs/39/40/43/44/48/54) to jab get under be/test/get. Unlike the 4 parity cases (which exclude .be), these assert ON the store layout — flat shards, peer-URI ref rows, anchor-file shape, no-escape. Port as jab-driven STRUCTURAL assertions; triage repro-first, splitting the C-only / unimplemented arms (cached //host, keeper://local, sub-source, keeper upload-pack, HOME walk-up) to follow-up tickets. New storecase.sh harness.
A security/quality/modularity review of the be/ JS reference impl (9 module reviewers + adversarial verification + 3 cross-cutting passes) produced this batch: 31 findings survived verification, 2 were refuted (recurse sub-path traversal; ulog _lastTs). Fix-and-land via Issues, grouped by disjoint file ownership; the cross-cutting modularity refactors (086-090) run as a sequenced second wave.
*Status 2026-06-25* — ALL implemented in the main working tree + verified: be/ 64/64, beagle/ 464/464 green. Wave-1 (065-083,085) full; wave-2 (086-090,084) landed the behavior-preserving SAFE subset, risky parts deferred as own residuals (suites stay green):
cleanup (writers take the reader handle, drops the reader.shard leak) landed.
the O(n^2) dir-hunk re-encode, and the dead BLOBFAIL branch landed.
statExists landed. NB checkout.apply() is NOT dead — guard.js's JS-083 repro calls it.
--plain) and JS-091 (rev-anchored #<sha>./path descent in size/blob/type).
*Audit 2026-07-07* — the 06-25 "ALL implemented" claim did NOT reach the be/ shard: only JS-065/069/071/073/075/082 (+100) landed (d89eb236 7b0cd620 174d06f4 08710bda d80b0a33); the 066-091 residuals below re-verified OPEN in be/ HEAD 082b172c. JS-066 REGRESSED, JS-083 elevated (live via submount), JS-068/078/079 MOOT (JSQUE-020 928aaad5 deleted the file queue), JS-093/094 LANDED e5cf0fdd.
Security:
.gitignore glob exponential backtracking (ReDoS) → glob→RegExp + work budget (REGRESSED: the 06-25 fix never reached be/).wire.js ssh host argv injection (CVE-2017-1000117 class) + unquoted remote PATH.Quality:
patchscope.lca DFS first-hit = stale merge base + unbounded → capped recency LCA.registry.build masks a module's load error as 'no handler for verb' → re-throw.wire.fetch leaks child stdin fd on every error path → guarded close before reap.put rewrites whole wtlog per arg (O(N²)) → ulog.appendInPlace/feedRows.bro fd-1 capture monkey-patch fragile under re-entry (JAB-029) → gate on mode.checkout.apply writes a zero-byte file for a missing object → skip-on-missing (elevated: submount.js now calls apply, the path is LIVE).Modularity (second wave — collide on shared files, sequence after the bug fixes):
log.js uses test-only k._packs() + re-impls resolveHexAny → use the public API.store.js ~650-line god module; ref writers take raw reader.shard → split objects/refs.core/+shared/ depend UPWARD on view/ (shQuote) → shared/util/shell.js.libDir/_here) duplicated 5× → one shared/util/here.js.loop→bro→loop require cycle + fd-1 patch → inject ctx.driveSubRun(argv).checkout.apply, 3 short-hex resolvers, dup helpers).fc50e82 (js/ lineage, 2026-07-03): the bulk
set_tests_properties no longer names the be/-gated JABCulogLib/JABCstore, so a clone without be/ configures cleanly (their per-test LSAN env is redundant since JS-064 embedded the suppression in the binary). The site now lives in the jab runtime repo's CMakeLists.txt (js/ left the beagle build — JAB-005 46f87bcd).
js/hunk.hpp JABChunkFeed writes the TOK TLV at 1/4 the
byte length (token-COUNT vs byte-length pointer math) — a fed hunk's toks drain back as N/4 and next() fails unless 4 | N. Found fixing COMMIT-003 (its plain-mode EMPTY-toks workaround dodges it). Blocked on a beagle C-core clone (GET-033).
First cut moved the two live unit tests to be/test (+ JS-062/JS-063 below); the once-deferred be-js-* harness suite followed via e542b67e ("move be tests out") + d80bdb5c (TEST-003 de-nativify) — the whole suite now globs from be/test/CMakeLists.txt, binding tests live in the jab repo test/ (js/ became a submodule, JAB-005 46f87bcd), and beagle/test/js keeps only the beagle-owned get/{zip,delta}.js fixtures.
04449a47: the five be-bin-* harnesses repointed to the
post-reorg be/ layout (shared//views//core/discover.js) + main.js <verb> entry; ctest #195–199 green. (061's deferred harness chunk.)
0c2063ee: js/CMakeLists.txt JABCulogLib/JABCstore repointed
to ../be/test/*.js (EXISTS-guarded); ctest #457/#458 green.
Topic reopened 2026-06-21: the be status JABC-coverage review surfaced standard-API gaps for utility scripts; this batch was the POSIX-syscall ones, each thin marshalling over an EXISTING C leaf (no new abc work). All three landed via the Issues loop (store-backed worktrees, repro-first, human-gated).
800c57a3 — script argv → args / process.argv (ctest JABCargv).60194418 — io.readdir: dir-marked /, polymorphic 2nd arg
(fn | {recursive, callback, hidden}), over FILEScanDir/FILEDeepScanDir.
8622368a — FILEGetEnv / FILEGetCwd → io.getenv / io.cwd.0155ee76 — process leaves io.spawn / spawnFds / reap (over
FILESpawn/FILESpawnFds/FILEReap) + io.unlink. io.exec was cut on review (misnamed sugar); capture-stdout recipes (pipe-drain + file/mmap) live in API.md. stderr/memfd/async-child deferred.
78edd840 — ron time codec: ron.now / ron.of(Date|ms) /
ron.date(ron60) over RONNow/RONOfTime/RONToTime + DOGutf8sFeedDate (beagle-domain; ron60 spans 2000–2099). ctest JABCcodec.
012d4b3d — generic tokenizer tok.parse(bytes, lang, out?) →
tok32 Uint32Array (optional out Buf, zero-copy) + a pure-JS TokStream cursor, over the standalone HUNKu32bTokenize core. ctest JABCtok.
5d162989 — generic mmap LSM index abc.index (u64/wh128):
point/range/prefix + .seek pull cursor, in-memory (io.ram) vs on-disk (abc.book), HIT<lane>Compact. + io.rename/io.mkdir. ctest JABCindex.
5b11dad9 — git JS package: git.pack (PACK container) +
git.delta.apply, migrated off abc (hard cutover; abc.over("PACK")/delt removed). GIT-007 vector byte-identical. ctest JABCpack.
090658bb: the pack-log feed/scan emit (sha→offset)
wh128 entries into a CALLER buffer (dog/git/PIDX), surfaced via git.pack scan(out) / feed(…,out); the caller pipes entries into a JS-022 abc.index. The pack-log → abc.index pipeline is now wired from JS end-to-end. Deferred: converge keeper UNPKIndex onto PIDXScan.
git.pack (the PACK container) already
(de)compresses blobs, every ZINF caller is pack/wire-internal, and beagle has no loose objects. Only foreign-git-loose / generic-gz would want it.
DOGIsProjector/DOGProjectorDog):beagle-domain logic, belongs with the keeper/graf/sniff/HOME SDK effort.
The deeper store-layer gaps (keeper/graf/sniff/HOME bindings — open a .be, read an object by sha, classify the worktree, ahead/behind) are a separate, larger SDK effort; JS-018 / JS-019 fold into it.
371ad14b: be <name> runs a repo-local bin/<name>.js via
the jabc runtime (forked through BERun, no JSC in be), tail forwarded as args; last dispatch fallback (never shadows a verb/projector/file). WITH_JS ON by default, jabc built beside be. Concept: Extensions. ctest be-all-02-extension-dispatch. Store/repo SDK stays deferred.
jabc has no process.exit(code),
so only 0-vs-nonzero (a thrown script → 1) propagates through be <name>.
be get wire client (JS-038 umbrella) — get path GREEN
Reproduce be get as bin/get.js, output-equivalent to native across file: / ssh: / be: remotes and new/del/mod files+dirs. The git-wire conversation lives in keeper/ (unlinkable), reimplemented in JS like status.js did sniff. Tests in test/js/get/, helpers in test/js/lib/. The pipeline full-fetches (no haves → OFS-only verbatim pack), so the thin-pack leaves are NOT on the get path.
bin/lib/pkt.js + wire.js — pkt-line + the
fetch convo (advert / want-have-done; NO side-band requested → raw pack after NAK) over io.spawn/net. transport: file→keeper, be→ssh keeper, ssh→git.
bin/lib/ingest.js — write the pack (minus
20-byte trailer) as NNNNN.keeper + the byte-identical <ron64>.keeper.idx wh128 run + refs/wtlog. Native needs the prebuilt idx (else unk).
bin/lib/checkout.js + bin/get.js — apply
tree (new/upd/del, files+dirs) + wtlog anchor + the get ?<br>#<hl> banner + post commit rows (update). ctest be-js-get-{file,be,git} 3/3.
..be.idxsidecar, thin-pack/incremental fetch (would use the leaves below).
Native-leaf prereqs (for push / thin packs — NOT needed by the get path):
c3fbdda5: zip.deflate/inflate over dog/git/ZINF
(ctest JABCzip). Caught the ZINFInflate NOROOM-wrap footgun → GIT-011.
742c06ff (code + delta.js) but INCOMPLETE: the be get
reconcile dropped JABCdelta registration + encode docs → GET-031; follow-up needed to wire the test + docs.
feed base by offset|hash (REF_DELTA emit) — ← JS-036.
The reflog-WRITE verbs as JS, output-equivalent to native (the JS-027/JS-038 pattern); all five children landed 2026-06-22 (audited 2026-07-07). Today the code lives in the beagle-ext shard — be/verbs/{put,delete,post}/*.js + be/shared/{stage,conflict,ulog,store}.js — with parity suites in be/test/{put,delete,post}.
ea9de45b+4fd1d639: FILESetMtime utimensat leaf +
io.setMtime binding (round-trip test: jab repo test/stat.js, JABCstat).
3ce8aee5: ULOG write side folded into ulog.js + ref writes
into store.js (was keeper.js) — crash-safe monotonic appender + set/tombstone.
e6e47128: put.js + stage.js — the staging engine.e0f79ff0: delete.js — staged removal + branch tombstone.032debec: post.js + decide/commit/conflict — thecommit-maker (FF-or-refuse then; patch-absorb grew later under other tickets).
js/main.cpp)fopen/ftell/malloc fail)
return past the JSClose teardown → the whole JS context leaks (LSan 2358 B, masked by the blanket JSC suppression). Fix: a JABCRunFile worker funnels every failure to the shared cleanup. Sibling of JS-007. File-disjoint, standalone.
c9395c2f: jab <projector> LSan report is benign JSC VM
singletons, NOT a leak — teardown is fine (jab --eval 0 clean; no data scaling; GC reclaims nothing). The standalone binary lacked the leak:libjavascriptcoregtk suppression ctest applies; fix embeds __lsan_default_suppressions() (ASAN-only, js/main.cpp:11-20) + JABCleakLoop repro. JABC 30/30. Clean 3-way merge with JS-063's js/CMakeLists.txt.
4c6fa1fa
be patch was the LAST verb not mirrored. JS-052 is bin/patch.js over FULL-HISTORY weave reconstruction (mirrors GRAFMergeWtFileTunable): per file, DAG-fold each side's commit history with the already-bound weave.fold/merge/ merged leaves, then merge+fence — NO new binding (a first 3-blob weave.merge3 cut was rejected as the graf merge debug tool, not patch's engine).
4c6fa1fa: bin/lib/patchscope.js + bin/patch.js on
full-history weave reconstruction (existing weave.* leaves, no new C) + 9 test/js/patch/* parity cases. Conflicts deterministic via SOURCE_DATE_EPOCH; same-anchor fence-order is the DOG-005 graf→dog/WEAVE residual.
1afd5f2d, TUI open
Mirror bro (the dog TUI pager/renderer) as bin/bro.js. A SELF-CONTAINED viewer: URI args → io.mmap+tok.parse → hunks → paint — NO stdin TLV pipe and NO forking C producers; bro.js runs JS commands for its content in-process (the point). Native gap is tiny (a raw-mode + winsize tty.* leaf); the bulk is a pure-JS port of bro/BRO.c (renderer + colour-diff classifier + TUI).
1afd5f2d: tty leaf (ANSIRaw/Cook/TtySize + the tty.*
leaf) + bin/bro.js plain viewer (matches bro --plain). The interactive raw-mode TUI (TODO#3) remains open. libabc+libdog ONLY; cook-on-exit mandatory.
A read-only review of bin/*.js (clarity / reuse / missing JABC APIs) spawned three tickets. JS-042 (js/-only) and JS-043 (bin/-only) are FILE-DISJOINT → parallel; JS-044 wires them together and is blocked on both.
ff7a378e: JABC FILE bindings — io.stat carries mtime/atime
+ new io.lstat/readlink/symlink/chmod over abc/FILE.h leaves (JABCstat test). Surfaced GET-032. Enables the JS-044 consumer rewire.
cbad5786: bin/*.js consolidation — 4 new libs
(path/sha/ulog/render), 12 callers repointed, hexToBytes→hex.decode, dag.commitTs reuse, dead-func removal; −177 lines, byte-identical output. NB: the keeper ref-delta fallback was GATED, not deleted (reachable on wire-cloned packs — review premise was wrong).
b87e6251: rewired consumers — classify.js drops the
/usr/bin/stat subprocess (→ io.lstat.mtime) + real symlink classify; checkout.js materializes symlinks + exec-bit (the JS-038 checkout residuals). New be-bin-checkout-symlink test.
7ef0bf70: advanced sub → adv verb (subs.js/status.js),
byte-matching native SUBS-030; sub-status-parity oracle expects adv.
The bin/*.js review batch (JS-042/043/044/045) is fully landed; full be-bin/ be-js-get suite 7/7 green. Worktrees ~/todo/JS-04{2,3,4,5} are spent (removable).
125d5c8f (was ~/todo/JS-025): bin/status.js
+ bin/lib/* reproduce native be status BYTE-FOR-BYTE (real repo 1291 ok + recursive status:abc; test/bin/* all pass). libdog+abc ONLY, jabc link unchanged, nothing committed. Validates the extension SDK end-to-end. Children (done): JS-028 git.tree/parseCommit leaves, JS-029 be/wtlog lib, JS-030 keeper lib, JS-031 classify+ignore+status.js, JS-032 dag (ahead/behind), JS-033 subs (submodule rows + recursion), JS-034 gap review. Oracle: native be status; parity tests in test/bin/* (del/new, pin advances, sub recursion).
The js/ 7-lens code review (2026-06-16) produced JS-002..JS-014; ALL were fixed on branch ?/dogs/js (worktree ~/todo/dogs-js), each repro-tested red→green and verified green under WITH_JS+ASAN (ctest -R JABC 3/3, LSan clean), and MERGED to trunk. The build was first restored (c4f03a7c: dropped dead convert.cpp/rdx — no rdx/ dir — and mapped ABC_BASS). Tests are C++ (js/test/jabc_test.cpp + run-007.sh) since test.js can't be regenerated (no node). JS-001 (the ABC-container binding proposal) is also closed. That batch closed; the reopened POSIX batch JS-015/016/017 landed (see above); JS-018/019 deferred. Per-ticket Outcome + hash in each .mkd.
5ee417eb — file.write/io.log heap corruption (CRIT).07f858b7 — validate JSC exception + NULL typed-array ptr.bd3a9c67 — guard len-1 underflow (live sites; convert/macro sites deferred).08df5879 — JS_FILES fd-table custody (leak, double-unprotect, std-fd close).abc29c84 — JABCioLog logs args[i].24f890ed — main() opens script_file + IO guards.71e5aaf8 — io timer double→int guard (convert.cpp i64→BigInt deferred to rdx).621f4633 — io.mmap argc guard + unmap-on-fail + path overflow.f20e2ec7 — callback exception-safety + re-entrancy guard (no live JSStringRef leaks left).041e4bd5 — utf8 Decode validation + Encode NUL trim.0b1006d4 — C++ test harness, ctest fails on a bug.23d71efc — js2c.js escaping (blobs need a node-regen to benefit).9c6118b4 — Google-C++ .clang-format + prune dead surface (deeper rename = optional follow-up).
Deferred (dead code, out of build): the convert.cpp i64→BigInt (JS-008) and convert/JABC.hpp-macro underflow sites (JS-004) — revisit when rdx is re-wired.
u64/u32 buffers,
kv64/kv32 maps, wh64/wh128 sorted runs — backed by JS-owned ArrayBuffers / mmap (not C-side BASS). Recommends model-A view-over-ArrayBuffer (BASS confined to per-call scratch), per-class JSC bindings, BigInt for u64. CLOSED.