Repository navigation
feat(gateway): image generation offload - job-service routing, sync_id, poll progress, per-device auth - #86
siddWednesday wants to merge 1 commit into
Conversation
…c bearer auth The three image POST routes now start jobs via ImageGenerationJobService instead of calling generateImage directly - restoring the single-job admission (busy = 429), giving gateway images a syncId + sidecar so they land in this Mac's gallery and ship to paired devices over the mesh like local generations. Responses carry sync_id so a paired requester can dedupe the synced copy; pending polls report live stage/step. A presented bearer is verified against the live per-device action tokens (401 on mismatch); no credentials keeps the documented open-LAN posture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



What this does
Review note - merge order: this branch sits on top of
feat/windows-parity(it uses its per-device token infrastructure). Merge that to main first; this PR's diff then collapses to the single offload commit (617e982). Mobile half: off-grid-ai/OGAM#638.The desktop half of phone->Mac image-generation offload: a paired (or any LAN) phone POSTs the gateway's existing
/v1/images/generationsin async mode and receives a desktop-quality image; the mobile half is the matchingfeat/image-gen-offloadbranch in OGAM.ImageGenerationJobServiceinstead of callinggenerateImage()directly. That restores the single-job admission for gateway callers (second request = 429), and gives every gateway image a syncId + sidecar - so it appears in this Mac's own gallery and ships to paired devices over the existing mesh share, exactly like a locally started generation.sync_idso a paired requester dedupes the mesh copy against the HTTP result (the phone uses it as the local file id).{stage, step, total}) - the phone maps this into its normal generation card.Verification
Unit + integration: 5 pure tests (
image-route.test.ts: response shaping, sync_id, poll progress gating) + 4 against the real booted gateway (image-route-auth.integration.test.ts: open posture reaches 501, valid token accepted, invalid = 401 on both routes). Full suite green through the pre-push gate.Verified live on a dev build (2026-08-26): 501 honest reason with no model; SDXL pulled headlessly via
/v1/models/pull; sync generation returned b64 + sync_id with the sidecar landing ingenerated-images/; async 202 + poll showedstep 3/4 -> 4/4 -> completedwith the result held at the poll URL; concurrent request 429'd; bad bearer 401'd. End-to-end phone->Mac generation confirmed on a real iPhone against this branch (image generated on the Mac, delivered into the phone chat).No screenshots: the change is headless (HTTP surface); the live curl transcript above is the visual. The user-facing surface ships in the OGAM PR.
🤖 Generated with Claude Code