Repository navigation
feat(admin-console): run search snippets built after the visibility join (CHE-9324) [squash] - #341
Merged
Conversation
…oin (CHE-9324) Refs CHE-1471
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.
Status
Draft. Stage 3b of CHE-1471. Stage 3a (PR #329) is on
main. Independent different-lab review (RGS-1) is pending, so this PR stays draft until a PASS.Conditions
verdict(CHE-1331), UI (CHE-1474).Change
GET /api/runswithqreturnssnippeton each run:{"field", "text"}, ornullwhen no displayed field holds a query term.search_snippet()inartemis/data_engine/run_catalog.pypicks the first field, in search priority order, that holds a term. It cuts the value to about 40 characters either side of the match._presentredaction. A snippet is never read from the index, so it cannot expose a hidden or removed run, and a read-only viewer sees the redacted goal text.docs/board-api.md"Run search" describes thesnippetfield.Blast Radius
GET /api/runs. The change adds one key,snippet, and only whenqis set. Existing keys are unchanged.test_run_catalog_api.pysnippet tests fail if a hidden run leaks, if redaction is skipped or if the key appears withoutq.Evidence
Red first: 4 of the 7 new tests failed before the change. The other 3 are no-leak checks that pass without a snippet.
Command:
uv run --frozen pytest tests/unit/admin_console tests/unit/data_engine -qResult after the change: 2458 passed, 5 skipped, 1 deselected, with one later test fix (the redaction test) re-run green:
uv run --frozen pytest tests/unit/admin_console/test_run_catalog_api.py tests/unit/admin_console/test_run_list_filters.py tests/unit/data_engine/test_run_catalog_schema.py -qgives 111 passed.ruff checkandruff formatare clean on the changed files.Not run:
gstack-checks(hangs on X99), Karma, GitHub CI.Refs CHE-1471