Search & Discovery: Week 11

by Harsh Chandwani

week
gsoc
gsoc2026
SearchDiscovery
week#11
Phase-2

Week Summary

No new entity this week. While building the four entities I kept a list of small problems that were real but never urgent enough to stop for, and this week they all went in as one hardening MR (!1284): eight items, one of them a real bug, most of the rest tests.

The hardening MR (!1284). The bug was in the bulk indexer. If the poller pushes documents at a write alias that doesn’t exist yet, the engine quietly creates a plain index under that name and reports success. Nothing logs, the queue rows are marked done, and the alias can never be bound afterwards, because an index and an alias cannot share a name. I reproduced that on a live engine before fixing it. The fix is one flag, require_alias=true: the same push now fails per document, retries, and parks for the watchdog. It is the only behavior change in the MR.

The tests cover things that were true but that nothing checked. A query parameter could be added without adding it to the input guard, and no test would notice. A controller test file could fall out of the suite’s file list and simply never run again, with the gate still green. One of the four query classes was missing the input-length bound the other three have. And one end-to-end test found its database row by position in the table, which works until leftover rows exist and then fails in a way that looks like a real regression. Each of these got a test that fails the day it happens again and says what went wrong.

On the same theme: twice this phase, leftover state from an earlier run, a standing index or stale queue rows, made healthy tests fail in a way that read as broken code, and both times it cost time to diagnose. The end-to-end tests now check for that residue first and name it, so the failure says “clean your stack” instead of looking like a regression.

The last piece is a small read-only admin page showing each entity’s index state (version, document count, aliases) and the queue’s health, the same numbers the CLI health command prints. This closes what was left of my original reindex issue (#2615). Most of that issue got built in earlier weeks, the full-rebuild command, the alias swap, the database fallback, and the part that didn’t, checkpointing and resume, stopped making sense once the full rebuild measured at two minutes: there is nothing worth resuming. The page is for whoever operates this without a terminal.

Daily Work Update

# Day Date A short description of the work done
1 Monday 2026/08/03 Went through the accumulated items and planned the MR
2 Tuesday 2026/08/04 Reviewed the plan; reproduced the missing-alias bug live: index created, success reported, nothing logged
3 Wednesday 2026/08/05 Fixed the indexer with require_alias=true and added the missing length bound to the provenience query class
4 Thursday 2026/08/06 Wrote the guard-membership and suite-coverage tests
5 Friday 2026/08/07 Fixed the row-identity reads, added the residue check to the end-to-end tests, made the region facet ordering testable
6 Saturday 2026/08/08 Built the admin status page
7 Sunday 2026/08/09 Ran the full gate, checked every new test actually fails on the defect it covers, and opened the MR (!1284)