feat(sidecar): protocol 3 — the first route on this bridge that is not a GET #3
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/phase-6-identity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
POST /link/confirmforwards a one-time link code to the plugin and hands back what it says. Everything before it was the website reading what the game had already told us; this is the website asking the game a question only the game can answer.It is still a forwarder and holds no authority of its own
It does not mint codes, does not store them, does not know what a website user is, and cannot tell a good code from a bad one. Putting the code table here would give the sidecar a credential and an opinion, and D2 and the bridge principles say it has neither.
A refused code is a 200
link.okandlink.errorare both answers, and the website has to tell "that code is wrong" from "the game never replied" to say the right thing to a player. The two transport failures keep the codesrespondalready gives them: 503 when the game is down, 504 when it is up and silent.That distinction was walked from the other end this phase: with the sidecar up and no plugin connected,
POST /link/confirmanswers{"error":"no plugin connected"}with a 503, and the module turns that into "The game servers are unreachable right now — try again in a minute" rather than "that code is wrong".usable_codeSplit out and tested because its two rejections are easy to get subtly wrong. It trims before it measures: a player pasting a code out of game chat brings whitespace with it, a field of nothing but spaces is empty rather than four characters long, and the length bound belongs on the trimmed value.
Checks
cargo test --release— 46 green.cargo clippy --release --all-targets -- -D warnings— clean. Built and run against the phase-6 module for the whole browser walk.AI disclosure
🤖 Generated with Claude Code
https://claude.ai/code/session_01PMH6bw1jXMgbyF3ZWGEzSM