Skip to content

feat(extensions)!: normalize protocol negotiation - #3352

Merged
drew merged 5 commits into
NVIDIA:mainfrom
sjenning:feat/3057-normalize-extension-negotiation/sjenning
Sep 21, 2026
Merged

drew merged 5 commits into
NVIDIA:mainfrom
sjenning:feat/3057-normalize-extension-negotiation/sjenning

Conversation

@sjenning

Copy link
Copy Markdown
Collaborator

🏗️ build-from-issue-agent

Summary

Normalize extension startup around a shared version and capability handshake. The gateway now enforces protocol compatibility across compute drivers, credential drivers, gateway interceptors, and supervisor middleware, and exposes immutable negotiated extension snapshots through gateway info and the Go SDK.

This is a breaking wire-contract change for external extensions: peers must return protocol 1.0 metadata and the family base capability, and supervisor middleware Describe now accepts MiddlewareDescribeRequest.

Related Issue

Closes #3057

Changes

  • Added openshell.extension.v1.PeerMetadata and a shared validator supporting same-major minor skew, mutual capability requirements, and actionable rejection errors.
  • Integrated fail-fast negotiation into all four extension families, including built-in and external implementations.
  • Added sorted, non-secret startup snapshots to GetGatewayInfo, openshell gateway info, and the curated Go SDK.
  • Updated examples, generated Go bindings, schema inventory checks, architecture docs, published docs, and affected public skills.
  • Retained legacy implementation-version fields as migration compatibility fields while making the common metadata authoritative.

Deviations from Plan

The legacy version fields are documented as deprecated migration fields but do not use protobuf's [deprecated = true] option. Generated Rust accessors for deprecated fields trigger warnings under the workspace's -D warnings policy while the gateway intentionally continues populating them during migration.

Testing

  • mise run pre-commit
  • OPENSHELL_NO_BROWSER=0 mise run test
  • OPENSHELL_NO_BROWSER=0 mise run ci
  • mise run go:ci
  • mise run sdk:ts:ci (109 tests)
  • Focused extension negotiation tests
  • E2E skipped: no files under e2e/ changed

The OPENSHELL_NO_BROWSER=0 override neutralizes a shell-exported local setting that otherwise intentionally changes two unrelated OIDC rollback tests.

Tests added or updated:

  • Unit: shared validator compatibility/error cases; compute, credential, interceptor, and middleware handshake rejection/snapshot coverage; Go conversion and deep-copy coverage.
  • Integration: existing workspace integration suites passed as part of mise run test and mise run ci, including 1,551 server test-support tests.
  • E2E: N/A; the build did not modify e2e/.

Checklist

  • Follows Conventional Commits
  • Commit is signed off (DCO)
  • Breaking protocol and migration behavior documented
  • Architecture and public documentation updated

Documentation updated:

  • docs/extensibility/extension-negotiation.mdx: protocol envelope, skew policy, capabilities, migration, and inspection.
  • Extension-family and gateway reference pages: startup requirements and upgrade ordering.
  • architecture/gateway.md and architecture/compute-runtimes.md: negotiated extension boundaries and snapshots.
  • skills/debug-openshell-cluster/SKILL.md and skills/openshell-cli/SKILL.md: operator diagnostics and gateway-info output.

@sjenning
sjenning requested review from a team, derekwaynecarr and mrunalp as code owners September 15, 2026 19:14
@copy-pr-bot

copy-pr-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@sjenning sjenning self-assigned this Sep 16, 2026
@sjenning
sjenning force-pushed the feat/3057-normalize-extension-negotiation/sjenning branch from f12d10d to 9ad65e1 Compare September 16, 2026 23:05

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

The accepted issue makes this work project-valid, but the initial review found two blocking compatibility problems: deterministic credential-driver incompatibility is retried until the startup deadline, and the published migration order has no interoperable old/new pairing.

Action required: fix the two findings below, then push a new head for a focused follow-up review.

Blocking findings:

  • GATOR-9ad65e15-01: Fail immediately when a launched credential driver proves protocol incompatibility.
  • GATOR-9ad65e15-02: Define and implement a coherent mixed-version rollout contract, or document the required coordinated outage.

Carried findings:

  • None
Gator metadata
  • Validation: Project-valid through accepted issue #3057, whose negotiated-extension scope matches this PR.
  • Docs: Updated, but the migration sequence is materially inconsistent with mandatory missing-metadata rejection.
  • Checks: Current-head Branch Checks and Helm Lint are pending; the other reported gates are green.
  • E2E: test:e2e is required for gateway/supervisor and credential-flow changes after review blockers are resolved; dispatch is not started yet.
  • Head SHA: 9ad65e15efa283e00069209ff7bd43ed8de575e9
  • Base SHA: c502be9fd73c41bab25f0a88587b7a3d90c96b55
  • Merge base SHA: c502be9fd73c41bab25f0a88587b7a3d90c96b55
  • Patch ID: afcb6592f103bb232869cad6bb63c5d4019f40cd
  • Gator payload: 9
  • Review mode: initial
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:in-review

Comment thread crates/openshell-server/src/credentials.rs
Comment thread docs/extensibility/extension-negotiation.mdx Outdated
@johntmyers johntmyers added the gator:in-review Gator is reviewing or awaiting PR review feedback label Sep 16, 2026

@drew drew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for the extension-side handshake enforcement gap. The Go constant re-export is non-blocking, but worth fixing in this PR for a complete curated API.

Comment thread proto/compute_driver.proto
Comment thread sdk/go/openshell/v1/health.go
@johntmyers johntmyers added gator:blocked Gator is blocked by process or repository gates and removed gator:in-review Gator is reviewing or awaiting PR review feedback labels Sep 17, 2026
@sjenning
sjenning force-pushed the feat/3057-normalize-extension-negotiation/sjenning branch 2 times, most recently from 9ac6e0e to 7b0384c Compare September 17, 2026 19:51
@johntmyers

Copy link
Copy Markdown
Collaborator

gator-agent

Blocked

Gator is blocked because this branch conflicts with the current main branch, so the new commits cannot receive a reliable follow-up review yet.

Next action: @sjenning, please merge or rebase the current main branch into this PR branch and resolve the conflicts. Gator will then inspect the fixes for the open review findings and dispatch the required E2E workflow if review feedback is resolved.

Gator metadata
  • Head SHA: 7b0384c94adec13eacf0ff4f47a93e51845c9dbc
  • Gator payload: 9
  • Next state: gator:blocked
  • Blocked reason: merge_conflict

@sjenning
sjenning force-pushed the feat/3057-normalize-extension-negotiation/sjenning branch from 7b0384c to 874a1c8 Compare September 17, 2026 19:59

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

Thanks @sjenning. I checked the three focused remediation commits after the rebase. The merge conflict is resolved, the migration guide now clearly requires a coordinated gateway-and-extension outage, and the Go extension-kind constants are re-exported. I also checked @drew's extension-side handshake concern: the first-party handlers and examples now validate gateway metadata before accepting the peer. One carried readiness-path blocker remains.

Action required: classify a credential driver's deterministic handshake rejection, including FAILED_PRECONDITION, as terminal and cover the real RPC-status path with the immediate-failure regression test.

Blocking findings:

  • None newly introduced.

Carried findings:

  • GATOR-9ad65e15-01: A launched credential driver that rejects incompatible gateway metadata through FAILED_PRECONDITION is still treated as retryable, so startup waits for startup_timeout_secs instead of failing immediately. Preserve the tonic status through readiness classification, treat deterministic handshake statuses as terminal, and retain retries for connection or genuinely transient readiness failures.

Resolved findings:

  • GATOR-9ad65e15-02: The documentation now states that legacy-to-current migration requires coordinated gateway-and-extension downtime.
Gator metadata
  • Validation: Project-valid through accepted issue #3057, whose extension-negotiation scope matches this PR.
  • Docs: Updated with a coherent coordinated-outage migration contract.
  • Checks: Required test dispatch is deferred until the carried review blocker is resolved.
  • E2E: test:e2e is required for gateway/supervisor and credential-flow changes; it has not been dispatched yet.
  • Head SHA: 874a1c835f2057c40ab353f6cad9feea3cfbd780
  • Base SHA: 9708ba999985ca18ffec5a3310f11e4b04b615f6
  • Merge base SHA: 9708ba999985ca18ffec5a3310f11e4b04b615f6
  • Patch ID: 13ce8739b93c73dac362f6c8d52aa6bd435211cd
  • Gator payload: 9
  • Review mode: follow_up
  • Previous reviewed SHA: 9ad65e15efa283e00069209ff7bd43ed8de575e9
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:in-review

@johntmyers johntmyers added gator:in-review Gator is reviewing or awaiting PR review feedback test:e2e Requires end-to-end coverage and removed gator:blocked Gator is blocked by process or repository gates labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/3352 does not exist yet. A maintainer needs to comment /ok to test bc2c68643082283e6a47d153b62fdf994c31e029 to mirror this PR. Once the mirror exists, re-apply the label or re-run Branch E2E Checks from the Actions tab.

@johntmyers

Copy link
Copy Markdown
Collaborator

/ok to test bc2c686

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

Thanks @sjenning. I reviewed the focused credential-readiness update: deterministic RPC rejections, including FAILED_PRECONDITION, now fail immediately while connection and transient readiness failures remain retryable. The regression coverage exercises the real RPC-status path, so the last carried finding is resolved and no blocking findings remain.

Blocking findings:

  • No blocking findings remain.

Carried findings:

  • None.

Resolved findings:

  • GATOR-9ad65e15-01: The readiness loop now preserves and classifies tonic statuses, and the 30-second-timeout regression verifies an immediate failure for an incompatible driver.
Gator metadata
  • Validation: Project-valid through accepted issue #3057, whose extension-negotiation scope matches this PR.
  • Docs: Updated with the coordinated-outage migration contract; no additional docs are needed for this focused readiness fix.
  • Checks: Current-head Branch Checks and Helm Lint are queued or running.
  • E2E: test:e2e is applied; the current-head mirror exists and Branch E2E Checks is running.
  • Head SHA: bc2c68643082283e6a47d153b62fdf994c31e029
  • Base SHA: 9708ba999985ca18ffec5a3310f11e4b04b615f6
  • Merge base SHA: 9708ba999985ca18ffec5a3310f11e4b04b615f6
  • Patch ID: 4ca6982861e8dd9690753ade6cd6c082b52ad591
  • Gator payload: 9
  • Review mode: follow_up
  • Previous reviewed SHA: 874a1c835f2057c40ab353f6cad9feea3cfbd780
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:watch-pipeline

@johntmyers johntmyers added gator:watch-pipeline Gator is monitoring PR CI/CD status gator:in-review Gator is reviewing or awaiting PR review feedback gator:blocked Gator is blocked by process or repository gates and removed gator:in-review Gator is reviewing or awaiting PR review feedback gator:watch-pipeline Gator is monitoring PR CI/CD status gator:blocked Gator is blocked by process or repository gates labels Sep 17, 2026
@johntmyers johntmyers added gator:in-review Gator is reviewing or awaiting PR review feedback gator:blocked Gator is blocked by process or repository gates and removed gator:in-review Gator is reviewing or awaiting PR review feedback labels Sep 18, 2026
Closes NVIDIA#3057

Introduce a shared extension handshake, enforce protocol and capability compatibility across extension families, and expose immutable negotiated snapshots through gateway info and the Go SDK.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
Signed-off-by: Seth Jennings <sjenning@redhat.com>
@sjenning
sjenning force-pushed the feat/3057-normalize-extension-negotiation/sjenning branch from bc2c686 to effd300 Compare September 21, 2026 18:25
@johntmyers johntmyers added test:e2e Requires end-to-end coverage and removed test:e2e Requires end-to-end coverage labels Sep 21, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/3352 is at bc2c686 while the PR head is effd300. A maintainer needs to comment /ok to test effd300e6d3953c856a9f6dacbe3afd080755370 to refresh the mirror. Once the mirror catches up, re-run Branch E2E Checks from the Actions tab.

@johntmyers

Copy link
Copy Markdown
Collaborator

/ok to test effd300

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

Thanks @sjenning. I reviewed the author-only rebase adaptations against current main in critical-only mode. The earlier negotiation and migration findings remain resolved, the rebase introduces no new Critical defect, and the required current-head E2E workflow is queued.

Blocking findings:

  • No blocking findings remain.

Carried findings:

  • None.
Gator metadata
  • Validation: Project-valid through accepted issue #3057, whose extension-negotiation scope matches this PR.
  • Docs: Fern and architecture docs cover the negotiation contract and coordinated-outage migration.
  • Checks: Current-head Branch Checks, Helm Lint, and E2E are queued or pending.
  • E2E: test:e2e is applied; the mirror was refreshed for the current head and Branch E2E Checks is queued.
  • Head SHA: effd300e6d3953c856a9f6dacbe3afd080755370
  • Base SHA: fa8f6d394983b541ac31363f8a2d5ea027b08acf
  • Merge base SHA: fa8f6d394983b541ac31363f8a2d5ea027b08acf
  • Patch ID: dff0eca870e28c2d6cd646beb5578de337d86931
  • Gator payload: 9
  • Review mode: critical_only
  • Previous reviewed SHA: bc2c68643082283e6a47d153b62fdf994c31e029
  • Review budget exhausted: yes
  • Maintainer decision required: no
  • Next state: gator:watch-pipeline

@johntmyers johntmyers added gator:watch-pipeline Gator is monitoring PR CI/CD status gator:in-review Gator is reviewing or awaiting PR review feedback and removed gator:blocked Gator is blocked by process or repository gates gator:watch-pipeline Gator is monitoring PR CI/CD status labels Sep 21, 2026
@drew
drew merged commit 2493d41 into NVIDIA:main Sep 21, 2026
91 of 101 checks passed
@johntmyers

Copy link
Copy Markdown
Collaborator

gator-agent

Monitoring Complete

Monitoring is complete because this PR has merged.

Final status: Gator's current-head review had no blocking findings, and a maintainer approved the PR before merge.

I removed the active gator:* label because there is nothing left for gator to monitor on this PR.

@johntmyers johntmyers removed the gator:in-review Gator is reviewing or awaiting PR review feedback label Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(extensions)!: normalize extension version and capability negotiation

3 participants