Skip to content

fix: Preserve daemon defaults across explicit tier requests - #804

Draft
buildingjoshbetter wants to merge 3 commits into
fix/runtime-throttle-applicability-742from
fix/daemon-tier-identity-795
Draft

buildingjoshbetter wants to merge 3 commits into
fix/runtime-throttle-applicability-742from
fix/daemon-tier-identity-795

Conversation

@buildingjoshbetter

Copy link
Copy Markdown
Owner

Purpose

Refs #795. Prevent a request for an explicit embedding tier from silently changing the daemon's default model. Reuse an already loaded model across equivalent built-in tier names.

This is a prerequisite for safe tier preparation. Issue #795 remains open for target-bound preparation, bounded rebuild lifetime and coordinated activation.

Changes

  • Resolve explicit requests without calling the global embedding-model setter. Preserve the existing removed-qwen3 migration error, including whitespace and case variants.
  • Reuse immutable cached snapshots for base / pro / qwen3_256 and for edge / model2vec when the resolved built-in identity matches.
  • Preserve identical raw-tier cache reuse, including implicit defaults and custom entries. A global default change alone does not invalidate a published implicit snapshot. A cache miss still resolves the current selection.
  • Keep preflight and loading on the same cache-selection rule. Preserve the fast lane's captured identity, deadlines, inference ownership, batch ceilings and sticky CPU recovery.
  • Include the verified MCP dependency correction from fix: Require MCP compatible with current Pydantic #801 so the review branch uses the current minimum dependency boundary. This PR is stacked on fix: Apply daemon pacing only when its policy applies #797.

Validation

GPUBox isolated full suite: 2,182 passed, 22 skipped, 3 deselected; 420 subtests passed. TRUEMEMORY_TEST_NATIVE_VEC=1; network disabled; generated fixtures only. Configured Ruff and Python 3.10 syntax checks pass. New diffs and commit identities pass publication checks.

Full-run log SHA256: d88501c185f9e37e020d3e5ed6bc73057723862679ddd50543a0dd7eebcaa0e8.

Eighteen focused cases exercise alias reuse, explicit-target nonmutation, custom/fallback boundaries, removed-name validation from the actual resolver, initial-load concurrency, expiration, OOM invalidation and native slice ceilings with model fakes.

An earlier private full run failed six cases. Investigation found that re-resolving an already loaded implicit tier could change vector spaces after a waiting query resumed. The correction preserves all original concurrency and deadline-recovery assertions. Only the historical assertion that the main path must mutate global selection was intentionally changed to require no mutation. Four new controls fail against the earlier implementation and pass with the correction. A separate removed-name control also failed against the earlier pure resolver. Failed run evidence is retained; the failed snapshot was not pushed.

Limits

No native model performance improvement is claimed here. Distinct replacement construction can still overlap old model references, and the optional fast CPU model has a separate lifetime. This does not implement a target protocol for older daemons, change tier-switch callers/configuration, or complete the whole-process memory budget.

The separate batch-layout retrieval regression on #735 remains held. This change does not alter model weights, precision, dimensions, reranker selection or retrieval depth.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant