Back to Ruflo

ADR-G012: Manifest Validator and Conformance Suite

v3/@claude-flow/guidance/docs/adrs/ADR-G012-manifest-validator.md

3.6.303.1 KB
Original Source

ADR-G012: Manifest Validator and Conformance Suite

Status: Accepted Date: 2026-02-01 Author: Guidance Control Plane Team

Context

The Agentic Container System Specification (v0.1) defines Agent Cell Manifests that declare an agent's identity, budgets, data policy, tool policy, memory policy, and observability requirements. Without a validator, malformed or over-privileged manifests can enter the system and create security gaps.

Decision

Implement ManifestValidator with fails-closed admission control:

Validation Rules

CheckError CodeSeverity
Missing apiVersionMISSING_FIELDReject
Unsupported API versionUNSUPPORTED_API_VERSIONReject
Missing cell name/purpose/codeRefMISSING_FIELDReject
Invalid SHA-256 digest formatINVALID_DIGESTReject
Negative budget valuesBUDGET_NEGATIVEReject
Budget exceeding maximum limitsBUDGET_EXCEEDReject
Wildcard in network allowlistWILDCARD_NETWORKReject (unless privileged)
Invalid data sensitivity enumINVALID_ENUMReject
Region conflict (allowed intersects blocked)REGION_CONFLICTReject
Missing memory namespaceMISSING_FIELDReject

Risk Scoring

Three axes compose the risk score (0-100):

AxisWeightFactors
Tool riskHighBash, Task, network wildcards, write confirmation disabled
Data sensitivityMediumPII allowed, restricted data, long retention
Privilege surfaceMediumGlobal memory scope, overwrite mode, gates disabled

Lane Selection

Risk score determines execution lane:

ConditionLane
portabilityRequiredwasm (forced)
Risk exceeds maxRiskScorewasm (forced)
Risk >= 70wasm
Risk >= 40 with native preferencesandboxed (downgrade)
Low riskRespect preferredLane

Admission Decision

RiskDecision
Below admit threshold (default 30)admit
Between thresholdsreview (human approval required)
Above reject threshold (default 70) or any validation errorreject

Conformance Suite

ConformanceSuite validates system behavior against golden traces — recorded sequences of events with expected gate decisions. Ships with 5 default traces covering destructive commands, secrets, budget exceedance, memory without evidence, and valid operations.

Consequences

  • No agent cell can enter the system without passing validation
  • Any single validation error causes rejection (fails-closed)
  • Risk scoring provides quantitative basis for lane selection
  • Golden traces enable regression testing of gate behavior
  • 59 tests validate all validation paths, risk computation, and lane selection

Alternatives Considered

  • Schema-only validation (JSON Schema): Cannot express semantic constraints like region conflicts or risk-based lane selection
  • Soft validation with warnings: Violates the Agentic Container Spec's "admission means contract" principle
  • External policy engine (OPA/Rego): Adds a dependency and runtime cost; can be added later as an alternative evaluator