feat(assignments): Add assignment_type to network state, to guide consumers which one should be used - #222
Merged
define-null merged 1 commit intoAug 20, 2026
Conversation
A migrating state publishes both the combined and the split assignments so consumers that predate the split keep working; assignment_type tells the rest which to read, and resolve() takes an override to pin a consumer either way. Absent means legacy, so states published before the field still parse. Split blobs move to NetworkAssignmentV2: no effective_from (nothing read it), one required fb_url instead of url/fb_url/fb_url_v1, free-form version. Split mode isn't in production yet, so that wire change costs nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
define-null
deleted the
defnull/introduce-global-assignment-type-switch
branch
August 20, 2026 09:26
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is this PR about?
Once workers and portals support both combined and split assignments, choosing between them should be an explicit state decision rather than an artifact of what each component happens to have deployed.
This change publishes assignment_type, allowing us to switch modes—or roll back—by updating state instead of redeploying. resolve() also accepts an override so an individual consumer can be pinned to a specific assignment type. If assignment_type is absent, behavior remains unchanged and existing states continue to use the legacy path.
For split assignments, blobs now use NetworkAssignmentV2. The new format removes the unused effective_from field and replaces the url / fb_url / fb_url_v1 variants with a single url plus an explicit version. Since split mode is not live yet, this is a backwards-compatible cleanup with no migration cost.