Skip to content

feat(graph): add the document-vector read seam for revision candidates (#1014) - #1055

Merged
jasonssdev merged 3 commits into
mainfrom
feat/1014-phase-b-p1-vector-read
Sep 28, 2026
Merged

jasonssdev merged 3 commits into
mainfrom
feat/1014-phase-b-p1-vector-read

Conversation

@jasonssdev

Copy link
Copy Markdown
Owner

Summary

PR 4 of the decision-revision-detector chain, which is Phase B slice P1 (stacked-to-main).

  • Planning docs: the Phase B re-plan. Production candidates read the document vectors that reindex already stores in vectors.db, and revisions never calls an embedder. The subject pass is dropped (owner decision B3). --include-confidential does not authorize an embed call (owner decision B2). The spec and design deltas are updated and the Phase B tasks are written (11 slices).
  • P1, the vector read seam:
    • VectorStoreDB.document_vectors(concept_ids) returns StoredDocVector rows (vector + content hash) by joining doc_vectors and vector_meta. It is concrete-store only and deliberately not on the VectorStore Protocol, following the precedent of neighbors.
    • The public embedding_tag(model) in state/reindex.py; _effective_model_tag delegates to it.

Nothing is wired to a verb yet; the seam is inert until P5.

Related issue

Refs #1014

Type of change

  • feat — new feature
  • docs — documentation only

How was this tested?

  • Strict TDD. RED was observed for both behaviors (AttributeError on the missing method and function). 5 mutations were run: 4 were killed. The 5th, removing the empty-input guard, survives because SQLite's IN () matches no rows anyway; the guard is kept as a query-avoidance shortcut.
  • ruff check ., ruff format --check . and mypy . are clean; pytest --cov 6823 passed, 97.07% coverage; evals/run_self_tests.py 43 of 43.

Checklist

  • My commits follow Conventional Commits.
  • I added or updated tests for the change.
  • I updated docs where behavior, interfaces, or the knowledge model changed.
  • Lint, format, type check, and tests pass locally (ruff, mypy, pytest).
  • Output remains OKF-conformant and derived stores stay reconstructible from the bundle + sources.
  • The change is consistent with the project's guiding principles (local-first, provenance, freshness, human-in-the-loop).

… blocking (#1014)

Adds VectorStoreDB.document_vectors, a JOIN of doc_vectors and
vector_meta keyed by concept id, and promotes reindex.embedding_tag to
a public function that _effective_model_tag now delegates to. Together
these let a future reader (openkos revisions) compare a Decision's
current content hash against its stored vector without ever embedding
itself, per design.md Decision B1.
@jasonssdev
jasonssdev merged commit 62e0e11 into main Sep 28, 2026
9 checks passed
@jasonssdev
jasonssdev deleted the feat/1014-phase-b-p1-vector-read branch September 28, 2026 23:28
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