revert: drop the jupiter->Doormile telemetry bridge

Doormile should not be wired to jupiter's APIs at all. The ingest routes,
the legacy identity middleware and the worker-side fan-out existed to
copy jupiter's rider GPS into Doormile, which was never the goal:
Doormile needs its own JetStream in front of its own endpoints, not a
pipe from someone else's.

Removed here: /internal/miler/* ingest, LegacyMilerIdentity, and the
legacyuserid field on the miler update payload. The worker-side shadow
forward and its k8s secret are removed separately in the Kubernetes
repo; jupiter forwarding is untouched and verified still healthy.

MilerProfile.Legacyuserid is deliberately kept. Nothing reads it now,
but it records which jupiter rider each of the six migrated riders came
from, which is worth having during the cutover. Dropping a populated
column buys nothing and AutoMigrate would not drop it anyway.

Kept from that work because they are unrelated to jupiter and fix real
bugs: db.EnsureStreams (four subjects were publishing to no stream and
being dropped silently) and the tenantlocationid column.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Suriya
2026-08-10 16:24:35 +05:30
parent 5458d080c6
commit 41f0013751
4 changed files with 5 additions and 107 deletions

View File

@@ -92,12 +92,11 @@ type MilerProfile struct {
Profilephotourl string `json:"profilephotourl" gorm:"column:profilephotourl"`
Vehicleid *int `json:"vehicleid" gorm:"column:vehicleid"`
Hubid *int `json:"hubid" gorm:"column:hubid"`
// Legacyuserid is this rider's userid in the old jupiter/Nearle system, for
// riders migrated from it. It exists so telemetry still arriving over the
// jupiter NATS chain — which identifies a rider by jupiter's userid and has
// no Doormile token — can be resolved to a Doormile rider. Nil for riders
// created natively in Doormile, which is the normal case. Never used for
// authentication: it identifies, the X-Internal-Key authenticates.
// Legacyuserid holds this rider's userid in the old jupiter system for the
// six riders migrated from it. Nothing reads it any more — the jupiter
// telemetry bridge it existed for was removed — but it is kept as a record
// of where each migrated rider came from, which is worth having during the
// cutover. Nil for riders created natively in Doormile.
Legacyuserid *int `json:"legacyuserid,omitempty" gorm:"column:legacyuserid;index"`
Defaultvehicletype string `json:"defaultvehicletype" gorm:"column:defaultvehicletype"`
Currentlatitude float64 `json:"currentlatitude" gorm:"column:currentlatitude"`