Skip to content

feat(dispatch): implement Phase 17 multi-order admission and execution - #22

Merged
404khai merged 1 commit into
mainfrom
feat/phase-17-multi-order
Oct 7, 2026
Merged

404khai merged 1 commit into
mainfrom
feat/phase-17-multi-order

Conversation

@404khai

@404khai 404khai commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

Allow a new order to be inserted into an occupied rider's remaining plan while preserving ownership, custody and active travel/wait/service. Dispatch exhaustively evaluates every eligible rider and order-preserving pickup/dropoff placement using whole-plan timing, prefix capacity and hard service protections, then minimizes signed incremental road-travel seconds, road distance and canonical identity.

  • Add explicit frozen execution projections, forecast validity, deterministic stop service, mixed hard/soft deadline policies and immutable acceptance-time cumulative-delay protection.
  • Bind proposals to exact world, routing, readiness, policy, execution and logical-clock contexts. Atomically publish the selected assignment, replacement plan and accepted terms; incomplete search cannot commit.
  • Drive pooled simulation from the current committed plan, retain active execution identities, release responsibility per order and measure one union rider busy interval. Typed prediction failures block admission while existing execution continues.
  • Preserve schema 1 / Phase 13–16 compatibility. Add schema 2 pooled CLI scenarios, independent insertion oracle, semantic replay artifacts, measured benchmark evidence and the normative architecture audit.

Validation

  • cargo fmt --all -- --check
  • cargo +1.99.0 clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo +1.99.0 test --workspace --all-features --locked: 159 tests pass.
  • Independent tiny oracle: 96 admission comparisons; 24 seeded actual-readiness replay cases.
  • Release CLI build and scripts/collect_multi_order_benchmark.py: all 11 scenarios replay byte-for-byte across 11 measured runs each; coverage/work/publication invariants verified.
  • Documentation links, benchmark binary/dataset/replay hashes and git diff --check pass.

The successful pooling fixture assigns B during A's active execution, delivers both orders and records one 45.008-second busy interval. Benchmarks record hardware, compiler/build, dataset hashes, raw timing samples, median/p95/p99 and deterministic work; memory is explicitly unmeasured. These small synthetic datasets make no scalability claim.

Completion and scope

Phase 17 completion report records PASS for all 24 gates, scenario results, benchmark configuration/results and limitations. Normative audit preserves the confirmed Phase 18 contracts.

There are no queued editable future stops; active actions retain independent execution identities. Any later introduction of queued editable work must add plan-generation binding. Exhaustive insertion has a deterministic placement budget, while baseline input/health evaluation occurs before that budget.

Phase 18 implementation remains deferred until explicit user confirmation.

@404khai
404khai merged commit 8106ab0 into main Oct 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant