Repository navigation
fix(orders): remove driver offers; only adhoc orders are offered - #398
Merged
Merged
Conversation
…rivers
Assigning a driver started an expiring "offer" in meta.offer that the driver
had to accept, and raised "driver not accepted" when they did not. That is
not how dispatch works: an order assigned to a driver (by dispatch or
auto-assign) is simply theirs. Only adhoc orders are offered, and the
existing adhoc flow already does it: dispatching pings drivers within
adhoc_distance (OrderPing), fleetops:dispatch-adhoc pings again every minute
while nobody has taken it, and a driver takes it with `start` + `assign`.
This reverts "feat(orders): driver offers with accept, decline and expiry":
- meta.offer and its sync on assignment (observer, bulk assign)
- POST v1/orders/{id}/accept and /decline
- fleetops:expire-offers, the driver_not_accepted alert (DriverNotAccepted),
OrderOfferDeclined, the order.offer_* broadcasts
- `offer` on the order resources and fleetops.offer_timeout_minutes
The cancel reason keeps its request helper, which it shared with decline.
roncodes
added a commit
to fleetbase/postman
that referenced
this pull request
Oct 13, 2026
Fleet-Ops drops driver offers in fleetbase/fleetops#398. Remove the Accept an Order and Decline an Order requests and their examples, the offer field on the Order object, the order.offer_* realtime events and the offer_timeout_minutes setting. The Orders folder now explains that an assigned driver simply has the order and only ad hoc orders are offered to nearby drivers, taken with Start an Order and assign. The expected_status override added for the offer requests is reverted, as nothing else in the Fleetbase API collection uses it.
5 of 16 tasks
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.
What
Removes the driver offers added in #394. An order assigned to a driver is simply theirs; only adhoc orders are offered to drivers, and Fleet-Ops' existing adhoc flow already handles that.
Why
#394 made every driver assignment an expiring offer in
meta.offer(5 minutes by default). When the driver did not tap Accept, the order was markedexpiredand dispatch got "driver has not accepted", even though the driver was assigned and the order was theirs. That is not how dispatch works:adhoc_distance(OrderPing),fleetops:dispatch-adhocpings again every minute while nobody has taken it, and a driver takes it withstart+assign. This existed before feat(orders): status-guarded edits, order.changed events, driver offers #394 and is unchanged.meta.offerduplicated the adhoc flow and applied it to assigned orders.Changes
Reverts ea06435 ("driver offers with accept, decline and expiry"):
meta.offerand its sync on assignment (order observersaving, bulk assign in the internal driver and order controllers)POST v1/orders/{id}/acceptandPOST v1/orders/{id}/declinefleetops:expire-offers(scheduled every minute), thedriver_not_acceptedalert (DriverNotAccepted),OrderOfferDeclined, theorder.offer_expired|accepted|declinedbroadcasts (OrderOfferChanged)offeron the v1 order resources; thefleetops.offer_timeout_minutessettingKept from #394: status-guarded edits and
order.changed, telling a driver when an order is taken off them, and cancel with a reason. The cancel endpoint keeps thereasonFromRequesthelper it shared with decline.API and docs impact
offerfield that feat(orders): status-guarded edits, order.changed events, driver offers #394 added (unreleased; no tag contains feat(orders): status-guarded edits, order.changed events, driver offers #394).release/v0.4.25no longer readsmeta.offer(318baba).Validation
Ran each test file on its own, as the repo's file runner does, with PHP 8.3, on this branch and on
release/v0.6.72:release/v0.6.72without this change. They look like local environment and vendor drift.ApiOrderControllerContractsTest: 18 tests (19 before; the offers test is removed), 0 errors.OrderControllerLifecycleActionsTest,OrderOperationsTest,OrderChangeNotificationsTest,OrderAssignmentObserverTest: pass.Existing orders may still have a
meta.offerfrom #394. Nothing reads it any more.