π fix: a push in a cloud session moves the board through REST
Slice: #128
Fixes State #138 of P-45: the board moves an agent's push makes went through GitHub's GraphQL API, which Claude's GitHub proxy refuses, so a cloud session's push printed "could not read where #N and its work item are on the board (GitHub's GraphQL API refused: HTTP 403)" and moved nothing.
src/board.ts,boardStarted: GitHub's REST API alone. It reads the slice and its parent (/issues/{n},/issues/{n}/parent), the open Work items (/issues?state=open&type=Work item, every page), the repository owner's Projects (/orgs/{org}/projectsV2or/users/{user}/projectsV2), each open one's Status and Step single-select fields, its items with those values, and moves an item withPATCH β¦/projectsV2/{n}/items/{id}. Pages follow the Link header. A closed Project, an archived item, a pull request or draft, and another repository's issue are left alone; a Project with neither field has no items read. Every part has a REST equivalent, so no GraphQL is left in the push. The moves, their order and their lines are as before; a refusal now names the REST call, e.g.GitHub's REST API refused GET /orgs/example-org/projectsV2?per_page=100: HTTP 403 Forbidden.- Differences from GraphQL: only the repository owner's Projects are read (onboard makes the board there), closed Projects are skipped, and every open Work item is read rather than the newest hundred.
onboardkeeps its GraphQL setup: it runs on the owner's Mac, not in sessions.- README: the board paragraph says the moves use REST and work through the proxy.
- Tests: a REST Projects fake (
RestBoardinsrc/fake-board.test.ts); the push tests insrc/work.test.tsnow run on it and check no GraphQL is asked;src/board.test.tscovers a user-owned board, one-item pages, a closed Project, items of other repositories, PRs, drafts and archived items, no parent or a non-Work-item parent, and refused reads.
Checked against GitHub: the field, item and Link shapes the fake serves match athya-hq's own Projects (read-only). pnpm check passes (881 tests, board.ts 100% lines).
π€ Generated with Claude Code
Summary by cubic
Fixes board moves on push in Claude cloud sessions: they went through GitHub's GraphQL API, which the session's proxy refuses, so a push printed a 403 and moved nothing. They now use GitHub's REST API for Projects alone, and a refused read names the REST call.
- Only the repository owner's open Projects are read; closed Projects are skipped, and every open Work item is read rather than the newest hundred.
- A missing parent reads as no parent only when the response is a 404 saying so; any other failure is a refused read and names the call.
onboardkeeps its GraphQL setup because it runs on the owner's Mac, not in sessions.