Skip to content

Rename SchedulingScope -> CallbackDispatchScope, SCHEDULING_KEY -> DISPATCH_KEY - #51

Merged
ya-luotao merged 1 commit into
mainfrom
refactor/callback-dispatch-scope
Jul 31, 2026
Merged

Rename SchedulingScope -> CallbackDispatchScope, SCHEDULING_KEY -> DISPATCH_KEY#51
ya-luotao merged 1 commit into
mainfrom
refactor/callback-dispatch-scope

Conversation

@ya-luotao

Copy link
Copy Markdown
Owner

Follow-up to the v0.25–v0.27 adversarial release audit (fixes landed in 6e4d9c8). Codex's non-blocking design concern: since callback_wrapper (#47 phase 2) the scope object carries an inseparable (scheduling mode, wrapper) dispatch pair, so the name SchedulingScope undersells what it invalidates.

Pure rename, no behavior change — both names are @api private:

  • FiberBoundary::SchedulingScopeFiberBoundary::CallbackDispatchScope
  • FiberBoundary::SCHEDULING_KEYFiberBoundary::DISPATCH_KEY (fiber-storage symbol value updated to :claude_agent_sdk_callback_dispatch in lockstep)
  • 22 replacements across fiber_boundary.rb / query.rb / sdk_mcp_server.rb / two specs / CLAUDE.md; docs/rails.md and docs/sessions.md grep-verified clean of the old names

Verification: 1210 examples, 0 failures; RuboCop 64 files, no offenses.

Note: independent of #52 (both branch from 6e4d9c8); whichever merges second has a small mechanical conflict in the shared fiber_boundary.rb/query.rb region — resolve by using the new names inside the extracted helper.

🤖 Generated with Claude Code

https://claude.ai/code/session_019Manwfh1GRrJtQfgTm1dtt

…SPATCH_KEY

Since callback_wrapper (#47 phase 2) the fiber-storage scope carries the
(scheduling mode, wrapper) dispatch pair, not just the mode — name the
carrier and its key after what they hold. Both are @api private, so the
rename is safe. The fiber-storage symbol value follows suit
(:claude_agent_sdk_callback_dispatch), comments and CLAUDE.md updated,
and the restore local in Query#handle_sdk_mcp_request is now
previous_dispatch. No behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QFYekWo9xbMekqyu4Qj6Dk
@ya-luotao
ya-luotao merged commit 4704e2e into main Jul 31, 2026
3 checks passed
@ya-luotao
ya-luotao deleted the refactor/callback-dispatch-scope branch July 31, 2026 12:44
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