Repository navigation
feat: route Call Dispatch to opted-in remote dispatchers - #333
Draft
devin-ai-integration[bot] wants to merge 2 commits into
Draft
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Joshua Tubbs <orin8722@gmail.com>
Co-Authored-By: Joshua Tubbs <orin8722@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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 changed and why
Call Dispatch can now go to a remote dispatcher through the orinks.net dispatch-call relay (Orinks/orinks-net branch
devin/1791435822-dispatch-call-relay). If nobody answers, the local dispatcher does. Remote calls only happen when the new settingremote_dispatch_callsis on (it defaults to off), online services are on, and the player is signed in. In every other case the local flow is byte-for-byte unchanged.remote_dispatch.rs: an off-loop worker (std thread, boundedsync_channel(4), cancel flag). It creates the call, polls/statusevery 3 s for a 60 s ring and then up to a 90 s answer window, and on any give-up it sends a best-effort cancel request.remainingMiles,hoursLeft,truckDamagePct,cargoDamagePct,hosRemainingMinutes?,weatherAlerts). No text is sent.ClockandTransportcan be swapped out, so the tests run instantly and offline.driving_dispatch_call.rs:Menu::updatedrains the worker's events each frame.effective_decision(kind, local, remote), the more cautious of the two, so a remote answer can only make things safer: out of hours is alwaysstop, and the mechanic still runs only when damage is overFIELD_REPAIR_DAMAGE_PCT.net::request_json: now rejects any status outside 2xx, so the body of a 3xx redirect can't be read as valid JSON.request()already errored on 4xx and 5xx.What players or maintainers will notice
With the setting on, Call Dispatch says "Calling dispatch.", then "A dispatcher picked up." and the answer. If nobody answers, the player hears "No dispatcher picked up, so the office is handling it." followed by the usual office answer.
Tests and checks run
cargo fmt --all --checkandcargo clippy --all-targets --locked -- -D warningscargo test -p ff-core -p freight-fate: 6,141 passed, 0 failed--break-battery: 48 clean, on the first commit; the follow-up only touched the two call modulesAccessibility impact
Every new line goes through
ctx.sayon the menu channel, and the final answer is queued after the earlier lines so it doesn't cut them off. Picking another report while a call is waiting says "Still waiting for a dispatcher." The flow is checked in headless state tests; nobody has rendered or listened to it yet.Changelog
## UnreleasedinCHANGELOG.md, written in plain player language and matching the style of the existing entries.[skip changelog].Link to Devin session: https://app.devin.ai/sessions/7e2a2cc4481342d38d43e5b179f6e339
Open in Devin Desktop: https://app.devin.ai/desktop/session/7e2a2cc4481342d38d43e5b179f6e339?variant=devin
Requested by: @Orinks