Skip to content

Release: stage 3 processing pipeline - #46

Merged
xquantize merged 12 commits into
mainfrom
develop
Oct 28, 2026
Merged

xquantize merged 12 commits into
mainfrom
develop

Conversation

@xquantize

Copy link
Copy Markdown
Owner

PRs #38–#45: clean, chunk, embed, Postgres + pgvector, process. Smoke-tested locally: 9 docs, 254 chunks, rerun embeds 0.

xquantize and others added 12 commits October 28, 2026 10:04
Co-authored-by: Cursor <cursoragent@cursor.com>
Lock in 0.1° edge behaviour for default and north-crossing swell windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Commits the approved roadmap stage 3 slice plan so each PR can tick progress.

Co-authored-by: Cursor <cursoragent@cursor.com>
Split plain text on heading lines, drop boilerplate sections, and
normalise whitespace so slice 2 can chunk citation-ready bodies.

Co-authored-by: Cursor <cursoragent@cursor.com>
* Add document chunking with citation metadata for stage 3.

Overlapping word-budget chunks preserve section boundaries and carry
RawDocument fields needed for retrieval citations in slice 4.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Enforce max_words when packing overlap prefix with the next sentence.

Record overlap prefix lengths for tail merge instead of re-detecting by word match; add reviewer repro and real tail-merge tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
* Add embed() for nomic-embed-text via OpenAI-compatible client.

Task prefixes, batching, and dimension checks keep later process slices
from hitting the network with wrong vectors or Ollama-incompatible params.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Raise when embed batch response count mismatches input.

Partial API responses previously dropped texts silently; match the
dimension check with an explicit count validation per batch.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
* Add local Postgres schema and swellsense db init.

Docker Compose runs pgvector on localhost; init applies idempotent SQL
and checks embedding dimension against settings.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Commit schema DDL before closing db init connections.

Psycopg 3 does not commit on close; persist init_schema and CLI db init
with explicit commits and tests that reconnect after init.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Register pgvector adapters on reconnect in schema round-trip test.

init_schema only registers Vector on the connection it receives; a fresh
psycopg.connect needs register_vector before INSERT can adapt embeddings.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
So db integration tests run against pgvector in GitHub Actions before slices 5 and 6.

Co-authored-by: Cursor <cursoragent@cursor.com>
Slice 5 exposes document/chunk upserts and cosine nearest search without
committing inside store helpers so callers and tests own transactions.

Co-authored-by: Cursor <cursoragent@cursor.com>
* Add swellsense process to chunk, embed, and store raw pages.

Wire the CLI to load data/raw, upsert into Postgres with hash-based skip,
and continue on per-document failures like ingest.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Re-raise Ollama and Postgres errors from process().

Document-level failures still land in failed[]; infrastructure errors reach the CLI exit path without commit.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@xquantize
xquantize merged commit 94f26b3 into main Oct 28, 2026
1 check passed
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