AI Initiative logoAI Initiative
Reading room / CertFabric

cert-fabric — Architecture

Maps manifest intake, static gates, provenance, test execution, vulnerability checks, verdicts, redaction, sealing and ledger stages.

Evidence pipeline architecture
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

Not explicitly attributed in document header · Date not established

Provenance, authorship and editorial notes

cert-fabric — Architecture

Id

certfabric-architecture

Project

CertFabric

Source path

conduir-evolution/services/cert-fabric/ARCHITECTURE.md

Source host

local

Source sha256

4512a8a1e0d4a7e0f87492b77092141a5df0288c438cccae4076e663bec04eb9

Repo root

conduir-evolution

Repo head

61278260a6a877769ef025356ecc5feb1d53f1b4

Date
Not recorded
Author

Not explicitly attributed in document header

Document status

Evidence pipeline architecture

Source status statement
Not recorded
Summary

Maps manifest intake, static gates, provenance, test execution, vulnerability checks, verdicts, redaction, sealing and ledger stages.

Topics
  • AI Workflow
  • Verification
  • CertFabric
  • Evidence pipeline architecture
Related ids
  • certfabric-guide
Evidence concerns
  • Optional QualityFabric is an integration boundary, not proof of an active composed service. A cert verdict covers its pinned subject and checks only.
  • Private source selection. Source inspection only; no fresh build, deployment or effectiveness certification.
Copy scope

Full original document, byte-identical

Copy status

copied-private-review

Format

markdown

Bytes

9572

Word count

1032

Headings
  • cert-fabric — Architecture
  • Components
  • API surface
  • Module map
  • Key invariants (from v8.1 spec)
  • Decision trail
  • Scaling considerations (deferred to v0.3)
Sensitive content review
Automated secret patterns
Email occurrences

0

Customer record terms
Limitation

Pattern scan plus editorial review; not a guarantee of no personal or proprietary material. Private copies retain source code examples, internal locations and attributions.

Attribution note

Source document attribution is preserved. Repository ownership or an agent role is not automatically authorship.

Date basis

Document header or dated filename; source may contain later updates

Source pin note

SHA-256 binds exact copied working-file bytes; repo_head is repository context, not proof that every byte is committed at that head.

Publication recommendation

Private technical reading candidate; editorial selection and claim review required before public use

cert-fabric — Architecture

Components

┌──────────────────────────────────────────────────────────────────────────┐
│                       cert-fabric service (port 48030)                   │
│                                                                          │
│  ┌──────────────────┐   ┌──────────────────────────────────────────────┐ │
│  │ FastAPI surface  │   │              Orchestrator                    │ │
│  │ (api/server.py)  ├──>│  Stage 0: manifest intake (manifest.py)      │ │
│  │  POST /run       │   │  Stage 1: static gates (stages/static_gates) │ │
│  │  GET /verdict    │   │  Stage 2: provenance (stages/provenance)     │ │
│  │  GET /metrics    │   │  Stage 3: test exec + R-8 (stages/test_exec) │ │
│  │  /healthz /readyz│   │  Stage 4: vuln scan (stages/vuln_scan)       │ │
│  └──────────────────┘   │  Stage 5: verdict (stages/verdict)           │ │
│           ▲             │  Stage 5.5: redaction (evidence/redaction)   │ │
│           │             │  Stage 6: sealing (stages/evidence_sealing)  │ │
│  ┌──────────────────┐   │  Stage 7: ledger (ledger/factory)            │ │
│  │ CLI              │   │  Stage 8: teardown verify (runners/isolation)│ │
│  │ (cli/main.py)    │──>│                                              │ │
│  │  --local mode    │   └──────────────────────────────────────────────┘ │
│  │                  │              │                  │                  │
│  └──────────────────┘              │                  │                  │
│                                    ▼                  ▼                  │
│                          ┌─────────────────┐  ┌─────────────────┐        │
│                          │ Ledger (sqlite  │  │ Evidence bundle │        │
│                          │  or postgres)   │  │  storage (S3/   │        │
│                          │  cert_runs +    │  │  local fs)      │        │
│                          │  cert_birth_    │  │                 │        │
│                          │  events outbox  │  │  per-run dirs   │        │
│                          └─────────────────┘  └─────────────────┘        │
└──────────────────────────────────────────────────────────────────────────┘
        │                          │                            │
        │ POST verify              │ Read PR context            │ Submit pytest
        ▼                          ▼                            ▼
   ┌──────────┐               ┌──────────┐                ┌──────────────┐
   │ Sigstore │               │ GitHub   │                │ Quality-     │
   │ Fulcio/  │               │ App API  │                │ Fabric       │
   │ Rekor    │               │          │                │ (optional)   │
   │ (cosign) │               │          │                │              │
   └──────────┘               └──────────┘                └──────────────┘

API surface

EndpointMethodPurpose
/GETService discovery
/healthzGETLiveness probe
/readyzGETReadiness — verifies ledger reachable
/metricsGETPrometheus-style metrics
/api/v1/cert/runPOSTSubmit cert run; returns 202 + polling URLs
/api/v1/cert/run/{id}/statusGETPhase + percent
/api/v1/cert/run/{id}/verdictGETFinal verdict
/api/v1/cert/{service}/latestGETMost-recent verdict per service
/api/v1/cert/{service}/historyGETVerdict history
/api/v1/cert/self-test/replayPOSTRun adversarial self-tests

Module map

src/cert_fabric/
├── __init__.py                # version, predicate_type, port, log init
├── logging_config.py          # structlog + secret-redaction processor
├── manifest.py                # cert.manifest.yaml v1 schema (pydantic)
├── api/
│   └── server.py              # FastAPI app — production surface
├── cli/
│   └── main.py                # Typer CLI — local mode + ops commands
├── stages/
│   ├── static_gates.py        # Stage 1 — R-1..R-7 static integrity
│   ├── provenance.py          # Stage 2 — cosign verify-attestation
│   ├── test_executor.py       # Stage 3 — pytest + R-8 typed DB
│   ├── vuln_scan.py           # Stage 4 — Trivy / Grype
│   ├── verdict.py             # Stage 5 — 10-clause + maturity score
│   ├── evidence_sealing.py    # Stage 6 — Cosign-attested proof manifest
│   └── contract_compat.py     # N-1 backward compat check
├── runners/
│   ├── orchestrator.py        # wire all stages together
│   ├── self_test.py           # Stage 8 — adversarial matrix
│   └── isolation.py           # scorched-earth env + Docker hygiene
├── ledger/
│   ├── factory.py             # sqlite:// or postgresql:// dispatch
│   ├── sqlite_ledger.py       # dev/local backend
│   └── postgres_ledger.py     # production backend w/ pool + WAL
├── evidence/
│   └── redaction.py           # pre-seal secret-shape scanner
└── parity/
    ├── __init__.py
    └── assertions.py          # shared Bucket D/E behavioral parity suite

Key invariants (from v8.1 spec)

1. Verification ≠ Provenance — CertaaS attests testing (Tier-2 signature, cert-fabric/v2 predicate); CI builder attests creation (Tier-1 signature, SLSA provenance predicate).
2. Test before Sign — Stage 6 sealing + deploy-authoritative signing occur ONLY after Stages 3-4 PASS. Failed tests = no signature = no deploy.
3. Hard gates override score — A 95/100 score with one FAIL clause still produces verdict FAIL.
4. Server-derived PR context — caller hints are advisory; CertaaS rederives base/head/files/actor/labels from GitHub API.
5. R-8 typed — postgres | none | other; no silent passes on non-Postgres services.
6. BirthEvent internal-only until TLA-11 — outbox row written on PASS; NATS publisher worker deferred.
7. Secret leak = BLOCK — pre-seal redaction scanner forces verdict BLOCK on any non-mock secret-shaped string in the bundle.
8. Scorched-earth env — subprocesses see only the whitelist; operator's shell vars (OPENAI_API_KEY, AWS_*, etc.) never leak through.
9. Idempotent ledger writes — re-submitting the same run_id updates without duplicating.
10. Self-test on every release — 7-mode adversarial fixtures run weekly + on deploy; runner is suspect until all 7 are green.

Decision trail

The architecture is the result of 6 rounds of independent review:

ReviewSourceHeadline finding
#1Anonymous third-partySequencing fixes; QF demoted from critical path
#2Gemini multi-agent swarmTest-then-Sign; Cosign-attested manifest; immune-system framing
#3Consistency-pass reviewerOne canonical clause list; mechanical Test-then-Sign; bug-free env isolation
#4GPT contract-passCertaaS contract: inputs, trust boundary, two-tier signing, local CLI
#5GPT provenance-precisionProvenance envelope; R-8 typed; server-derived PR; secret-leak = BLOCK
#6Gemini "Stress Test"Hard gates override score; lifecycle signal intent; resilience deferrals
#7 (v8.1 RC)GPTMake v8 ideas executable without weakening hard gates
#7.1 (v7.1 patch)Self-auditOperational seams: MDC scope, Grace Period semantics, §A5/§A7 appendices

Full traceability at delivery/MODULARITY-CERT-FRAMEWORK-V1-ARCHITECTURE-REVIEW-2026-05-22.md (../../delivery/MODULARITY-CERT-FRAMEWORK-V1-ARCHITECTURE-REVIEW-2026-05-22.md) §A1-§A8.

Scaling considerations (deferred to v0.3)

ItemWhy deferredTrigger to revisit
Celery/Redis task queue< 10 runs/day at MVP> 20 concurrent submissions
Registry mirror (Trivy DB cache)Trivy DB pull is ~30s/run; acceptable todayWhen fleet > 15 services × hourly runs
Operator-signed degraded modeSigstore/GitHub outages are minutes-hoursFirst SLA commitment to a customer
Auditor instance (second CertaaS certifying primary)Bootstrap risk acknowledged in DECISION-LOGAfter cert-fabric serves > 30 days uptime
Multi-tenant isolationSingle-org Phase-0When second org joins

Continue exploring