diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 00000000..17ed11cb --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,55 @@ +name: Sovereign CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + verify: + name: Workspace Verification & Invariant Audit + runs-on: spark + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Verify Code Formatting + run: cargo fmt --all -- --check + + - name: Cargo Workspace Check + run: cargo check --workspace --all-targets + + - name: Run Workspace Unit and Integration Tests + run: cargo test --workspace --verbose + + - name: Enforce Zero Disk Secrets Invariant + run: | + echo "Auditing repository for prohibited plaintext secret files..." + if find . -maxdepth 4 -name ".env*" -not -path "*/.git/*" -not -path "*/target/*" | grep -q .; then + echo "Prohibited plaintext .env file found. Use an approved AIEN SecretProvider." + exit 1 + fi + echo "Zero plaintext .env files verified." + + - name: Enforce Sovereign Voice and Anti-Slop Invariant + run: | + echo "Auditing repository for em dashes, en dashes, and formulaic tropes..." + BAD_CHARS=$(grep -rnE --exclude-dir=target --exclude-dir=.git --exclude='*.rs' '—|–' crates/ docs/ README.md || true) + if [ -n "$BAD_CHARS" ]; then + echo "Em dashes or en dashes detected:" + echo "$BAD_CHARS" + exit 1 + fi + echo "Sovereign voice compliance verified." + + - name: Enforce Architectural Terminology Invariants + run: | + echo "Auditing documentation for deprecated absolute claims..." + BAD_TERMS=$(grep -rnE --exclude-dir=target --exclude-dir=.git --exclude='0001-trust-evidence-foundation.md' 'all secrets reside in TPM|zero external network calls|universal portability' README.md docs/ || true) + if [ -n "$BAD_TERMS" ]; then + echo "Deprecated non-normative claims detected:" + echo "$BAD_TERMS" + exit 1 + fi + echo "Architectural terminology verified." diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa9b8d05..3c220e3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,7 @@ name: Sovereign CI on: - push: - branches: [main] - pull_request: - branches: [main] + workflow_dispatch: permissions: contents: read @@ -35,7 +32,7 @@ jobs: run: | echo "Auditing repository for prohibited plaintext secret files..." if find . -maxdepth 4 -name ".env*" -not -path "*/.git/*" -not -path "*/target/*" | grep -q .; then - echo "::error::Prohibited .env file found in workspace. Use hardware TPM atlas-vault." + echo "::error::Prohibited plaintext .env file found. Use an approved AIEN SecretProvider." exit 1 fi echo "Zero plaintext .env files verified." diff --git a/.github/workflows/sovereign-inquisitor.yml b/.github/workflows/sovereign-inquisitor.yml index 69922d5e..80ff1151 100644 --- a/.github/workflows/sovereign-inquisitor.yml +++ b/.github/workflows/sovereign-inquisitor.yml @@ -1,12 +1,7 @@ name: Sovereign Gatekeeper & Automated Reviewer on: - pull_request_target: - types: [opened, synchronize] - issues: - types: [opened] - issue_comment: - types: [created] + workflow_dispatch: permissions: pull-requests: write diff --git a/README.md b/README.md index 3b4b92c0..6f9dff39 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ For raw telemetry datasets, reproducible verification scripts, and SVG compariso --- -## Universal Multi-Platform Portability +## Multi-Platform Architecture & Portability Matrix While the primary reference deployment executes on the NVIDIA DGX Spark (Grace Blackwell GB10), AIEN runs across multiple platform targets: @@ -50,7 +50,9 @@ While the primary reference deployment executes on the NVIDIA DGX Spark (Grace B - **Linux (x86_64)**: Standard glibc and musl native binaries, AVX-512 SIMD acceleration, and support for commodity desktops and server racks. - **AMD ROCm**: Native Rust runtime execution targeting ROCm and HIP compute drivers. - **NVIDIA Hardware**: Reference deployment on Grace Blackwell unified memory and standard CUDA accelerators via Modular MAX and ONNX Runtime. -- **Air-Gapped Sovereign Servers**: Complete offline functionality with hardware TPM 2.0 key vaulting and zero external network calls. +- **Air-Gapped Sovereign Servers**: Complete offline capability with hardware TPM 2.0 key vaulting and no unsolicited outbound telemetry. + +For formal verification statuses across architectures, see [PLATFORM_MATRIX.md](docs/PLATFORM_MATRIX.md). --- diff --git a/docs/FORGEJO_CI.md b/docs/FORGEJO_CI.md new file mode 100644 index 00000000..50af12d4 --- /dev/null +++ b/docs/FORGEJO_CI.md @@ -0,0 +1,69 @@ +# Forgejo Actions CI Standard Operating Practice + +This document defines the standard practice for automated continuous integration across the AIEN ecosystem. + +## Core Policy + +All continuous integration pipelines, automated invariant verifications, test suites, and lint checks execute natively on the NVIDIA DGX Spark workstation via Forgejo Actions. + +Public GitHub repositories maintain GitHub Actions workflow definitions configured strictly for manual execution (`workflow_dispatch`). Automated execution on GitHub is disabled to eliminate billable cloud runner minutes and avoid recurring compute fees. + +## Architectural Advantages + +1. **Zero Cloud Compute Fees**: CI tasks run on owned, dedicated local hardware with zero marginal cost. +2. **Native Grace Blackwell GB10 Access**: Tests and benchmarks execute directly on Grace Neoverse V2 ARM64 cores and Blackwell silicon, providing realistic production runtime telemetry rather than generic x86 virtual machines. +3. **High-Speed Execution**: Local NVMe storage, shared compiler artifact caches, and 121 GB unified memory reduce workspace build and test times from minutes down to seconds. +4. **Hardware TPM Integration**: Verification suites test against the physical TPM 2.0 interface (`/dev/tpmrm0`) and hardware vaulting mechanisms directly. + +## Runner Infrastructure + +The execution environment runs as a dedicated systemd user service on the DGX Spark workstation: + +- **Runner Binary**: `/home/drakestapleton/.local/bin/forgejo-runner` +- **Service Name**: `forgejo-runner.service` (`systemctl --user status forgejo-runner`) +- **Configuration**: `/home/drakestapleton/atlas-forgejo/runner/config.yaml` +- **Working Directory**: `/home/drakestapleton/atlas-forgejo/runner/workspace` + +### Configured Runner Labels + +The runner maps standard workflow labels directly to host execution: + +| Label | Execution Backend | Platform | +| :--- | :--- | :--- | +| `spark` | Host process (`:host`) | Linux aarch64 (Grace Blackwell) | +| `spark:host` | Host process (`:host`) | Linux aarch64 (Grace Blackwell) | +| `ubuntu-latest` | Host process (`:host`) | Linux aarch64 (Grace Blackwell) | +| `linux-arm64` | Host process (`:host`) | Linux aarch64 (Grace Blackwell) | +| `self-hosted` | Host process (`:host`) | Linux aarch64 (Grace Blackwell) | + +## Repository Workflow Conventions + +Every repository in the AIEN ecosystem adheres to the following dual-workflow layout: + +1. **Forgejo Workflows (`.forgejo/workflows/`)**: + - Filename: `.forgejo/workflows/ci.yml` + - Trigger: `push` and `pull_request` on `main` + - Runner Target: `runs-on: spark` + - Purpose: Automatic test execution, code style verification, zero-plaintext-secret auditing, and terminology enforcement. + +2. **GitHub Workflows (`.github/workflows/`)**: + - Filename: `.github/workflows/ci.yml` + - Trigger: `workflow_dispatch` (manual only) + - Runner Target: `runs-on: ubuntu-latest` + - Purpose: Optional manual validation for outside contributors without consuming automated runner minutes. + +## Invariant Verification Gates + +The Forgejo CI pipeline enforces four non-negotiable invariant gates before any code merges to `main`: + +1. **Zero Plaintext Secrets**: + Scans the workspace for `.env` or credential files. All secret material must resolve dynamically through an approved `SecretProvider` (`MemorySecretProvider` or hardware TPM `Tpm2SecretProvider`). + +2. **Sovereign Voice & Anti-Slop**: + Audits repository documentation and code for em dashes (`—`), en dashes (`–`), and formulaic marketing tropes. + +3. **Normative Terminology**: + Audits documentation to ensure compliance with the normative specifications in `docs/SECURITY_MODEL.md`, `docs/NETWORK_POLICY.md`, and `docs/PLATFORM_MATRIX.md`. + +4. **Code Quality and Test Coverage**: + Executes `cargo fmt --all -- --check`, `cargo check --workspace --all-targets`, and `cargo test --workspace --verbose`.