Skip to content

refactor(coordinator): give provider challenges a connection owner - #1028

Closed
Gajesh2007 wants to merge 7 commits into
refactor/coordinator-codeidentity-ownerfrom
refactor/coordinator-provider-challenges
Closed

Gajesh2007 wants to merge 7 commits into
refactor/coordinator-codeidentity-ownerfrom
refactor/coordinator-provider-challenges

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Provider challenge transport, nonce tracking and verification were embedded in api/provider.go. This gives each provider connection a challenge.Session and moves the ordered checks into challenge.Verifier, with separate files for transport, signatures, posture, integrity and failure handling. The API retains registration, heartbeat processing and connection teardown, and supplies current registry, policy, trust and scheduler dependencies.

Stacked on #1023 (refactor/coordinator-codeidentity-owner).

Before

flowchart TD
  A[Provider WebSocket] --> B[API read loop and private tracker]
  B --> C[Server challengeLoop and sendChallenge]
  C --> D[Control-lane nonce and timestamp]
  D --> A
  A --> E[API reply delivery into tracker]
  E --> F[Server verifyChallengeResponse]
  F --> G[Signatures, posture, binary and model hashes]
  G --> H[Current runtime, version and capability policy]
  H --> I[Evidence, hash publication, success and trust reuse]
  F --> J[Existing transient or hard failure handling]
Loading

After

flowchart TD
  A[Same provider WebSocket] --> B[API owns registration and teardown]
  B --> C[One challenge.Session per connection]
  C --> D[Run and control-lane send; private pending nonces]
  D --> A
  A --> E[Session.Deliver matches only its pending nonce]
  E --> F[Verifier uses coordinator-created expected values]
  F --> G[Signature, posture and integrity owners in the same order]
  G --> H[Same live policy and capability callbacks]
  H --> I[Same evidence, hash publication, success and trust reuse]
  F --> J[Same failure accounting and reconnect thresholds]
  B --> K[Existing context cancellation stops the session]
Loading

The nonce is removed on delivery, timeout or cancellation. Expected nonce/timestamp values come from the issuing session, not the reply. The verifier still clears application evidence before checking signatures, refreshes model hashes before success can drain queued requests, and performs trust-reuse/scheduler settlement afterward. Missing legacy status signatures remain advisory; invalid signatures retain their existing failure handling. The five-minute interval, thirty-second response timeout, five-second control write and reconnect threshold remain unchanged.

All existing fixtures remain at the API boundary. A test-only adapter lets the direct verifier fixtures call the real owner without duplicating nonce state. The new two-connection WebSocket/P-256 fixture proves that one connection cannot consume another's challenge and that replay does not add a success. It passes against the original implementation; sharing the tracker across connections makes it fail at the intended assertion.

Validation:

  • Compile and 58 focused top-level / 68 including-subtest race cases pass.
  • Full Go 1.25 coordinator race suite passes: 3,346 top-level / 5,662 including subtests; 106 existing database/live/opt-in skips are recorded separately.
  • Sixteen extracted operation/gate comparisons and all 44 retained provider declarations match original tokens under the named boundary mappings. The other 1,174 original coordinator files are byte-identical, and all 3,511 prior test/benchmark/fuzz/example entries remain.
  • Independent source review is clean. The final source follow-up only regroups imports; its import set and every byte outside that block are unchanged from the passing test source.
  • Pinned golangci-lint 2.1.6 reports zero issues. Build, maintained documentation checks and YAML validation are recorded in the final handoff.

Documentation follows the new owners and corrects old descriptions of existing failure behavior: runtime policy can exclude routing without changing hardware trust, and RDMA enablement alone does not fail a challenge. No production policy, wire schema, cryptography, model runtime or dependency pins change. No Apple service, provider executable, model or live database was used.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 14, 2026 7:02pm UTC
d-inference-console-ui-dev Ready Ready Preview Sep 14, 2026 7:02pm UTC
d-inference-landing Ready Ready Preview Sep 14, 2026 7:02pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T19:06:57.256325Z 03e3210 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Parent refresh at da47f42f9e includes the reviewed #1017 test race fix: retry delays remain at their existing production values, and four tests no longer override shared timing variables. The trust-reuse race suite passes (46 top-level tests; 60 including subtests), plus 40 repeated executions of the failing pair across CPU settings. The propagation was checked against the exact four-file patch.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: da47f42f9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 7685e0bdd3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…/coordinator-provider-challenges

# Conflicts:
#	docs/architecture/security/attestation.md
#	docs/developer/build.md
#	docs/developer/test.md
#	docs/reference/protocol-messages.md
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Refreshed the parent branch and resolved documentation/source-map conflicts. Existing subsystem implementations and regression tests are preserved. Exact parent composition and independent review pass; all coordinator test packages compile and documentation checks pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 03e3210d56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head (03e3210d5663a7ac1f39c416582b34fdf9d60612), including its reviewed fixes, with implementations and regressions reconciled into the coordinator subsystem owners. Closing the component PR to collapse the stack; its branch, commits and review history are retained. Follow #1056 for combined validation and merge status.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference-console-ui-dev — 03e3210d Deployed Sep 14, 2026 by vercel[bot]
Preview – d-inference — 03e3210d Deployed Sep 14, 2026 by vercel[bot]
Preview – d-inference-landing — 03e3210d Deployed Sep 14, 2026 by vercel[bot]
benchmarks — 03e3210d Deployed Sep 14, 2026 by Gajesh2007 via E2E Benchmarks #1306
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