Skip to content

feat: bulk= keyword param on ingest_turn (#194) - #276

Merged
robotrocketscience merged 1 commit into
mainfrom
feat/issue-194-ingest-bulk-param
Apr 29, 2026
Merged

feat: bulk= keyword param on ingest_turn (#194)#276
robotrocketscience merged 1 commit into
mainfrom
feat/issue-194-ingest-bulk-param

Conversation

@robotrocketscience

Copy link
Copy Markdown
Owner

Summary

Additive, keyword-only bulk: bool = False on ingest_turn.

When bulk=True, duplicate-sentence record_corroboration writes are skipped — the only currently-redundant per-turn side effect inside a multi-turn batch. Canonical beliefs row and v2.0 ingest_log row are always produced; final belief state is identical either way.

Default-off preserves prior behaviour for every existing caller.

Scope decisions

  • bulk is keyword-only (positional pass rejected) — guards against future args being inserted before it and keeps the call site self-documenting.
  • The issue body listed three "likely candidates" to skip (per-turn promotion checks, FTS5 commits, telemetry rows). None of those exist as code today, so the implementation skips only the side effect that does exist (record_corroboration on duplicates). Docstring notes it's reserved for future per-turn-cost reductions as new side effects land.
  • No flush() / context-manager — there is nothing buffered to flush at present. SQLite autocommit at the store layer is fine for current scale.

Tests

tests/test_ingest_bulk.py (new):

  • default-off
  • keyword-only enforcement
  • unique-sentence input → identical state for bulk=True vs bulk=False
  • duplicate-sentence input → identical beliefs, divergent belief_corroborations
  • bulk=True still writes ingest_log (v2.0 source-of-truth invariant)

Full local run: 1728 passed, 8 skipped.

Closes #194.

Additive, keyword-only `bulk: bool = False` on `ingest_turn` for
research-line / batch ingest callers (e.g. wonder_ingest). When True,
duplicate-sentence corroboration writes are skipped — the only
currently-redundant per-turn side effect. Canonical beliefs row and
v2.0 ingest_log row always produced; final belief state is identical
either way.

Default-off preserves prior behaviour for all existing callers.

Closes #194.
@robotrocketscience
robotrocketscience force-pushed the feat/issue-194-ingest-bulk-param branch from 3274411 to 56cad93 Compare April 29, 2026 01:04
@robotrocketscience robotrocketscience added the review-Setr PR coordination mutex label Apr 29, 2026
@robotrocketscience
robotrocketscience merged commit 62492c4 into main Apr 29, 2026
8 checks passed
@robotrocketscience
robotrocketscience deleted the feat/issue-194-ingest-bulk-param branch April 29, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-Kulili PR coordination mutex review-Setr PR coordination mutex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bulk= parameter to ingest_turn (v2.0 wonder prep)

1 participant