fix(headless): make real-run archive emit failures fatal (OPS-001) - #145
Merged
cursor[bot] merged 1 commit intoJul 8, 2026
Merged
Conversation
Co-authored-by: Ravindra Kumar <ravidsrk@gmail.com>
cursor
Bot
merged commit Jul 8, 2026
1b01047
into
cursor/adversarial-review-base-256a
1 of 2 checks passed
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes OPS-001 from the adversarial review (
c6c486).Real headless runs could exit 0 while leaving no
.fleet/runs/<id>/audit trail when archive emission failed. Dry-run cleanup remains non-fatal.Changes
Base
Merges into
cursor/adversarial-review-base-256a(mission BASE).Greptile Summary
This PR makes real headless archive emission failures fail the run. The main changes are:
Confidence Score: 5/5
Safe to merge with minimal risk.
The change is narrow, preserves dry-run behavior, and adds tests for the affected success and failure paths. No runtime bugs were identified in the changed code.
No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Runtime as Headless runtime participant Runner as run_runtime_emit participant Emitter as emit_headless_trace_archive participant Archive as .fleet/runs archive Runner->>Runtime: run_with_timeout(command) Runtime-->>Runner: runtime_rc + captured transcript Runner->>Emitter: "emit archive(cleanup=0, transcript)" Emitter->>Archive: create audit trail alt emit succeeds Archive-->>Emitter: archive path Emitter-->>Runner: "rc=0" Runner-->>Runner: return runtime_rc else real-run emit fails Archive-->>Emitter: error Emitter-->>Runner: emit_rc Runner-->>Runner: return emit_rc end Note over Emitter: cleanup=1 dry-run failures warn and return 0%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Runtime as Headless runtime participant Runner as run_runtime_emit participant Emitter as emit_headless_trace_archive participant Archive as .fleet/runs archive Runner->>Runtime: run_with_timeout(command) Runtime-->>Runner: runtime_rc + captured transcript Runner->>Emitter: "emit archive(cleanup=0, transcript)" Emitter->>Archive: create audit trail alt emit succeeds Archive-->>Emitter: archive path Emitter-->>Runner: "rc=0" Runner-->>Runner: return runtime_rc else real-run emit fails Archive-->>Emitter: error Emitter-->>Runner: emit_rc Runner-->>Runner: return emit_rc end Note over Emitter: cleanup=1 dry-run failures warn and return 0Reviews (1): Last reviewed commit: "fix(headless): fail real runs when archi..." | Re-trigger Greptile