Share source evidence through the selected capture sink
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# ADR-0024: Publish artifacts with native reports and debug evidence
|
||||
|
||||
**Status:** Accepted; the requirement for one native invocation ExecutionGroup is
|
||||
partially superseded by [ADR-0025](0025-use-consumer-owned-execution-observation.md).
|
||||
partially superseded by [ADR-0025](0025-use-consumer-owned-execution-observation.md),
|
||||
and whole-source evidence representation by [ADR-0027](0027-share-whole-source-capture-evidence.md).
|
||||
All other decisions remain accepted.
|
||||
**Date:** 2026-11-22
|
||||
|
||||
|
||||
39
docs/adr/0027-share-whole-source-capture-evidence.md
Normal file
39
docs/adr/0027-share-whole-source-capture-evidence.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# ADR-0027: Share whole-source capture evidence
|
||||
|
||||
**Status:** Accepted
|
||||
**Date:** 2026-11-25
|
||||
|
||||
## Context
|
||||
|
||||
Requested evidence repeated the original input and complete parsed source in
|
||||
many operation records. This made larger bundles harder to navigate without
|
||||
improving the availability of chunk-level context or native request history.
|
||||
|
||||
## Decision
|
||||
|
||||
Record original input and validated parsed source once at logical bundle-root
|
||||
paths in the selected evidence sink. Operation and run records identify those
|
||||
records with explicitly labeled bundle-root references. An explicit execution
|
||||
writer takes precedence over an enabled debug recorder; shared records and their
|
||||
consumers use the same selected sink. Available evidence remains on failure.
|
||||
|
||||
Chunks, selections, references, incoming artifacts, and native prepared
|
||||
messages, responses, and exchanges remain directly readable. No symlinks,
|
||||
filesystem-root assumptions, or reconstruction tool are required. Requested
|
||||
capture remains required work; no sanitization, retention, or access-policy
|
||||
guarantee is added. This narrowly supersedes the whole-source duplication choice
|
||||
in [ADR-0024](0024-publish-artifacts-with-native-reports-and-debug-evidence.md).
|
||||
|
||||
## Alternatives considered
|
||||
|
||||
- Repeat the entire source in every operation: convenient in isolation, but
|
||||
needlessly duplicates run-wide context.
|
||||
- Replace all repeated content with references: makes ordinary operation and
|
||||
native request inspection less convenient than selected.
|
||||
|
||||
## Consequences
|
||||
|
||||
A complete bundle provides source context without each operation directory
|
||||
being self-contained. Logical references are private evidence representation,
|
||||
not a new durable reporting protocol. Operators continue to own access and
|
||||
retention of potentially sensitive evidence.
|
||||
@@ -153,6 +153,8 @@ details cheaply during callbacks, then write at normal boundaries. Cache paths
|
||||
reuse existing details; debug never triggers a second preparation or model call.
|
||||
Shared callback state is synchronized. Available result-less failure facts and
|
||||
unassessed undelivered responses remain distinguishable.
|
||||
Native messages and exchanges stay inline; run-wide source records are shared
|
||||
as described in [State Internals](state.md#native-and-application-evidence).
|
||||
|
||||
[Run capture](../../internal/cli/run_capture.go) uses secret-aware configuration
|
||||
views and exact marked-secret omissions, while native snapshots preserve credential
|
||||
|
||||
@@ -141,8 +141,11 @@ fallback directory. Available files are retained.
|
||||
## Native And Application Evidence
|
||||
|
||||
[Run capture](../../internal/cli/run_capture.go) snapshots the original secret-aware
|
||||
application/PromptKit configuration and source evidence. Scoped pipeline capture
|
||||
records source/reference/incoming artifacts, normalization originals/mappings/
|
||||
application/PromptKit configuration. The runner selects the explicit evidence
|
||||
writer when provided, otherwise enabled debug, and writes original and parsed
|
||||
source once to that sink. Scoped operation inputs refer to these records by
|
||||
labeled bundle-root paths; chunks, references, and incoming artifacts stay inline.
|
||||
Scoped pipeline capture also records normalization originals/mappings/
|
||||
proposals, candidates, complete findings/guidance, fallback/deterministic outcomes,
|
||||
and cache selection/current artifact bytes.
|
||||
|
||||
|
||||
@@ -258,6 +258,10 @@ Exact files, nesting, and serialized shapes are private diagnostic choices,
|
||||
not public contracts or exhaustive provider transcripts. Debug never prepares
|
||||
or executes another request just to capture it.
|
||||
|
||||
Whole-source input and parsed-source evidence are recorded once per run; scoped
|
||||
operation records refer to them while retaining chunks and native messages inline.
|
||||
An isolated operation directory therefore need not contain the complete source.
|
||||
|
||||
Requested capture is required work. Allocation/link failure stops before model
|
||||
work, recording errors surface at normal boundaries, and finalization failure
|
||||
fails the invocation even after publication. Available evidence and primary/
|
||||
|
||||
@@ -20,8 +20,8 @@ The [Core And Integration API Roadmap](../core-integration-api.md) established
|
||||
the core/integration boundary. The reassessment below distinguishes its completed
|
||||
work from the remaining audit remediation.
|
||||
|
||||
The **45 original finding entries** reduce to **20 outstanding catalog entries
|
||||
and fourteen resolved entries**. Repeated responsibility findings are
|
||||
The **45 original finding entries** reduce to **19 outstanding catalog entries
|
||||
and fifteen resolved entries**. Repeated responsibility findings are
|
||||
merged. Regression gaps are attached to the defects they protect rather than
|
||||
counted as additional runtime bugs. In particular, TEST-001, TEST-002, and
|
||||
TEST-004 each cover several distinct defects; TEST-003's native-fixture oracle
|
||||
@@ -66,23 +66,20 @@ context; they are not one universal severity scale. No audit establishes a P1
|
||||
incident or a measured end-to-end production speedup.
|
||||
|
||||
CAT-001, CAT-002, CAT-003, CAT-004, CAT-005, CAT-007, CAT-011, CAT-012, CAT-013, CAT-015,
|
||||
CAT-016, CAT-027, CAT-032, and CAT-034 are resolved;
|
||||
CAT-016, CAT-024, CAT-027, CAT-032, and CAT-034 are resolved;
|
||||
the other entries remain outstanding. The original reports and their baseline
|
||||
observations are historical.
|
||||
"Refactoring" denotes a maintenance opportunity, not a confirmed runtime
|
||||
failure. CAT-024 explicitly requires revisiting an existing evidence-convenience
|
||||
choice. Related entries
|
||||
failure. Related entries
|
||||
may share files without representing the same underlying issue; they should be
|
||||
coordinated rather than silently treated as duplicates.
|
||||
|
||||
**Migration overlap:** Lazy [operation evidence](../../../internal/framework/pipeline/operation.go)
|
||||
and guarded run-wide projections resolve CAT-003. Core operation
|
||||
ownership and the [internal guides](../../internal/modules.md) clarify portions
|
||||
of CAT-014/017/018/022/025/032, without completing their broader layout,
|
||||
of CAT-014/017/018/022/025, without completing their broader layout,
|
||||
copying, runner, writer-obligation, or package-cohesion work. CAT-006/008/009
|
||||
and CAT-023 remain separate lifetime, failure-diagnostic, and CLI concerns;
|
||||
CAT-024's full-source representation is unchanged. These overlaps do not resolve
|
||||
any of those findings.
|
||||
and CAT-023 remain separate lifetime, failure-diagnostic, and CLI concerns.
|
||||
|
||||
## Prioritized Findings
|
||||
|
||||
@@ -485,6 +482,12 @@ do not introduce another command framework or result envelope.
|
||||
**Assessment:** Capacity/convenience design opportunity; original P3; requires
|
||||
deliberate review of the existing evidence representation.
|
||||
|
||||
**Status:** Resolved. The selected evidence sink receives one original and one
|
||||
parsed source record, with bundle-root references in run and operation inputs.
|
||||
Tests cover explicit/debug/distinct sinks, multiple jobs, cache hits, and source
|
||||
write and parse failures. [ADR-0027](../../adr/0027-share-whole-source-capture-evidence.md)
|
||||
records the selected representation.
|
||||
|
||||
**Source:** [RES-003](05-resources.md#res-003--enabled-capture-repeats-the-full-source-for-every-extraction-job).
|
||||
|
||||
Each extraction operation serializes the full source again, multiplying debug
|
||||
@@ -499,7 +502,7 @@ required-capture failures visible. No silent truncation, quotas, or deletion.
|
||||
selects sharing original input and complete parsed source once per run through
|
||||
the operation capture destination. Operation-specific inputs, selected references,
|
||||
and convenient native evidence remain directly inspectable. General deduplication
|
||||
is out of scope; implementation remains pending.
|
||||
is out of scope.
|
||||
|
||||
### CAT-025 — Extension Concurrency And Capture Obligations Are Implicit
|
||||
|
||||
|
||||
@@ -418,6 +418,14 @@ Comment subtle deferred ownership; record all inspected boundaries in catalog.
|
||||
|
||||
## Stage 13 — Share Source Evidence At The Effective Sink
|
||||
|
||||
**Completed.** The runner selects the explicit writer or enabled debug sink once,
|
||||
records original input before parsing and validated source afterward, and passes
|
||||
labeled bundle-root references through run, chunk, lane, and operation inputs.
|
||||
Chunk and native request evidence remain inline. Tests cover multiple jobs,
|
||||
cache hits, each sink selection, both shared-write failures, and parse failure;
|
||||
the prescribed suites and targeted pipeline race checks pass. ADR-0027 records
|
||||
the narrow source-representation decision. No follow-up remains for this work.
|
||||
|
||||
**Coverage:** CAT-024. **Prerequisites:** Stages 11–12.
|
||||
|
||||
Implement selected sink, shared source records, and descriptor passing through
|
||||
|
||||
Reference in New Issue
Block a user