You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make exchange admission own ID and queue ordering - #95
Depends on #94 (adapter-scoped graph identity). This PR targets worktree-native-identity so its diff contains only the admission refactor. Review and merge the identity PR first, then retarget this PR to main and rerun CI. Do not merge either PR automatically.
Summary
Define exchange order as graph admission order, as chosen by the user, rather than entry into Exchanges::begin or connection arrival.
Extract adapter identity before admission, then assign the exchange ID and register the thread queue place in one graph-owned critical section.
Remove the caller-managed allocate-then-join protocol and keep standalone note IDs on the same counter.
Keep adapter code, project lookup, parser work, and sink writes outside the admission lock.
Preserve bounded record waits, native identity scoping, forwarding behavior, and output shapes.
Document admission order separately from the writer delivery sequence and correct stale continuation wording.
Verification
Added a deterministic Exchanges::begin regression that pauses the first identity extraction and admits another exchange on the same thread. It failed before the fix and passes afterward, checking record IDs and continuation edges.
Existing same-adapter waits, cross-adapter isolation, standalone note IDs, memory bounds, golden output and forwarding integration tests pass.
Full gate passed: 418 Rust tests plus wrapper and service shell checks, rustfmt and Clippy.
No actionable comments were generated in the recent review.
Walkthrough
Tracker now allocates exchange IDs and joins thread-bound exchanges to the thread queue during admission. Exchanges uses Tracker for begun exchanges and standalone notes. Tests cover exchange IDs and continuation edges when identity lookup pauses during admission.
Merge Risk: Minimal · up to f921a
This change makes exchange ordering follow graph admission order and keeps IDs and continuation edges consistent under concurrent admission. No actionable merge-blocking risk was identified.
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.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Stack
Depends on #94 (adapter-scoped graph identity). This PR targets worktree-native-identity so its diff contains only the admission refactor. Review and merge the identity PR first, then retarget this PR to main and rerun CI. Do not merge either PR automatically.
Summary
Verification