Skip to content

test(worker): isolate runtime acquisition in the rewind admission test - #1457

Merged
nixuuu merged 1 commit into
devfrom
fix/rewind-admission-abort
Nov 29, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/rewind-admission-abort

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 29, 2026

Copy link
Copy Markdown
Member

Change

The rewind admission fixture creates fixed Claude and Codex adapters in one Effect scope. When rewinding Claude to a new binding, the host unloads Codex through useRuntime. That acquisition previously reached the real configuration reconciler, which could close the shared scope while the first post-rewind Claude turn was starting.

Pause acquisition at useRuntime so starts, rewinds and cross-provider unloads all use the fixed fixture runtimes. The test still exercises both real adapter paths and checks cancellation, redelivery, persisted receipts, and the next turn on the replacement binding.

Verification

  • Holding Codex cleanup until the third Claude query opened reproduced the CI failure before the post-rewind turn emitted turnStarted. The same ordering passed three times with this change.
  • Ran both provider cases ten times each with check:tmp. All 20 passed and cleaned up.
  • Worker typecheck and edited-file lint passed locally.

Related: #1446

Cross-provider unload acquires the Codex runtime through useRuntime. Reconciliation after that acquisition could close the scope shared by both test adapters while the first post-rewind Claude turn was starting. Pause acquisition at the common boundary so the fixture owns both runtimes through teardown.

Related: #1446
@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 07:20
@nixuuu
nixuuu merged commit 6ae17b9 into dev Nov 29, 2026
45 of 47 checks passed
@nixuuu
nixuuu deleted the fix/rewind-admission-abort branch November 29, 2026 07:31
nixuuu added a commit that referenced this pull request Nov 29, 2026
…1454)

## Change

The native split view was changing the width of a conversation on every
animation frame. On a landscape phone, the transcript repeatedly wrapped
and measured its text as the sidebar moved.

- Slide the sidebar and the conversation together with one horizontal
transform. The conversation takes its full width at the start of a close
and its split width at the end of an open.
- Show a vertical guide under the resize handle. Releasing the handle
applies and saves the width once. Cancelling keeps the previous width.
- Size both panes from the same window frame when rotating. The split
follows the system layout direction and keeps the transcript and
composer inside the outer safe edges, including on Android's inverted
list.

## Verification

- Compared the original and revised Android API 36 development client on
a landscape phone emulator with a populated conversation and an isolated
gateway. Its conversation container reported 2–4 width changes per
toggle before the fix and one after. A 700 ms drag went from 11 width
changes to one on release. Holding or cancelling the drag produced no
width change.
- On the final revision, four collapsed landscape → portrait → landscape
rotations each went directly from 862.48 to 411.43 and back to 862.48
dp. With the sidebar open the corresponding widths were 542.48 and
411.43 dp.
- Also checked persistence after reopening and restarting, double-tap
reset, reduced motion, portrait and landscape rotation, and the mirrored
split with forced RTL. Frame pacing on a physical iPhone remains
unverified.
- Mobile TypeScript check, formatting and scoped lint passed for the
edited TSX files.

Two CI attempts reproduced a race in the worker’s Claude rewind fixture.
The fixture correction is in #1457.

Fixes: #1089
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.

1 participant