feat(evidence): restore bounded request outcome export with retained lineage - #1138
Conversation
Buyer accuracy claims still require observed task outcomes. Latency claims require request and decision traces, not outcome labels.
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
…n target Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
2026-09-12 stack refresh: exact head |
…tained evidence links
…quest-outcome-export-integrated-20260912
…-export-integrated-20260912 # Conflicts: # docs/product-technical-gap-baseline.md
Restack onto mainNew SHA: Conflicts: one, in TestsNote: this repo ships a Rust-native extension (
Readiness reviewThe delta matches the title: a bounded, service-admin, prompt-free export joining retained admissions to durable workflow/batch associations, with explicit handling of missing/invalid/truncated evidence rather than inferred correctness. The PR body itself is candid about outstanding gates and is worth restating: it was explicitly returned to Draft at the (then) current head after a strict full-suite ( Verdict: NEEDS_WORK (per the PR's own admission, not a new finding from this review) — concrete outstanding items before it's a real merge candidate:
No new defects found in the diff itself; the merge was clean apart from the doc file, and every test I ran passed. 🤖 Addressed by Claude Code |
Resolve orchestrator conflicts by keeping main rate-limit admission and ZDR redaction while preserving automatic_proxy selection receipts and restored workflow-run request_id binding; keep both gap-baseline evidence sections. Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve cancellable race attempts with decision attempt IDs, route embeddings through _available_embedding_agents, and keep the PR #971 timeout-supersession narrative alongside main's diary entries. Co-authored-by: Cursor <cursoragent@cursor.com>
| phases = self._conn.execute( | ||
| "SELECT kind, key, payload FROM orchestration_records " | ||
| "WHERE kind IN ('initial_decision', 'decision_receipt') " | ||
| "AND key IN (" + placeholders + ") " | ||
| "ORDER BY seq DESC LIMIT ?", | ||
| (*request_ids, 2 * limit + 1), | ||
| ).fetchall() |
| diagnostics = self._conn.execute( | ||
| "SELECT kind, key, payload FROM orchestration_records " | ||
| "WHERE kind IN ('provider_dispatch', 'auxiliary_dispatch') " | ||
| "AND key IN (" + placeholders + ") ORDER BY seq DESC LIMIT ?", | ||
| (*request_ids, 8 * limit + 1), | ||
| ).fetchall() |
Operator outcome
Provide a service-admin, prompt-free export joining retained admissions to
durable workflow and batch associations. Missing, invalid and truncated
evidence stays explicit; this does not infer customer correctness.
Lineage and boundary
Stacked on #1107. Preserves its current-main integration and the valid constant
and test from #1126. No predecessor is closed. Archived exporter history is
documented rather than silently replaced; protected-main adoption is unproven.
The existing journal owns atomic workflow linkage and original provenance.
The existing admin authorization path durably audits before reading evidence.
Pagination and per-admission links are bounded. Malformed retained JSON no
longer prevents index migration; invalid records remain stored and counted,
while valid workflow origins remain unique. No numerical estimator, new service,
production routing default or external owner-source dependency is introduced.
Historical verification (prior revisions)
40d344dc4733e6fa2b8d45817faba8d4ba4f6dbdincludes thecanonical LaRT inventory repair; full suite 3,724 passed, 2 skipped in
156.29s, terminal session 73240. Documentation-only handoff is
342cbbe6. The precedingaae29136run had one inventory failure, 3,723 passed and 2 skipped.outside checkout with Python isolated mode. Both import origins asserted
under the isolated installation, without source namespace injection.
aae29136archive, built wheel andinstalled bytes. The diff from that revision to
40d344dccontains onlythe runbook and paper inventory; installed acceptance is scoped to unchanged runtime.
419d6bcc7fe5d77493b917d77bbd7207612253179901886bb7bd9e1ff883f5f7.8dfee5d228a28733136e25c6006f77006bcba095863a667e0f2a3e71ca8c7c04.top, complete sequence diagram, ADR top. Labels and identifiers were legible
without overlap/clipping in those views; ADR navigation worked. Lower ADR,
current mobile and other locales are not accepted by this limited inspection.
Remaining gates
Required current-head reviews/checks, protected-stack delivery and release are
not established. No observed accuracy or decision-latency improvement is
claimed. Real provider integration and independent adjudication are separate
from controlled-output HTTP tests. Returned to Draft at unchanged head
1881ef06after the strict full-suite audit exposed unresolved repository-wide resource ownership; those gates remain unsatisfied.See
docs/doctoring/request_outcome_export.mdand Proposed ADR 0131 for theRED/fix history, assumptions, limits, transaction behavior and rollback.
Current repair evidence — 1881ef0
Normal-pushed head
1881ef06ed90ee72eb7209434db366c851cd68dccontains source/test repair7ebf577535139c6655a1b8d360682511defc22baand evidence documentation. It normally merges #1107 headde21ffd42733d6115800b33c4e84b3626a33f758throughd1a080d7; no predecessor was closed and no force push was used..venv/bin/python -m pytest -q -W error --tb=short; log/tmp/co-export-full-strict-1881ef06.log. The process ended, but the original session receipt was lost during context compaction, so a separately observed exit code is not claimed. These are test outcomes, not 1,287 independent root causes. Tracebacks include unclosed HTTPError responses, listener sockets and SQLite connections surfaced asPytestUnraisableExceptionWarning. Repository-wide resource ownership remains unresolved. Neither focused 124-test strict passes nor the default-warning full pass below establish strict full-suite success. No blanket warning filter or global finalizer was added.1881ef06ed90ee72eb7209434db366c851cd68dc: 3,762 passed, 2 skipped in 118.22s, terminal session47002, exit 0; log/tmp/co-export-full-suite-1881ef06.log. Command:.venv/bin/python -m pytest -q --tb=short, using the workflow-equivalent default warning policy (not-W error). This is distinct from the focused/native and fresh-installed 124-test warnings-as-errors results below.rustdoc --test docs/doctoring/irt_router_measurement_review.md. This is a synthetic unit-coordinate counterexample, not empirical parameter fitting or customer accuracy/latency KPI gain.456b8e53b075cd6c4654eda23c580999a911bc1f3ff7f0e98fcbe85c73f769bd.a2d9456d11ed7032b76a15c2e5562b202c6aad9521285b312073c9dff5b6d55b.See current validation runbook. Historical full-suite evidence above does not certify this new head. Current-head hosted checks, independent approval, protected merge, release/deployment, real provider adjudication, and customer accuracy/decision-latency gains remain unproven.