Skip to content

T-6K39-providers-onto-aspects-moved-install-pin-deps

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

Rewire detect-runners’s own providers to consume the T-1VJD aspect layer instead of re-reading manifests themselves, and move sdlc’s detectDeps/resolvePinnedManagerInstall into this package as resolveInstall/hasMissingDeps/missingDeps/resolvePinnedManagerInstall — so “how to run it” (Layer 2a) sits on top of “what’s here” (Layer 1) instead of duplicating the reads.

providers/{cargo,node-scripts,moon,just,mise,make}.ts each call their own ctx.files()/ctx.readJson() for manifest presence/content. sdlc’s lib/config/detect-deps.ts (detectDeps/hasMissingDeps/missingDeps/ INSTALL_VERBS/SetupCandidate) and lib/config/pinned-manager.ts (resolvePinnedManagerInstall) already delegate JS package-manager identification to detect-runners’s NODE_LOCKFILE_MANAGERS, but still do their own separate filesystem reads to apply it.

Each provider’s collect(ctx) gains a second parameter, the already-computed AspectFacts for its manifest kind, and stops calling ctx.files()/ctx.readJson() for presence/content (it may still use ctx.which()/ctx.runner() for its own exec-kind probes, e.g. just --list, unaffected). resolveInstall/hasMissingDeps/missingDeps/ resolvePinnedManagerInstall land in detect-runners, adapted to take AspectFacts instead of re-reading the filesystem. Public collect/tasks/discover behavior is unchanged — this task’s own test suite is the proof.

  1. Thread AspectFacts (from T-1VJD’s collectAspects) into each provider’s collect(ctx, facts) signature; replace each provider’s own ctx.files()/ctx.readJson() manifest read with a read off facts.
  2. Move detectDeps/hasMissingDeps/missingDeps/INSTALL_VERBS/ SetupCandidate from solutions/ontological/lib/config/detect-deps.ts into packages/ts/detect-runners, renamed resolveInstall per detection-consolidation.md §2’s target API, adapted to take AspectFacts.
  3. Move resolvePinnedManagerInstall/PackageManagerPin/ PinnedManagerSource from solutions/ontological/lib/config/pinned-manager.ts into the same package, same adaptation.
  4. Do NOT delete the sdlc-side files yet or rewire sdlc’s own callers — that’s T-LCKH. This task lands the moved/rewired code in detect-runners with its own passing test suite, still unconsumed by sdlc.
AreaNote
packages/ts/detect-runners/src/providers/{cargo,node-scripts,moon,just,mise,make}.tsConsume AspectFacts instead of independent manifest reads
packages/ts/detect-runners/src/install.ts (new)resolveInstall/hasMissingDeps/missingDeps, moved and adapted from sdlc’s detect-deps.ts
packages/ts/detect-runners/src/pinned-manager.ts (new)resolvePinnedManagerInstall, moved and adapted from sdlc’s pinned-manager.ts
  • AC-1: Every existing detect-runners test (collect/tasks/ discover behavior) passes unmodified — the provider rewrite is behavior-preserving.
  • AC-2: resolveInstall(facts) against fixtures for JS (lockfile-based), Rust (Cargo.lock), Go (go.sum), Ruby (Gemfile.lock), and Python (requirements.txt-family) markers returns the same SetupCandidate[] sdlc’s current detectDeps(root) returns for the equivalent fixture.
  • AC-3: resolvePinnedManagerInstall reproduces package.json#packageManager/.prototools/mise.toml resolution byte-for-byte against sdlc’s current implementation’s test fixtures.
  • AC-4: bun test packages/ts/detect-runners passes.
  • Deleting sdlc’s detect-deps.ts/pinned-manager.ts/detect-setup.ts or rewiring sdlc’s own callers — T-LCKH.
  • manifest-graph/project-facets.get.ts adoption — T-3GMU/T-OUKL.

T-1VJD (needs AspectFacts/collectAspects to consume).

Detection-consolidation research: ../decisions/D-LSLH-collapse-verbs-workflows-chain-hooks/detection-consolidation.md §2 “Layer 2a API”, §4 “What gets deleted”.

T-1VJD


← Back to Tasks