Skip to content

feat(app-server-protocol): add v2 pullRequest protocol module#184

Open
andrei-hasna wants to merge 1 commit into
mainfrom
openloops/open-codewith/44947225-d256-4827-9cef-e77d0cd6bd73-cf6fcd72
Open

feat(app-server-protocol): add v2 pullRequest protocol module#184
andrei-hasna wants to merge 1 commit into
mainfrom
openloops/open-codewith/44947225-d256-4827-9cef-e77d0cd6bd73-cf6fcd72

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Summary

Adds the v2 pullRequest protocol surface to codex-app-server-protocol and registers its three read methods, keeping query outcomes in-band rather than surfacing them as JSON-RPC errors.

  • Add protocol/v2/pull_request.rs with PullRequest{,Overview,List,Read} params/response types plus a PullRequestQueryState enum (Ready/Loading/Unavailable) carried on every response so empty/loading/degraded outcomes are in-band.
  • Export the module from v2/mod.rs.
  • Register pullRequest/overview, pullRequest/list, pullRequest/read in protocol/common.rs using global_shared_read("pull-request"), mirroring sibling read methods.
  • Add ClientRequest handler arms in app-server/src/message_processor.rs returning in-band Unavailable query states until the backing PullRequestRequestProcessor lands (todos task 1ca04ab4). The ClientRequest match is exhaustive with no wildcard arm, so these arms are required to compile.
  • Regenerate vendored app-server schema fixtures (TypeScript + JSON).

Validation

  • cargo build -p codex-app-server-protocol -p codex-app-server — ok
  • cargo test -p codex-app-server-protocol — 260 lib + 2 schema-fixture tests pass
  • cargo fmt --all
  • cargo clippy -p codex-app-server-protocol -p codex-app-server — clean

Follow-ups

Downstream todos 1ca04ab4 (implement PullRequestRequestProcessor) and 23c5b724 (migrate /pr TUI) remain blocked until this lands.

🤖 Generated with Claude Code

Add the v2 pullRequest protocol surface and register its three read
methods so downstream consumers can query pull-request data.

- Add protocol/v2/pull_request.rs with PullRequest{,Overview,List,Read}
  params/response types plus a PullRequestQueryState enum so empty,
  loading, and degraded outcomes are represented in-band on each
  response instead of as JSON-RPC errors.
- Export the module from v2/mod.rs.
- Register pullRequest/overview, pullRequest/list, and pullRequest/read
  in protocol/common.rs using global_shared_read("pull-request"),
  mirroring the sibling read methods.
- Add ClientRequest handler arms in app-server message_processor.rs that
  return in-band Unavailable query states until the backing
  PullRequestRequestProcessor is implemented (todos task 1ca04ab4);
  the ClientRequest match is exhaustive with no wildcard arm.
- Regenerate vendored app-server schema fixtures (typescript + json).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant