Skip to content

Fix ActorClass channel numbering for dynamic workers.#6720

Merged
kentonv merged 1 commit into
mainfrom
kenton/fix-dynamic-actor-class-numbering
May 4, 2026
Merged

Fix ActorClass channel numbering for dynamic workers.#6720
kentonv merged 1 commit into
mainfrom
kenton/fix-dynamic-actor-class-numbering

Conversation

@kentonv

@kentonv kentonv commented May 4, 2026

Copy link
Copy Markdown
Member

If a Dynamic Worker received actor classes in its env they would be assigned incorrect channel numbers, making them inoperable or sometimes even mixing them up.

Bug was found by an autonomous bug-finding agent based on Kimi.

If a Dynamic Worker received actor classes in its `env` they would be assigned incorrect channel numbers, making them inoperable or sometimes even mixing them up.

Bug was found by an autonomous bug-finding agent based on Kimi.
@kentonv kentonv requested review from a team as code owners May 4, 2026 17:35
@ask-bonk

ask-bonk Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

The fix is clearly correct. The non-dynamic code path at line 4041 correctly uses actorClassChannels.size() for the actor class channel number, while the dynamic worker path at line 4309 (previously 4308) had a copy-paste bug using subrequestChannels.size() instead. The test is well-designed — it adds a second actor class (envGreeter2) and a subrequest channel (someSubrequestChannel) to the env, which would expose the off-by-one/misassignment bug since subrequestChannels.size() would return a different value than actorClassChannels.size() when both types are present.

LGTM

github run

@kentonv kentonv enabled auto-merge May 4, 2026 17:36
@kentonv kentonv merged commit 429c606 into main May 4, 2026
25 checks passed
@kentonv kentonv deleted the kenton/fix-dynamic-actor-class-numbering branch May 4, 2026 17:52
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.

2 participants