Skip to content

feat(verify): copy the dev DB's listings into a verify instance with populate - #360

Merged
NathanAB merged 1 commit into
mainfrom
claude/verify-populate
Nov 30, 2026
Merged

NathanAB merged 1 commit into
mainfrom
claude/verify-populate

Conversation

@NathanAB

Copy link
Copy Markdown
Owner

Why

Features that read listings, such as search indexing, gallery paging and theme pages, need a verify DB that holds published rows. A fresh one from up has none. During the search cleanup (#351) on 2026-11-30, loading one took a hand-built pg_dump | psql pipe through the Postgres container with seven table excludes. It took several tries: psql isn't installed on the host, and zsh globbed a ? argument. populate makes it one call.

What changed

  • verify-instance.sh populate, run after up, copies the dev DB's data into this checkout's verify DB. That covers status lines, mods, themes, unreviewed mods and the users they point to. It leaves sign-in sessions, copy and vote events, and render jobs behind, and keeps rows the verify DB already has, such as the two seeded users. It prints what it copied.
  • Wrapper rule: it replaces the stock docker exec statuslines-postgres pg_dump … --data-only --disable-triggers --inserts --on-conflict-do-nothing -n public -T … piped into psql on the verify DB. That pipe works, but an agent rebuilds it by hand each time.
  • SKILL.md, the features README and search-indexing.md point to it.

Verification

  • populate before up refuses with "the verify DB isn't migrated; run up first", exit 1.
  • After up, it printed 3 published status lines, 52 published mods, 0 unreviewed mods. A second run printed the same counts. doctor stayed healthy with both seeded users, and /sitemap.xml listed 70 URLs, matching the manual load.
  • Planted break: pointing the source at a missing database printed "copying from statuslines_planted_missing failed", exit 1. Reverted.
  • TDD deviation: the helper has no test harness, and it needs Docker and Postgres, so it adds no test. It is proved by the runs above.
  • bun run check: 439 test files and 4,280 tests passed, 13 skipped, exit 0.

🤖 Generated with Claude Code

…populate

Features that read listings (search indexing, gallery paging, theme pages)
need a populated verify DB. Until now that took a hand-built pg_dump pipe
with seven table excludes, which cost several tries during the search
cleanup on 2026-11-30.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NathanAB
NathanAB merged commit 7c0884a into main Nov 30, 2026
2 checks passed
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