Data Model: Test Sanitation Evidence

RunEnvironment

Hash-addressed identity for a collection, execution, or timing observation.

FieldTypeRule
idstringSHA-256 over normalized fields below
os / runner_image / cpu_classstringexact platform/runner identity
pythonstringimplementation + full version
eventstringlocal, PR, push, schedule, or manual
envmap[string,string]explicit allowlist; secrets redacted
lock_hashstringuv.lock hash
install_command / install_statelist[string] / stringexact setup and cache state
workers / cache_policystringexact topology and cache behavior
harness_patch_hashstring/nullexact #3283 replay artifact hash

CandidateObservation

Environment-specific observation; one candidate may have several.

FieldTypeRule
environment_idRunEnvironment refrequired
nodeidstring/nullnull only for source-only/zero-node unit
collection_stateenumcollected, ignored, deselected, error, zero_node
outcomeenum/nullpassed, failed, error, skipped, xfailed, xpassed, not_run
skip_reasonstring/nullrequired for skipped/xfail/quarantine behavior
markerslist[string]effective inherited markers
durationobjectcollection/setup/call seconds and cost class
artifact_hashstringraw observation artifact

RouteMembership

FieldTypeRule
route_idstringstable frozen route ID
roleenumowner, coverage, platform, hard_gate
requiredbooleanbranch/release requirement
eventslist[string]triggering event set
selectorobjectexact paths, markers, ignores, environment

Changed narrow classes require exactly one owner. Documented secondary execution is allowed through other roles.

TestCandidateUnit

FieldTypeRule
idstringstable unique slug
memberslist[string]source functions or nodeids; nonempty
granularityenumfunction, family, duplicate_cluster, node
source_pathslist[path]repository-relative
production_pathslist[path/symbol]alleged source targets/live seams
oraclestring/nullintended observable assertion
contract_claimstring/nullnamed observable contract
authoritylist[reference]active spec, ADR, contract, matrix, or issue
duplicate_groupstring/nullnormalized body/semantic group
route_membershipslist[RouteMembership]owner and secondary roles
platformslist[string]supported scope
observationslist[CandidateObservation]at least one for deep rows

A family/cluster must share production path, oracle, outcome class, route role, cost class, platform scope, and disposition. Any divergence creates child node records. A ledgered KEEP requires non-null contract claim, authority, production path, and oracle.

EvidenceBundle

Evidence is class-specific, not universally maximal.

FieldTypeUsed by
profileenuminert, duplicate, structural, contract, slow, flake, dead_symbol, route, environmental_platform
caller_evidencelist[command/result]contract, dead symbol
authority_evidencelist[reference/result]all except mechanically inert placeholder where issue/absence is enough
routing_evidencelist[RouteMembership/result]inert, regression, route
base_evidenceobjectred/flake/bootstrap/timing claims
causal_probeobjectstructural, contract, duplicate survivor, changed survivor
overlap_evidencelist[comparison]duplicate/consolidate
cost_evidenceobjectslow/route and duplicate preference

causal_probe explicitly includes kind, fault, authority_violated, act_reached, intended_oracle, intended_oracle_failed, command, environment, and raw artifact hash. Collection/import/setup failures never satisfy it.

DispositionRecord

FieldTypeRule
candidateTestCandidateUnitexactly one deep candidate
evidenceEvidenceBundlesatisfies profile requirements
verdictenumKEEP, CONSOLIDATE, FIX_TEST, FIX_PRODUCT, DELETE, TEMPORARY
stateenumpending, terminal
action / survivorstring / stringnull
issue / owner / expiresnullableall required for temporary
hic_approvalstring/nullrequired for temporary
reviewobjectimplementer, independent reviewer, verdict, timestamp

FIX_* is never terminal. TEMPORARY is one-time/non-renewable, maximum 30 days, and valid only for profile environmental_platform; inert, correctness, and timing candidates cannot use it.

FrozenWorkloadDAG

FieldTypeRule
routeslist[object]stable ID, exact argv/selectors, environment ID, base/HEAD mapping
edgeslist[object]dependency fromto; acyclic
repetitionsintegerat least 3
measurementslist[object]collection/setup/call, wall, compute, outcome, artifact hash

Summed compute is the sum of route measurements. Critical path is derived from the frozen dependency DAG; deleted/renamed routes remain mapped rather than disappearing.

BootstrapLease

FieldTypeRule
stateenumABSENT, BUILDING, VALIDATED, PUBLISHED
owner_pid / process_start_tokeninteger / stringdistinguishes PID reuse
heartbeat_at / lease_secondstimestamp / numberlive-owner vs abandoned decision
temp_pathpathunique sibling on same filesystem
source_version / environment_hashstringvalidation inputs

Only the recorded live owner may transition BUILDING → VALIDATED → PUBLISHED. Publication validates the temp environment then renames it to an absent final path while state is locked. Recovery cleans only the recorded abandoned temp path.

AggregateReport

Generated from global machine census, non-overlapping evidence/dispositions/WP##.yaml shards, raw artifact hashes, frozen workload DAG, issue matrix, and hard-gate results. It is never an independent hand-maintained evidence source.