A user's own dsh llm-deepseek row pointed at magpie (e3491e2bb's docs)
calls /v1/messages with x-deepseek-harness-session-id and
x-deepseek-harness-compact. #2505 reads both in sessionOf/dshCompacts
for every route already, but TestDshMarksSessionAndCompaction only
covered /v1/chat/completions. TestDshMarksOnEveryRoute sends both marks
(and llm-deepseek's x-deepseek-harness-user-id) to /v1/messages on an
Anthropic provider and /v1/responses on a Responses provider, and checks
the recorded session, kind "compact" or none, and that the vendor gets
no x-deepseek-harness-* header. No behaviour changes: this guards what
the docs now tell users, and so it passes on the old code too.
docs/subsystems/gateway-sessions.md names it.
Broken by hand: dropping x-deepseek-harness-session-id from
sessionHeaders turns all four cases red (session ""); making dshCompacts
always false turns both compact cases red (kind ""). Restored after
each.
Run before the rebase onto 500aa7096: go test ./internal/gateway
-count=1 -timeout 45m (ok, 450s). At this head, after it (500aa7096
changes internal/sessions only): go test ./internal/gateway -run
'TestDshMarks|Session' ok, go test ./internal/sessions ok; gofmt -l internal/gateway empty; GOOS=linux and
GOOS=windows go vet ./internal/gateway ok. Real dsh 0.2.1-rc.2 through a
sandbox magpie recorded its session on /v1/messages (see e3491e2bb).
Not tried: streaming on these two routes in the test (the real dsh run
streamed /v1/messages), Windows test run.