test: watch indexer/ingest.py in the semantics tripwire (#106) - #116
Merged
IceRhymers merged 1 commit intoJul 25, 2026
Merged
Conversation
Arms tests/unit/test_semantics_version_tripwire.py's SEMANTICS_PATHS on indexer/ingest.py, the production file source added by the prior #106 PR, which was left unwatched to avoid a spurious INDEX_SEMANTICS_VERSION bump in that PR's own diff. Also updates indexer/store.py's delta-gate lang/size no-re-derive justification to name the module that now performs that derivation, and adds indexer/ingest.py to the runbook's list of version-bump-triggering modules. Refs #106
5 tasks
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.
Refs #106
Mandatory PR B of #106's two-PR delivery: PR A (merged at
ad04748) addedindexer/ingest.pyas the new production file source but deliberately left it out of the semantics tripwire'sSEMANTICS_PATHS, since arming it in that same diff would have made the diff its own offender (added files count as changed forgit diff --name-only) and forced the veryINDEX_SEMANTICS_VERSIONbump #106's acceptance criteria forbid. This PR closes that gap.Changes
tests/unit/test_semantics_version_tripwire.py: add"indexer/ingest.py"toSEMANTICS_PATHS; extend the module docstring with why, and with the expected false-positive behavior below.docs/runbooks/indexing-parallelism.md§5: addindexer/ingest.pyto the module list that requires a version bump if changed.indexer/store.py: comment-only fix to the delta-gate'slang/sizeno-re-derive justification — it previously citedindexer/parse.py+indexer/languages.pyas the (watched) modules that derive those columns; PR A moved the actual derivation intoindexer/ingest.py, so the comment now names it (pluslanguages.py'sEXT_TO_LANG, whichingest.pycalls directly) so a reviewer verifying the invariant isn't pointed at dead code.No code in
indexer/parse.py,indexer/symbols.py,indexer/languages.py, orapp/db/models.pyis touched, so noINDEX_SEMANTICS_VERSIONbump is triggered by this PR itself.Expected false positive — not confined to the future #111 arc merge
Adding a new path to
SEMANTICS_PATHSmakes it an offender in any diff whose base predates that file's creation.indexer/ingest.pypostdatesmaster(added by #106's first PR, not yet merged pastintegration/indexer-performance), so every local run of this test on this branch or its descendants seesindexer/ingest.pyas an offender today — including, later, the diff that foldsintegration/indexer-performanceintomaster(#111). Locally_base_ref()falls back toorigin/master(there is usually noGITHUB_BASE_REF), so this is the common case, not a rare one; CI is actually less likely to hit it, since both workflows checkout at default depth-1 and this test typically skips there instead of running.This is expected, not a regression, and not a reason to disable the test. Resolve it via the tripwire's own documented escape ("if this change genuinely cannot alter extraction output, say so in the PR") — do not bump
INDEX_SEMANTICS_VERSION, and do not removeindexer/ingest.pyfromSEMANTICS_PATHS, to silence it. The actual backing for "no output change" is #106 PR A's oracle parity test (tests/unit/test_ingest_parity.py), which pinsingest.pyagainstparse.pyfield-for-field on the(path, lang, size, content)set.Verification
make lint— green (ruff check,ruff format --check,mypy app indexer webui).GITHUB_BASE_REF=integration/indexer-performance uv run pytest tests/unit/test_semantics_version_tripwire.py -v— 9 passed, none skipped, no bump required (this is the PR's actual base, matching the local sibling-tripwire rule from the indexer: single-pass in-memory tarball ingestion (drop extract-to-disk) #106 plan).GITHUB_BASE_REF=integration/indexer-performance uv run pytest -m "unit or observability"— 1221 passed, 261 deselected.git diff --stat origin/integration/indexer-performance...HEAD -- indexer/parse.pyand theapp/db/models.pyINDEX_SEMANTICS_VERSIONdiff are both empty — the primary AC3 evidence gate.make webui-verify-dist— green, no drift (no frontend change).make test-integration— ran locally against thecodesearch-pgcontainer; 8 failed / 205 passed / 43 errors, all from missing Lakebase-only extensions (lakebase_tokenizer,lakebase_ann,lakebase_bm25, ...) that don't exist in stock Postgres. Confirmed byte-identical failure count on the unmodified base commit (ad04748) viagit stash, so this is a pre-existing local-environment limitation documented intests/integration/AGENTS.md("this project is Lakebase-only... no local Postgres in the development loop"), not something this PR introduces. CI's own Lakebase integration gate is repo-wide unprovisioned per the indexer: single-pass in-memory tarball ingestion (drop extract-to-disk) #106 plan.code-reviewerpass (separate context) found 2 HIGH + 1 MEDIUM + 2 LOW prose-accuracy issues in the first draft (mis-scoped "one-time Indexing performance integration arc (#110) #111-only" false-positive framing, an incorrect "parse.py has no production caller" claim, andlanguages.py'sEXT_TO_LANGmis-described as oracle-only) — all fixed; diff scope unchanged (3 files, no production code path affected —indexer/store.py's change is comment-only).