feat(validate): platform-model SSOT drift gate (template ⊆ manifest) #24
Reference in New Issue
Block a user
Delete Branch "feat/platform-models-ssot-drift-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds the SSOT drift gate for platform-managed LLM models (RFC internal#580 Option C). A template's config.yaml
provider: platformmodels must be a SUBSET of the controlplane providers manifest's platform set for that runtime (internal/providers/providers.yaml runtimes block). Pairs with the controlplane manifest SSOT (cp #359) + the deploy-time platform-models e2e smoke.Why
Offering a
provider: platformmodel the SSOT doesn't declare risks shipping an unservable option — the SEO 1033 / "Exception: success" class. This gate keeps each template's platform offering honest against the single source of truth.How
check_platform_models()in validate-workspace-template.py (runs in static + full mode).PROVIDERS_MANIFEST_FILEfor tests/offline, else a blobless sparsegitclone of just providers.yaml via the runner's ambient git creds. Fetch failure -> WARN + skip (no coupling to controlplane uptime; the e2e smoke is the hard backstop). Runtime absent from manifest -> WARN + skip.Test plan
Independent review caught that the live fetch path silently degraded to always-WARN-skip — the gate never actually blocked: - sparse-checkout cone mode (the default) takes DIRECTORY paths, not file paths, so `set internal/providers/providers.yaml` failed ("not a directory") -> CalledProcessError -> swallowed -> WARN-skip every real CI run. Use the containing directory `internal/providers`; the file read narrows it. - the clone/sparse path had ZERO test coverage (all 5 tests used PROVIDERS_MANIFEST_FILE), which is exactly why the bug shipped green. Add two tests that exercise the REAL clone against a local file:// repo: one proving subset-pass, one proving it DETECTS drift via the live path. - log git stderr on clone failure so future breakage is visible, not a silent skip. Full suite: 37 passed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Five-Axis (correctness/tests): subset check correct; sparse-checkout cone-mode bug fixed (dir not file path); added real-clone tests (subset-pass + drift-detect) that exercise the live path — the always-skip bug is now covered; full suite 37 green. APPROVED.
Security axis: clone uses ambient git creds (no token in URL/args/logs), subprocess arg-list (no shell injection), repo/rel not user-controlled. APPROVED.