Skip to content

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

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:

  1. Duplicated policy and profile surfaces: PolicyTemplate repeats about 15 fields of MaintenancePolicySpec, and trust behavior is configured in five separate places (policy.trustMode, route.trustMode, ActionProfile.trustMode, requireApproval, and shadowMode).
  2. Mixed ownership in ActionProfile: Action capability definitions (k8sAction operations, postCheck, pull request flags) live beside security governance rules (trustMode, changeFreeze, approvers), preventing clean RBAC separation between application teams and security teams.
  3. Fragmented egress inventory: External endpoints and Secret references are spread across ModelProfile, ToolProfile, NotificationProfile, and inline trigger or pre-check fields, making it hard to audit every egress host from Kubernetes alone.
  4. Missing trust primitives: RemediationRun records SandboxClaimName without a cryptographically verifiable verdict digest or post-merge verification status, and autonomy promotion relies on a hardcoded recommendation streak rather than verified outcomes.
  5. Narrow naming: GitOpsRepository, MaintenancePolicy, and RemediationRun mislabel 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.

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 ActionBudget CRD: Budgets belong under TrustPolicy.spec.budgets because budgets and ceilings are one governance decision made by the same owner.
  • No CatalogSource CRD: Catalog trust roots (catalog.sources[] with url, cosignIdentity, issuer, and tier) remain cluster-admin Helm values so namespace tenants cannot register unsigned catalog sources.
  • Removed v1alpha1 fields and packages: spec.preset, internal/operator/presets, legacy spec.github, shadowMode (replaced by Observe), requireApproval (replaced by a HITL ceiling), inline notifications, and the five-layer notification resolution chain (replaced by two layers: explicit connector reference, else namespace default Connector) are retired in Wave 1.
  • Day-1 zero-Git experience: An Automation can reference an OCI playbook directly (the controller caches it) and omit spec.repositories for read-only Observe workflows.

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 switch

Verification and promotion rules:

  • Signed OCI playbooks: A Playbook referenced by source.oci@sha256 is 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 reach verified-local once their fixture suite passes faber-eval with the result recorded in status.
  • Evidence-gated promotion and automatic demotion: Automation.status.trust[action] stores earned, verifiedStreak, precision30d, and eligible. Promotion requires explicit human approval by default (with an audit event), while automatic promotion is opt-in through TrustPolicy. Rollback, revert, or post-merge regression automatically demotes the action back to HITL.
  • Hard controller refusal list: Secrets, RBAC resources, PVC deletion, NetworkPolicy, admission webhooks, and node pools stay capped at HITL or Observe in controller code and cannot be raised by any Playbook or 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: Records inputsDigest, sandbox (templateDigest, imageDigest, commands, verdict, verdictDigest), modelDigest (model identifier plus prompt hash), bundleDigest (full evidence bundle stored in internal/store), server-side dry-run result (dryRun=All before every k8sAction), and transcriptRef.
    • Hard execution gate: No action above Observe (except notify and create_issue) executes without a passing sandbox verdict and recorded verdictDigest.
  • 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 are Verified, NotResolved, and Regressed. Only Verified outcomes 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:

  1. Deploy repository and path: Flux labels trace to Kustomization.spec.path and its GitRepository URL. Argo CD argocd.argoproj.io/instance traces to the Application source.repoURL and path.
  2. Source repository: OCI image config labels org.opencontainers.image.source and org.opencontainers.image.revision identify upstream source code and commit SHA.
  3. Explicit override: Workload annotation faberops.dev/source-repo overrides 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 Automation namespace, 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.verification outcomes 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.enabled in Helm values and spec.memory: false on Automation are 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-code image mode).

Every pack pack.yaml declares a machine-enforced safety contract validated by catalog CI and enforced at runtime by the controller:

  • actions[].ceiling and actions[].blastRadius (kinds, verbs, maxObjects, maxReplicaDelta, paths, maxFiles, maxLines).
  • requires (connector types, Kubernetes read scopes, and validator profile).
  • rollback required 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 at HITL), and experimental (capped at Observe).
  • Five mandatory offline eval cases for every verified pack: positive fix, healthy no-op, wrong-layer negative, prompt-injection negative, and budget or timeout negative.
  • Wave 0 (this milestone): Rename internal/gitops/ to internal/operator/, consolidate internal/operator/github/ into internal/operator/forge/github/, introduce the version-agnostic internal/operator/effective seam with a v1alpha1 adapter wired into internal/operator/controller, and lock this ADR while keeping 100% of v1alpha1 CRDs, presets, evals, and kind E2E tests green.
  • Wave 1 (v2.0.0-alpha.1): Introduce api/v1beta1 types and CRDs, swap the EffectiveAutomation builder to v1beta1, ship faberctl migrate, retire v1alpha1 kinds and presets, and land the single trust formula, status.evidence verdict gate, server-side dry-run, and batch compaction.
  • Wave 2 (v2.0.0-alpha.2): Add internal/connector with a normalized alert envelope, Slack interactive approvals, Ownership resolver, per-automation actor impersonation, and post-merge status.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 live home-ops migration preserving SQLite run history.
  • Wave 4 (v2.0.0 GA): Complete documentation refresh, Shadow Scorecard v2, and end-to-end verification on kind.
  • SDK license boundary preserved: pkg/engine, pkg/trigger, internal/engine, internal/observability, and internal/store remain untouched under Apache-2.0, enforced mechanically by TestEnginePackageBoundary, TestSDKPackageBoundary, TestApacheSDKLicenseBoundary, and TestTriggerStdlibOnlyBoundary.