GeezerVison is showing github.com — fix(server): keep Pi notification identities distinct across threads by aliceisjustplaying · Pull Request #15791 · pingdotgg/t3code
Conversation
Two Pi threads can emit notifications or extension errors at the same per-turn item ordinal. Persisted turn-item and node ids derive from the driver and native item id only, so one thread's notification overwrote the other's.
The notify: and extension-error: native ids now carry the provider-turn id, the same pattern the adapter already uses for compaction: and terminal-failure: items. No consumer parses these ids, and each notification is a one-off item, so already-persisted ids need no migration.
Taken over from @aliceisjustplaying's original change, which identified the bug and the fix. The takeover merged main (the adapter moved to packages/provider-pi), ported the two lines into the moved adapter, and trimmed the regression test to one case in adapter.test.ts: two threads each emit a notification and an extension error, and all four persisted ids must differ. The test fails with expected 2 to equal 4 when either prefix is removed.
Verification (headless Linux):
vp test run packages/provider-pi/src/server/adapter.test.ts: 94 passed
tsc-rs --noEmit in packages/provider-pi: clean
- Two independent reviews (Claude Opus 5.5 and Codex GPT-6-Sol) found no issues.
Not verified: a live Pi session (Pi is not installed on this host), or native macOS, Windows, iOS, Android and Electron desktop runs. This changes server identities only; screenshots do not demonstrate the behavior.
Maintainer takeover by Claude Fable 5.1 in Claude Code via T3 Code.
🤖 Generated with Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
kushaldotdev reacted with thumbs up emoji
…eir turn
Turn item and node ids derive from the driver and native item id alone. The Pi
adapter named notify and extension-error items `notify:<ordinal>` and
`extension-error:<ordinal>`, and every thread's first turn starts at the same
ordinal, so an item in one thread overwrote or took over the item with the same
name in another. Both now carry the provider turn id, as compaction items do.
coderabbitai
Bot
commented
Oct 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Warning
Review limit reached
Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.
Next included review available in 12 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used all 10 included reviews currently available.
Learn how review limits work.
Review configuration:
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
915b124a-01cb-46a7-adba-36e0281388d0
📥 Commits
-
Reviewing files that changed from the base of the PR and between ae913cb and 7c24194.
📒 Files selected for processing: 2
-
packages/provider-pi/src/server/adapter.test.ts
packages/provider-pi/src/server/adapter.ts
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
47365979-6094-4160-8cfc-9b90b10b22af
📥 Commits
-
Reviewing files that changed from the base of the PR and between efecd3c and ae913cb.
📒 Files selected for processing (2)
-
apps/server/src/orchestration-v2/Adapters/PiAdapterV2.test.ts
apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
📝 Walkthrough
-
Notification and extension-error item IDs now include the active provider-turn ID and item ordinal. A regression test checks that items from two threads have unique IDs and remain associated with their respective threads.
Changes: PiAdapterV2 item identity
| Layer / File(s) |
Summary |
Create turn-scoped item IDs apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts, apps/server/src/orchestration-v2/Adapters/PiAdapterV2.test.ts |
Notification and extension-error item IDs now include the provider-turn ID and item ordinal. A regression test verifies that four items from two threads have distinct IDs and belong to the correct threads. |
Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
Merge Risk: ⚪ Minimal · up to ae913
-
No actionable issue remains; the change is mergeable after normal checks.
### Architecture Summary
Architecture risk: 🔵 Low · up to ae913
The change affects 1 system.
Changed systems: apps/server
Architecture concerns
No architecture-level concerns identified.
Review details
-
Systems and components
- observed — apps/server (service) was modified; 2 changed files map to changed impact.
Before / after behavior
- observed — Modified behavior in apps/server/src/orchestration-v2/Adapters/PiAdapterV2.test.ts: Adds a two-thread regression test for item identity: each thread receives a
notify and an extension_error during its first turn, and the test checks that each emitted item is associated with the current thread and all four item IDs are unique.
- observed — Modified behavior in apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts: Notification items now use a native ID containing the provider-turn ID and next item ordinal; previously, the ID contained only the ordinal.
- observed — Modified behavior in apps/server/src/orchestration-v2/Adapters/PiAdapterV2.ts: Extension-error items now use a native ID containing the provider-turn ID and next item ordinal; previously, the ID contained only the ordinal.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Docstring Coverage |
 |
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. |
| 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. |
| Title check |
 |
The title clearly and concisely identifies the server fix that keeps Pi notification identities distinct across threads. |
| Description check |
 |
The description covers the problem, fix, scope, regression test, verification results, and verification limits. It also explains the focused bug fix and takeover context. |
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autopilot · 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.
macroscopeapp
Bot
commented
Oct 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at b87748d
Macroscope's review found this PR approvable — This is a narrowly scoped server bug fix: notification and extension-error IDs now include the provider-turn identity, preventing cross-thread collisions, with a two-thread regression test. It does not change product defaults or static-analysis configuration, and the adapter’s content and control flow remain unchanged.
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.
|
Heads-up: this is now conflicting with main (mergeable: false) after Pi moved into packages/provider-pi (#17302) and the provider refactors that followed (#17542, #17427, #17381, #17375).
Would you be able to rebase and push? Macroscope's verdict was recorded against the old head, so a new push restarts the review path. Both notification PRs are in the same state; rebasing them as a pair should be enough.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note Written by claude-opus-5-5 on behalf of Maria
Hi! We are cleaning up open PRs, and this one appears to have been created with an older model (gpt-6). If this change is really important, we recommend rebuilding the PR with a newer model if possible.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note Written by claude-opus-5-5 on behalf of Maria
Reopening, this was closed by mistake. Sorry for the noise!
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Taking over this one to bring it up to date with the Pi adapter's move into packages/provider-pi. Thanks @aliceisjustplaying.
|
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.
Uh oh!
There was an error while loading. Please reload this page.
Labels
macroscope-review
Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|