GeezerVison is showing github.com (truncated) — fix(server): stop event subscribers before closing the database by maria-rcks · Pull Request #27831 · pingdotgg/t3code
Conversation
ProjectSettingsUpgrade.integration.test.ts intermittently passes its assertions and then fails removing its temporary directory with ENOTEMPTY. the orchestrator's two detached event-subscriber fibers outlive server-layer teardown; their startup queries can open sqlite readers that recreate statev2.sqlite-wal and statev2.sqlite-shm during cleanup.
replace both forkDetach calls with forkScoped, so teardown interrupts and awaits the subscribers before closing sqlite. this is a two-line product fix with no test timing changes.
verification in one blacksmith worker:
- unchanged main (
4fb9e5d34e83): 0/30 failures; late sqlite reader warnings in 15/30 runs.
- candidate: 0/30 failures; late sqlite reader warnings in 0/30 runs.
- one additional traced run per version passed, making 0/31 failures before and 0/31 after. the baseline trace showed a reader recreating both sqlite sidecars after the main connection unlinked them; the candidate trace showed no sidecar recreation after shutdown. the intermittent cleanup failure itself did not reproduce in these runs.
- all 102 runtime-layer tests passed.
vp run check:changed passed format, lint, knip, graphql generation checks, typechecks, and 16 tests.
Written by gpt-6.1-sol via T3 Code on behalf of Maria
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at f6e1229
Macroscope's review found this PR approvable — The two event subscribers now stop with the orchestrator instead of remaining detached during shutdown. Event processing logic is unchanged, and the change is limited to service lifecycle cleanup.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Thread transfer impact
✅ Thread transfer remains within every enforced ceiling.
| Provider |
Metric |
Main baseline |
This PR |
Impact |
PR ceiling |
|
| Codex |
Total thread wire |
5.0 KiB |
5.0 KiB |
−29 B (−0.6%) |
6.8 KiB |
✅ |
| Codex |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Codex |
Live turn WebSocket wire |
1.2 KiB |
1.2 KiB |
−29 B (−2.3%) |
2.0 KiB |
✅ |
| Codex |
Live turn WebSocket decoded |
21.6 KiB |
21.5 KiB |
−41 B (−0.2%) |
24.4 KiB |
✅ |
| Codex |
Live turn messages |
2 |
1 |
−1 (−50.0%) |
8 |
✅ |
| Claude |
Total thread wire |
5.0 KiB |
5.0 KiB |
0 B (0.0%) |
6.8 KiB |
✅ |
| Claude |
Thread snapshot wire |
3.8 KiB |
3.8 KiB |
0 B (0.0%) |
4.9 KiB |
✅ |
| Claude |
Live turn WebSocket wire |
1.3 KiB |
1.3 KiB |
0 B (0.0%) |
2.0 KiB |
✅ |
| Claude |
Live turn WebSocket decoded |
21.9 KiB |
21.9 KiB |
0 B (0.0%) |
24.4 KiB |
✅ |
| Claude |
Live turn messages |
2 |
2 |
0 (0.0%) |
8 |
✅ |
Baseline: c6ef3b4 · PR result: f6e1229 · Source CI: success
Scenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

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 c6ef3b4 and f6e1229.
Files selected for processing: 1
-
apps/server/src/orchestration-v2/Orchestrator.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
-
The orchestrator now forks the run-update and delegated-child-work stream consumers in its enclosing Effect scope instead of detaching them.
Changes: Orchestrator lifecycle
| Layer / File(s) |
Summary |
Scope event consumers apps/server/src/orchestration-v2/Orchestrator.ts |
The handleRunUpdate and delegated-child-work stream consumers now use Effect.forkScoped instead of Effect.forkDetach. |
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#24469: This PR changes related run-update and subagent event reactors. PR
#27831 changes the lifecycle scope of two orchestrator event-consumer fibers.
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to f6e12
-
No actionable merge-blocking risk is established; the lifecycle change addresses shutdown ordering without a demonstrated regression.
Pre-merge checks: 3 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Description check |
 |
The description clearly explains the problem, the two-line implementation change, and detailed verification results. It does not provide the required scope and approval information or explain why this… |
Add a Scope and approval section. Link the triaged issue or maintainer approval, or explain why this focused fix addresses an obvious bug and does not require prior approval. |
Passed checks: 3 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly identifies the server fix: stopping event subscribers before database closure. It is concise and uses conventional commit format. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description clearly explains the problem, the two-line implementation change, and detailed verification results. It does not provide the required scope and approval information or explain why this focused fix qualifies without a linked issue or approval.
Resolution
Add a Scope and approval section. Link the triaged issue or maintainer approval, or explain why this focused fix addresses an obvious bug and does not require prior approval.
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
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|