Skip to content

Add mapbox optimization submit/get/list - #51

Closed
mattpodwysocki wants to merge 1 commit into
feat/feedback-apifrom
feat/optimization-api
Closed

mattpodwysocki wants to merge 1 commit into
feat/feedback-apifrom
feat/optimization-api

Conversation

@mattpodwysocki

Copy link
Copy Markdown
Contributor

⚠️ Temporarily based on #49, not main

Same stacking situation as the rest of this stack. Once #43/#44/#45/#48/#49
merge in order, this should be retargeted to `main` (`gh pr edit --base
main`).

What

`mapbox optimization submit`/`get`/`list` — the sixth API added this
session, and the first one outside the API-naming doc's V1 scope (marked
`Support in V1: false` there — proceeding anyway per the explicit call to
do all 8 candidates regardless). Hand-authored into `custom-openapi/`
since openapi-specs has no spec for this API either (v2; v1 is retired).

Solves a multi-vehicle, multi-stop routing problem as an asynchronous job:

  • `submit` — POST, 202 with a job id, given the whole problem
    (locations, vehicles, and one or both of services/shipments) as one JSON
    document through `--data` — no per-field flag makes sense for something
    this shape, the same call `styles create` already made.
  • `get` — poll by id: 202 with no body while still solving, 200 with the
    solved routes once done.
  • `list` — every submitted job and its status, so a caller doesn't have
    to track ids itself.

No `profile` path parameter here, so no new `ARG_NAME_OVERRIDES` row —
unaffected by the collision the first four commands added this session hit.

Verification

Smoke-tested against production end to end, not just unit tests: submitted
a real 3-stop problem, polled it to a solved 4-stop route (start, two
services in the order the solver actually chose, end) with real ETAs and a
running odometer, and confirmed `list` reports it back as a bare JSON
array of `{id, status}`.

488 tests, `cargo fmt --check` and `cargo clippy --all-targets -- -D
warnings` both clean.

🤖 Generated with Claude Code

Sixth API this session, the first outside the naming doc's V1 scope
(marked Support in V1: false there) — continuing per the user's own call to
do all 8 anyway. Hand-authored into custom-openapi/ since openapi-specs has
no spec for this API either.

Solves a multi-vehicle, multi-stop routing problem as an asynchronous job:
submit (POST, 202 with a job id), get (poll by id — 202 while solving, 200
with the routes once done), list (every submitted job and its status).

submit's whole problem is one JSON document through --data, the same shape
styles create already uses — locations, vehicles, and one or both of
services/shipments, with no per-field flag for something this shape.

No profile path parameter here, so no new ARG_NAME_OVERRIDES row.

Smoke-tested against production end to end: submitted a real 3-stop
problem, polled it to a solved 4-stop route (start, two services in the
solver's chosen order, end) with real etas and a running odometer, and
confirmed list reports it as a bare JSON array of {id, status}.

488 tests, fmt and clippy clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mattpodwysocki
mattpodwysocki requested a review from a team as a code owner September 24, 2026 20:13
@mattpodwysocki

mattpodwysocki commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Closing as out of scope for V1

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