Skip to content

Fix: linearize callable admission with worker close - #1671

Merged
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
ChaoWao:fix/p02a-admission-linearization
Aug 4, 2026
Merged

Fix: linearize callable admission with worker close#1671
ChaoWao merged 1 commit into
hw-native-sys:mainfrom
ChaoWao:fix/p02a-admission-linearization

Conversation

@ChaoWao

@ChaoWao ChaoWao commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • publish L2 callable registrations under the lifecycle lock while the worker is NEW; registrations after initialization require the READY operation lease
  • hold the same lease across local, L2, and remote unregister operations, including child notification and remote cleanup
  • preserve registry-only unregister semantics while NEW and reject admission after close() claims the terminal lifecycle state

These rules make callable admission linearizable with close(): a callable is either fully admitted before close begins or rejected without publishing partial registry state.

Validation

  • python -m pytest tests/ut -q: 1069 passed, 13 skipped, 1 xfailed
  • ruff check and ruff format --check pass on changed files
  • pyright reports 0 errors on changed files
  • git diff --check passes

The change and its regression coverage are device-free Python paths; no hardware-specific code is modified.

L2 registration keeps NEW publication under the lifecycle lock.

Every post-start unregister uses the READY-only operation lease.

Race tests cover local and remote crossover paths with a hard timeout.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ChaoWao, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c55868a-d49f-4267-9b18-443e1ee65be4

📥 Commits

Reviewing files that changed from the base of the PR and between 8c5d2ae and cffc40e.

📒 Files selected for processing (2)
  • python/simpler/worker.py
  • tests/ut/py/test_worker/test_admission_fence.py

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

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

@ChaoWao ChaoWao changed the title Fix: close remaining P0.2-a admission races Fix: linearize callable admission with worker close Aug 4, 2026
@ChaoWao
ChaoWao merged commit d95514b into hw-native-sys:main Aug 4, 2026
18 checks passed
@ChaoWao
ChaoWao deleted the fix/p02a-admission-linearization branch August 4, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant