Repository navigation
feat: implement Phase 19 dynamic re-dispatch - #25
Merged
Merged
Conversation
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.
Behavior
Logical-time order, traffic, readiness, availability, cancellation and observed road-delay events now invoke committed-work recovery before the next effective-plan action. Unstarted pickup/dropoff pairs can move to available riders; active travel/wait/service and picked-up custody stay pinned. Whole-plan feasibility and original acceptance protections remain mandatory.
Healthy recovery requires positive road saving after explicit versioned reroute/stability penalties, minimum improvement and cooldown. Hard/unavailable-owner repair can bypass optional churn thresholds, but cannot weaken protections. Complete bounded neighborhoods produce an atomic owner/plan replacement; missing inputs, stale context or budget exhaustion publish nothing. Recovery evidence is read-only so callers cannot rebind evaluated proposals.
Schema 4 adds explicit dynamic inputs, delayed-arrival generation invalidation, pre-pickup cancellation/refusals, terminal population metrics and fleet-window responsibility exposure. Phase 17/18 admission APIs retain their existing contracts. Root/crate READMEs and architecture/API docs include runnable commands.
Validation and evidence
cargo fmt --all -- --checkcargo +1.99.0 clippy --workspace --all-targets --locked -- -D warningscargo +1.99.0 test --workspace --locked: 195 passing tests, including an immutable-evidence compile-fail API test.Completion report and every gate · Recovery contracts · Scenario expectations · Measured record.
Scope limits
This is a bounded local recovery heuristic, not a global VRP optimum or impossibility proof. Repairs requiring multiple moves through infeasible intermediate states may return scoped
NoRecovery. Unknown required existing inputs block recovery. Offline means unavailable for new work, not physical immobilization; unchanged obligations continue if recovery fails. Custody handoffs, returns/disposal, active/onboard cancellation, mid-leg diversion and Phase 20 are deferred.Generated semantic replay artifacts are isolated in the final evidence commit; implementation/API protection and evidence are separate commits.