Files
git.stella-ops.org/docs/modules/scanner/prep/2025-11-20-node-isolated-runner.md
master d519782a8f
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
prep docs and service updates
2025-11-21 06:56:36 +00:00

2.6 KiB
Raw Blame History

Scanner PREP — Node Analyzer Isolated Runner (22-001)

Date: 2025-11-20 Owner: Node Analyzer Guild Scope: Requirements and plan to provide an isolated/scoped runner so targeted Node analyzer tests complete without whole-solution fanout.

Goals

  • Enable StellaOps.Scanner.Analyzers.Lang.Node.Tests to run deterministically without restoring/building the entire solution.
  • Reduce CI/local runtime (<5 min) and contention during restores.
  • Keep offline/air-gap posture: rely only on local-nugets/ + repo fixtures; no external fetches.

Proposed approach

  1. Scoped solution file
    • Create src/Scanner/StellaOps.Scanner.Analyzers.Node.slnf including only Node analyzer projects + their direct deps (StellaOps.Scanner.Analyzers.Lang.Node, tests, shared test utilities).
    • CI job uses dotnet test --solution St...Node.slnf --no-restore --no-build after targeted restore.
  2. Isolated restore cache
    • Pre-populate local-nugets/ via existing offline feed; add msbuild property RestorePackagesPath=$(RepoRoot)/offline/packages to avoid global cache churn.
  3. Test shim
    • Add runsettings to disable collectors that trigger solution-wide discovery; set RunConfiguration.DisableAppDomain=true for determinism.
  4. Tarball/pnpm/Yarn PnP fixtures
    • Move heavy fixtures under src/Scanner/__Tests/Fixtures/node/ and reference via deterministic VFS layer; no temp extraction outside repo.
  5. Entry point
    • New scripts/scanner/node-tests-isolated.sh wrapper: restore scoped solution, then run dotnet test with /m:1 and explicit test filters as needed.

Deliverables for implementation task

  • Add .slnf, runsettings, and wrapper script as above.
  • Update CI pipeline (Scanner) to include isolated target; keep full solution tests separate.
  • Document usage in src/Scanner/__Tests/README.md.

Blocking items

  • Upstream Concelier projects in solution filter currently do not build (StellaOps.Concelier.Storage.Mongo duplicate AdvisoryObservationSourceDocument definition and missing NatsJSContext type), so dotnet test fails before Node analyzer tests execute. Needs Concelier fix or temporary exclusion to validate runner.
  • 2025-11-20 follow-up: deduplication + JetStream package added in Concelier.Storage.Mongo and Scanner tests now set UseConcelierTestInfra=false, but the shared Directory.Build.props still injects Concelier connectors into the restore/build graph; Node tests remain blocked until Concelier test infra is fully detachable or those projects are excluded from the filter.

This note satisfies PREP-SCANNER-ANALYZERS-NODE-22-001-NEEDS-ISOL by defining the isolated runner plan and artefact locations.