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

@@ -1843,11 +1843,6 @@ func UpdateMiler(c *fiber.Ctx) error {
Displayname string `json:"displayname"`
Defaultvehicletype string `json:"defaultvehicletype"`
Hubid *int `json:"hubid"`
// Legacyuserid links this rider to their old jupiter userid, so telemetry
// still arriving over the jupiter NATS chain resolves to them. Writable
// here because there is no other way to set it — the column is populated
// by ops for migrated riders, never by the rider themselves.
Legacyuserid *int `json:"legacyuserid"`
}
req := new(MilerUpdate)
@@ -1864,9 +1859,6 @@ func UpdateMiler(c *fiber.Ctx) error {
if req.Hubid != nil {
profile.Hubid = req.Hubid
}
if req.Legacyuserid != nil {
profile.Legacyuserid = req.Legacyuserid
}
profile.Updatedat = time.Now()
if err := db.DB.Save(profile).Error; err != nil {