You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real-world drift exists. Inspecting an existing artifact corpus (e.g. Azure/git-ape-private) shows two distinct, incompatible shapes for security-gate.json shipping under the same claimed schemaVersion: "1.0":
Boolean form (older): criticalPassed: true, highPassed: true
Same field name, different type. Only state.json carries schemaVersion at all today.
Goal
Land a tiered static-validation pipeline so every PR catches the broadest set of regressions before merge — without requiring a sandbox subscription. This issue covers Phase 1 (static lint), Phase 1A (schema introduction), and a reduced Phase 2 (fixture-driven schema validation).
Phase 1 — Static lint pipeline
New .github/workflows/git-ape-ci.yml running in parallel jobs:
shellcheck on every .sh (strict mode)
yamllint on every YAML
markdownlint on every .md (excluding generated website/build)
check-jsonschema validation of every committed JSON artifact (see Phase 1A)
Background
Today the PR pipeline only checks docs staleness, workflow lint (
actionlint), and plugin version drift. It does not validate that:.github/scripts/,.github/skills/**/scripts/) areshellcheck-cleanstate.json,metadata.json,requirements.json,cost-estimate.json,security-gate.json,policy-recommendations.json,parameters.jsonReal-world drift exists. Inspecting an existing artifact corpus (e.g.
Azure/git-ape-private) shows two distinct, incompatible shapes forsecurity-gate.jsonshipping under the same claimedschemaVersion: "1.0":criticalPassed: true,highPassed: truecriticalTotal: 5,criticalPassed: 5,highTotal: 5,highPassed: 5Same field name, different type. Only
state.jsoncarriesschemaVersionat all today.Goal
Land a tiered static-validation pipeline so every PR catches the broadest set of regressions before merge — without requiring a sandbox subscription. This issue covers Phase 1 (static lint), Phase 1A (schema introduction), and a reduced Phase 2 (fixture-driven schema validation).
Phase 1 — Static lint pipeline
New
.github/workflows/git-ape-ci.ymlrunning in parallel jobs:shellcheckon every.sh(strict mode)yamllinton every YAMLmarkdownlinton every.md(excluding generatedwebsite/build)check-jsonschemavalidation of every committed JSON artifact (see Phase 1A)batstests against the fixture corpusReuse (do not duplicate):
git-ape-actionlint.yml— already covers workflow lintgit-ape-docs-check.yml— already covers docs stalenessgit-ape-plugin-version-check.yml— already coversplugin.jsonversion driftPhase 1A — Schema introduction & versioning
Author strict JSON Schemas (draft 2020-12) under
schemas/git-ape/<artifact>/v1.json:_defs/v1.json— shared types (deploymentId,azureSubscription,armResourceId,iso8601DateTime,cafAbbreviation,environmentTier,deploymentStatus,softDeletableType)state/v1.json— matcheswebsite/docs/deployment/state.mdmetadata/v1.json,security-gate/v1.json,requirements/v1.json,cost-estimate/v1.json,policy-recommendations/v1.jsonplugin/v1.json— forplugin.jsonLocked-in design decisions:
schemaVersion, shared$defsversioned together as a release trainadditionalProperties: falseon top-level objects only; nested objects allow extras during transitionsecurity-gate.json: adopts count form only; boolean form is rejected at v1.0$schemainjection: emitters write a relative path (no network coupling)Phase 2 — Reduced (parity deferred)
maindoes not yet have astate.jsonemitter; those scripts arrive in #44. Phase 2 in this PR therefore covers:tests/fixtures/with valid + invalid samples per artifact typebatstests asserting good fixtures pass schema validation and bad fixtures failsecurity-gate.jsonboolean form (must be rejected by v1.0 schema)Bash↔PowerShell parity testing is deferred to a follow-up issue once #44 lands.
Out of scope (tracked separately)
/e2elabel trigger) — Phase 4Acceptance criteria
git-ape-ci.ymlruns all jobs in parallel and gates the PRschemas/git-ape/$defsreferenced from per-artifact schemas (no duplication)scripts/validate-schemas.shinvokable locally and from CIsecurity-gate.jsonboolean form,state.jsonmissing required field) cause CI to fail when run against the strict schemasplugin.jsonitself validates againstschemas/git-ape/plugin/v1.jsontests/fixtures/README.mddocuments how to add a new fixture