Skip to content

fix(seat): observe the replacement identity before finalizing an in-place restart - #1361

Merged
mvschwarz merged 2 commits into
mainfrom
fix/restart-in-place-observation-window
Oct 17, 2026
Merged

mvschwarz merged 2 commits into
mainfrom
fix/restart-in-place-observation-window

Conversation

@mvschwarz

@mvschwarz mvschwarz commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

A Codex in-place restart can report native_unknown when its resume screen is ready before the native process is visible. The restart now immediately checks the existing strict identity and secondary observations, then conditionally resamples within the existing finite timing budget.

Defaults allow 31 evaluations and 30 yields of 100 ms. Each successful strict attempt still needs two fresh matching process observations and the existing secondary condition. Only observation repeats; launch actions remain once, exceptions retain finalization, and the direct-native pane hold restores only after final proof. Shared identity APIs and the secondary's cached-array behavior are unchanged. Exhaustion remains unknown; success remains account-unverified.

Validation: tests-first red had 18 intended failures, all in the new describe; the existing cases and immediate-success case passed. Fixed CI passed all eight jobs, all 70 restart cases and 16,983 daemon tests. Added coverage includes both restart branches, delayed/invalid evidence, sample drift, pane joins, secondary failure, verdict writes, one launch/final event and held-pane restoration.

The budget counts scheduled yields, not observation I/O; it is not a hard three-second deadline. These are synthetic lifecycle tests, not provider/native or account acceptance. Main's effort, configuration and tmux behavior stay intact.

Refs #1196.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d5d2e3d3-8321-4712-b1a3-cbc8a0c1b617
📥 Commits

Reviewing files that changed from the base of the PR and between 57f2d71 and d98e0a2.

📒 Files selected for processing: 2
  • packages/daemon/src/domain/seat-restart-in-place.ts
  • packages/daemon/test/seat-restart-in-place.test.ts
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Don't use wizard code you don't understand. Wizards can generate reams of code. Make sure you understand all of it before you incorporate it into your project. |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mvschwarz
mvschwarz marked this pull request as ready for review October 17, 2026 06:51

@openrig-review openrig-review left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at d98e0a2. An in-place Codex restart now gives the replacement's identity a bounded window to appear: verifyReplacement evaluates the existing strict rebind and secondary observation at once, then resamples within the class's existing timing (31 evaluations, 30 yields of 100 ms by default). Every successful attempt still needs its own two fresh native observations; nothing joins across attempts, only observation repeats, exhaustion stays native_unknown and success stays restarted_account_unverified. Required CI passed at this head; no main commit since its base touches its files.

— dev60-planner@v-openrig-build

@mvschwarz
mvschwarz merged commit e81e261 into main Oct 17, 2026
9 of 10 checks passed
@mvschwarz
mvschwarz deleted the fix/restart-in-place-observation-window branch October 17, 2026 06:51
mvschwarz added a commit that referenced this pull request Oct 17, 2026
…lace restart (#1367)

The 0.6.11 cut of #1361 (main e81e261): verifyReplacement evaluates the existing strict rebind and secondary observation at once, then resamples within the class's existing timing (31 evaluations, 30 yields of 100 ms by default). Each success needs its own two fresh native observations; only observation repeats; exhaustion stays native_unknown and success restarted_account_unverified. Refs #1196.
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