Repository navigation
Stop before-after's base stacks from the worktree that started them - #1624
Merged
Merged
Conversation
quanvu309
force-pushed
the
t3/verify-before-after-cleanup
branch
from
November 24, 2026 17:26
0416c4c to
63b8d43
Compare
launch and serve release Postgres and the run folder on any failure or signal. before-after and bench stop the base run as the scratch tree that owns it, on success, failure, SIGINT and SIGTERM. The owner override is gone; ownership compares real paths.
quanvu309
force-pushed
the
t3/verify-before-after-cleanup
branch
from
November 24, 2026 17:53
63b8d43 to
6581d70
Compare
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
before-afterandbenchstop every run they start, and remove every scratch tree, on success, failure, SIGINT and SIGTERM.VERIFY_AIRDESIGN_OWNERis gone, so a run's owner is only the real path of the worktree that launched it.stopkeeps #1622's rule for everyone else.launch, not the caller, tears down its own half-started run, so a failed base startup, a site build error and an interrupt all go through one boundary. A tree-owned run is stopped as the tree, which passes the owner rule with no override. Round 1 and round 2 widened ownership; this removes the widening.With
--keep, a succeeded run is kept and the stop command for each is printed (the base run belongs to its tree). A failed or interrupted run is cleaned even with--keep.Surfaces: verification tooling only. Canvas, design panel, filmstrip, undo and replay, agent tools and PowerPoint are untouched.
Evidence
launch-cleanup.test.mjs: Postgres still alive after a base launch fails after it starts; a run folder left after a site build error; launch killed by SIGINT with the stack still running.leftover-runs.test.mjs: a symlinkedtree-linkrecords the override's foreign owner.pnpm gate,pnpm test:tooling,pnpm rulesexit 0.Real
before-afteragainstHEAD~1, private home each time: success exits 0; Postgres failure after state is recorded exits 1; injected site build error exits 1; SIGINT with Postgres up exits 1 ("interrupted by SIGINT"). Each leaves no scratch run, no Postgres directory, no worktree and no process.bench --cases doom-open-40 --runs 2leaves nothing on success or on the same Postgres failure.Merge Danger
Door: two-way. Tooling only; revert restores round 2.
Blast Radius: verification commands.
servenow exits 1 on a startup failure, where it exited 0 on uncaught errors after ready.launchwaits for a serve it ends, up to 15 s.