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:
@@ -417,23 +417,6 @@ func RegisterRoutes(app *fiber.App, cfg *config.Config) {
|
||||
internal.Get("/agent-decisions/similar", controllers.FindSimilarDecisions)
|
||||
internal.Patch("/agent-decisions/:id/outcome", controllers.UpdateDecisionOutcome)
|
||||
|
||||
// Rider telemetry ingest for the jupiter NATS chain. The forwarding worker
|
||||
// holds no rider JWT — the rider app is still jupiter-shaped and its token is
|
||||
// jupiter's — so identity arrives as a header and LegacyMilerIdentity turns
|
||||
// it into c.Locals("userid"). These are the *same handlers* the miler app
|
||||
// hits under /miler; only the way identity is established differs, so
|
||||
// validation and storage cannot drift between the two paths.
|
||||
//
|
||||
// Only fire-and-forget telemetry is exposed this way. Transactional actions
|
||||
// (pickup-complete, deliver, payment) are deliberately absent: the rider
|
||||
// needs a real answer from those, which a queue in front of them cannot give.
|
||||
ingest := internal.Group("/miler", middlewares.LegacyMilerIdentity)
|
||||
ingest.Post("/logs", controllers.CreateMilerPeriodicLog)
|
||||
ingest.Post("/status", controllers.CreateMilerStatus)
|
||||
ingest.Post("/consignments/logs", controllers.PublishConsignmentLogs)
|
||||
ingest.Post("/breaks/start", controllers.MilerStartBreak)
|
||||
ingest.Put("/breaks/end", controllers.MilerEndBreak)
|
||||
|
||||
// --------------------
|
||||
// WEBSOCKET — live miler tracking (no auth, public tracking link)
|
||||
// --------------------
|
||||
|
||||
Reference in New Issue
Block a user