Skip to content

fix: stop replay retries after cleanup failures - #2001

Merged
thymikee merged 1 commit into
mainfrom
fix/replay-attempt-session-cleanup
Aug 24, 2026
Merged

fix: stop replay retries after cleanup failures#2001
thymikee merged 1 commit into
mainfrom
fix/replay-attempt-session-cleanup

Conversation

@thymikee

@thymikee thymikee commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

Replay test retries now stop when the preceding attempt cannot close its session. A rejected close response is promoted to the same cleanup failure path, and the failed attempt is classified as infrastructure so a later attempt cannot contend with its retained device claim.

Adds regression coverage for the macOS open "System Settings" shape: a failed attempt whose close is rejected runs exactly once instead of reaching DEVICE_IN_USE on the next attempt.

Rebased onto current origin/main: this PR now contains one cleanup-retry commit and four targeted source/test files only.

Motivating CI evidence: merged PR #1952 macOS run 32734629087, job 97454414587; and PR #1994 macOS run 32734431023, job 97453800202.

Validation

  • Regression was observed red before the production change, then green.
  • Focused replay-test and daemon suite tests passed (23 tests).
  • pnpm test:replay:macos passed against the local macOS System Settings replay after the rebase.
  • pnpm check:affected --run passed after the rebase (GitHub-authoritative lanes remain pending on this head).

Docs and skills unchanged: the retry/session lifecycle contract is internal and existing guidance already covers it.

@thymikee

Copy link
Copy Markdown
Member Author

Review of exact head 8b9cfb0807b6be4637321ddebc62d9dfa449008c:

The functional fix is sound and sits at the right ownership seam: a rejected close response becomes a cleanup error, the attempt is classified as infrastructure, and the existing scheduler stops before retrying into a retained device claim. Both regression tests are non-vacuous.

The PR is not ready because its branch topology is wrong: it conflicts with main and carries 13 unrelated iOS snapshot commits (31 files, +939/-148) ahead of the one cleanup-retry commit. Rebuild/rebase it onto current main as only the cleanup-retry change and its four targeted source/test files, then rerun exact-head CI and re-stamp the macOS replay evidence. Do not apply labels.

@thymikee
thymikee force-pushed the fix/replay-attempt-session-cleanup branch from 8b9cfb0 to 469455f Compare August 24, 2026 14:20
@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 2.40 MB 2.40 MB +268 B
JS gzip 805.1 kB 805.3 kB +106 B
npm tarball 929.5 kB 929.6 kB +119 B
npm unpacked 3.22 MB 3.22 MB +268 B

npm unpacked components

Component Base Current Diff
JS / dist source 2.55 MB 2.55 MB +268 B
Apple runner source/project 570.6 kB 570.6 kB 0 B
macOS helper source 54.5 kB 54.5 kB 0 B
Android helper artifacts 0 B 0 B 0 B
Other package files 44.5 kB 44.5 kB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 21.5 ms 21.4 ms -0.1 ms
CLI --help 61.4 ms 61.7 ms +0.4 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/session2.js +268 B +106 B

Top changed packed files

Packed file Base Current Diff
dist/src/session2.js 233.2 kB 233.5 kB +268 B

@thymikee

Copy link
Copy Markdown
Member Author

Re-review of exact head 469455f83d34387341becdd49c0c4777dbdc0b5a: clean and ready for human review. The prior topology blocker is resolved: one commit, four targeted files, mergeable, with the cleanup failure classified at the owning attempt seam and non-vacuous regression coverage. Exact-head static, coverage, integration, and macOS smoke are green; the macOS lane ran the System Settings replay successfully. iOS smoke is still in progress and is the only pending check.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Aug 24, 2026
@thymikee
thymikee merged commit 6e45d88 into main Aug 24, 2026
28 checks passed
@thymikee
thymikee deleted the fix/replay-attempt-session-cleanup branch August 24, 2026 14:41
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-24 14:41 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant