chore: drop stale references to the onboarding offer and old resolver

The Playwright project list still named the deleted onboarding AI
offer spec. The CoachPlan comments said the review writes
`outcomeEncrypted` and surfaces it behind a flag; nothing writes or
reads it now, and the column is marked internal. Comments that named
`resolveProvider` as the resolver now name the chain, and the function
itself says it is test-only.
This commit is contained in:
Marc-André Bombeck committed 2026-11-12 13:03:58 +01:00
1 parent 2af0751b69
commit 8b6d9826ea
6 files changed
+14 -20

No files matched your search

-7
View File
@@ -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.
+6 -5
View File
@@ -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")
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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". */
+2 -2
View File
@@ -711,7 +711,7 @@ async function resolveAdminCodexProvider(): Promise<AIProvider | null> {
}
/**
* 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),
+2 -2
View File
@@ -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"