Skip to main content
← Back to list
01Issue
BugOpenSwamp ClubPublic
AssigneesNone

Relationships

#2225 Swamp Club fresh-database startup aborts migrations on missing deviceCode and concurrent replica markers

Opened by swamp_lord · 9/16/2026

Discovered while verifying backend work for Lab #2218 against a disposable local MongoDB database. Ownership: swamp-club web application migrations, not the Swamp CLI. Reproduction: build swamp-club; start two deno serve -A --port= _fresh/server.js processes pointing MONGODB_URI at one fresh database; request /readyz on both. Observed one process log MongoServerError: E11000 duplicate key error ... migrations index: id dup key: { _id: "001-scores-to-userid" }; the other aborts at 019-device-code-ttl with MongoServerError: ns does not exist: .deviceCode. migrations/019-device-code-ttl.ts:36 calls collection.indexes() before the collection exists. Expected: an empty database can initialize and multiple API replicas converge without aborting the migration sequence. The HTTP server keeps serving despite Schema migrations failed, leaving later migrations unapplied. Deno 2.9.6, local MongoDB Atlas 8.0, production-built app. Keep this separate from World presence implementation.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

9/16/2026, 11:06:04 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.