Skip to content

test(server): pin post-commit outbox settle boundary - #27560

Merged
Yash-Singh1 merged 1 commit into
pingdotgg:mainfrom
Narayan201120:test/outbox-settle-boundary
Nov 5, 2026
Merged

Yash-Singh1 merged 1 commit into
pingdotgg:mainfrom
Narayan201120:test/outbox-settle-boundary

Conversation

@Narayan201120

Copy link
Copy Markdown
Contributor

Split from #27423 per one-problem-per-PR. Test-only change; no production code is touched.

cancelUnsettled runs inside the commit transaction, so awaitSettled waiters must resolve only via the post-commit signalCancellations path. An earlier revision of that PR signalled inside the cancel itself; review showed a rollback after the signal would leave waiters resolved while rows stayed unsettled, so the signal stays post-commit.

This test pins the boundary: a waiter registered before the cancel stays pending through the cancel alone and resolves after the post-commit signal.

Verification

  • FoundationPersistence tests: 47 passed, including the new boundary test (failed before the correct boundary was established)
  • Formatting and lint passed for the changed file
  • Knip passes passed
  • Typecheck passed for apps/server

Made with GPT-6-Luna in Codex, running in T3 Code.

awaitSettled waiters must not resolve from cancelUnsettled inside the commit transaction. They resolve via the post-commit signalCancellations path, which this test exercises.
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 30, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at e25d16f

Macroscope's review found this PR approvable — This test-only change pins the post-commit outbox cancellation boundary. It changes neither production behavior nor product defaults and introduces no diagnostic suppressions.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 32ecd71 and e25d16f.

Files selected for processing: 1
  • apps/server/src/orchestration-v2/FoundationPersistence.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Walkthrough

This change adds a test for awaitSettled during cancellation. The test checks that the waiter remains pending after cancelUnsettled and resolves after signalCancellations.

Changes: Cancellation settlement

Layer / File(s) Summary
Waiter settlement test
apps/server/src/orchestration-v2/FoundationPersistence.test.ts
The test enqueues padding effects, cancels a provider-turn effect, and verifies that the waiter remains pending until signalCancellations is called.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Suggested reviewers: juliusmarminge, macroscopeapp

Merge Risk: Minimal · up to e25d1

The cancellation-settlement test has no identified merge-blocking issue. Merge after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the problem and the change clearly. It states that the PR is test-only and that it is split from #27423 under the one-problem-per-PR rule. It explains why the signal must stay p… Add a Scope and approval section. Link the triaged issue or the maintainer-approved discussion, including the approval comment. If no prior issue exists, explain why this test-only change qualifies without one. Correct 'Knip passes passed' …
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title names the change accurately. The PR adds one test that pins the post-commit settle boundary for outbox waiters. The title follows the conventional commit format and names the test scope (ser…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change accurately. The PR adds one test that pins the post-commit settle boundary for outbox waiters. The title follows the conventional commit format and names the test scope (server) and the behavior under test. It is specific enough for a teammate scanning history to understand the change.

Full details: Description check

Explanation

The description covers the problem and the change clearly. It states that the PR is test-only and that it is split from #27423 under the one-problem-per-PR rule. It explains why the signal must stay post-commit. The Verification section gives concrete results: 47 tests passed, the new test failed before the boundary was established, and formatting, lint, Knip, and typecheck passed. The template also asks for a Scope and approval section. The description does not include one. It links no triaged issue and no maintainer approval comment. It also does not explain why this focused test-only change qualifies without prior approval. The description has a typo, 'Knip passes passed'. The closing line names the model and harness, as the template requests. The Problem heading is not labeled as such, but the first paragraph covers the context.

Resolution

Add a Scope and approval section. Link the triaged issue or the maintainer-approved discussion, including the approval comment. If no prior issue exists, explain why this test-only change qualifies without one. Correct 'Knip passes passed' to 'Knip passed'. Consider a short Problem heading that states the gap the test closes, which is the lack of a test that pins the post-commit settle boundary.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

maria-rcks commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

verified the test-only change at e25d16f995b441b845fccd431d25530fe35ec19a with real codex gpt-6.1-sol turns through the local proxy. no code changes or pushes were needed.

first ran github/main (5fe18d79ac835e0f193ad61325e5b7d69a317bcf) in a separate worktree, then the exact pr head, installing each with vp i. servers ran in the background, one at a time, with isolated state. used the repository playwright dependency and /usr/bin/google-chrome. added a project through the app pointing at a real git repository and created its threads and turns through the client.

on both revisions:

  • a real codex turn read README.md and returned BASELINE_READY.
  • sent thread.stop over the authenticated client websocket immediately after message.dispatch succeeded, to reach the narrow pre-start cancellation path. the client showed "run interrupted before provider start" and the persisted provider-turn.start effect was cancelled. the next turn returned AFTER_CANCEL_OK.
  • clicked stop while a real codex terminal command was running. the client showed "stopped by user", the interrupt effect succeeded, and another turn returned AFTER_STOP_OK.

read-only database checks found zero pending/running outbox effects afterward on both revisions. runtime transcript.

blacksmith: vp test run apps/server/src/orchestration-v2/FoundationPersistence.test.ts
47 passed
premature-signal mutation: added test failed at waiterFiber.pollUnsafe()
mutation restored: 47 passed again

main and the pr have identical EffectOutbox.ts and EventSink.ts. no original application failure reproduced on main; this pr adds coverage rather than changing application behavior. the temporary mutation ran only on the remote check worker, never in either dev app.

main cancellation:

main: run interrupted before provider start

pr cancellation:

pr: run interrupted before provider start

pr: cancellation, terminal stop, and successful follow-up turns

pr: both interruptions followed by successful real codex replies

Not verified

  • the internal waiter/transaction boundary is covered by the focused test and mutation check, not directly observable through the client. the new test does not open a transaction or exercise rollback; its padding enqueues are a scheduling heuristic. no SQL rollback was injected into the running app.
  • native ios/android, electron, macos/windows, other providers, remote/relay/tunnel connections, and restart-continuation waiters were not exercised on this linux vm.
  • the first new-thread reply on this historical head persisted successfully but needed a reload to appear. subsequent replies, cancellation, and stop updated live without reload. that separate rendering observation was not fixed by this test-only pass.

inspected the captures and checked the uploaded video plays to the end and seeks successfully.

@Yash-Singh1
Yash-Singh1 merged commit 0961824 into pingdotgg:main Nov 5, 2026
30 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Nov 6, 2026
**v0.1.8-nightly.20261106.4247** · 67 changes from 19 contributors

- **Environment dictation.** Choose an environment for dictation in web and desktop, including desktop browser annotations.
- **Fresh sessions.** Use /clear to start a fresh session without leaving your thread.
- **Scheduled task sessions.** Run scheduled tasks in one thread, either continuing the conversation or starting fresh each time.
- **Secret requests.** Answer secret requests using a secret provider instead of copying and pasting credentials.
- **Snooze questions.** Snooze a thread with a pending question and answer it later.
- **Claude Ultracode.** Use Ultracode at any effort level, including with Claude Sonnet 5.5 and Haiku 5.5.
- **Faster pull requests.** Pull requests open faster using data already available in the app.

### Plus 31 more bug fixes and performance improvements.

<details>
<summary>Full changelog</summary>

## What's Changed
* fix(threads): side chats inherit parent permissions by default by @extoci in pingdotgg/t3code#31114
* fix(server): threads follow their worktree's branch changes by @Yash-Singh1 in pingdotgg/t3code#31599
* fix(pi): usage reports include sessions stored in a --session-dir launch argument by @saphid in pingdotgg/t3code#30690
* perf(mobile): skip unchanged terminal toolbar fade updates by @saphid in pingdotgg/t3code#25312
* perf(mobile): assemble HTML replacements in one pass by @saphid in pingdotgg/t3code#25278
* perf(mobile): skip canceled SVG parsing by @saphid in pingdotgg/t3code#25314
* test(server): strengthen v1 cutover proof with event-stream waits and content snapshots by @saphid in pingdotgg/t3code#11869
* fix(contracts): a stored secret reference is always sensitive by @yordis in pingdotgg/t3code#31403
* fix(server): a settings save no longer reads an unreadable secret again by @yordis in pingdotgg/t3code#31226
* fix(threads): allow snoozing pending input requests by @saphid in pingdotgg/t3code#20058
* fix(server): repair cutover test crypto import breaking main CI by @Yash-Singh1 in pingdotgg/t3code#31630
* feat(server): sends can start a fresh provider session by @juliusmarminge in pingdotgg/t3code#30323
* feat: /clear starts a fresh session in the same thread by @juliusmarminge in pingdotgg/t3code#30325
* feat: scheduled tasks can run in one thread with a fresh session each run by @juliusmarminge in pingdotgg/t3code#30326
* fix(web): dragging a sidebar thread no longer scrolls the list out from under the pointer by @juliusmarminge in pingdotgg/t3code#30346
* fix(assets): preserve the PR repository for GitHub media by @juliusmarminge in pingdotgg/t3code#21631
* fix(server): load PR uploads from SSO organizations by @juliusmarminge in pingdotgg/t3code#21632
* fix(mobile): the Duo inspector stops at its widest instead of vanishing by @juliusmarminge in pingdotgg/t3code#31665
* test(server): launcher PATH lookup test no longer drops the Windows drive letter by @tris203 in pingdotgg/t3code#22534
* test(server): replay tests delete their temp directories by @only21mil in pingdotgg/t3code#23445
* fix(mobile): transcribe Android audio during recording by @PixPMusic in pingdotgg/t3code#31300
* test(web): linked-environment subagents keep opening in their own thread by @RealDoc06 in pingdotgg/t3code#26492
* test(server): pin post-commit outbox settle boundary by @Narayan201120 in pingdotgg/t3code#27560
* test: remove unreachable github cli decoding test by @t3-code-bot[bot] in pingdotgg/t3code#28115
* test(server): retain delegated child events when detaching a parent by @benjamin-di in pingdotgg/t3code#29622
* test(lint): pin which ResizeObserver constructions no-raw-resize-observer reports by @only21mil in pingdotgg/t3code#28781
* test(mobile): drop two deleted tests from the React test list by @only21mil in pingdotgg/t3code#28800
* test(web): worked-for expand test waits for the timeline to finish loading by @saphid in pingdotgg/t3code#29661
* test(web): avoid PDF worker startup timeouts in attachment tests by @voltcrash in pingdotgg/t3code#29933
* test(web): source control writing settings test waits for the reset button by @juliusmarminge in pingdotgg/t3code#30372
* test(web): keep the work heading test inside the viewport by @voltcrash in pingdotgg/t3code#30613
* test: use an empty config file instead of the null device for git fixtures on Windows by @Pyseph in pingdotgg/t3code#30772
* test: remove stale tests for unused thread and onboarding helpers by @t3-code-bot[bot] in pingdotgg/t3code#30817
* test(server): correct Windows path and settings assertions by @ElliotDrel in pingdotgg/t3code#30983
* feat(claude): Ultracode works with any effort, like Claude Desktop by @Bil0000 in pingdotgg/t3code#27034
* perf(pr): pull requests paint from data already held, on web, desktop and mobile by @Bil0000 in pingdotgg/t3code#27798
* fix(mobile): approval card buttons line up by @shivamhwp in pingdotgg/t3code#31415
* fix(gitlab): author names link to GitLab profiles by @TonybynMp4 in pingdotgg/t3code#30418
* fix(gitlab): merge messages drop agent credits by @TonybynMp4 in pingdotgg/t3code#30441
* fix(gitlab): file and image comments appear as review threads by @TonybynMp4 in pingdotgg/t3code#30425
* fix(web): screen readers no longer read out a secret typed into the request card by @juliusmarminge in pingdotgg/t3code#31653
* perf(pr): actions update every client from the host's reply instead of re-reads by @Bil0000 in pingdotgg/t3code#25761
* feat(mobile): start side chats with /side by @juliusmarminge in pingdotgg/t3code#31709
* feat(claude): expose Ultracode on Claude Sonnet 5.5 and Haiku 5.5 by @DrSeedon in pingdotgg/t3code#30781
* feat(settings): Simlock, Antigravity and OpenCode credentials can come from a secret provider by @juliusmarminge in pingdotgg/t3code#31652
* refactor(mobile): screens declare what they are; layout and AppBar own every platform bar decision by @juliusmarminge in pingdotgg/t3code#31310
* fix(server): a saved source control token that can't be read no longer falls back to another account by @juliusmarminge in pingdotgg/t3code#31646
* feat(secrets): answer a secret request with a secret provider reference by @juliusmarminge in pingdotgg/t3code#31670
* fix(settings): removing a secret provider clears the fields that used it by @juliusmarminge in pingdotgg/t3code#31651
* docs(user): explain secret providers and secret requests by @juliusmarminge in pingdotgg/t3code#31654
* feat(server): transcribe audio on a chosen environment by @juliusmarminge in pingdotgg/t3code#30625
* feat(web): opt into environment dictation on this device by @juliusmarminge in pingdotgg/t3code#30623
* feat(desktop): dictate into browser annotations with the same consent by @juliusmarminge in pingdotgg/t3code#30624
* feat(mobile): opt in to dictation on a paired environment by @juliusmarminge in pingdotgg/t3code#31059
* fix(web): keep the folder path caret in place while editing by @juliusmarminge in pingdotgg/t3code#31642
* perf(mobile): call the highlights lexer through Nitro, up to 10x faster calls on Android by @camchis in pingdotgg/t3code#31188
* fix(claude): turns use the downloaded model catalog by @juliusmarminge in pingdotgg/t3code#31717
* fix(gitlab): bot authors are flagged as bots by @TonybynMp4 in pingdotgg/t3code#30383
* fix(gitlab): merge requests can edit their labels by @TonybynMp4 in pingdotgg/t3code#30483
* perf(mobile): faster thread sync, connects, and reconnects on bad wifi by @Bil0000 in pingdotgg/t3code#28487
* fix(mobile): iPad composer drops when the keyboard floats or minimizes by @juliusmarminge in pingdotgg/t3code#31251
* perf(mobile): stop iOS syntax highlighting from looking up a thread-local on every lexer call by @camchis in pingdotgg/t3code#31187
* fix(gitlab): edited comments wake PR watchers by @TonybynMp4 in pingdotgg/t3code#30403

## New Contributors
* @benjamin-di made their first contribution in pingdotgg/t3code#29622
* @ElliotDrel made their first contribution in pingdotgg/t3code#30983
* @DrSeedon made their first contribution in pingdotgg/t3code#30781

**Full Changelog**: pingdotgg/t3code@v0.1.8-nightly.20261105.4234...v0.1.8-nightly.20261106.4247

</details>


Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.8-nightly.20261106.4247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants