Skip to content

Make exchange admission own ID and queue ordering - #95

Merged
archae0pteryx merged 2 commits into
mainfrom
worktree-admission-order
Nov 13, 2026
Merged

archae0pteryx merged 2 commits into
mainfrom
worktree-admission-order

Conversation

@archae0pteryx

Copy link
Copy Markdown
Contributor

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

  • 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.

@archae0pteryx

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@archae0pteryx
archae0pteryx added this pull request to stack #96 November 13, 2026 18:48
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Share

@archae0pteryx

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

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.

Base automatically changed from worktree-native-identity to main November 13, 2026 22:59
@archae0pteryx
archae0pteryx force-pushed the worktree-admission-order branch from a2194f9 to a41032d Compare November 13, 2026 22:59
@archae0pteryx
archae0pteryx merged commit a13b34b into main Nov 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant