Repository navigation
fix(platform): rank task field and comment search hits together - #4248
Conversation
yannickmonney
left a comment
There was a problem hiding this comment.
Independent review — TALE-579 / PR #4248
Verdict: ACCEPT at exact head 17e7c225fbc36ad33e1bdbf55e4eedd3b4de3f2c.
Reviewer: Codex #11, agent 7a7d20b9-15bf-4d0c-99bf-33e6e841a76c,
run 6333d4f4-601c-4e09-91cd-d568d57c89bd; implementation is distinct
(Codex #8, agent 579ebc6d-a30d-43a6-b3fb-a340b6a22eae, run 24de1220).
Read TALE-141 and GitHub #3596 as the acceptance contract. No blocking findings.
Evidence
- Production diff retains
LIMIT 25on each SQL candidate query. Both queries
now execute even when fields fill the first page. CommentDISTINCT ON
removes repeated-comment task rows before its candidate limit. The task-ID
set removes overlap between the two bounded pages before final active-first,
newest-first sorting andslice(0, 25). At most 50 task candidates enter
application ranking; no new uncapped task/comment fetch or pagination loop. - Two top-25 pages suffice for a top-25 union: any task below position 25 in
either individually deduplicated, consistently ranked leg already has 25
distinct tasks ahead of it. The merge therefore does not need an unbounded
application scan to meet this contract. SQL LIKE matching still searches
the eligible relation as before; this is not a claim of constant database work. - Owned throwaway instance TALE-579 PostgreSQL 17.5, cluster
pg-data,
loopback port 5579, userreviewer579, databasepostgres. Real boot
migrations create the schema; the production search service and PR regression
lane run without SQL/project mocks, using synthetic org/user/project IDs.
The extracted lane differs only in its service import path, so the same test
can execute after checking out main. Instance stopped after both runs. - Head: 7/7 PostgreSQL assertions pass: comment-only control; 24, 25 and
30 archived field hits retain the active comment task first; repeated comments
and dual field/comment matches yield 25 distinct task hits; active-page recency
combines both legs; ordinary field and blank-query controls remain correct. - Main
bd2275c3f8bc5f928349cc2a38f10134e666eb42: the identical real-Postgres
lane fails 4/7 assertions, including the exact 25/30 archived-hit starvation
and mixed-page assertions; comment-only, 24-hit and ordinary/blank controls
pass. Exit 1 on main versus exit 0 on pinned head. - Targeted Vitest server suites
service.board-search.test.ts,service.test.ts
andintegration-scope.guard.test.ts: 3 files / 27 tests pass, Node 24.21.0,
one worker. SQL recording assertion proves both page limits are 25. - Targeted oxlint and oxfmt checks of the changed TypeScript files pass;
formatter also receives the automation reference Markdown path. - Search importer suites
backend/core/chat/assistant_tools.test.tsand
backend/domains/chat/shim.test.ts: 2 files / 149 tests pass, one worker.
Total targeted unit/importer/guard coverage: 5 files / 176 tests pass.
Not run / boundaries
No full platform suite, whole-workspace/scoped TypeScript check, full backend
HTTP/MinIO integration harness, browser/UI checks, production tests, query-plan
benchmark or CI execution/wait. This backend-only review changes no product code.
CI is intentionally left to the completion owner: no rerun or cancellation.
Disk remained above the 20 GiB floor (188 GiB initially; 183 GiB at later readback).
No push, merge, task move or native human-review decision.
Initial setup-only Vitest invocations used the wrong working directory/path;
they ran no tests. Corrected runs above are the evidence, not those failures.
Acceptance is an independent exact-head review record, not authorization to merge
with missing required CI or bypass the source task's native review guard.
ff30ff6 to
4d76211
Compare
4d76211 to
dd39355
Compare
dd39355 to
3366e6c
Compare
What changed
Verification
Independent review requested through TALE-359. No merge, card move or CI rerun/cancellation.
Closes #3596