Repository navigation
fix(models): persist discovery membership without deleting bindings - #1901
Conversation
Separate saved model configuration from endpoint publication state so a previously discovered model cannot silently return to Composer through configured-binding merging or restart hydration. Reconcile only complete nonempty answers, retain manual ids and history, and cover the real Host-to-IPC-to-Composer path with isolated storage. Schema v25 adds a backed-up migration for durable publication state. fixes vastsa#1892
|
Independent review confirms the old real Host → IPC → Composer path still re-adds |
Summary
Fixes #1892.
Separate saved model bindings from current endpoint publication state. Previously discovered configured models omitted from a complete response no longer return to ordinary/recent Composer choices through binding merging, offline fallback, or restart hydration. This is provider-independent; there is no gateway-specific logic or external-config synchronization.
published/unlisteddiscovery state in Host-owned SQLite (schema v25, backed-up v24 migration).completedefaults to additive-only.unlistedis not proof of failed inference. Current/default models are not automatically switched or runtime-blocked. Undisclosed server truncation cannot be reliably detected. OAuth list results without a completeness contract remain non-reconciling.Review notes
The earlier unpushed delete-only candidate was rejected because IPC and Composer re-added configured IDs. This commit replaces that candidate, preserves the original binding-retention invariant, and fixes the consumer boundary. The issue body was corrected to withdraw unsupported 404, binding-provenance and context-window claims.
The schema change is additive and backed up. Older apps refuse schema v25; downgrade requires the pre-migration backup. No installed app or live database was touched during development.
Validation
Candidate:
efaa782f63cfd0b21cf73bdde314c69068f2ef32Base main:
541471d55648df021b232b5d01f0e1dd14cbb033Passed:
apps/desktop/test/*model*.test.mjsplus endpoint-probe tests).node scripts/e2e-model-discovery-state.mjsagainst the exact committed candidate: real isolated Host/SQLite and production IPC/Composer, mocked HTTP only; disappearance, offline, restart, recovery, case changes, partial/malformed/empty lists, manual IDs, legacy default, endpoint isolation.Known limitations, not hidden as green:
data_relocation::tests::relocated_project_memory_remains_readable_through_the_repository(empty content versusKeep project memory), previously reproduced on the unmodified base. A worktree setup test failed once in a concurrent run and passed in isolated and subsequent full runs. A serial full-suite attempt exceeded 240 seconds and was stopped.ENOEXEC). PR-base used the installed pnpm with auto-switch disabled; the exact lint constituent commands ran directly and passed.filter_nextwarning intranscripts.rs. Production build reports chunk-size warnings.