Skip to content

T-3GMU-manifest-graph-onto-aspects

State: closed/done · Impact: low · Complexity: medium

Eliminate manifest-graph’s independent manifest re-parsing by having its walk.ts consume T-1VJD’s collectAspects instead, while leaving scanAspects/buildSystemGraph’s public signatures, output shape, and the Rust-parity fixture contract completely unchanged.

packages/ts/manifest-graph/src/walk.ts independently parses package.json/Cargo.toml into its own ManifestInfo, duplicating exactly the manifest reads detect-runners’s providers already do. Its Rust peer (solutions/ontological/crates/manifest-graph, out of scope per the user) is held to output parity by a shared fixture suite — that parity contract is about scanAspects’s output, not how walk.ts gets its inputs.

walk.ts calls collectAspects (from @sksizer/detect-runners/aspects) and maps AspectFacts → its own ManifestInfo, instead of reading package.json/Cargo.toml itself. scanAspects(manifest: ManifestInfo): Aspect[] and buildSystemGraph(root, opts) keep their exact signatures and output shape — the Rust-parity fixture suite is the safety net proving zero output drift.

  1. Add an AspectFacts → ManifestInfo mapping function in walk.ts.
  2. Replace walk.ts’s own package.json/Cargo.toml file reads with a collectAspects call plus that mapping.
  3. Re-run the Rust-parity fixture suite to confirm scanAspects’s output is byte-for-byte identical to before this change (the Rust side is never touched; only its parity partner’s inputs changed).
  4. packages/ts/manifest-graph gains a workspace:* dependency on @sksizer/detect-runners if it doesn’t already have one.
AreaNote
packages/ts/manifest-graph/src/walk.tsManifest reads replaced by collectAspects + a mapping function
packages/ts/manifest-graph/package.jsonworkspace:* dependency on @sksizer/detect-runners, if not already present
  • AC-1: scanAspects(manifest)’s output is identical, for every existing fixture, before and after this change.
  • AC-2: The Rust/TypeScript parity fixture suite passes with zero output drift.
  • AC-3: bun test packages/ts/manifest-graph passes.
  • AC-4: packages/ts/manifest-graph/src/walk.ts no longer reads package.json/Cargo.toml directly (grep-verified).
  • manifest-graph’s own package identity, path, or public API — unchanged.
  • The Rust crate (solutions/ontological/crates/manifest-graph) — out of scope per the user; only its TypeScript peer’s inputs change.
  • sdlc consumer migration — T-LCKH.

T-1VJD only (not T-6K39/T-LCKH) — can run in parallel with T-LCKH.

Detection-consolidation research: ../decisions/D-LSLH-collapse-verbs-workflows-chain-hooks/detection-consolidation.md §2 “Layer 2b API”, §6 “PR 4”.

T-1VJD


← Back to Tasks