2.6 KiB
2.6 KiB
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 fan‑out.
Goals
- Enable
StellaOps.Scanner.Analyzers.Lang.Node.Teststo 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
- Scoped solution file
- Create
src/Scanner/StellaOps.Scanner.Analyzers.Node.slnfincluding 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-buildafter targeted restore.
- Create
- Isolated restore cache
- Pre-populate
local-nugets/via existing offline feed; add msbuild propertyRestorePackagesPath=$(RepoRoot)/offline/packagesto avoid global cache churn.
- Pre-populate
- Test shim
- Add runsettings to disable collectors that trigger solution-wide discovery; set
RunConfiguration.DisableAppDomain=truefor determinism.
- Add runsettings to disable collectors that trigger solution-wide discovery; set
- 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.
- Move heavy fixtures under
- Entry point
- New
scripts/scanner/node-tests-isolated.shwrapper: restore scoped solution, then rundotnet testwith/m:1and explicit test filters as needed.
- New
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.MongoduplicateAdvisoryObservationSourceDocumentdefinition and missingNatsJSContexttype), sodotnet testfails 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.