docs: record that the external stream setup script is now read-only

Birock/doormile-bookings/setup_jetstream.py called update_stream with the
subject list replaced wholesale, from a hardcoded list that had drifted
behind this repo. Re-running it would have stripped booking.cancelled,
booking.outcome, booking.assignment_failed, chat.room.closed.* and --
worst -- booking.assignment_requested, which carries the assignment
retry loop rather than merely reporting on it. Bookings would have
stopped reaching riders with nothing logged, until a restart repaired
the stream via EnsureStreams. A "setup" script that causes an outage
when run is a bad thing to leave lying around.

It is now an inspector: it reports streams, subjects and consumer state
and has no add/update/delete calls at all. Verified it is the only
script anywhere that pointed at doormile-nats (66.116.226.161:4223) --
every other stream-mutating script targets jupiter's NATS.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Suriya
2026-08-11 10:48:53 +05:30
parent 2158031191
commit 2cbc9e5b13

View File

@@ -12,7 +12,15 @@ import (
// JetStream server. It lives here, next to the code that publishes, on purpose:
// the streams used to be created only by an external Python script
// (Birock/doormile-bookings/setup_jetstream.py) on another machine, and the two
// drifted. Four of the eight subjects this app published were bound to no stream
// drifted.
//
// That script has since been reduced to a read-only inspector, because it
// updated streams with the subject list replaced wholesale. Re-running it would
// have stripped every subject added here — including booking.assignment_requested,
// which carries the assignment retry loop itself, so bookings would have stopped
// reaching riders entirely with nothing logged anywhere. This map is now the only
// place streams are defined; adding a js.Publish without adding its subject here
// means the event goes nowhere. Four of the eight subjects this app published were bound to no stream
// at all — booking.cancelled, booking.outcome, booking.assignment_failed, and
// chat.room.closed.<id> (CHAT declared the literal "chat.room.closed", which does
// not match a subject with an extra token). Every publish site is best-effort