
PRIOR ITERATIONS FINDINGS (avoid duplicate flags — these are already covered):

--- iteration-001.md ---
| L-001-001 | P1 | correctness | .opencode/skills/system-spec-kit/shared/embeddings/profile.ts:147 | "return 'hf-local';" | confirmed-residue | Align `resolveActiveProfileProvider()` with the canonical resolver by including the llama-cpp availability step before hf-local, or delegate active profile creation to `getStartupEmbeddingProfile()`. |
| L-001-002 | P1 | correctness | .opencode/skills/system-spec-kit/scripts/evals/run-ablation.ts:51 | "const PROD_DB_PATH = resolveActiveProfileDbPath(undefined, DB_DIR);" | confirmed-residue | After fixing the shared profile resolver, keep this caller covered with a no-key + llama-cpp-installed regression test so ablation reads the llama-cpp profile DB. |
| L-001-003 | P1 | correctness | .opencode/skills/system-spec-kit/scripts/evals/run-bm25-baseline.ts:40 | "const PROD_DB_PATH = resolveActiveProfileDbPath(undefined, DB_DIR);" | confirmed-residue | Route BM25 baseline DB selection through the canonical startup profile so the no-cloud-key default is llama-cpp, not hf-local. |
| L-001-004 | P1 | correctness | .opencode/skills/system-spec-kit/scripts/evals/map-ground-truth-ids.ts:35 | "const DB_PATH = resolveActiveProfileDbPath(undefined, DB_DIR);" | confirmed-residue | Use the canonical provider profile for ground-truth mapping; otherwise the mapper targets the hf-local DB while runtime writes llama-cpp. |
| L-001-005 | P1 | correctness | .opencode/skills/system-spec-kit/mcp_server/lib/eval/memory-state-baseline.ts:64 | "return resolveActiveProfileDbPath(undefined, DEFAULT_DB_DIR);" | confirmed-residue | Replace or repair this helper dependency so memory baseline captures the actual active profile DB under the llama-cpp default. |
| L-001-006 | P1 | correctness | .opencode/skills/system-spec-kit/mcp_server/scripts/migrations/create-checkpoint.ts:38 | "resolveActiveProfileDbPath(undefined, path.resolve(process.cwd(), '.opencode/skills/system-spec-kit/mcp_server/database'))," | confirmed-residue | Make checkpoint creation resolve the same active DB as runtime; a no-key llama-cpp install should checkpoint `context-index__llama-cpp__...sqlite`. |
| L-001-007 | P1 | correctness | .opencode/skills/system-spec-kit/mcp_server/scripts/migrations/restore-checkpoint.ts:37 | "resolveActiveProfileDbPath(undefined, path.resolve(process.cwd(), '.opencode/skills/system-spec-kit/mcp_server/database'))," | confirmed-residue | Make checkpoint restore use the canonical active profile path so restores do not silently target hf-local on llama-cpp default installs. |
| L-001-008 | P1 | correctness | .opencode/skills/system-spec-kit/config/config.jsonc:28 | "\"databasePath\": \".opencode/skills/system-spec-kit/mcp_server/dist/database/context-index.sqlite\"," | confirmed-residue | Remove or rewrite this doc-only config field to describe provider-keyed DB derivation; the fixed literal conflicts with post-014 filenames. |
| L-001-009 | P1 | correctness | .opencode/skills/system-spec-kit/package-lock.json:17 | "\"onnxruntime-common\": \"^1.21.0\"" | confirmed-residue | Regenerate the lockfile after the package.json removals so the root lock package no longer declares `onnxruntime-common` as a direct dependency. |
| L-001-010 | P1 | correctness | .opencode/skills/system-spec-kit/package-lock.json:40 | "\"onnxruntime-common\": \"^1.21.0\"," | confirmed-residue | Regenerate the lockfile so the `mcp_server` package lock entry matches `mcp_server/package.json` and drops the direct ONNX runtime dependency. |
| L-001-011 | P1 | correctness | .opencode/skills/system-spec-kit/shared/embeddings/providers/hf-local.ts:301 | "// Detect native module version mismatch (onnxruntime-node, sharp)" | confirmed-residue | Remove the `onnxruntime-node` production-code reference or generalize the message to native module failures without naming the rejected runtime. |
