Skip to content

integration: search hardening and CI integrity (#38, #75, #80, #81) - #96

Merged
tannerwendland-db merged 6 commits into
masterfrom
integration/search-hardening-and-ci-integrity
Jul 24, 2026
Merged

integration: search hardening and CI integrity (#38, #75, #80, #81)#96
tannerwendland-db merged 6 commits into
masterfrom
integration/search-hardening-and-ci-integrity

Conversation

@IceRhymers

@IceRhymers IceRhymers commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Search hardening and release integrity

Coordinated delivery for #38, #75, #80, and #81 through integration/search-hardening-and-ci-integrity.

Delivery model

  • Each issue was planned with Claude Fable and executed with Claude Sonnet 5 under the repository-local autoplan workflow.
  • Every child PR targeted this integration branch and was squash-merged only after its running CI checks were verified green.
  • master remains protected. This PR remains a draft and must be reviewed and merged by a human maintainer only.

Delivered changes

Issue Delivered PR Integration commit Result
#80 #98 9c4f679 CI gate fails if committed Web UI dist/ is stale.
#81 #97 e90cac0 commit: query-corpus parity coverage.
#75 #99 bd51c16 Postgres-invalid regexes become recoverable regex_invalid payloads.
#38 #100 f27565b Bounded, interruptible Python regex highlight scanning with cursor-safe match_budget truncation.
Final doc drift #101 8bdef8c Corrected final-review stale re/regex and CI-build wording.

Final verification

Combined integration head: 8bdef8c441ef4e97bf252352cb76ded1e93be774

  • GitHub CI on this exact head: lint ✅ · unit ✅ · webui ✅
    • The webui job ran the new committed-dist freshness gate successfully.
    • Lakebase integration CI is skipped by the repository-wide unprovisioned CI_LAKEBASE_ENABLED gate; this predates this work.
  • Local clean-worktree validation:
    • uv sync --all-groups --all-extras
    • make lint
    • make test ✅ — 1082 passed
    • make webui-test ✅ — 209 passed
    • make webui-verify-dist ✅ — production build reproduced the committed dist/ with zero drift.
  • Targeted real-Postgres integration evidence was captured on the child PRs for the changed grep, symbols, and service paths. Lakebase-only test failures in a vanilla local Postgres environment were verified pre-existing/environment-specific.
  • Final independent integration review: APPROVE. It audited the combined diff, cursor semantics, recoverable-payload compatibility, dependency/deploy implications, test coverage, and documentation drift. The three factual documentation findings from that review were fixed by docs: fix stale re/regex and CI build-step wording from final review #101.

Integration exit criteria

  • All child PRs merged with verified green CI
  • Combined-branch project gates and CI green
  • Final independent review and documentation-drift pass complete
  • This PR refreshed with delivered PRs and validation evidence
  • Human maintainer reviews and merges the protected-master PR

Human handoff

Please review the combined diff and this validation record, then merge this draft PR into master when satisfied. No agent will merge it.

…98)

Add a `webui-verify-dist` Makefile target that rebuilds the frontend
and fails if the committed dist/ diverges from src/, wired into CI's
webui job. Uses `git status --porcelain` (not `git diff --exit-code`)
so untracked new hashed chunks are caught, not just modified/deleted
files. Updates the three docs that claimed no such check existed.

Refs #80
Add "commit": TokenKind.COMMIT to the parity test's _FIELD_TO_KIND
map and two commit: corpus entries exercised by both the Python and
TS suites, closing the latent KeyError('commit') in the safe-atom
parity test.

Refs #81
A Postgres-invalid POSIX regex (e.g. /[/), negated or not, through search_code,
symbol_search, or semantic_search's repo:/file: filters previously reached the
database raw and escaped as an uncaught sqlalchemy.exc.DataError instead of a
recoverable payload field. Adds a typed RegexInvalidError mapped by a single
reraise_or_recoverable(error: DBAPIError) mapper shared across grep/symbols/
references/semantic, surfaced as a new additive `regex_invalid` field on the
search_code and semantic_search envelopes, and mapped to a 400 with the Postgres
message on the webui /api/search and /api/semantic routes.

Refs #75
Switch grep's highlight rescan from stdlib re to the regex module and
thread a per-request wall-clock match budget (default 2000ms,
CODE_SEARCH_MATCH_BUDGET_MS) through grep_search. A trip stops
scanning, keeps fully-scanned files, and surfaces truncated=True +
truncation_reason="match_budget" instead of stalling the event loop on
a catastrophic-backtracking pattern.
…101)

README.md and app/AGENTS.md still said Python `re` in two spots that #38's
commit (f27565b) missed when it switched the rescan to the `regex` module
elsewhere. webui/frontend/README.md claimed CI does not run a Node build
step, which #80's commit (9c4f679) made false by adding make
webui-verify-dist to the webui CI job; the point that production deploy
doesn't need Node at deploy time is preserved.
@IceRhymers
IceRhymers marked this pull request as ready for review July 24, 2026 14:35
@tannerwendland-db
tannerwendland-db merged commit 995f8c6 into master Jul 24, 2026
4 checks 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.

2 participants