refactor(settings): provider facts as data
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
#181: ModelProvider is the provider-descriptor table — label, effort ladder, flagship, endpoint, env var joined by wire dialect (chat/models paths + the SSE decoder selector), auth mode (Bearer vs Anthropic's header pair), keyless (nous rides the Portal login), and the ONE trailing-slash endpoint trim. The probe's URL builders, auth headers, and stream-decoder picks select by data; the per-dialect bodies and decoders stay separate functions, not switch clothing. ProviderCredential.resolve is the ONE credential rail (provider key, else the shared Portal session key for keyless providers — official endpoint ONLY, never a user-set URL). Settings' Test Connection and the new PassReadiness module both call it; the twice-implemented #175 fallback can no longer drift. One deliberate tightening, reviewer- blessed: a nous pass profile on a custom base_url with no pasted key now reads missingKey where the old session-model fallback said ready — the old copy had no endpoint gate at all. Pass readiness leaves the session model (PassReadiness.swift maps each pass surface to ready/missingKey/unknown over the descriptor; MentorSessionModel stores the verdicts and reads no keys or auth files). runPass and blindRead run their guards through one shared rail (guardOpenPieceRun) — identical refusal strings, blockers named honestly. No app-side model-settings store (ADR-0014 red line). Rider: the #179 mid-pass repoint pin polls the rig's hasHeldPrompt before releasing the held turn — runningPass flips before the one-shot engine parks its prompt, so firing into that window false-failed under parallel-suite load. Full suite 668/668 (xcresult executed count). Finish-audit: three reviewers (ponytail/security/general), zero findings above LOW; two ponytail trims and one pin tightening applied. Closes #181
This commit is contained in:
1 parent
218e2db397
commit
f49e4b6ca0
15 files changed
+506
-184
No files matched your search
@@ -157,6 +157,14 @@ final class ScriptedEngine: EngineTransport, @unchecked Sendable {
|
||||
queue.sync { heldLoad != nil }
|
||||
}
|
||||
|
||||
/// True while a hangOnPrompt prompt is parked — the #179 repoint pin
|
||||
/// polls for the PARK (runningPass flips before the one-shot engine
|
||||
/// even spawns; ending the hold in that window false-fails under load,
|
||||
/// the #30/#147 flake family).
|
||||
var hasHeldPrompt: Bool {
|
||||
queue.sync { heldPromptID != nil }
|
||||
}
|
||||
|
||||
// MARK: EngineTransport
|
||||
|
||||
/// The fake always spawns cleanly — there is no process.
|
||||
|
||||
Reference in new issue
Block a user