doctor_asupersync ingestion accepts a versioned DoctorEvidenceBundle and
normalizes runtime and operator artifacts into deterministic EvidenceRecord
entries with explicit provenance. This contract covers:
- the versioned bundle boundary and fail-closed metadata validation
- accepted artifact kinds (
trace,structured_log,ubs_findings,benchmark,runtime_inspector,proof_status,proof_lane_manifest,rch_receipt,browser_package_readiness,cargo_feature_graph,tracker_context,redacted_log) - deterministic normalization and deduplication behavior
- rejection semantics for malformed/unsupported artifacts
- redaction failure semantics for log-like or receipt-like artifacts
- no-claim boundaries carried by every accepted source adapter
- structured ingestion events for debugging and replay
- bundle
schema_version:doctor-evidence-v1 - report
schema_version:doctor-evidence-v1 - Compatibility policy: additive fields are allowed within
v1; semantic changes to required fields or normalization rules require a version bump.
Evidence ingestion accepts a versioned DoctorEvidenceBundle:
{
"schema_version": "doctor-evidence-v1",
"bundle_id": "string",
"run_id": "string",
"source_profile": "string",
"generated_by": "string",
"artifacts": [
{
"artifact_id": "string",
"artifact_type": "trace|structured_log|ubs_findings|benchmark|runtime_inspector|proof_status|proof_lane_manifest|rch_receipt|browser_package_readiness|cargo_feature_graph|tracker_context|redacted_log",
"source_path": "string",
"replay_pointer": "string",
"content": "string"
}
]
}Required bundle fields:
schema_versionbundle_idrun_idsource_profilegenerated_byartifacts
The bundle schema version must be doctor-evidence-v1; bundle_id, run_id,
source_profile, and generated_by must be non-empty; and artifacts must
contain at least one entry. Invalid bundles fail closed through
ingest_doctor_evidence_bundle as a deterministic one-row rejection report with
no normalized records. Artifact-level malformation is report-local: malformed
artifacts are emitted in rejected while the bundle can still ingest.
Each artifact is represented as:
{
"artifact_id": "string",
"artifact_type": "trace|structured_log|ubs_findings|benchmark|runtime_inspector|proof_status|proof_lane_manifest|rch_receipt|browser_package_readiness|cargo_feature_graph|tracker_context|redacted_log",
"source_path": "string",
"replay_pointer": "string",
"content": "string"
}Required fields:
artifact_idartifact_typesource_pathreplay_pointercontent
Missing required metadata causes rejection with reason
artifact missing required metadata fields.
The ingestion report is:
{
"schema_version": "doctor-evidence-v1",
"run_id": "string",
"records": [
{
"evidence_id": "string",
"artifact_id": "string",
"artifact_type": "string",
"source_path": "string",
"correlation_id": "string",
"scenario_id": "string",
"seed": "string",
"outcome_class": "success|cancelled|failed",
"summary": "string",
"replay_pointer": "string",
"provenance": {
"normalization_rule": "string",
"source_digest": "string",
"source_kind": "string",
"adapter_version": "doctor-evidence-adapter-v1",
"no_claim_boundary": "does_not_prove:string",
"redaction_policy": "string"
}
}
],
"rejected": [
{
"artifact_id": "string",
"artifact_type": "string",
"source_path": "string",
"replay_pointer": "string",
"reason": "string"
}
],
"events": [
{
"stage": "string",
"level": "info|warn",
"message": "string",
"elapsed_ms": 0,
"artifact_id": "string|null",
"replay_pointer": "string|null"
}
]
}Required EvidenceRecord fields:
evidence_idartifact_idartifact_typesource_pathcorrelation_idscenario_idseedoutcome_classsummaryreplay_pointerprovenance.normalization_ruleprovenance.source_digestprovenance.source_kindprovenance.adapter_versionprovenance.no_claim_boundaryprovenance.redaction_policy
- Artifacts are processed in lexical order by
(artifact_id, artifact_type, source_path). - Normalized records are emitted in lexical order by
evidence_id. - Rejected artifacts are emitted in lexical order by
(artifact_id, artifact_type, reason). - Event
elapsed_msis synthetic and monotonic (deterministic stage tick), not wall clock. - Duplicate normalized records are dropped by canonical key and logged via
dedupe_recordevent.
trace: parse JSON object, maptrace_id/correlation_id,scenario_id,seed,outcome_class, andsummary/message.structured_log: parse JSON object, mapcorrelation_id,scenario_id,seed,outcome_class, andsummary/message.ubs_findings: each non-empty line becomes one failed evidence record.benchmark: eachkey=valueline becomes one success evidence record.runtime_inspector: parse JSON object as a runtime-inspector snapshot.proof_status: parse JSON object as a proof-status snapshot row.proof_lane_manifest: parse JSON object as proof-lane manifest metadata.rch_receipt: parse JSON object as a terminal or blocker RCH receipt.browser_package_readiness: parse JSON object as browser/package readiness evidence.cargo_feature_graph: each non-empty line becomes one success evidence record.tracker_context: parse JSON object as tracker/bead context.redacted_log: parse JSON object after redaction checks pass.
Malformed JSON, invalid benchmark line format, empty findings, and unsupported artifact type are rejected with explicit reasons.
Every accepted source type has a deterministic adapter row with:
source_kind: canonical source family for downstream analyzers.adapter_version: currentlydoctor-evidence-adapter-v1.normalization_rule: stable rule identifier for replay/debugging.no_claim_boundary: adoes_not_prove:*statement naming what the record does not prove by itself.redaction_policy: stable policy identifier for the adapter.
Examples:
rch_receiptusessource_kind = "rch_receipt"and does not prove source code correctness.proof_statususessource_kind = "proof_status_snapshot"and does not prove that the proof command executed at ingestion time.cargo_feature_graphuses line-snippet normalization and does not prove build success.
Ingestion fails closed when content contains common unredacted secret markers,
including private-key headers, bearer-token headers, AWS_SECRET_ACCESS_KEY, or
the test sentinel UNREDACTED_SECRET. A redacted_log artifact that mentions a
token/password/secret without also carrying a redaction marker is also rejected.
Rejected artifacts retain artifact id, source path, replay pointer, and reason.
ingest_startparse_artifactnormalize_recorddedupe_recordreject_artifactingest_complete
Events are part of the compatibility surface for downstream diagnostics and
must remain stable within doctor-evidence-v1.
- Consumers must fail closed on unknown bundle or report
schema_version. - Consumers can trust
replay_pointerto provide deterministic repro context. - Consumers can rely on
outcome_classnormalization to one of:successcancelledfailed
- Consumers should retain
provenance.source_digestfor audit and dedupe tracing. - Consumers should treat unknown artifact types as expected rejection paths, not runtime panics.
- Consumers must carry forward
no_claim_boundaryand must not promote a source record into a stronger proof claim without a later proof lane.