bc-dgx7.98: B7e-graph — The workspace's beads and comments as one local snapshot… - #855
Merged
Conversation
…f Dolt bin/b7e-graph over lib/beadsnapshot.js: reads issues/labels/comments/parent edges directly from each workspace's embeddeddolt/<prefix> via `dolt sql -q -r json`, cached under os.tmpdir() keyed by the resolved .beads path, invalidated by dolt's own manifest+journal mark or --max-age (default 5m), --refresh forces a rebuild. Never a write. Filters (--title-match, --assignee, --label, --status, --parent, --closed-reason, --with-comments) apply afterward over the plain JS array — nothing a caller types reaches SQL. -w resolves a beadcause-registered workspace name; with none, falls back to $BEADS_DIR. Recovered from a dead attempt's worktree (uncommitted since 2026-08-27); this commit is that work as found, about to be rebased onto current main.
Owner
Author
|
A beadcause worker opened this and does not merge its own work. It is on the merge queue as bc-sct6g. |
Owner
Author
|
Merged into
The queue reports its own half only: how this branch got through, not what was in it. What the advocate actually did — the conflicts, which side it kept, the suites it ran and against which tree — is on bc-dgx7.98's merge bead, written by the window that did it. Nothing here is a summary of that; a process that did not watch the merge has no business paraphrasing one. |
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.
Recovers and finishes a dead attempt's work: this worktree (b7e-graph-dgx798a) already held a complete, uncommitted bin/b7e-graph + lib/beadsnapshot.js + test/beadsnapshot.mjs + README section + package.json/lock entries from 2026-08-27, frozen (no live process on it) rather than a duplicate in progress. I committed it as-is, then rebased 91 commits of intervening main onto it — one conflict, in README.md, where main had appended a different new section (
b7e-why) right after the same anchor point this one appends after; resolved by keeping both, in main's order.What it does:
bin/b7e-graphreads a beads workspace'sissues/labels/comments/parent-edge tables directly off itsembeddeddolt/<prefix>Dolt database viadolt sql -r json -q <fixed literal>— never throughbd's own query layer, which is exactly what the bead's cited incidents (dv-3rn.2: 48 concurrentbdprocesses, five-minute hangs) show falling over under concurrent load. Filtering (--title-match,--assignee,--label,--status,--parent,--closed-reason,--with-comments) happens afterward over the plain JS array, so no caller input ever reaches SQL. Results are cached underos.tmpdir()(never~/.config/beadcause— a disposable read cache doesn't owe an evidence-register entry or a retention decision), invalidated by Dolt's own manifest+journal change mark or--max-age(default 5 min), with--refreshto force a rebuild.What I verified rather than took on faith from the frozen worktree: the acceptance criteria's live claim (ran it against deluvia's actual graph, not just the test fixture), that the registries the bead's own text names as owed (package.json/lock, README section) are complete and internally consistent after the rebase, and that
node bin/b7e-enroll— the tool this repo built since this work was written, specifically to check what a newb7e-*command still owes — finds nothing missing. One thing worth flagging: the bead's own acceptance/description still says the DEFAULT_TOOL_LIST entry goes inlib/toolbelt.js; that convention changed underbc-wbrhito a self-declared@grant readheader line, whichbin/b7e-graphalready carries, so nothing further was needed there — noted here so nobody re-reads the bead text and goes looking for a toolbelt.js edit that no longer applies.Tests: node --test test/beadsnapshot.mjs: 46/46 checks pass, including a real bd+dolt fixture proving field-for-field parity with bd list --status=all --json, the read-only guarantee, and the cache invalidation rules. Live-ran against deluvia's real graph: node bin/b7e-graph -w deluvia --title-match 'Entry 107' --with-comments answered correctly in 2.4s (acceptance criteria's 5s bar), comments inlined verbatim. node bin/b7e-enroll b7e-graph: nothing owed (bin/package.json/lock/README/@grant header all agree). Ran the 54 suites node bin/b7e-affected names as touched by this diff (README.md, bin/b7e-graph, lib/beadsnapshot.js, package.json/lock, test/beadsnapshot.mjs) via node --test: 54/54 pass, 0 fail. Started a full node bin/b7e-gate --jobs 6 but it queued 20+ min behind two other sessions' gates on this shared Mac without reaching a suite; stopped it rather than hold the window — CI runs the full suite on the PR.
Files changed — 6 files · +1243 −0 · against `main`
Opened by a beadcause worker session on bc-dgx7.98 — b7e-graph — The workspace's beads and comments as one local snapshot you can actually query. It merges itself once the checks report; merging is what closes the bead. If this is still open, something stopped that, and the reason is on bc-dgx7.98 and in Adam's inbox.
bead: bc-dgx7.98