You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User clarified the v3 north star: all reads via GraphQL (kernel + federated extensions, tracked in SP6 #203), all writes via RPC (this issue). The frontend never calls /api/ops directly.
Currently /api/ops carries BOTH read and write traffic for extensions. SP6 handles the read half; this issue handles the write half.
Webhook / publisher fan-out — emitted via the event log.
Build outline
Spec + spike: typed Rust trait shape, how the WASM component answers the tarpc method (custom WIT export, similar in flavour to SP6's graphql-resolve), auth threading, error mapping, idempotency keys.
Generated codegen: extend comtrya-wit-codegen so every WIT write op gets a tarpc method emitted from the same source.
Server: stand the tarpc service up alongside axum, wire into the same auth + rate-limit + audit pipeline.
SDK rollout: typed RPC client per extension in @comtrya/sdk-core. Frontend write callers (createEpic, closeIssue, mergePull, etc.) migrate one by one.
Sunset /api/ops writes: once every write caller is on tarpc, the /api/ops POST surface is removed.
Tests + docs: per-extension write test suite, end-to-end RPC flow in start.sh --reset --oneshot, updated SPEC.md / GOAL.md / v3-decisions.md to describe RPC as the live shape (not the goal).
Background
User clarified the v3 north star: all reads via GraphQL (kernel + federated extensions, tracked in SP6 #203), all writes via RPC (this issue). The frontend never calls
/api/opsdirectly.Currently
/api/opscarries BOTH read and write traffic for extensions. SP6 handles the read half; this issue handles the write half.Target transport: tarpc
https://github.com/google/tarpc
Why:
axumalongside the GraphQL endpoint.Scope (writes)
Every WIT op that is a write today migrates to a typed tarpc method:
ext_issues: open-issue, close-issue, reopen-issue, assign-project, post-comment, edit-comment, delete-commentext_epics: create-epic, change-state-epic, assign-projectext_pull_requests: create-pull, close-pull, merge-pullext_checks: record-checkext_docs/ext_workspace_home: any write ops that exist today/api/ops(label updates, repository config, etc.)Out of scope (stays on existing transports)
receive-pack) — already pure Rust, not an extension write.Build outline
graphql-resolve), auth threading, error mapping, idempotency keys.comtrya-wit-codegenso every WIT write op gets a tarpc method emitted from the same source.axum, wire into the same auth + rate-limit + audit pipeline.@comtrya/sdk-core. Frontend write callers (createEpic,closeIssue,mergePull, etc.) migrate one by one./api/opswrites: once every write caller is on tarpc, the/api/opsPOST surface is removed.start.sh --reset --oneshot, updated SPEC.md / GOAL.md / v3-decisions.md to describe RPC as the live shape (not the goal).References
docs/spec-gap-analysis.md§A7.1 — RPC writes (decided)docs/v3-decisions.md— north-star sectionGOAL.md— north-star sectionSPEC.md— product principles