Skip to content

Wire-literal single source of truth: CalamariWireVariables index

Placeholder ppxd requested to merge feat/calamari-wire-literal-ssot into main

Summary

Operator-facing aggregator of every wire literal Squid.Calamari recognises. Operators grep ONE file (CalamariWireVariables.cs) to discover every toggle / glob / convention filename / env var. Modeled after Octopus's SpecialVariables.cs (1208-line single index).

Per-feature *VariableNames classes keep ownership of their constants; the SSOT re-exports them via compile-time aliases.

What's in the box

Layer File
SSOT index src/Squid.Calamari/Constants/CalamariWireVariables.cs (new)
Drift detector tests (10) tests/Squid.Calamari.Tests/Calamari/Constants/CalamariWireVariablesDriftTests.cs (new)

Grouped by feature

Inner class What it indexes
SubstituteInFiles (G1.1) Canonical + nested Legacy IIS-prefixed
ConfigurationTransforms (G1.2) Canonical + nested Legacy
JsonConfigVariables (G1.3 + PR-3) Canonical + nested Legacy. Same toggle drives JSON / YAML / XML per file extension.
Package (G1.4) OriginalPath (canonical-only)
Conventions (G1.5 + PR-1) PreDeployFilename / PostDeployFilename / DeployFailedFilename (file-system conventions)
Hardening (T3) MaxFileSizeMBEnvVar

How drift stays caught

  1. Compile-time alias — each SSOT constant = OriginatingClass.Const. Renaming the originating const breaks the alias at build time.
  2. Drift detector tests — pin both alias integrity (SSOT == origin) AND literal value (SSOT == "Squid.Action.X.Y"). Coordinated renames on both sides still surface as a deliberate test edit.

Test plan

  • Squid.Calamari.Tests: 473/473 (was 463; +10)
  • Squid.UnitTests: 5625/5625 (unchanged)
  • Solution build: 0 errors
  • Pre-merge audit GREEN on 6/6 invariants
  • Purely additive — git diff main only shows new files, no modifications to existing code

Non-breaking guarantee

Surface Status
All existing *VariableNames classes Unchanged
Step files Untouched
Registries Untouched
Production behavior Identical (SSOT contains only public const string aliases)
SquidWeb Untouched

Merge request reports

Loading