diff --git a/playwright.config.ts b/playwright.config.ts index c046e2d21..be75f3589 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -279,13 +279,6 @@ export default defineConfig({ "setup-flow-a11y.spec.ts", "setup-flow-connect.spec.ts", "setup-flow-locale-overflow.spec.ts", - // The shared-provider offer journey states INSTANCE-wide facts to - // reason about: it writes the operator key into `app_settings` and - // replaces every `provider_health` row for both shared tags, then - // puts both back. Serial mode only orders tests inside one file, so - // a second project would hold and clear that state underneath the - // first — and underneath any other spec that reads AI availability. - "onboarding-ai-offer.spec.ts", // The delegated-writes journey invites, accepts and revokes between // its own two accounts. A second project would send a second invitation // between the same pair while the first is live, and meet the 409. diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 80f3d5962..d5943dc37 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -7240,8 +7240,8 @@ model CoachFact { // `status` is an APP-SIDE closed enum (NOT a DB enum, to keep the migration // purely additive): proposed | active | met | abandoned | review_due | reviewed. // The last two are the v1.22 (W9, C2) n-of-1 experiment lifecycle: an -// "experiment" is just a CoachPlan with a reviewDate; when the review fires and -// the read-back is generated, `outcomeEncrypted` carries the grounded result. +// "experiment" is just a CoachPlan with a reviewDate; the review only moves the +// status. `outcomeEncrypted` is no longer written or read (see the column). model CoachPlan { id String @id @default(cuid()) userId String @map("user_id") @@ -7260,9 +7260,10 @@ model CoachPlan { status String @default("proposed") // Optional review checkpoint the Coach can recall ("how did this go by …"). reviewDate DateTime? @map("review_date") - // v1.22 (W9, C2) — the n-of-1 read-back prose, grounded in the user's own - // before/after numbers and encrypted at rest like the cue/action. Written - // once when an experiment's review is processed; surfaced behind a flag. + // v1.22 (W9, C2) — the n-of-1 read-back prose an experiment's review used + // to write, encrypted at rest like the cue/action. Nothing writes or reads + // it now; older rows stay, rotated with the key and carried by the backup. + /// @internal: kept for rows written before the review stopped writing it. outcomeEncrypted Bytes? @map("outcome_encrypted") // Provenance — nullable so a future manual-entry surface can leave it null. sourceConversationId String? @map("source_conversation_id") diff --git a/src/components/settings/ai/shared.ts b/src/components/settings/ai/shared.ts index 02e763029..da8255efa 100644 --- a/src/components/settings/ai/shared.ts +++ b/src/components/settings/ai/shared.ts @@ -127,8 +127,8 @@ export const LOCAL_MODEL_PRESETS = [ export const CUSTOM_MODEL_SENTINEL = "__custom__"; /** - * Map UI provider tag → the `aiProvider` enum understood by the - * legacy single-result `resolveProvider()` resolver. `codex` and + * Map UI provider tag → the stored `aiProvider` enum, the provider picked + * under Settings, AI. `codex` and * `admin-openai` aren't user-level provider columns (they're handled * by Codex OAuth + admin-key fallback), so they map to null and the * legacy column is left blank. diff --git a/src/lib/ai/mock-client.ts b/src/lib/ai/mock-client.ts index 1b596662b..59e61a9e5 100644 --- a/src/lib/ai/mock-client.ts +++ b/src/lib/ai/mock-client.ts @@ -18,8 +18,8 @@ import { reasoningTitleOf } from "./reasoning/support"; * never hit the network. * * The mock is exported from `src/lib/ai/` so any test can import it, - * but it is NOT registered in `resolveProvider()` — the production - * path must never reach it. + * but no provider resolver returns it: the production path must never + * reach it. */ export interface MockAIProviderOptions { /** Provider tag returned in `CompletionResult.providerType`. Defaults to "local". */ diff --git a/src/lib/ai/provider.ts b/src/lib/ai/provider.ts index 11b5b90b0..4f55ed9c2 100644 --- a/src/lib/ai/provider.ts +++ b/src/lib/ai/provider.ts @@ -711,7 +711,7 @@ async function resolveAdminCodexProvider(): Promise { } /** - * Resolve the AI provider for a given user. + * Test-only, ignoring the chain's switches: use `resolveProviderChain`. * * Priority: * 1. User selected ANTHROPIC / LOCAL with valid creds → that provider. @@ -840,7 +840,7 @@ export async function resolveProviderChain( aiResponseTimeoutSeconds: true, }, }); - // See `resolveProvider`: every instance carries the record's settings. + // Every instance carries the record's timeout and reasoning effort. const bind = (provider: AIProvider): AIProvider => bindReasoningEffort( bindResponseTimeout(provider, userRow?.aiResponseTimeoutSeconds), diff --git a/src/lib/ai/vision-capability.ts b/src/lib/ai/vision-capability.ts index 2617f2f1b..9b8be711d 100644 --- a/src/lib/ai/vision-capability.ts +++ b/src/lib/ai/vision-capability.ts @@ -66,8 +66,8 @@ function openAIFamilySupportsVision(model: string): boolean { /** * Logical provider tags the OCR path reasons about. Mirrors the - * `ProviderChainType` vocabulary plus the legacy `admin-key` single-provider - * tag `resolveProvider`'s admin fallback returns. + * `ProviderChainType` vocabulary plus the legacy `admin-key` tag the + * operator-key client carries. */ export type VisionProviderType = | "anthropic"