T-ERF6-refresh-stale-system-graph-fixtures
State: open/ready · Impact: medium · Complexity: small
AUTO-DEFINED: this spec was best-effort machine-authored by /sdlc:task-auto-define on 2026-09-13 because the task is autonomy: autonomous/pr. Review the Goal, Approach, Today, Files-to-touch, and Acceptance-criteria carefully before trusting it.
The system-graph lab fixtures (repo.json, repo-external.json,
moon-facets.json) now describe a stale repo layout after recent
package/solution moves. Regenerating them is a large diff (~37,000
lines) that also invalidates hand-written counts in
lab/fixtures/index.ts. This needs a dedicated refresh chore, plus a
README note on when the snapshot is meant to be retaken.
The system-graph lab fixtures (repo.json, repo-external.json, moon-facets.json) now describe a stale layout; regenerating is a 37,000-line diff that also invalidates hand-written counts in lab/fixtures/index.ts — a separate refresh chore, and a note on the fixtures README about when the snapshot is meant to be retaken.
— from T-4VNC-learning-p1-scaffold-solution’s post-mortem
| Location | Role today |
|---|---|
solutions/ontological/experiences/system-graph/lab/fixtures/repo.json | Generated SystemGraph snapshot of this monorepo (currently 260 nodes / 414 edges / 234 manifests scanned), walked before recent package/solution moves. The live tree now has ~38 manifest-bearing directories the snapshot doesn’t know about and ~41 directories the snapshot cites that no longer exist. |
solutions/ontological/experiences/system-graph/lab/fixtures/repo-external.json | Same snapshot with npm and crates.io added as extra roots; stale for the same reason as repo.json. |
solutions/ontological/experiences/system-graph/lab/fixtures/moon-facets.json | Directory-to-moon-project (layer/stack/language) map (95 entries today), joined to graph nodes by repo-relative directory; goes stale in lockstep with repo.json’s directory set. |
solutions/ontological/experiences/system-graph/lab/fixtures/index.ts#FIXTURES | Hand-written note: strings on the repo and repo-external entries quote node/edge/mapped counts (“251 nodes · 378 dependencies · 94 of 251 mapped”, “547 nodes · 1875 dependencies”) that no longer match the live JSON — repo.json alone is already at 260 nodes / 414 edges. |
solutions/ontological/experiences/system-graph/lab/fixtures/README.md | Documents the exact regen commands (the manifest-graph CLI walk plus a moon query projects pipe) but names only one retake trigger — “when the wire schema changes” — nothing about the directory-layout moves that actually caused this drift. |
Proposed
Section titled “Proposed”repo.json, repo-external.json, and moon-facets.json reflect the tree as it
stands today; index.ts’s hand-written counts match the regenerated payload;
and fixtures/README.md names a package/solution directory move as a retake
trigger alongside the existing wire-schema-change trigger, so the next move
doesn’t silently re-stale the snapshot.
Approach
Section titled “Approach”-
From the repo root, run the two commands
fixtures/README.mdalready documents to regenerate the wire snapshots:Terminal window out=solutions/ontological/experiences/system-graph/lab/fixturesbun packages/ts/manifest-graph/src/cli.ts . --out "$out/repo.json"bun packages/ts/manifest-graph/src/cli.ts . --external --out "$out/repo-external.json" -
Run the documented moon-facets regen command to refresh the facet map:
Terminal window moon --log error query projects | jq '[.projects[] | {key: .source, value: {id, layer, stack, language}}] | from_entries' > solutions/ontological/experiences/system-graph/lab/fixtures/moon-facets.json -
Recompute the node count, edge count, and moon-mapped fraction from the regenerated JSON, and update the four
note:strings on therepoandrepo-externalentries inindex.ts’sFIXTURESarray to match. -
Add a short paragraph to
fixtures/README.mdstating that a package/solution move (a directory renamed or relocated undersolutions/,apps/,packages/, orcrates/) is also a retake trigger, alongside the existing wire-schema-change trigger. -
Run
bun testundersolutions/ontological/experiences/system-graph(perlab/README.md) to confirm the regenerated payload still satisfies theselect/layout/zoominvariants the lab’s tests check. -
Spot-check the lab Storybook (
bun run --cwd solutions/ontological/experiences/system-graph storybook) renders therepoandrepo-externalfixture stories without runtime errors.
| Area | Note |
|---|---|
solutions/ontological/experiences/system-graph/lab/fixtures/repo.json | Regenerate from the current tree via the manifest-graph CLI walk |
solutions/ontological/experiences/system-graph/lab/fixtures/repo-external.json | Regenerate via the manifest-graph --external walk |
solutions/ontological/experiences/system-graph/lab/fixtures/moon-facets.json | Regenerate via moon query projects |
solutions/ontological/experiences/system-graph/lab/fixtures/index.ts | Update the repo/repo-external note: strings in FIXTURES to the regenerated counts |
solutions/ontological/experiences/system-graph/lab/fixtures/README.md | Add a retake-trigger note covering package/solution directory moves |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
repo.jsonandrepo-external.jsonmatch a clean run of the twobun packages/ts/manifest-graph/src/cli.tscommands documented infixtures/README.mdagainst the tree at merge time. - AC-2:
moon-facets.jsonmatches a clean run of themoon --log error query projects | jq ...command documented infixtures/README.md. - AC-3: every count in the
repoandrepo-externalentries’note:strings inindex.ts’sFIXTURESarray (node count, edge count, moon- mapped fraction) matches the regenerated JSON. - AC-4:
fixtures/README.mdnames a package/solution directory move as a retake trigger, not only a wire-schema change. - AC-5:
bun testundersolutions/ontological/experiences/system-graphpasses against the regenerated fixtures.
Out of scope
Section titled “Out of scope”- Changing the
SystemGraphwire schema, themanifest-graphCLI, or the Rust crate it peers with. - Teaching the backend to ingest moon project metadata onto the wire
(tracked separately — see
lab/README.md’s “What is faked, and what is not” section). - Automating fixture regeneration (a script or CI gate that reruns the walk on every package move); this task is the one-time refresh plus the README note, not an automation.
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”Spawned by /sdlc:spawn-task-pr on 2026-09-13 UTC from T-4VNC-learning-p1-scaffold-solution in git@github.com:sksizer/dev.git.