[codex] Sync app-server protocol, service tiers, and provider startup #3036
Mergedjuliusmarmingemerged 3 commits into
main fromrefs/pull/3036/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge changed the title
- @@ -0,0 +1,13 @@1+import type { ModelSelection } from "@t3tools/contracts";2+import {3+ getModelSelectionBooleanOptionValue,4+ getModelSelectionStringOptionValue,5+} from "@t3tools/shared/model";6+7+export function getCodexServiceTierOptionValue(8+ modelSelection: ModelSelection | null | undefined,9+): string | undefined {10+ return (11+ getModelSelectionStringOptionValue(modelSelection, "serviceTier") ??12+ (getModelSelectionBooleanOptionValue(modelSelection, "fastMode") === true ? "fast" : undefined)13+ );@@ -557,10 +556,14 @@557- // Force-refresh every new/rebuilt instance in parallel and wait558- // for them all to complete. The refresh's result is piped559- // directly into `syncProvider`, so `providersRef` is populated560- // deterministically by the time this block returns — regardless561- // of PubSub subscription timing. Failures are logged and562- // swallowed so one bad driver can't wedge the whole registry.556+ // Snapshot current state without starting a probe. Managed providers557+ // launch their startup refresh independently, so this closes the558+ // subscription race without putting external work on the registry559+ // or HTTP server construction path.563560 yield* Effect.forEach(564561 newlyAdded,565562 ([, instance]) =>566- refreshOneSource(buildSnapshotSource(instance)).pipe(Effect.ignoreCause({ log: true })),563+ Effect.gen(function* () {564+ const source = buildSnapshotSource(instance);565+ const provider = yield* source.getSnapshot;566+ yield* correlateSnapshotWithSource(source, provider).pipe(567+ Effect.flatMap(syncProvider),568+ );569+ }).pipe(Effect.ignoreCause({ log: true })),
juliusmarminge merged thisae7e88b
juliusmarminge closed this
Sign in to join this conversation.



Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
c707ac43-ae7f-4c7f-bdf9-0c880c7c399dYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands and usage tips.