Skip to content

Publish dev db#843

Open
marcodejongh wants to merge 6 commits intomainfrom
publish_dev_db
Open

Publish dev db#843
marcodejongh wants to merge 6 commits intomainfrom
publish_dev_db

Conversation

@marcodejongh
Copy link
Owner

No description provided.

marcodejongh and others added 5 commits February 14, 2026 11:37
- Create shared db-connection utility (packages/db/scripts/db-connection.ts)
  that auto-selects postgres-js for localhost or Neon serverless for
  localtest.me/production, enabling scripts to run during Docker build
- Refactor import-moonboard-problems.ts and seed-social.ts to use shared
  connection instead of inline Neon setup
- Create test user script (test@boardsesh.dev / test) with pre-computed
  bcrypt hash, idempotent via onConflictDoNothing
- Generate ~2000 realistic ascent ticks per board type for the test user
  using an asymmetric bell curve distribution modeled after a V8 climber
- Modify Dockerfile.dev-db to install Node.js 20, run MoonBoard import,
  test user creation, and social seed during build
- Simplify dev-db-up.sh (remove MoonBoard download/import, add test user info)
- Extend CI trigger paths to include scripts, schema, migrations, package.json
- Update CLAUDE.md documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace exponential date bias (which clustered ticks in recent weeks) with
a pre-generated session schedule: 2-4 sessions/week over 3 years with 10%
rest weeks. Each tick picks a random session date, producing ~5 ticks per
session per board — a realistic weekly pattern for a dedicated climber.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onversations

Static, fully hardcoded test data for UI testing: 12 parody pro climber
users, 80 fixture ticks, 80 hilarious threaded conversation trees across
8 categories (grade debates, beta spray wars, flash incredulity, angle
gatekeeping, salty attempts, campus vs footwork, excuse makers, training
plan arguments), and 30 fixture votes. All UUIDs and content are 100%
deterministic for reliable test assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move fixture user ID injection after fakeUserIds declaration to fix
"Cannot access before initialization" ReferenceError. Also make the
Dockerfile migration loop continue on individual migration errors so
the migration record INSERT always runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
boardsesh Building Building Preview, Comment Feb 15, 2026 6:19pm

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude
Copy link

claude bot commented Feb 15, 2026

Claude Review

Ready to merge - No significant issues found.

This PR consolidates MoonBoard data import, test user creation, and social seeding into the Docker build, simplifying the development setup. The code is well-structured with proper database connection handling abstracted into db-connection.ts.

Minor observations (non-blocking):

  1. packages/db/docker/Dockerfile.dev-db:123 - Migration errors are now caught and continued with a warning (|| { echo "WARNING: migration $tag had errors, continuing..."; true; }). This is intentional for the Docker build context where some migrations may have already been applied, but worth noting.

  2. packages/db/scripts/fixtures/deterministic-social.ts - Large fixture file (~1000 lines) with hardcoded UUIDs and comments. The deterministic nature is intentional for UI test assertions, so this is appropriate.

  3. Test coverage - No new tests added for the seeding scripts, but these are development/infrastructure scripts that run during Docker build, making automated testing less critical.

…ssword, and drizzle schema migration tracking

The Dockerfile's initdb only trusted localhost connections, but the
neon-proxy container connects from the Docker network. Also set the
postgres password (required by neon-proxy auth) and record migrations
in both public.__drizzle_migrations and drizzle.__drizzle_migrations
so drizzle ORM's migrate() function recognizes them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link

claude bot commented Feb 15, 2026

Claude Review

Ready to merge - Minor issues noted below, but nothing blocking.

Minor Issues

  1. packages/db/docker/Dockerfile.dev-db:149 - Migration errors are suppressed with || { echo "WARNING..."; true; }. While this may be intentional for idempotent runs, silent migration failures could mask real problems during image builds.

  2. packages/db/scripts/db-connection.ts:14 - The file logs the database host (line 14 in create-test-user.ts, line 25), which could potentially expose internal hostnames in build logs. This is low-risk for dev images but worth noting.

  3. packages/db/scripts/fixtures/deterministic-social.ts - This 973-line fixture file contains hardcoded UUIDs with a specific format (fx-user-0001-..., fx-tick-grade-01, etc.). If any UUID collision occurs with real data in the future, inserts would silently be ignored due to onConflictDoNothing().

Documentation

CLAUDE.md has been properly updated to reflect the new image contents (MoonBoard data, test user, social seed data).

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