{% if trace_inspectors %}

Memory lineage

Expected sources, retrieval candidates, supplied context and persisted output bindings are separate evidence stages.

{% for row in trace_inspectors.memory %}
Task {{ row.task_id or 'Unspecified' }}{% if row.root_trace_id %} · Root {{ row.root_trace_id[:8] }}{% endif %}{% if row.turn_id %} · Turn {{ row.turn_id[:8] }}{% endif %} · {{ row.state|replace('_', ' ') }}
{% for label, refs in [('Expected / authoritative', row.expected), ('Retrieved', row.retrieved), ('Supplied', row.supplied), ('Output-bound', row.output_bound)] %}

{{ label }}

{% for ref in refs %}

{{ ref.ref }}
{{ ref.resource_type }} · version {{ ref.version or 'unknown' }} · {{ ref.role or 'unspecified role' }}

{% else %}

Not observed

{% endfor %}
{% endfor %}
{% if row.capture_note %}

{{ row.capture_note }} Observed supplied items: {{ row.observed_supplied_count }}. Recorded legacy source IDs: {{ row.legacy_source_ids|join(', ') or 'none recorded' }}.

{% endif %}
{% else %}

Not captured for this trace: authoritative input_refs, retrieval candidates and exact supplied references. Host intent/context events and memory-selection instrumentation are needed; absence is not proof that no memory was used.

{% endfor %} {% if trace_inspectors.selection_ledger %}
Why one memory outranked another — candidate decisions
{% for entry in trace_inspectors.selection_ledger %}{% endfor %}
CandidateRankScoreSelectedRecorded reason
{{ entry.resource.ref }}{{ entry.candidate_rank }}{{ entry.relevance_score if entry.relevance_score is not none else 'Unknown' }}{{ entry.selected }}{{ entry.selection_reason|replace('_', ' ') }}
{% endif %}
{% endif %} {% if trace_inspectors %}

Artifact provenance

{% for row in trace_inspectors.artifacts %}
{% for ref in row.artifact_refs %}{{ ref.resource_type }} · {{ ref.ref }}{% endfor %} {% if row.outside_observed_execution %}

Created outside the observed execution path. No producer span was recorded.

Untraced interval: {{ row.untraced_interval.before or 'unknown start' }} → {{ row.untraced_interval.after or 'unknown end' }}.

{% endif %}

Task {{ row.task_id or 'unspecified' }} · Producer {{ row.producer_span_id or 'not observed' }} · {{ row.producer_component or 'component unknown' }} · {{ row.producer_status }}.

Persisted {{ row.created_at }} · State {{ row.artifact_status }} · Persistence verified {{ row.persistence_verified }} · Delivered and acknowledged {{ row.delivered }} · Verified outcome {{ row.verified_outcome }}.

Credit decisions: {{ row.credit_decisions|join(', ') or 'Not observed' }}.

{% if trace_permissions and trace_permissions['artifact.lookup'] %}{% for ref in row.artifact_refs %}{% endfor %}{% endif %} {% if not trace_capabilities['artifact.lookup'].configured %}

Current-state lookup requires the host artifact_resolver callback.

{% endif %}
{% else %}

Not captured for this trace: artifact_persisted with source input_refs, artifact output_refs, persistence verification and producer parent_span_id. Instrument the host persistence path, including fallback generation. No source-to-artifact link can be verified.

{% endfor %}
{% endif %} {% if trace_inspectors %}

Output contract boundaries

{% for row in trace_inspectors.contracts %}
{{ row.contract_name }} · parser {{ row.parser_status or 'unknown' }}

Model {{ row.model_evidence.provider or 'unknown' }} / {{ row.model_evidence.model or 'unknown' }} · Stop {{ row.model_evidence.finish_reason or 'unknown' }} · Output tokens {{ row.model_evidence.output_tokens if row.model_evidence.output_tokens is not none else 'unknown' }} / limit {{ row.model_evidence.max_output_tokens or row.output_limit or 'unknown' }} · Response {{ row.model_evidence.response_chars if row.model_evidence.response_chars is not none else 'unknown' }} characters.

Model relation: {{ row.model_relation|replace('_', ' ') }}.

Opening marker {{ row.opening_marker_found }} → Closing marker {{ row.closing_marker_found }} → Parser {{ row.parser_status }} → Recovery {{ row.recovery_status or ('used' if row.recovery_used else 'not used') }} → Emitted {{ row.emitted }} → Browser acknowledged {{ row.acknowledged if row.acknowledged is not none else 'unknown' }}.

Nodes {{ row.nodes if row.nodes is not none else 'unknown' }} · Edges {{ row.edges if row.edges is not none else 'unknown' }}.

{% else %}

Not captured for this trace: output_contract parser/closing-marker results and ui_delivery emission/browser acknowledgement. Instrument the host parser, transport and browser acknowledgement path. A model response alone does not establish interactive delivery.

{% endfor %}
{% endif %}