[EPAC-1870]: force search Lambda rebuild and harden headline option regression test#452
Merged
riddim-developer-bot[bot] merged 1 commit intoMay 14, 2026
Conversation
ghost
approved these changes
May 14, 2026
ghost
left a comment
There was a problem hiding this comment.
ReviewAutonomousPR
- Verdict:
approve - Reviewer boundary:
review_only - Acceptance criteria coverage: covered=3, missing=0, unclear=3
Summary
PR is a narrow, low-risk redeploy trigger with a targeted regression guard for SQL option strings; no functional bug in source SQL is introduced.
Actionable findings
- nit / follow_up — Runtime coverage for malformed headline options is still unit-test-only (
backend/search/main_test.go:159)- The new regression test only checks that SQL constants contain
StartSel=orStopSel=, but it does not execute the handler path that previously produced the 500. If option formatting can be altered by runtime codegen/middleware in a future change, this test would not detect it. Consider retaining/adding an integration assertion on the endpoint (or canary test path) that validates noinvalid parameter list formatSQL error for?q=.... - Actionability:
follow_up
- The new regression test only checks that SQL constants contain
Acceptance criteria coverage
- unclear — Canary
TestSearchSpeechesNoDateFiltersBudgetQuerypasses against PR branch- Patch does not include or report new canary execution results; this should be verified in CI after deployment of this commit.
- Actionability:
follow_up - Evidence: Diff adds only SQL comment + unit test; no canary test output provided.
- Suggested follow-up: Verify canary outcome in CI for this PR
- unclear —
/search/speeches?q=budgetreturns HTTP 200 in staging/production after redeploy- Deployment outcome is outside PR scope and must be validated post-merge by release process.
- Actionability:
external_gate - Evidence: Acceptance criteria include deployment verification; PR description only provides metadata snapshots and test-plan outputs.
- Suggested follow-up: Coordinate staging/prod redeploy validation
- unclear — French diacritic query path returns 200 with
language_hint:"fr"and no SQL error- No French-query runtime assertion was added in this patch; relies on existing canary/endpoint coverage.
- Actionability:
follow_up - Evidence: No test asserting French locale response is introduced in this PR.
- Suggested follow-up: Add or confirm existing i18n search regression coverage
- covered — Root cause confirmed in writing with evidence
- PR body names stale deploy as confirmed and includes historical commit + current source + Lambda metadata.
- Evidence: Body snippet: historical commit containing
StartSel=, StopSel=, clean current source, Lambda CodeSha256/LastModified values.
- covered — Redeploy-only fix includes explicit trigger + clear PR rationale
- One non-functional SQL comment change is present in
backend/search/main.go, and rationale is documented. - Evidence: Single-line comment addition in
rankedSpeechSearchSQL; PR body explains rationale.
- One non-functional SQL comment change is present in
- covered — Regression test guards specific malformed-option shape
- Added
TestTsHeadlineOptionsHaveNoEmptySelectorschecks for empty selector tokens in both ranked and legacy SQL constants. - Evidence: New test in
backend/search/main_test.goasserts absence ofStartSel=/StopSel=.
- Added
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.
Why
The search endpoint error was reproducible from production/staging despite
backend/search/main.goshowing only validts_headlineoptions. This PR keeps logic unchanged while forcing a fresh Lambda rebuild and proving the regression can’t be reintroduced silently.What changed
backend/search/main.goto ensure a new Lambda artifact is built/deployed from this change.TestTsHeadlineOptionsHaveNoEmptySelectorsinbackend/search/main_test.goto assert neither ranked nor legacy SQL containsStartSel=orStopSel=option tokens.Root cause confirmation
Confirmed stale deploy (candidate 1) rather than runtime/code-generation bug:
673d28cd29fcc7dd717aabeeb3ef7209abe11499containsMaxWords=50, MinWords=10, StartSel=, StopSel=inbackend/search/main.go.symphony/epac-1870-fix-search-speeches-ts-headline-sql-invalid-paracontains noStartSel=orStopSel=inbackend/search/main.go.epac-search-stagingmetadata:CodeSha256=Q8Ia3m+4E/hhTxcMvS2eKBUzYk8g4usO3NpnvOKN5vQ=LastModified=2026-05-14T22:18:38.000+0000search(production) metadata:CodeSha256=9zLOex7iRndABJ7m5s4pNvo/+gpx3xAPwwSUNoMxuG8=LastModified=2026-05-14T15:07:07.000+0000Test plan
cd backend/search && go test -coverprofile=coverage.out ./...ok epac-apiwith 50.8% statement coverage.go tool cover -func=coverage.outVerification notes
gh run list --workflow backend-staging.yml --limit 10andbackend-production.ymlwere checked to correlate current deploy history with function state.Reviewer-Boundary: review-only
Resolves EPAC-1870
Release-Note: Fix /search/speeches so malformed
ts_headlineoptions are not shipped to PostgreSQL queries.