Conversation
Correct scopes, device registration fields and response, negotiate request/response shapes, and session completion payload. Document the save upload/download/confirm endpoints and list RomM Desktop as a reference client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013q3PdG4Zfn6QWeBCRnC1sm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013q3PdG4Zfn6QWeBCRnC1sm
…claude/pr-149-alignment-45er1r # Conflicts: # docs/developers/device-sync-protocol.md
Negotiate can now return a `delete` action (with `total_delete`) when a slot the device still holds was emptied on the server, and `download` also covers a device holding a removed version. Sessions belong to one launch rather than being cancelled by the next negotiate, and a session the 24-hour cleanup expired can still be completed. Also documents the `content_hash` baseline on upload, update and download confirmation, the `capabilities` registration field, the 409 from `allow_existing: false`, how device matching actually works, and the extra devices scope needed when passing `device_id` to the save endpoints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jZ2WEQAFScfBv7UGUscNZ
sdornan
changed the base branch from
main
to
docs/retired-folder-keys-accepted
September 28, 2026 14:50
sdornan
changed the base branch from
docs/retired-folder-keys-accepted
to
main
September 28, 2026 14:50
sdornan
marked this pull request as ready for review
September 28, 2026 14:51
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the documented authentication, scope, registration, and endpoint behavior gaps.
Review effort: Lite
Findings: 3
Open (3)
What changed in this PR
Updates the device sync protocol documentation to match the server’s current API.
Changes:
- Documents authentication, registration, scopes, and negotiation.
- Adds transfer, confirmation, deletion, and session-completion workflows.
- Describes push-pull synchronization and related endpoints.
| File | Summary |
|---|---|
docs/developers/device-sync-protocol.md |
Rewrites the device sync protocol reference. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Session-authenticated clients need the romm_csrftoken cookie echoed in an X-CSRFToken header, so name both instead of pointing at a page that does not. A device-scoped slot upload also returns 409 when the device has no baseline for the slot's latest save, including its first upload to a slot another device filled. The push-pull endpoint needs devices.write and was missing from the scope table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016jZ2WEQAFScfBv7UGUscNZ
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
docs/developers/device-sync-protocol.mddidn't match what the RomM server implements. A client built from the old page would fail against a real server. This PR rewrites the page to match the backend (backend/endpoints/device/,backend/endpoints/sync/,backend/endpoints/saves.py,backend/endpoints/play_sessions.pyand their response schemas), including the sync changes from rommapp/romm#4670, #4674, #4768 and #4789.Changes
POST /api/play-sessionsneedsroms.user.write, notme.*. Passingdevice_idto the save endpoints also needs adevices.*scope, or the call returns403.mac_address,client,client_version,sync_config,capabilities,allow_existing,allow_duplicate,reset_syncs, with nopaths), and the realsync_modevalues (api,file_transfer,push_pull). It explains how matching works (mac_address, thenhostname+platform), the200/201/409responses, and the{ device_id, name, created_at }response with a string UUIDdevice_id.saves[]+rom_idsshape with an MD5content_hash, pairing on(rom_id, slot), and the error codes (400/404).session_id,actioninstead oftype,no_op, the newdeleteaction,save_id, and thetotal_*counts includingtotal_delete.destination/source/dest_path/resolutionfields, which don't exist.overwrite/autocleanup/content_hashand the 409 guard,PUTupdate, download withoptimistic, and the/downloadedconfirmation with its optionalcontent_hash.start_time/end_time/duration_ms/save_slot, the response shape, the 404/400 cases (an expired session can still be completed), and the standalone/api/play-sessionsalternative.It's merged with
main(the humanize pass), so there are no conflicts. Frontmatter, title and "See also" links are kept. The page passes prettier and markdownlint with the repo's Trunk configs, andmkdocs build --strictsucceeds.AI disclosure
This change was written with AI assistance (Claude Code), working from a comparison of the page against the RomM server source. Please review it against the backend before merging.
🤖 Generated with Claude Code
https://claude.ai/code/session_013q3PdG4Zfn6QWeBCRnC1sm
https://claude.ai/code/session_016jZ2WEQAFScfBv7UGUscNZ