Skip to content

feat(assignments): Add assignment_type to network state, to guide consumers which one should be used - #222

Merged
define-null merged 1 commit into
mainfrom
defnull/introduce-global-assignment-type-switch
Aug 20, 2026
Merged

define-null merged 1 commit into
mainfrom
defnull/introduce-global-assignment-type-switch

Conversation

@define-null

@define-null define-null commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

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.

  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
define-null merged commit f38fb09 into main Aug 20, 2026
3 checks passed
@define-null
define-null deleted the defnull/introduce-global-assignment-type-switch branch August 20, 2026 09:26
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