Skip to content

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

LocationRole today
solutions/ontological/experiences/system-graph/lab/fixtures/repo.jsonGenerated 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.jsonSame 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.jsonDirectory-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#FIXTURESHand-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.mdDocuments 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.

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.

  1. From the repo root, run the two commands fixtures/README.md already documents to regenerate the wire snapshots:

    Terminal window
    out=solutions/ontological/experiences/system-graph/lab/fixtures
    bun 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"
  2. 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
  3. Recompute the node count, edge count, and moon-mapped fraction from the regenerated JSON, and update the four note: strings on the repo and repo-external entries in index.ts’s FIXTURES array to match.

  4. Add a short paragraph to fixtures/README.md stating that a package/solution move (a directory renamed or relocated under solutions/, apps/, packages/, or crates/) is also a retake trigger, alongside the existing wire-schema-change trigger.

  5. Run bun test under solutions/ontological/experiences/system-graph (per lab/README.md) to confirm the regenerated payload still satisfies the select/layout/zoom invariants the lab’s tests check.

  6. Spot-check the lab Storybook (bun run --cwd solutions/ontological/experiences/system-graph storybook) renders the repo and repo-external fixture stories without runtime errors.

AreaNote
solutions/ontological/experiences/system-graph/lab/fixtures/repo.jsonRegenerate from the current tree via the manifest-graph CLI walk
solutions/ontological/experiences/system-graph/lab/fixtures/repo-external.jsonRegenerate via the manifest-graph --external walk
solutions/ontological/experiences/system-graph/lab/fixtures/moon-facets.jsonRegenerate via moon query projects
solutions/ontological/experiences/system-graph/lab/fixtures/index.tsUpdate the repo/repo-external note: strings in FIXTURES to the regenerated counts
solutions/ontological/experiences/system-graph/lab/fixtures/README.mdAdd a retake-trigger note covering package/solution directory moves
  • AC-1: repo.json and repo-external.json match a clean run of the two bun packages/ts/manifest-graph/src/cli.ts commands documented in fixtures/README.md against the tree at merge time.
  • AC-2: moon-facets.json matches a clean run of the moon --log error query projects | jq ... command documented in fixtures/README.md.
  • AC-3: every count in the repo and repo-external entries’ note: strings in index.ts’s FIXTURES array (node count, edge count, moon- mapped fraction) matches the regenerated JSON.
  • AC-4: fixtures/README.md names a package/solution directory move as a retake trigger, not only a wire-schema change.
  • AC-5: bun test under solutions/ontological/experiences/system-graph passes against the regenerated fixtures.
  • Changing the SystemGraph wire schema, the manifest-graph CLI, 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.
  • none

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.


← Back to Tasks