Skip to content

Testing (FLT-379 first slice)

Run: dotnet test Forge.Architecture.slnx. Tests needing D2 fail when no binary is configured; they take --d2/FORGE_ARCH_D2 explicitly and never skip. CI downloads the pinned binary and points FORGE_ARCH_D2 at it. .gitattributes normalizes fixtures to LF.

  • Oracle (expected/*.txt, authored by a different model family from the fixtures): the object model is projected to element/edge/ omitted-edges lines and asserted as sets; absent strings must appear in no generated file and no diagnostic text. A wrong-classifier test proves the oracle fails while check still byte-matches its own output.
  • Parser edges: both Sdk forms, props references, test signals, conditions, computed identities, imports, partial/complete overrides, shared libraries, list/mapping depends_on, registry ports, indexed references, module addresses, unknown types/keys, unresolved references.
  • Hostile: UNC/drive/escape/device entries (opener reads nothing), DOCTYPE, junctions, .. slugs, alias bombs, merge keys, custom tags, payload labels through all four sources compiled with real D2.
  • Determinism: shuffled input, two runs, no machine paths, CRLF fixtures, and a grammar lock on the D2 allowlist.
  • Gate matrix over CLI exit codes: stale add/remove, hand-edited SVG and model, missing/extra files, bad binary hash, gone sources, unreferenced scans, vacuous sources, older/newer schemas, unknown config keys.

Stryker runs on Core with thresholds.break: 60 (stryker-config.json). The suite is run five times before landing to catch order and transient-process flakes.