Uh oh!
There was an error while loading. Please reload this page.
fix(logs): keep run provenance when compaction drops the execution state - #6528
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Write path: On completion, the run’s Read path: Reviewed by Cursor Bugbot for commit df73bf0. Configure here. |
Greptile SummaryThe PR preserves resolved-secret provenance when execution-state compaction occurs while preventing that server-only data from reaching display projections.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/logs/execution/logger.ts | Lifts run provenance before redaction and preserves it through compaction tiers that retain trace content. |
| apps/sim/lib/logs/execution/trace-store.ts | Uses top-level provenance for display redaction, omits server-only fields, and handles eligible historical truncated rows. |
| apps/sim/lib/logs/types.ts | Adds the optional top-level resolved-secret provenance field to the execution-data contract. |
| apps/sim/lib/logs/execution/logger.test.ts | Covers provenance persistence and compaction while replacing the previously flagged introduced any usages. |
| apps/sim/lib/logs/execution/trace-store.test.ts | Covers provenance omission, registry reconstruction, legacy truncation fallback, and fail-closed cases with a typed span helper. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Completed execution] --> B[PII projection]
B --> C[Top-level run provenance]
C --> D{Payload oversized?}
D -->|No| E[Persist full execution data]
D -->|Yes| F[Compact execution data]
F --> G[Persist spans and provenance]
E --> H[Display projection]
G --> H
H --> I[Rebuild redaction registry]
I --> J[Return projected trace]
H --> K[Omit server-only provenance]
Reviews (2): Last reviewed commit: "improvement(logs): type the new test hel..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
Oversized-payload compaction drops executionState wholesale but keeps secretProjectionVersion, so the display projection saw a contract-marked row it could not verify and returned structural-only spans — blanking every input and output in the trace. Store the provenance top-level so it survives compaction, omit it from both display projections (it carries encrypted secret values and their names), and let rows truncated before this shipped keep the spans they were already projected with at write time.
598198c to
df73bf0Comparewaleedlatif1
commented
Aug 11, 2026
waleedlatif1
commented
Aug 11, 2026
@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 df73bf0. Configure here.
Summary
execution_dataso it survives oversized-payload compaction droppingexecutionState. Without it the display projection can't rebuild its redaction registry and blanks every span's input/output — a truncated run renders as an empty trace.Type of Change
Testing
Traced against a real affected execution: the spans and their input/output are present in
execution_databut stripped on read. Added mutation-verified unit tests for the write path, all three compaction tiers, the display omit, and each fail-closed case. 466 tests pass inlib/logs.Checklist