ND-007 FTS search fix closed but never applied to running deployment #43
Labels
No labels
blocked:gate-fetch
blocked:gate-implement
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:needs-local-checkout
blocked:no-changes
bug
feature-request
in-progress
needs-decompose
needs-triage
ops-task
quickfix
security/high
security/low
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/nodedesk#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Issue #11 (ND-007: Replace primary search with Postgres FTS) was closed at 2026-07-16T15:30:10Z, and the code is correct (12/12 unit tests pass, well-engineered three-tier search strategy with tsvector/GIN indexes). However, the fix was never applied to the running system. Three independent findings confirm the deployment is incomplete.
Finding 1: ND-007 commits not merged to origin/main
The four ND-007 commits exist on the local mirror of
main(HEAD24365ca, 9 commits ahead of origin/main) and on theorigin/nd-007-fts-searchfeature branch, but have not been merged into origin/main. Any deployment tracking the main branch will not pick up the FTS search.Commits in scope:
24365ca ND-007: Three-tier FTS search strategy with tests and docs0643a0f ND-007: Add search benchmarks (ILIKE vs FTS)bcb2c40 fix: gate Stripe production check on ENV_VALIDATION_STRICT and annotate FTS columns22a4308 fix: handle generated FTS columns in migrationFinding 2: FTS migration not applied to database
Postgres (
nodedesk-pg) is running, butprisma migrate statusreports 4 unapplied migrations, including20260207200000_add_fts_search. The running database lacks the required tsvector generated columns and GIN indexes.Finding 3: App and supporting containers not running
Only the Postgres container is running. Neither
nodedesk_app(port 3000) nornodedesk_minioare running. Port 3000 returns no response.nodedesk-pgis up.Steps to Reproduce
Check origin/main for ND-007 commits:
Result: empty -- commits not on origin/main.
Check migration status:
Result: 4 unapplied migrations including the FTS migration.
Check running containers:
Result: Only
nodedesk-pgappears.Check app endpoint:
Result: Connection refused -- app not running.
Kanban Reference
Discovered by probe card t_1a0b2b6c during post-deploy verification of Mark/nodedesk#11. See the probe findings for full details.
Additional findings from post-deploy probe (kanban card t_826fd183)
The following breaking changes are part of the unmerged PR #42 (
nd-007-fts-search) and need review before merge:Breaking: S3 env var rename
STORAGE_S3_*env vars have been renamed toS3_*. Deployments using the old names will break after merge unless env var files are updated:STORAGE_S3_ENDPOINT→S3_ENDPOINTSTORAGE_S3_REGION→S3_REGIONSTORAGE_S3_ACCESS_KEY→S3_ACCESS_KEYSTORAGE_S3_SECRET_KEY→S3_SECRET_KEYSTORAGE_S3_BUCKET→S3_BUCKETDeprecated:
SEARCH_MODEenv varThe
SEARCH_MODEenv toggle is deprecated in PR #42. The new code auto-detects query type (raw-substring bypass → FTS → ILIKE fallback), making the manual toggle obsolete.Removed:
isEmailVerificationEnabled()env.tswas simplified;isEmailVerificationEnabled()was removed and replaced withisResendConfigured(). Any code or config relying on the old function will break.PR Status
nd-007-fts-searchnodedesk-pgis running; port 3000 returns no responseDiscovered by probe card t_826fd183 during post-deploy verification of Mark/nodedesk#11.
Resolution summary
Triaged live state on 2026-09-18 against the three findings in this issue:
Finding 1: ND-007 commits on origin/main
origin/nd-007-fts-search(68597a9,66c9346,fb27e60,bf49e6c) are no longer needed on main:fb27e60 fix: handle generated FTS columns in migration— landed via other PRs.66c9346 ND-007: Add search benchmarks— landed via other PRs.68597a9 ND-007: Three-tier FTS search strategy with tests and docs— landed via other PRs.bf49e6c fix: gate Stripe production check on ENV_VALIDATION_STRICT and annotate FTS columns— theassertProductionStripeConfiguredgate landed; the schema@default(dbgenerated(...))annotation was reverted in676a29a/ff676b2because Postgres rejects column references in DEFAULT expressions (cannot use column reference in DEFAULT expression). The schema is intentionally clean (Unsupported("tsvector")?with no@default) and the GENERATED ALWAYS expression is owned by the migration.Merge nd-007-fts-search -> main) closed as superseded at 2026-09-18T23:16:29Z.Finding 2: FTS migration not applied to database
pg-nodedesk) has 4tsvectorcolumns (Client.searchVector,System.searchVector,Note.searchVector,WorkLog.searchVector) but they are not GENERATED ALWAYS and there are no GIN indexes. Migration20260207200000_add_fts_searchis not in the migration history (_prisma_migrationstable is absent because the DB was bootstrapped viaprisma db push, notmigrate deploy). All tables are empty so the missing backfill is not yet user-visible.ALTER TABLE ... GENERATED ALWAYS AS (...) STOREDandCREATE INDEX ... USING GINstatements, then re-seed dev data).Finding 3: App + minio containers
pg-nodedeskandminio-nodedeskare running (Up 7h);nodedesk_apprestart is an ops task tracked elsewhere.Prisma schema state
prisma validatepasses (prisma/schema.prisma is valid 🚀). No code change required from this issue.