Skip to content

fix(server): await catalog readiness for reads#36131

Open
harshmathurx wants to merge 1 commit into
anomalyco:v2from
harshmathurx:catalog-ready
Open

fix(server): await catalog readiness for reads#36131
harshmathurx wants to merge 1 commit into
anomalyco:v2from
harshmathurx:catalog-ready

Conversation

@harshmathurx

Copy link
Copy Markdown

Issue for this PR

Closes #36117

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Makes the public catalog read handlers wait for the existing plugin readiness barrier before returning successful catalog snapshots:

  • /api/model now waits for the same bounded catalog readiness path as /api/model/default.
  • /api/provider and /api/provider/{providerID} also wait for plugin readiness before reading provider availability.
  • Readiness timeout remains explicit via ServiceUnavailableError instead of returning a successful partial catalog.

This keeps cold-start provider/model reads from treating intermediate plugin/catalog state as authoritative.

@kitlangton tagging you since you authored the issue and the repro. Could you assign #36117 to me if this matches the intended fix direction?

How did you verify your code works?

  • Ran git diff --check.
  • Attempted the linked focused regression command from packages/server; this branch does not currently include test/catalog-readiness.test.ts, so Bun reported that the filter matched no files.
  • Attempted bun run typecheck from packages/server; blocked locally because dependencies/tooling are unavailable (tsgo: command not found) after the repo dependency install is blocked by the private/403 ghostty-web dependency.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally where possible
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@harshmathurx

Copy link
Copy Markdown
Author

Hi @kitlangton — pinging you on this since it's been a couple of days with no maintainer response. The issue is linked in the PR description and all automated checks are green, but the PR is still waiting on review/merge. Could you take a look when you have a chance? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant