## Phase 145: Sovereign CI/CD & Software Supply-Chain Platform — GitHub Actions / GitLab CI / CircleCI / Jenkins / Buildkite Replacement

Closes the CI/CD sovereignty gap. Phase 12 (CI/CD & DevOps Consolidation) wires
up pipelines that consume third-party runners. Phase 49 (Infrastructure &
DevOps) sets up deployment targets. But neither delivers a sovereign
continuous-integration / continuous-delivery **platform** — pipeline DSL, runner
fleet, secrets store, artifact cache, environments, approvals, marketplace of
reusable actions, insights, audit, policy — that Oshun projects and external
customers can adopt instead of GitHub Actions, GitLab CI/CD, CircleCI, Jenkins,
Buildkite, TeamCity, Bamboo, Azure DevOps Pipelines, Bitbucket Pipelines, Drone,
Woodpecker, Argo Workflows, Tekton, Harness, Semaphore, Spacelift, Garden, or
Earthly cloud.

This phase ships a complete sovereign CI/CD platform plus the adjacent
software-supply-chain sovereignty layer (artifact registry, SLSA provenance,
SBOM, sign-and-verify) so every build, test, and deploy in the Oshun ecosystem
runs on Oshun-owned infrastructure with auditable provenance.

---

### 145.1 @neith/ci-dsl — Pipeline Definition Language

#### 145.1.1 Workflow Schema

- [x] **145.1.1.1** YAML + optional TypeScript DSL (compile-time typed)
- [x] **145.1.1.2** Jobs with dependencies (DAG)
- [x] **145.1.1.3** Matrix / parallel fan-out
- [x] **145.1.1.4** Conditional job (expression language)
- [x] **145.1.1.5** Reusable workflow / workflow-call
- [x] **145.1.1.6** Composite action / step group
- [x] **145.1.1.7** Container, VM, bare-metal, macOS-VM executor selection
- [x] **145.1.1.8** Per-job timeout / retry / continue-on-error
- [x] **145.1.1.9** Per-step env / shell / working-dir
- [x] **145.1.1.10** GitHub-Actions / GitLab-CI / CircleCI YAML drop-in compat

#### 145.1.2 Expressions & Templating

- [x] **145.1.2.1** CEL / expressions language for conditions
- [x] **145.1.2.2** Context objects (github-equivalent, vars, secrets, needs)
- [x] **145.1.2.3** Built-in functions (join, contains, fromJSON, hashFiles)
- [x] **145.1.2.4** Safe-eval sandbox for expressions
- [x] **145.1.2.5** Static schema validator with IDE hints
- [x] **145.1.2.6** Visual pipeline graph preview
- [x] **145.1.2.7** Dry-run render (show resolved DAG)
- [x] **145.1.2.8** Diff-on-PR render (show pipeline change)
- [x] **145.1.2.9** Parameterized dispatch (manual input)
- [x] **145.1.2.10** Global defaults / workspace policy inheritance

---

### 145.2 @neith/ci-runner — Self-Hosted & Managed Runner Fleet

#### 145.2.1 Runner Protocol

- [x] **145.2.1.1** Agent with stateful long-poll (like GHA runner)
- [x] **145.2.1.2** Agent with queue poll (like Jenkins)
- [x] **145.2.1.3** Push-based via broker (NATS / sovereign stream)
- [x] **145.2.1.4** mTLS-authenticated agent enrolment
- [x] **145.2.1.5** Workload attestation (SPIFFE SVID)
- [x] **145.2.1.6** Auto-update agent channel
- [x] **145.2.1.7** Bandwidth / CPU / memory telemetry
- [x] **145.2.1.8** Disk / workspace cleanup after job
- [x] **145.2.1.9** Graceful drain for maintenance
- [x] **145.2.1.10** Heartbeat + watchdog

#### 145.2.2 Runner Targets

- [x] **145.2.2.1** Linux (Ubuntu, Debian, RHEL, Alpine, Neith-OS) x86_64 /
      ARM64
- [x] **145.2.2.2** Windows Server / Windows 10/11 x86_64 / ARM64
- [x] **145.2.2.3** macOS (Sonoma, Sequoia) x86_64 / ARM64 (licence-bound
      self-host)
- [x] **145.2.2.4** BSD (FreeBSD / OpenBSD)
- [x] **145.2.2.5** GPU runners (NVIDIA / AMD / Intel) with driver matrix
- [x] **145.2.2.6** TPU / NPU runners
- [x] **145.2.2.7** Embedded / microcontroller cross-build runners
- [x] **145.2.2.8** Game-console dev-kit runners (licence-gated)
- [x] **145.2.2.9** Mobile device farm runner (Android ADB, iOS Xcode)
- [x] **145.2.2.10** Bare-metal HPC runner

#### 145.2.3 Runner Orchestration

- [x] **145.2.3.1** Autoscaling (Kubernetes / Firecracker / Nomad / sovereign)
- [x] **145.2.3.2** Spot / preemptible with requeue on eviction
- [x] **145.2.3.3** Queue + fair-share + priority per workspace
- [x] **145.2.3.4** Concurrency limits per workflow / branch
- [x] **145.2.3.5** Cost-aware scheduling (cheapest region that meets SLA)
- [x] **145.2.3.6** Warm-pool pre-boot image
- [x] **145.2.3.7** Per-label runner groups
- [x] **145.2.3.8** Tenant isolation (network, filesystem, kernel)
- [x] **145.2.3.9** Capacity-planning forecaster
- [x] **145.2.3.10** Auto-drain on build-cache hit-rate drop

---

### 145.3 @neith/ci-actions — Reusable Action / Step Marketplace

- [x] **145.3.1** Action manifest (inputs, outputs, runs, branding)
- [x] **145.3.2** JavaScript / Node action type
- [x] **145.3.3** Docker container action type
- [x] **145.3.4** Composite action (step group) type
- [x] **145.3.5** Rust / Go / Python native compiled action type
- [x] **145.3.6** WASM action type (sandboxed, portable)
- [x] **145.3.7** Action registry with semantic-version resolution
- [x] **145.3.8** Immutable pinned SHA reference policy
- [x] **145.3.9** Marketplace (signed, categorized, reviewed)
- [x] **145.3.10** Vulnerability scan on every publish
- [x] **145.3.11** GitHub-Actions compatibility bridge (uses:)
- [x] **145.3.12** GitLab-CI component compatibility
- [x] **145.3.13** CircleCI orb compatibility
- [x] **145.3.14** Tekton task / pipeline import
- [x] **145.3.15** Maintainer-reputation / download-count

---

### 145.4 @neith/ci-cache — Build / Dependency / Test Cache

- [x] **145.4.1** Per-workflow cache keyed on file-hash
- [x] **145.4.2** Restore-keys with fallback chain
- [x] **145.4.3** Cross-branch / fallback-to-base-branch
- [x] **145.4.4** Content-addressed storage (CAS) backend
- [x] **145.4.5** Dedup across workspaces
- [x] **145.4.6** S3 / GCS / Azure / sovereign object store
- [x] **145.4.7** Compression (zstd / lz4)
- [x] **145.4.8** Encryption at rest per workspace
- [x] **145.4.9** Eviction policy (LRU / cost / retention)
- [x] **145.4.10** Bazel / Buck2 / Nix remote-build cache compatibility
- [x] **145.4.11** Sccache / ccache compatibility
- [x] **145.4.12** Docker layer cache (BuildKit, buildx remote)
- [x] **145.4.13** Node_modules / pnpm-store / cargo / go-mod / pip / UV wheel
      cache
- [x] **145.4.14** Test result + coverage cache (skip unchanged tests)
- [x] **145.4.15** Cache hit / miss telemetry per key pattern

---

### 145.5 @neith/ci-artifact — Build Artifacts & Package Registry

- [x] **145.5.1** Artifact upload from workflow step
- [x] **145.5.2** Artifact download in downstream job / workflow
- [x] **145.5.3** Retention policy with legal-hold override
- [x] **145.5.4** Artifact promotion (dev → stage → prod)
- [x] **145.5.5** OCI / Docker image registry
- [x] **145.5.6** Maven / Gradle repository
- [x] **145.5.7** npm / pnpm / yarn registry
- [x] **145.5.8** Cargo registry
- [x] **145.5.9** PyPI / UV / Conda registry
- [x] **145.5.10** Go modules proxy
- [x] **145.5.11** RubyGems / Hex / Nuget registry
- [x] **145.5.12** Debian / RPM / Arch package repository
- [x] **145.5.13** Helm chart repository
- [x] **145.5.14** Generic blob artifact with signature
- [x] **145.5.15** Mirror / cache upstream public registries

---

### 145.6 @neith/ci-secrets — Secret & Variable Store

- [x] **145.6.1** Encrypted secret store with envelope encryption
- [x] **145.6.2** Customer-managed key / HSM / KMS backend
- [x] **145.6.3** Scope hierarchy: org / workspace / repo / env / job
- [x] **145.6.4** Reusable secret references
- [x] **145.6.5** OIDC token federation to AWS / GCP / Azure / sovereign cloud
- [x] **145.6.6** Short-lived credential minting (STS-style)
- [x] **145.6.7** Vault / Conjur / AWS Secrets Manager / GCP SM backend
- [x] **145.6.8** Audit trail for every secret read
- [x] **145.6.9** Log masking in real time + post-hoc redaction
- [x] **145.6.10** Secret-leak scanner on push and in logs
- [x] **145.6.11** Rotation scheduler
- [x] **145.6.12** Break-glass access with approval
- [x] **145.6.13** Secret version history
- [x] **145.6.14** Per-environment secret promotion policy
- [x] **145.6.15** Plaintext export forbidden by policy

---

### 145.7 @neith/ci-env — Environments, Approvals & Deploys

- [x] **145.7.1** Environment definition (dev / stage / prod / canary / custom)
- [x] **145.7.2** Per-env required reviewers
- [x] **145.7.3** Wait-timer / scheduled-window gate
- [x] **145.7.4** Branch / tag / path protection rules
- [x] **145.7.5** Manual approval via chat / ticket integration
- [x] **145.7.6** Two-person-rule (SoD) enforcement
- [x] **145.7.7** Canary rollout with auto-promote-or-rollback
- [x] **145.7.8** Progressive delivery (Argo Rollouts / Flagger class)
- [x] **145.7.9** Change-management ticket integration
- [x] **145.7.10** Deployment dashboard with history / diff
- [x] **145.7.11** Service catalog (DORA deployment frequency)
- [x] **145.7.12** Release calendar / freeze window
- [x] **145.7.13** Rollback to any prior release
- [x] **145.7.14** Deploy attestation (who, when, what)
- [x] **145.7.15** Drift detection (GitOps reconcile)

---

### 145.8 @neith/ci-triggers — Event & Scheduling

- [x] **145.8.1** Git push / PR / tag triggers
- [x] **145.8.2** Sovereign git host integration (native) + GitHub / GitLab /
      Bitbucket mirror
- [x] **145.8.3** Scheduled / cron trigger
- [x] **145.8.4** Manual / workflow_dispatch trigger
- [x] **145.8.5** Webhook trigger with signature verify
- [x] **145.8.6** Upstream workflow trigger (chained)
- [x] **145.8.7** Cron-reliable trigger guarantee (at-least-once, at-most-once
      options)
- [x] **145.8.8** Path-filter trigger (only run when specific paths change)
- [x] **145.8.9** Matrix trigger (across services)
- [x] **145.8.10** Approval-required manual trigger

---

### 145.9 @neith/ci-insights — DORA & Quality Telemetry

- [x] **145.9.1** Deployment frequency, lead time, change-failure rate, MTTR
      (DORA)
- [x] **145.9.2** Pipeline success / duration / flake rate
- [x] **145.9.3** Per-step duration heatmap
- [x] **145.9.4** Cache hit / miss and time saved
- [x] **145.9.5** Test flake detection + quarantine
- [x] **145.9.6** Coverage trend + gap highlighting
- [x] **145.9.7** Build cost per commit / per team
- [x] **145.9.8** Build-time regression alert
- [x] **145.9.9** Top-slowest pipelines
- [x] **145.9.10** SLA / queue-wait dashboard
- [x] **145.9.11** Per-runner utilization
- [x] **145.9.12** Carbon / energy estimate per build
- [x] **145.9.13** Developer lead-time per PR
- [x] **145.9.14** Security-finding-to-fix time
- [x] **145.9.15** Exportable metrics for Neith Metron (Phase 142)

---

### 145.10 @neith/ci-security — Supply-Chain Hardening

- [x] **145.10.1** SLSA level 3 / 4 provenance attestation for every build
- [x] **145.10.2** SBOM generation (SPDX 2.3 + CycloneDX 1.5) per artifact
- [x] **145.10.3** Sigstore / Cosign keyless signing
- [x] **145.10.4** Sovereign transparency log (Rekor-compatible)
- [x] **145.10.5** in-toto layout for end-to-end supply-chain policy
- [x] **145.10.6** SCA (OSV / NVD / GHSA feeds)
- [x] **145.10.7** Container scan (Grype / Trivy / sovereign)
- [x] **145.10.8** Secret scan (gitleaks / sovereign)
- [x] **145.10.9** Licence compliance scan (SPDX)
- [x] **145.10.10** Malware heuristics on artifacts
- [x] **145.10.11** Typosquatting / dependency-confusion guard
- [x] **145.10.12** Verified-reproducible-build mode
- [x] **145.10.13** Binary transparency for shipped binaries
- [x] **145.10.14** Admission policy (OPA / Rego / Cedar) on deploy
- [x] **145.10.15** Incident-response runbook integration

---

### 145.11 @neith/ci-testing — First-Class Testing Support

- [x] **145.11.1** Test-result upload (JUnit, xUnit, TAP, Go test2json,
      cargo-test-json)
- [x] **145.11.2** Coverage ingestion (lcov, cobertura, covr)
- [x] **145.11.3** Flaky test detection + quarantine + owner alert
- [x] **145.11.4** Test impact analysis (run only affected tests)
- [x] **145.11.5** Sharded test parallelization
- [x] **145.11.6** Cross-browser / device Selenium / Playwright / Appium grid
- [x] **145.11.7** Load / perf test (k6 / Locust / Gatling) integration
- [x] **145.11.8** Mutation testing (Stryker / PIT / Cargo Mutants)
- [x] **145.11.9** Contract / consumer-driven tests (Pact)
- [x] **145.11.10** Snapshot / visual-regression testing
- [x] **145.11.11** E2E record-and-replay
- [x] **145.11.12** Fuzz-test integration (libFuzzer, cargo-fuzz, AFL++)
- [x] **145.11.13** Sanitizer-first build variant per PR
- [x] **145.11.14** Test-history search
- [x] **145.11.15** Test-owner notification on failure

---

### 145.12 @neith/ci-governance — Org, Policy & Compliance

- [x] **145.12.1** Org / workspace / project hierarchy
- [x] **145.12.2** Role-based access (owner, admin, maintainer, developer,
      viewer, bot)
- [x] **145.12.3** Per-repo policy (required checks, code-owners, linear
      history)
- [x] **145.12.4** Branch-protection enforcement
- [x] **145.12.5** Merge-queue (GitHub-class merge queue)
- [x] **145.12.6** Required-check matrix
- [x] **145.12.7** Cost-centre tagging + chargeback
- [x] **145.12.8** SOC 2 / ISO 27001 / FedRAMP / PCI control mapping
- [x] **145.12.9** Immutable audit log with non-repudiation
- [x] **145.12.10** OIDC / SAML / SCIM with sovereign IdP (Phase 146)
- [x] **145.12.11** SBOM / SLSA policy gate per env
- [x] **145.12.12** Data-residency routing per workspace
- [x] **145.12.13** DR / backup / restore runbooks
- [x] **145.12.14** Customer-managed encryption keys
- [x] **145.12.15** Break-glass admin with hardware-key MFA

---

### 145.13 @neith/ci-ide — Developer UX

- [x] **145.13.1** CLI tool (`neith-ci run`, `neith-ci logs`, `neith-ci rerun`)
- [x] **145.13.2** VS Code / JetBrains / Helix extension
- [x] **145.13.3** Pipeline-as-code syntax highlight + schema
- [x] **145.13.4** Local `act`-class pipeline runner for offline test
- [x] **145.13.5** Remote-debug (attach to failed runner)
- [x] **145.13.6** Live log stream with search and filter
- [x] **145.13.7** Rerun-failed / rerun-all
- [x] **145.13.8** Manual re-queue of individual steps
- [x] **145.13.9** Approvals via terminal + chat + mobile
- [x] **145.13.10** Pull-request summary comment with pipeline result

---

### 145.14 Migration & Interop

- [x] **145.14.1** GitHub Actions `.github/workflows/*.yml` importer
- [x] **145.14.2** GitLab CI `.gitlab-ci.yml` importer
- [x] **145.14.3** CircleCI `.circleci/config.yml` importer
- [x] **145.14.4** Jenkinsfile converter (Declarative + Scripted)
- [x] **145.14.5** Buildkite / Bamboo / TeamCity / Azure Pipelines importer
- [x] **145.14.6** Drone / Woodpecker importer
- [x] **145.14.7** Argo Workflows / Tekton importer
- [x] **145.14.8** Compat shim for `github.` context object
- [x] **145.14.9** Keep-the-old-syntax mode (parallel run both for diff)
- [x] **145.14.10** Audit of imported secret / token permissions
