test(local-knowledge): harden #1818 embedding-space governance evidence and gates#2000
Merged
Conversation
…ce and gates Post-merge audit of Epic #1818 (embedding-space governance and multi-space retrieval, children #1843-#1848). A read-only multi-agent audit found the shipped implementation production-sound with zero critical/high runtime or security defects: the provider-SDK boundary holds, compareEmbeddingProfiles fails closed, per-capsule embedding prevents cross-space contamination, cross-space fusion is rank-only RRF with a deterministic total order, and diagnostics stay body-free. The confirmed gaps were test-coverage, evidence-honesty, and gate hardening only. This change adds them without altering production retrieval behavior: - #1843 pin each PROFILE_COMPARISONS reason and the missing-left/right-profile guards so a mutation to the compatibility table is caught; add an ADR-0036 pointer to the contract. - #1844 assert the set-level incompatible embedding-space projection (two hardened members diverging only in fingerprint) with reason code, degradation string, and fingerprint-not-on-wire redaction. - #1846 add a full cross-lane RRF-tie determinism plus run-to-run stability test. - #1847 add DOM-render and jest-axe coverage for the incompatible and policy-denied Knowledge Pod guidance states. - #1848 add the multi-space fixture to the non-tautology regression probe set so the eval gate proves it can fail; correct the stale closure state in the embedding-space governance ledger. - security: rename hermetic eval-harness placeholder credentials to non-credential sentinels so secret scanners cannot flag or cargo-cult them. Local gates green: typecheck, lint, format:check, arch:check(+negative), check:retrieval-quality (16/16 fixtures, 4 regression probes below floors), check:grounded-retrieval-quality, check:grounded-faithfulness, test:coverage:ui, and the full keiko-server / keiko-local-knowledge / keiko-contracts suites. Refs #1818, #1843, #1844, #1845, #1846, #1847, #1848 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Post-merge audit hardening for Epic #1818 (embedding-space governance and multi-space retrieval; children #1843–#1848), which shipped in PR #1911 (
48958a53) and PR #1912 (f40f9f17) and is already merged and closed.A read-only multi-agent audit (six per-child verifiers plus one cross-cutting security auditor) found the shipped implementation production-sound with zero critical/high runtime or security defects: the provider-SDK boundary holds (query embeddings route only through the Model Gateway adapter),
compareEmbeddingProfilesfails closed, per-capsule embedding prevents cross-space contamination, cross-space fusion is rank-only RRF with a deterministic total order, and diagnostics/evidence stay body-free.The confirmed gaps were test-coverage, evidence-honesty, and gate hardening only. This PR closes them without changing any production retrieval behavior. The single non-test production edit is a cosmetic rename of placeholder credentials in a hermetic, server-internal eval harness.
Refs #1818, #1843, #1844, #1845, #1846, #1847, #1848
Scope
Reuse And No-Duplication
Rationale: additive tests extend the existing suites; the eval-gate probe extends the existing
runLocalKnowledgeRegressionProbesnon-tautology mechanism (theABSENT_CHUNK_SENTINELdecoy path already used by the exact/semantic/multilingual probes). No new subsystem is introduced.Delivery Board
This is a post-merge hardening PR against already-closed issues (#1818 and #1843–#1848 are
CLOSED/status: done). Board-workflow transitions below are therefore recorded as-is rather than re-opened.dev, enable auto-merge, close the issue, or bypass human review. This PR was opened only at explicit human request and will not be self-merged.In Progress/swimlane transitions — the linked issues are already closed; no issue, project, or board state was changed by this PR.Product Impact
Update Impact
internal-only.internal.Verification
Required:
Local verification:
Reuse / gap rationale:
Select only what applies:
format:check)Not applicable rationale:
check:editor-release-evidencenot regenerated: only a keiko-ui test file changed (not bundled), so the Linux-authoritative bundle fingerprint is unchanged; a macOS regeneration would break CI.Review And Closure
Refs(notResolves): the linked issues are already closed; this PR must not reopen or re-close them.Risk Notes
Low risk. No production retrieval/fusion/embedding/policy/UI behavior changes; changes are additive tests, one eval-gate probe, a docs correction, and a cosmetic eval-harness placeholder-credential rename. The one non-test edit (
grounded-retrieval-eval.ts) only changes hermetic in-memory eval fixture values with no network effect; its dedicated test (6/6) passes. The editor-release-evidence fingerprint is unchanged (no bundled UI code touched).🤖 Generated with Claude Code