Skip to content

Add wave-1 read-path smoke perf gate#39

Merged
kossoy merged 2 commits into
mainfrom
feat/folio-15-22-wave-1-50k-row-read-path-smokeperf-check
Jun 26, 2026
Merged

Add wave-1 read-path smoke perf gate#39
kossoy merged 2 commits into
mainfrom
feat/folio-15-22-wave-1-50k-row-read-path-smokeperf-check

Conversation

@kossoy

@kossoy kossoy commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Refs #22

What changed

  • Added ok-folio-etl smoke-read-paths to time the post-backfill catalog page, source/category/artist/favorites facets, and search against the expected 50,338 downloaded rows and 1,953 artist facet rows.
  • Updated the smoke search row to exercise the gallery catalog path with GetGalleryCatalog(..., GalleryCatalogFilters{Query: query}), matching /api/gallery/catalog?q=....
  • Kept category facets on the stored category column via SQL grouping and added regression coverage proving stored category values drive the facet.
  • Removed source_page LIKE from gallery free-text search so URL-shaped text fields are not part of catalog/search text scans.
  • Documented the wave-1 smoke command and runbook table for recording the real LAN baseline latencies after the full backfill.

Verification

  • git fetch origin
    • completed with no output
  • git rebase origin/main
    • Current branch feat/folio-15-22-wave-1-50k-row-read-path-smokeperf-check is up to date.
  • ./scripts/product-verifier.sh
    • dashboard npm ci completed; found 0 vulnerabilities
    • dashboard npm run build completed via tsc -b && vite build
    • ok-folio stack template check passed
    • go test ./... passed

Notes

  • The real LAN/runtime smoke output is not fabricated here; this PR adds the gate and runbook capture point. The smoke command fails unless it sees the full 50,338-row catalog and 1,953 grouped artist rows.
  • Review feedback addressed: the smoke search row now times the gallery catalog query path rather than the standalone /api/search helper.

Maestro-Backend: codex (0-end)

Greptile Summary

This PR adds a wave-1 read-path smoke gate for the folio catalog. The main changes are:

  • New smoke-read-paths command for catalog, facet, favorite, and search timing.
  • Stored category grouping kept for category facets.
  • Gallery free-text search narrowed to title, artist, and file name.
  • Tests added for category facets and URL-shaped search exclusion.
  • Runbook steps added for recording LAN smoke output.

Confidence Score: 5/5

The changes are focused on read-path smoke coverage, category facet behavior, and search scope, with repository verification reported as passing.

No code issues were identified in the reviewed changes, and the described checks cover the affected Go packages, dashboard build, stack template validation, and product verification.

T-Rex T-Rex Logs

What T-Rex did

  • I attempted smoke-read-paths in two environments, first from /tmp/okfolio-base and then from /home/user/repo, and both runs exited with status 127 because Go is unavailable.
  • I verified stored-category facet behavior and SQL predicate generation before and after the changes: before, stored-alpha was 2 and stored-beta was 1 with SQL including source_page LIKE; after, the same facet counts remain and the SQL predicates are limited to title, artist, and file_name with has_source_page_like and has_source_page_ilike false.
  • I reviewed the docs smoke-runbook before and after: before, the runbook lacked the Wave-1 section and smoke-read-paths registration with Go help failing due to missing go; after, the runbook includes the new section, expected table rows and registration, and the same Go toolchain blocker.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "Time gallery catalog search in smoke gat..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 590e7d65e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/ok-folio-etl/smoke_read_paths.go Outdated

func timeSearch(db *database.DB, query string, limit int) ([]database.DownloadedPhoto, int64, float64, error) {
start := time.Now()
photos, total, err := db.SearchPhotos(query, limit, 0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Time the gallery search path instead

This smoke row exercises SearchPhotos, which backs the separate /api/search path, but the gallery UI sends its search text to fetchGalleryCatalog and the API then calls GetGalleryCatalog with GalleryCatalogFilters.Query. A regression in applyGalleryCatalogFilters—including reintroducing source_page LIKE or slow filtered facet recomputation under q—would still pass this new gate, so the wave-1 smoke does not verify the search read path changed by this commit; time GetGalleryCatalog(..., GalleryCatalogFilters{Query: query}) here instead.

Useful? React with 👍 / 👎.

@kossoy kossoy merged commit b8b51ee into main Jun 26, 2026
4 checks passed
@kossoy kossoy deleted the feat/folio-15-22-wave-1-50k-row-read-path-smokeperf-check branch June 26, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant