Skip to content

fix(runs): deny an expired run's open approval - #2181

Merged
elie222 merged 1 commit into
elie222:mainfrom
tc3oliver:fix/expire-stuck-run-cleanup
Oct 25, 2026
Merged

elie222 merged 1 commit into
elie222:mainfrom
tc3oliver:fix/expire-stuck-run-cleanup

Conversation

@tc3oliver

Copy link
Copy Markdown
Contributor

Why

A run waiting on an approval card that nobody answers is eventually expired. Its card's effect then stayed intended, since expiry only dropped the turn checkpoint. Stopping a thread and cancelling runs already deny it (#2171).

What changed

expireStuckRun now calls clearEndedRunState after cancelling the run, as the stop and cancel paths do. That also covers the checkpoint and the waiting one-time answer, so its own checkpoint and secret deletes are removed.

How tested

A new unit test expires a run with an unanswered approval card and checks its effect is denied. It fails without the change. The existing secret-delete assertion still passes, and so does the Postgres steering-replay suite, which expires runs. Typecheck passes and Biome is clean on the changed files; the unit suite passes except the backup script tests, which fail the same way on main on macOS.

@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
rakazo-www Skipped Skipped Oct 25, 2026 3:49pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Expired runs now use clearEndedRunState, matching the existing stop and cancel paths.

  • Expiring a stuck run now denies its unanswered approval effect.

No actionable issues found. Tests were inspected but not run during this review.

Reviews (1) · Last reviewed commit: "fix(runs): deny an expired run's open ap..." · Reviewed by Greptile

@elie222
elie222 merged commit 12d6965 into elie222:main Oct 25, 2026
28 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Playwright screenshots

No new feature frames; gallery is suite-vs-main drift.

Open screenshot gallery · Dashboard · CI run

Updated for commit c733dae.

@tc3oliver
tc3oliver deleted the fix/expire-stuck-run-cleanup branch November 13, 2026 05:07

This branch was previously deployed

1 inactive deployment
Preview — c733daee Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants