Repository navigation
Phase 1 follow-ups: unmatched rides, dedupe, env config, rewind-safe commits - #2
Merged
Merged
Conversation
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups to Phase 1 and prep for Phase 2. Stacked on #1: review and merge #1 first, then retarget this PR to
master.Rewind-safe commits and panic recovery (
pkg/kafkaconsumer)Env-var configuration (all services)
KAFKA_BROKERS,REDIS_ADDR,HTTP_ADDRandMETRICS_ADDRreplace the hardcodedlocalhostaddresses.Matching tuning:
MATCH_WORKERSNumCPU*25(wasNumCPU*5)MATCH_DEADLINE500ms(was 800 ms)REDIS_POOL_SIZEMATCH_WORKERS*5Invalid values stop the service at startup. Each service has table-tested
LoadConfig.Unmatched rides (roadmap 1c)
ride.unmatched(RideID,Reason=no_drivers|match_deadline,RequestedAt,FailedAt) instead of only logging. Publish failures are retried.matching.ErrAssign) are always retried, even after the match deadline. A retry is safe because the existing assignment is replayed.assignment-service (roadmap 1e)
ride.matchedevents are deduped.assignments_totaland end-to-end latency count each ride once. Duplicates go toassignment_duplicates_total.ride.unmatchedin its own consumer group,assignment-service-unmatched, so a not-yet-created unmatched topic can't stallride.matched.GET /rides/<id>returns matched, unmatched, or 404./assignments/<id>and/countare unchanged.rider-simulator
Droppedinstead of blocking.Docs
/rides/<id>, refreshed known limitations.docs/at-least-once-consumers.md,docs/driver-state-model.mdanddocs/rps-benchmarking-setup.mdupdated.Known gaps (documented)
ride.pricedis redelivered. A short-TTL outcome record is planned.Testing
go vet,go buildandgo test -count=1withGOWORK=off(CI mode), plusgo test -race, pass in all 8 CI modules./rides/<id>responses