improvement(provenance): attribute stored-envelope display reads to their execution - #7039
Conversation
…heir execution A display materialization of an execution log imports the row's stored provenance envelopes into throwaway registries, and each import of an incomplete envelope re-emitted the registry's own summary — per envelope, per view, carrying counts and a workspace but never the execution id. A reader repeatedly materializing the same stored rows produced hundreds of identical lines that could not say which executions to go look at, and the volume scaled with views of a state that was fully recorded when the run wrote it. Verified against production before changing anything: essentially no new incomplete envelopes are being stored since the writer fix shipped, and no data drains exist — the stream is bounded re-reads of old rows through the display paths, not a live producer. The display registries are now staged — the existing concept for a registry that filters one value for a caller that reports against the real boundary — and each display function reports once per materialization with the execution id, workflow, workspace, and the parts that could not be vouched for. Severity is preserved: an incomplete stored envelope stays at warn, a malformed one stays at error. Projection behavior is unchanged everywhere — incomplete and malformed envelopes still fail their values closed exactly as before; only the reporting moves to the boundary that knows the execution.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThe PR moves stored provenance fault reporting from staged registries to execution-aware display boundaries and adds coverage for malformed and undecryptable envelopes.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/logs/execution/trace-store.ts | Centralizes stored-envelope import classification and emits grouped execution-attributed display reports. |
| apps/sim/lib/logs/execution/trace-store.test.ts | Adds comprehensive reporting and fail-closed projection tests for stored provenance envelopes. |
| apps/sim/executor/utils/resolved-secret-trace-registry.ts | Generalizes staged-registry documentation to cover value filtering and display materialization. |
Reviews (2): Last reviewed commit: "improvement(provenance): classify every ..." | Re-trigger Greptile
PR SummaryLow Risk Overview Fault reporting moves to Projection stays fail-closed — withheld values and redaction behavior are unchanged; only logging is more attributable. Tests mock the logger and pin the new messages, zero registry summaries, and dual-site reporting on block-output reads. Reviewed by Cursor Bugbot for commit d9f727a. Configure here. |
…in dual-site reporting Review pass over the previous commit: one helper instead of three copies of the incomplete-envelope check, the staged TSDoc generalized to cover both of its uses, and the block-outputs entry point's two-site reporting of one run envelope documented and pinned rather than left implicit.
…he display boundary Review findings from the first round, both accepted: a present-but- malformed block or run envelope was withheld with no attributed line, and a complete envelope whose entries fail decryption latched the staged registry with only the unattributed entry-level error. Fault classification moves into the one import helper the display paths share, which now returns the registry and the fault together: absent is not a fault, unparseable is malformed, unable-to-vouch is incomplete, and a complete envelope whose registry latched during import — entry decryption is the only latch on that trusted path — is undecryptable. Every consumer reports through the same table, severity per kind, so the exact-value loop stops being the only site that could name a malformed envelope. Withholding behavior is unchanged at every site.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d9f727a. Configure here.
Summary
source-provenance-incompletere-fire from the execution-log display paths — the one live provenance noise source left after v0.8.10 (493 lines in 34.6h post-deploy, ~10x the prior rate, none of them naming an execution).execution_datato the large-value store, so the stored envelopes are only observable at read time — the faucet-closed conclusion therefore rests on the write-side latch signals being silent in prod since 08-21 plus the writer fix (fix(provenance): stop requiring a projection of roots no model sees #6981) being deployed, not on the SQL alone. Either way the stream is bounded re-reads of old rows through display materialization (log detail, v1 logs API, exports, public logs, child-trace hydration), not a live producer.traceStore.spanProvenance,traceStore.exactProvenance, both block-output imports) are now staged — the registry's existing concept for "filters values for one operation; the caller owns reporting with more context" — so they no longer emit a per-envelope, per-view registry summary. The staged TSDoc is generalized to cover both of its uses.traceSpans/finalOutput/workflowInput/blockOutput:<id>). A block-outputs read runs both display functions, so an incomplete run envelope appears once under each site — documented and pinned by a test rather than left implicit.Type of Change
Testing
Tests pin: one attributed warn per display function with executionId + parts and zero registry summaries; the dual-site shape on block-outputs reads; malformed at error with the value withheld; complete envelopes fully silent. 1,135 tests green across lib/logs, api/logs, api/v1/logs, api/workflows, data-drains, workflows/executor, and the registry suite.
bun run type-checkclean, all 33 audits pass.Checklist