feat(action): Handle cancellation gracefully - #521
Conversation
36b27bb to
d3947ab
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d3947ab to
d5c20ff
Compare
| INPUT_SERVICE_MEMORY: ${{ inputs.service-memory }} | ||
| INPUT_SERVICE_TIMEOUT_MS: ${{ inputs.service-timeout-ms }} | ||
| run: node ${{ github.action_path }}/dist/action/index.js | ||
| run: exec node "${{ github.action_path }}/dist/action/index.js" |
There was a problem hiding this comment.
We need this (or something like it) so that when github interrupts/kills the process, the signal makes it to node.
Abort in-flight analysis, preserve partial findings and usage, and finalize findings artifacts with a cancelled outcome. Keep analyze/report publication ownership intact and conclude active checks consistently. Co-Authored-By: GPT-5 <noreply@anthropic.com>
d5c20ff to
d97dff9
Compare
There was a problem hiding this comment.
Looks good to me. The graceful-cancel path is coherent end to end: signal handling with force-on-second-signal, abort propagation distinct from the circuit breaker, cancelled findings artifacts (including split analyze/report ownership), check finalization, and telemetry flush before exit. Prior notes around recalled-memory linkage, cancelCoreCheck Sentry capture, and schedule abort isolation look addressed, and the new coverage locks in the important cancelled publish/no-publish behaviors.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d97dff9. Configure here.
| failOnWriteError: inputs.mode === 'analyze', | ||
| }); | ||
| span.setAttribute('warden.finding.count', 0); | ||
| return; |
There was a problem hiding this comment.
Cancelled artifacts omit pending triggers
Medium Severity
Cancellation before trigger dispatch finalizes with empty results, so matched triggers never appear as pending in triggerResults or skippedTriggers. executeAllTriggers synthesizes those pending rows, but the early finalizeCancelledPRRun paths skip it, so cancelled artifacts look like nothing matched.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d97dff9. Configure here.
| minConfidence, | ||
| failCheck, | ||
| }); | ||
| } |
There was a problem hiding this comment.
Cancelled skills still fail checks
Medium Severity
Cancellation is only honored after a clean skill report. If the task returns report.error or throws, the executor still captures a Sentry exception, marks the GitHub check as failed, and drops the report. The run-level execute catch similarly fails the core check and writes a non-cancelled artifact even when cancellation was requested.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit d97dff9. Configure here.


Warden Action runs now treat
SIGINTandSIGTERMas terminal cancelled outcomes instead of exiting before results are finalized. Cancellation aborts in-flight analysis, verification, and consolidation work; preserves completed findings and observed usage in an atomic findings artifact withoutcome: "cancelled"; concludes active checks; and flushes telemetry before exiting.Split mode retains a single publication owner: analyze writes the replay artifact without publishing, while report consumes and publishes successful or cancelled artifacts. Legacy run and schedule modes continue publishing directly. The findings schema remains backward compatible because the new outcome field is optional for older artifacts.