Repository navigation
feat(admin-console): search run comments and annotation text (CHE-1478) [squash] - #353
Draft
congvc-bot-x99[bot] wants to merge 1 commit into
Draft
congvc-bot-x99[bot] wants to merge 1 commit into
congvc-bot-x99[bot] wants to merge 1 commit into
Conversation
Index comment and annotation bodies in runs_fts (new notes column, catalog revision 2) and keep them current with triggers on the notes tables. Note matches rank after goal matches. Snippets for note-only matches are built after the visibility join and redacted for read-only runs.
Base automatically changed from
agent/x99-claude-sonnet/che-9324-2b1ec5ad4321
to
main
November 27, 2026 04:58
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.
Closes the backend part of CHE-1478 (stage 6 of CHE-1364): run search now finds comment and annotation text.
Base: stacked on PR #341 (CHE-9324, snippets after the visibility join), because #341 had not merged. Retarget to
mainwhen it does.What changed
runs_ftsgets a third columnnotes(catalog FTS revision 2, WAL-aware backup viaschema_revisions).run_catalog.migrate_notes(modulerun_catalog_notes, revision 1) runs fromnotes.migrateonce both notes tables exist: it installs triggers onrun_commentsandrun_annotations(insert,UPDATE OF body, delete) and rebuilds the index withgroup_concatof the bodies. Comment and annotation routes are untouched (PR feat(smartqa): add run comment edit and delete routes [squash] #352 keeps working).goal_miss, unchanged), notes weighted like metadata.note_snippet, fieldcommentorannotation), redacted for read-only runs.Known limits
run_catalog_*triggers to change when notes are indexed.Test command
uv run pytest tests/unit/data_engine tests/unit/admin_console/test_run_catalog_api.py tests/unit/admin_console/test_run_list_filters.py tests/unit/admin_console/test_run_comments.py tests/unit/admin_console/test_run_comments_api.py tests/unit/admin_console/test_run_annotations.py tests/unit/admin_console/test_run_annotations_api.py tests/unit/admin_console/test_run_notes_search.pyOutput (X99): first run
402 passed, 1 skipped, 2 failed(the two schema-diff tests below); after updating them,test_run_comments.py+test_run_annotations.pyre-run:36 passed. The new file alone:12 passed.ruff check .andruff format --checkclean.New file
tests/unit/admin_console/test_run_notes_search.pycovers: comment-only and annotation-only hits with snippets, goal-before-note ranking, hidden run and removed run never leak, read-only redaction, edit/delete keep the index current, run delete and tombstone drop notes, upgrade once with backup and idempotent re-run, migration no-op before notes tables exist, substring fallback.