# TASK-010: Implement pull-request and issue API contracts Status: planned — depends on TASK-004 Owner: Codex Reviewer: Claude ## Outcome Provide frozen read-only domain and data contracts for pull requests, issues, reviews, and comments so Claude can implement TASK-008 without editing shared layers. ## Writable paths - `app/src/main/java/com/ubisam/ubgitea/domain/workitems/` - `app/src/main/java/com/ubisam/ubgitea/data/workitems/` - `app/src/test/java/com/ubisam/ubgitea/domain/workitems/` - `app/src/test/java/com/ubisam/ubgitea/data/workitems/` - `tasks/010-work-items-api-contract.md` ## Acceptance criteria - [ ] Pull requests and issues use separate immutable domain models. - [ ] Lists, reviews, and comments have explicit immutable pagination contracts. - [ ] Nullable or deleted authors map without crashes or invented identity. - [ ] 401, 403, 404, 422, rate-limit, network, parse, and server failures map to typed results. - [ ] Endpoint DTOs remain outside domain and UI packages. - [ ] Representative JSON and fake-server tests cover lists, reviews, comments, deleted users, pagination, and failures. - [ ] No create, edit, merge, close, comment, or notification-write endpoint is exposed. - [ ] Evidence records the reviewed contract-freeze commit for TASK-008. ## Required checks ```text ./gradlew assembleDebug ./gradlew testDebugUnitTest ./gradlew lintDebug ```