ADR 0001: faberops.dev/v1beta1 Seven-CRD Model and Runtime Contracts
- Status: Accepted (locked for Faber v2.0.0, Wave 0 through Wave 4)
- Date: 2026-12-01
- Applies to: Faber operator,
faberctl, Helm chart, and FaberOps Catalog v2
Context
Section titled “Context”Faber v1 (faberops.dev/v1alpha1) grew organically to nine CustomResourceDefinitions: GitOpsRepository, MaintenancePolicy, PolicyTemplate, RemediationRun, ModelProfile, ToolProfile, NotificationProfile, ActionProfile, and TargetCluster. That model works for single-cluster GitOps maintenance, but it creates structural friction for both self-hosted operators and enterprise platform teams:
- Duplicated policy and profile surfaces:
PolicyTemplaterepeats about 15 fields ofMaintenancePolicySpec, and trust behavior is configured in five separate places (policy.trustMode,route.trustMode,ActionProfile.trustMode,requireApproval, andshadowMode). - Mixed ownership in
ActionProfile: Action capability definitions (k8sActionoperations,postCheck, pull request flags) live beside security governance rules (trustMode,changeFreeze,approvers), preventing clean RBAC separation between application teams and security teams. - Fragmented egress inventory: External endpoints and
Secretreferences are spread acrossModelProfile,ToolProfile,NotificationProfile, and inline trigger or pre-check fields, making it hard to audit every egress host from Kubernetes alone. - Missing trust primitives:
RemediationRunrecordsSandboxClaimNamewithout a cryptographically verifiable verdict digest or post-merge verification status, and autonomy promotion relies on a hardcoded recommendation streak rather than verified outcomes. - Narrow naming:
GitOpsRepository,MaintenancePolicy, andRemediationRunmislabel read-only incident triage, CVE response, IaC drift checks, and application code pull requests.
To address these issues once cleanly, Faber v2 moves to faberops.dev/v1beta1 behind an internal version-agnostic EffectiveAutomation seam (internal/operator/effective) so the controller runtime can transition from v1alpha1 to v1beta1 without rewriting internal/engine, internal/store, internal/observability, sandbox execution, or forge drivers.
Decision
Section titled “Decision”1. Seven Namespaced faberops.dev/v1beta1 CRDs
Section titled “1. Seven Namespaced faberops.dev/v1beta1 CRDs”All seven CRDs are namespaced, belong to API group faberops.dev/v1beta1, and share categories=faber:
| Kind | Short name | Replaces (v1alpha1) |
Primary owner | Responsibility |
|---|---|---|---|---|
Connector |
fconn |
ModelProfile, NotificationProfile, ToolProfile MCP endpoints, inline URLs |
Platform | Typed external endpoint with type, url, secretRef, capabilities (read, notify, write, trigger), and optional default: true per type. kubectl get fconn provides the complete egress inventory and lets the Helm chart generate egress NetworkPolicy rules. |
Repository |
frepo |
GitOpsRepository |
Platform or app team | Repository binding with kind (gitops, app, iac, helm), one unified forge block, per-repo validator config (image or mirror mode), hard diff guardrails, active learning rules, and ownership overrides. |
Playbook |
fpb |
PolicyTemplate, action half of ActionProfile, ToolProfile scopes |
Catalog or platform | Reusable investigation and remediation content plus its safety contract: triggers, zero-cost pre-checks, prompt, output schema, routes, typed actions[] with ceiling and blastRadius, requires (connector types, Kubernetes read scopes, validator), and fixture digest. |
Automation |
fauto |
MaintenancePolicy |
App team | Declarative binding of a Playbook reference or OCI playbook reference to parameters, target clusters, optional repositories, requested trust level, notification connectors, and small overrides. status.trust[] tracks earned autonomy per action. |
AutomationRun |
frun |
RemediationRun |
Controller | Immutable execution record capturing inputs, bounded output, approval votes, status.evidence, and post-merge status.verification. |
TrustPolicy |
ftp |
Governance half of ActionProfile plus action budgets |
Security | Optional RBAC-separated governance object defining autonomy ceilings per action class, protected workloads, promotion and demotion criteria, action budgets, change freeze windows, and approver quorum rules. When absent, the built-in default ceiling is HITL. |
TargetCluster |
ftc |
TargetCluster |
Platform | Multi-cluster inspection target (kubeconfigSecretRef xor endpoint), retained unchanged in concept. |
Explicit non-CRDs and removals:
- No
ActionBudgetCRD: Budgets belong underTrustPolicy.spec.budgetsbecause budgets and ceilings are one governance decision made by the same owner. - No
CatalogSourceCRD: Catalog trust roots (catalog.sources[]withurl,cosignIdentity,issuer, andtier) remain cluster-admin Helm values so namespace tenants cannot register unsigned catalog sources. - Removed
v1alpha1fields and packages:spec.preset,internal/operator/presets, legacyspec.github,shadowMode(replaced byObserve),requireApproval(replaced by aHITLceiling), inlinenotifications, and the five-layer notification resolution chain (replaced by two layers: explicit connector reference, else namespace defaultConnector) are retired in Wave 1. - Day-1 zero-Git experience: An
Automationcan reference an OCI playbook directly (the controller caches it) and omitspec.repositoriesfor read-only Observe workflows.
2. Single Deterministic Trust Formula
Section titled “2. Single Deterministic Trust Formula”Every mutating action evaluates one deterministic trust formula, surfaced verbatim in status.trustDecision:
effective = min( Automation.spec.trust (requested), Playbook.spec.actions[x].ceiling (HITL when the playbook is unverified), TrustPolicy ceiling for the action class and workload (HITL when no TrustPolicy grants higher), Automation.status.trust[x].earned)then apply runtime overrides: change freeze, budget exhausted, automatic demotion, global kill switchVerification and promotion rules:
- Signed OCI playbooks: A
Playbookreferenced bysource.oci@sha256is verified once the controller checks its Cosign signature and confirms the canonical content digest matches. - Local or inline playbooks: Custom or locally edited playbooks are unverified and capped at
HITL. They can reachverified-localonce their fixture suite passesfaber-evalwith the result recorded in status. - Evidence-gated promotion and automatic demotion:
Automation.status.trust[action]storesearned,verifiedStreak,precision30d, andeligible. Promotion requires explicit human approval by default (with an audit event), while automatic promotion is opt-in throughTrustPolicy. Rollback, revert, or post-merge regression automatically demotes the action back toHITL. - Hard controller refusal list: Secrets, RBAC resources, PVC deletion,
NetworkPolicy, admission webhooks, and node pools stay capped atHITLorObservein controller code and cannot be raised by anyPlaybookor catalog pack.
3. Mandatory status.evidence and Post-Merge status.verification
Section titled “3. Mandatory status.evidence and Post-Merge status.verification”AutomationRun adds two first-class status contracts that remain under the 64 KiB etcd object budget by storing bulky payloads in internal/store:
status.evidence: RecordsinputsDigest,sandbox(templateDigest,imageDigest,commands,verdict,verdictDigest),modelDigest(model identifier plus prompt hash),bundleDigest(full evidence bundle stored ininternal/store), server-side dry-run result (dryRun=Allbefore everyk8sAction), andtranscriptRef.- Hard execution gate: No action above
Observe(exceptnotifyandcreate_issue) executes without a passing sandbox verdict and recordedverdictDigest.
- Hard execution gate: No action above
status.verification: After a pull request merges and Flux or Argo CD reconciles, or after a bounded Kubernetes write completes, the controller re-runs the playbook pre-check and watches for regression over a configurable window (24 hours by default). Outcomes areVerified,NotResolved, andRegressed. OnlyVerifiedoutcomes count toward trust promotion precision and memory utility.
4. Deterministic Zero-Cost Ownership Resolver
Section titled “4. Deterministic Zero-Cost Ownership Resolver”Workload-to-repository mapping is derived live state rather than learned memory. The deterministic Ownership resolver (internal/operator/ownership) resolves both deploy and source repositories at zero LLM cost:
- Deploy repository and path: Flux labels trace to
Kustomization.spec.pathand itsGitRepositoryURL. Argo CDargocd.argoproj.io/instancetraces to theApplicationsource.repoURLand path. - Source repository: OCI image config labels
org.opencontainers.image.sourceandorg.opencontainers.image.revisionidentify upstream source code and commit SHA. - Explicit override: Workload annotation
faberops.dev/source-repooverrides automatic discovery.
Discovered URLs are matched against bound Repository objects in the owning namespace, enabling cross-repo remediation when Automation.spec.repositories is omitted.
5. Slim Operational Memory (FTS5 and Gold/Silver/Bronze Quarantine)
Section titled “5. Slim Operational Memory (FTS5 and Gold/Silver/Bronze Quarantine)”Faber v2 ships operational memory with zero extra pods, backed by SQLite FTS5 and PostgreSQL tsvector in internal/store, omitting embeddings and neural rerankers from v2.0.0 (deferred behind a single flag in v2.1):
| Tier | Source | Allowed use |
|---|---|---|
| Gold | Human-authored inputs: HITL rejection reasons, explicit /faber remember markers, pinned facts, postmortems, and human-approved runs that later achieved Verified |
Sticky constraints, promotion precision, eval fixtures |
| Silver | Automatically verified runs (status.verification == Verified) without human labelling |
Turn-1 recalled brief, playbook context, weighted promotion precision |
| Bronze | Unverified model outputs: learnedFacts, episodic summaries, and dead-end sandbox hypotheses |
On-demand memory_search only. Never injected into the turn-1 brief until reinforced by a second independent run or a human. |
Safety invariants for operational memory:
- Tenant isolation: Memory is partitioned by the owning
Automationnamespace, never by target workload namespace. - Prompt-injection defense: Bronze quarantine prevents attacker-controlled log lines from becoming permanent turn-1 instructions. Recalled briefs are fenced as untrusted data in the dynamic user turn only.
- Trust separation: Memory never feeds trust promotion. Promotion reads only the
status.verificationoutcomes table. - PII hygiene and batch compaction: The redactor strips both secrets and PII (emails and IPs from logs) with cascading forget support. Context compaction runs in batches on threshold crossings to preserve provider prompt caches.
- Minimal configuration: Only
memory.enabledin Helm values andspec.memory: falseonAutomationare exposed as knobs.
6. Catalog v2 Categories and Safety Contracts
Section titled “6. Catalog v2 Categories and Safety Contracts”FaberOps Catalog v2 (github.com/faberops/catalog) aligns its four categories directly to the v1beta1 domain model and preserves the four-tab Web GUI browser:
playbooks/: Investigation and remediation playbooks (absorbing v1 recipes and action outputs).connectors/: Typed external endpoints (LLM, Prometheus, Loki, VictoriaLogs, Alertmanager, Grafana Alerting, Slack with interactive approvals, Matrix, Webhook, MCP, and P1/P2 integrations).signatures/: Reusable log, metric, and failure signature patterns (replacing v1 inputs).validators/: Offline sandbox validator profiles and images (base,security,iac, plus dependency-baked language images for app-codeimagemode).
Every pack pack.yaml declares a machine-enforced safety contract validated by catalog CI and enforced at runtime by the controller:
actions[].ceilingandactions[].blastRadius(kinds,verbs,maxObjects,maxReplicaDelta,paths,maxFiles,maxLines).requires(connector types, Kubernetes read scopes, and validator profile).rollbackrequired for every Kubernetes write (post-check plus pre-mutation snapshot).- Pack tiers enforced in code:
verified(Cosign-signed with passing fixtures, ceiling honored),community(capped atHITL), andexperimental(capped atObserve). - Five mandatory offline eval cases for every
verifiedpack: positive fix, healthy no-op, wrong-layer negative, prompt-injection negative, and budget or timeout negative.
Consequences
Section titled “Consequences”- Wave 0 (this milestone): Rename
internal/gitops/tointernal/operator/, consolidateinternal/operator/github/intointernal/operator/forge/github/, introduce the version-agnosticinternal/operator/effectiveseam with av1alpha1adapter wired intointernal/operator/controller, and lock this ADR while keeping 100% ofv1alpha1CRDs, presets, evals, andkindE2E tests green. - Wave 1 (
v2.0.0-alpha.1): Introduceapi/v1beta1types and CRDs, swap theEffectiveAutomationbuilder tov1beta1, shipfaberctl migrate, retirev1alpha1kinds and presets, and land the single trust formula,status.evidenceverdict gate, server-side dry-run, and batch compaction. - Wave 2 (
v2.0.0-alpha.2): Addinternal/connectorwith a normalized alert envelope, Slack interactive approvals, Ownership resolver, per-automation actor impersonation, and post-mergestatus.verification. - Wave 3 (
v2.0.0-beta.1): Add slim FTS5 Gold/Silver/Bronze memory, Catalog v2 restructure with five-case eval CI enforcement, and livehome-opsmigration preserving SQLite run history. - Wave 4 (
v2.0.0GA): Complete documentation refresh, Shadow Scorecard v2, and end-to-end verification onkind. - SDK license boundary preserved:
pkg/engine,pkg/trigger,internal/engine,internal/observability, andinternal/storeremain untouched underApache-2.0, enforced mechanically byTestEnginePackageBoundary,TestSDKPackageBoundary,TestApacheSDKLicenseBoundary, andTestTriggerStdlibOnlyBoundary.