Repository navigation
mesh: test that the ATOM media relay needs prefill's handoff - #179
Conversation
The PD image-chat test's mock prefill now answers as ATOM's multimodal prefill does once it hands off (non-streaming, kv_transfer_params with cache_seed and mrope_position_delta, plus prompt_token_ids), and decode is checked to receive them. A third case answers the image chat without kv_transfer_params and gets 502 prefill_missing_kv_transfer_params with decode never reached. can_chunk_request's comment names the dependency on ROCm#3410. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 1 pushed 1187e64.
|
| let with_handoff = json!({"choices": [], "prompt_token_ids": prompt_ids, | ||
| "kv_transfer_params": handoff}); | ||
| // One that does not hand off answers the image chat without `kv_transfer_params`. | ||
| let without_handoff = json!({"choices": [], "prompt_token_ids": prompt_ids}); |
There was a problem hiding this comment.
ATOM's prefill answers without a handoff as "kv_transfer_params": null, not by omitting the key (ROCm#3410's test_prefill_without_handoff_returns_no_kv_params). With null here the case gets 500, not 502: execute_atom_relay passes Some(Null) to enrich_decode_kv, which rejects it. Make the mock answer null and have execute_atom_relay treat null as missing.
| /// ids prefill expands from the media and the handoff's `cache_seed`, | ||
| /// which chunked mode starts decode without. ATOM's multimodal prefill | ||
| /// hands them off only once ROCm/ATOM#3410 lands; before it, the relay | ||
| /// answers such a request 502 `prefill_missing_kv_transfer_params`. |
There was a problem hiding this comment.
Against a real ATOM prefill this request gets 500 enrich_decode_kv_failed, not 502 prefill_missing_kv_transfer_params: the prefill returns kv_transfer_params: null. Keep this sentence once execute_atom_relay treats null as missing, or state the real code.
|
REQUEST CHANGES @ 1187e64: 1 blocking. Blocking (inline on the test and on Checked: gate on g07 @ 1187e64, green: pytest 14819 passed, cargo 1670 passed, 0 failed, the known Accepted with reservation: the Dev record says #167 asks for an in-place extension; #167 only names the PD test's mock. Watch next: none. EvidenceEach run:
Why null: |
ATOM's prefill answers without a handoff as "kv_transfer_params": null, which the relay passed to enrich_decode_kv and answered 500. Answer it 502 prefill_missing_kv_transfer_params, as for an absent field, and test both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Round 2 pushed 24c8778.
task-167 @ 24c8778: gate.sh green (pytest 14819 passed, cargo 1670 passed, 0 failed, one known up-m1 skip). |
|
APPROVE @ 24c8778. No blocking issues. Round 1's finding is fixed: ATOM's real no-handoff answer ( Checked:
Accepted with reservation: Watch next: none. EvidenceEach run:
|
Closes #167. Ready for review. No blocking issues.
Why
An image chat sent down ATOM's PD response relay fails today, because ATOM's multimodal prefill on main hands off nothing: it answers with a null handoff. The relay answered that null with 500 instead of refusing it as a missing handoff, and the PD test hid both: its mock prefill always answered with a handoff.
What changed
execute_atom_relaytreats a nullkv_transfer_paramsas missing, so such a chat gets 502prefill_missing_kv_transfer_params, not 500.kv_transfer_paramswithcache_seedandmrope_position_delta, plusprompt_token_ids. Decode is checked to receive all of them.kv_transfer_paramsnull and absent: the client gets 502 and decode is never called.AtomAdapter::can_chunk_request's comment says media takes the relay because decode needs prefill's expanded ids and cache seed, which ATOM's prefill hands off once feat(engine): multimodal PD through the chat path ROCm/ATOM#3410 lands.Review focus
execute_atom_relay, the one file outside up-m1: test that the media relay needs prefill's handoff (ROCm/ATOM#3410 first) #167's file set.Testing
The null and absent cases pass: without prefill's handoff the relay refuses the image chat with 502, so the relay depends on ROCm#3410.
task-167 @ 24c8778: gate.sh green (black, ruff diff, pytest 14819 passed, cargo 1670 passed, 0 failed, one known up-m1 test skipped).
Follow-ups
none
Dev record
execute_atom_relay), but ATOM's prefill sendskv_transfer_params: null(ChatCompletionResponsedumps None; feat(engine): multimodal PD through the chat path ROCm/ATOM#3410'stest_prefill_without_handoff_returns_no_kv_paramsasserts it), which reachedenrich_decode_kvand failed with 500.atom/mesh/src/routers/http_pd_router.rsis changed outside the brief's file set, so the real null answer gets the 502 the brief names. The cases share one test,atom_pd_ingress_relays_an_image_chat_without_chunked_transfer, extended in place; the brief names only the PD test's mock, not an in-place extension (reviewer's note). The text case is unchanged. The mock also returnsmrope_position_delta, since feat(engine): multimodal PD through the chat path ROCm/ATOM#3410 returns it.vendoring_rejects_unsafe_downloads_and_preserves_sources_on_failure, a knownup-m1failure whose manifest moved to fix(mesh): commit the vendored ext-proc proto manifest ROCm/ATOM#3523.Evidence
Revert-red, each mutation run alone with
cargo test --lib atom_pd_ingress_relays_an_image_chatinatom-gate:localon g07, then restored:execute_atom_relay's null check reverted (Some(v) => v,None =>), at 24c8778left: 500, right: 502at the null case's status assertexecute_atom_relaytakes a missingkv_transfer_paramsas{}(round 1)Elapsed) because decode is dispatchedcan_chunk_requestignorescarries_media(round 1)chunked_transfer: true, expectedNullWith the change at 24c8778: 1 passed;
cargo fmt --checkclean.🤖 Generated with Claude Code