Skip to content

fix(coordinator): preserve model aliases after validation read failures - #931

Closed
Gajesh2007 wants to merge 4 commits into
masterfrom
fix/model-alias-read-errors
Closed

Gajesh2007 wants to merge 4 commits into
masterfrom
fix/model-alias-read-errors

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Transient model-registry reads currently fall through as if the alias or concrete ID did not exist. A following write can succeed, dropping rollout history, replacing an OpenRouter-only alias through the standard endpoint, creating an alias over a concrete model ID without takeover, or registering a concrete build over an existing alias.

Both alias upsert endpoints and concrete model registration now stop before writing when namespace validation fails. Registration also stops before fetching artifacts. Standard upserts also require a successful prior-alias read, and distinguish failed member reads (500) from confirmed missing builds (400). The duplicated desired/previous validation follows one ordered loop; the error-swallowing priorAlias helper is removed. Existing successful updates, takeover rules, endpoint ownership and missing-ID behavior remain covered by the alias tests.

flowchart LR
  subgraph Before
    A[Alias upsert or model registration] --> B[Namespace or priorAlias read fails]
    B --> C[Assume missing]
    C --> D[Alias or concrete model write succeeds]
    D --> E[200 with lost lineage or conflicting ownership]
  end
  subgraph After
    F[Alias upsert or model registration] --> G[Check namespace and prior alias errors]
    G -->|Store failure| H[500 before any write]
    G -->|Successful read or confirmed namespace miss| I[Validate ordered desired and previous members]
    I -->|Store failure| H
    I -->|Missing member| J[400]
    I -->|Valid| K[Existing ownership checks then appropriate write]
  end
Loading

Validation:

  • Added seven fault-injection cases with an available backing store. On the baseline, four return 200 and mutate persisted aliases; two return a misleading 400. All now return 500. The reverse registration regression also previously fetched two artifacts and created the colliding concrete model; it now preserves the namespace and performs no fetch.
  • GOTOOLCHAIN=go1.25.0 go test -race ./api -run 'Test.*(Alias|DesiredModels)' -count=1 passed (5.406s), including existing creation, takeover, missing-member, lineage, OpenRouter and desired-model publication cases.
  • Additional registration/alias/desired-model race coverage passed after the reverse-guard fix (3.674s).
  • scripts/docs-check.sh --all passed (278 pages); current Markdown has no references to the removed helper.
  • GOTOOLCHAIN=go1.25.0 go test ./... passed for the full coordinator (API package 194.207s); CI also validates the published branch.

This change addresses validation-read failures. It does not change alias deletion ordering or claim transactional serialization across coordinator processes.

@vercel

vercel Bot commented Sep 12, 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 12, 2026 12:39am UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 12:39am UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 12:39am UTC

Request Review

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-12T00:43:45.253638Z a6de519 Manual request
ℹ️ 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
Gajesh2007 marked this pull request as ready for review September 12, 2026 00:12
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review — also includes reverse model registration namespace guard and its reproduced write-through regression at source 88e9bae.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: a6de519a16

ℹ️ 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 (a6de519a164a9d6b0c04229d26e7d68369032ad1), 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 — a6de519a Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — a6de519a Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — a6de519a Deployed Sep 12, 2026 by vercel[bot]
benchmarks — a6de519a Deployed Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1025
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