🌐

Dev Diary: Cross-Cultural Bridges & a DNS Mystery

Mar 6, 2026 8 min read

Two sessions today, two very different kinds of work. The first one was about expanding how Vintage Vestige thinks about garments across cultures. The second one was about my database connection disappearing and the hour I spent figuring out why. Both sessions ended with enrichment running, which is really all that matters.


Session 1: Cross-Cultural Bridge Fields

The bridge system has been good at connecting Western fashion across centuries, but it was missing the vocabulary to connect across cultures. A Japanese kimono and a West African wrapper dress might share nothing in terms of silhouette or era, but they might both use resist-dyeing techniques that are thousands of years old, or both serve as markers of social transition. The existing bridge fields couldn’t see that.

So I built three new ones:

The implementation touched six files. database.py got the new ORM columns. claude.py got updated enrichment prompts plus changes to build_rich_text() so the new fields feed into the text embeddings. enrich_async.py got the save logic. compute_bridges.py got structural weight calculations for the new fields. And I wrote a new script, backfill_bridge_fields.py, to re-enrich existing products with the new fields without re-running the full enrichment pipeline.

One design change worth noting: social_function started as a scalar pick-one field, but that didn’t hold up. A Victorian mourning dress serves both “mourning/grief expression” and “status display.” A Chanel suit is both “professional/occupational” and “social rebellion.” So I switched it to an array with a controlled vocabulary of 15 functions plus room for freeform labels when Claude identifies something outside the vocabulary. Same pattern as the vibe system from this morning.

Caught a bug at the end of the session: build_rich_text() was treating textile_pattern as a string when it’s actually a list. Quick isinstance check fixed it. And then the database stopped responding.


Session 2: The Connection Headache

The direct Supabase database hostname (db.tusswxlrdoamintvswjs.supabase.co) just stopped resolving. No DNS response at all. The database itself was fine (I could see it in the dashboard), but nothing could connect to it.

The fix was switching to Supabase’s connection pooler, which uses a different hostname. Sounds simple. It was not simple. Four problems stacked on top of each other:

  1. Couldn’t find the pooler URL. Supabase has redesigned their dashboard since I last looked, and the connection strings are in a different place now. Some poking around to locate them.
  2. Password had a ? in it. Question marks break URL parsing (they start the query string). Had to URL-encode it as %3F in the connection string.
  3. Lines got merged in .env. The DATABASE_URL and SUPABASE_URL values ended up on the same line with no newline between them. Subtle, annoying, took a minute to spot.
  4. Wrong AWS region. The pooler hostname includes the region, and I guessed us-east-1. The error was “Tenant or user not found,” which doesn’t exactly scream “wrong region.” Ended up brute-force testing AWS regions until us-west-2 (Oregon) worked.

Final working connection string:

postgresql+psycopg://postgres.tusswxlrdoamintvswjs:...@aws-0-us-west-2.pooler.supabase.com:6543/postgres

Connection restored. 4,234 products confirmed in the database. Kicked off enrichment on 300 more products.

Root Cause

Best guess: Supabase rotated their direct database infrastructure or paused something on the free tier. The direct hostname (db.<ref>.supabase.co) just stopped resolving, no warning, no error page, just silence. The pooler hostname is a proxy that sits in front of the actual database, so it’s more resilient to that kind of infrastructure change. It’s now the permanent connection method.


What’s Next

Enrichment is running. The cross-cultural bridge fields are live. Tomorrow I want to see what bridges the new fields produce, especially between the V&A’s non-Western collections and the Met’s Western ones. A shibori-dyed Japanese indigo robe and a West African adire cloth connected through construction_technique: resist_dyeing is exactly the kind of bridge this system was built to find.

Vintage Vestige — a fashion knowledge graph connecting 500 years of design history. Built with Python, FastAPI, Claude Vision, Supabase, pgvector, and React.