Skip to content

feat(supervisor): push gateway desired state - #2967

Closed
pimlock wants to merge 2 commits into
mainfrom
feat/1731-desired-state-prep/pimlock
Closed

feat(supervisor): push gateway desired state#2967
pimlock wants to merge 2 commits into
mainfrom
feat/1731-desired-state-prep/pimlock

Conversation

@pimlock

@pimlock pimlock commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implement issue #1731 in one PR. Replace supervisor polling for gateway-owned desired state with bootstrap and correlated ConfigUpdate snapshots over ConnectSupervisor.

This PR is a draft while the protocol, startup ordering, update application, reconciliation, polling removal, tests, and documentation are completed.

Related Issue

Closes #1731

Planned Changes

  • Rename the existing config, provider-environment, and inference response messages as reusable snapshot types.
  • Carry a complete bootstrap in SessionAccepted and gate initialization on its result.
  • Deliver later component snapshots through correlated, sequenced ConfigUpdate messages.
  • Add bounded owner reconciliation and immediate invalidation.
  • Preserve standalone and local-override behavior.
  • Remove obsolete supervisor polling and internal provider/inference fetch RPCs.
  • Update architecture and compatibility documentation.

Excluded

Changing deployment defaults for supervisor:latest is not part of this PR.

Testing

Work in progress. Final verification will include focused protocol/runtime tests, mise run pre-commit, mise run test, relevant sandbox E2E coverage, and mise run ci.

Checklist

  • Implementation complete
  • Documentation updated
  • Pre-commit passes
  • Unit and integration tests pass
  • Relevant E2E coverage passes
  • Full CI passes

@github-actions

Copy link
Copy Markdown

@pimlock
pimlock force-pushed the feat/1731-desired-state-prep/pimlock branch from 5668d78 to a3e9722 Compare August 26, 2026 21:32
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@pimlock
pimlock marked this pull request as draft August 26, 2026 22:15
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@pimlock pimlock self-assigned this Aug 26, 2026
@pimlock pimlock changed the title refactor(supervisor): prepare desired-state snapshots feat(supervisor): push gateway desired state Aug 26, 2026
@pimlock
pimlock force-pushed the feat/1731-desired-state-prep/pimlock branch from a3e9722 to ba19ea3 Compare August 26, 2026 22:26
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@pimlock

pimlock commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test 1ab15bf

@lbelyaev

lbelyaev commented Sep 2, 2026

Copy link
Copy Markdown

The bootstrap-gates-initialization model is a real improvement over the fetch-and-continue path — requiring provider_environment in ConfigBootstrap closes the empty-start-on-fetch-failure case cleanly.

One thing worth surfacing while the readiness semantics are still open: handle_result classifies ConfigApplyOutcome::Degraded as terminal_success, so a provider-environment component that applies Degraded still advances applied_revision and lets the session reach initialized/ready — the same path a clean Applied takes. Failed/Unsupported are correctly excluded, so the intent to proceed-on-degraded looks deliberate. The gap is that once it's folded into applied_revision, nothing downstream can distinguish a fully-applied provider environment from a degraded one: a consumer gating on Ready (or on the applied revision) sees success in both cases.

Would it be worth carrying the per-component outcome through to an observable signal — either surfacing provider_environment_outcome alongside the applied revision, or a readiness condition that only holds when the provider environment applied Applied (not Degraded)? For anything that needs provider credentials in place before it dispatches, "Ready" currently can't express "Ready, but provider state is degraded," and a bounded pre-dispatch retry is the only client-side workaround. A deterministic E2E that asserts a Degraded provider apply is visibly distinguishable from Applied would pin it.

@pimlock

pimlock commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #3244, which implements Stage 1 of the revised rollout for #1731. The gateway sends full configuration snapshots while supervisor polling remains authoritative. Stage 2 will apply snapshots and acknowledge revisions; Stage 3 will add durable completion semantics and remove polling. Closing this all-in-one draft in favor of the staged implementation. Replacement: #3244

@pimlock pimlock closed this Sep 9, 2026
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.

Push gateway-owned desired state to supervisors

2 participants