mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-21 10:52:06 +01:00
## Thinking Path > - Paperclip users can inspect queued messages, interrupt a task, or steer the active run. > - All three operations need the same view of pending comments, approvals and first-turn inputs. > - The HTTP routes owned the code that loaded and locked this state. > - A separate move makes the later steering transaction easier to review. > - The same callers now use the board queue reader and lock in wake-queue. ## Linked Issues or Issue Description **What existing behavior does this improve?** Reading the board queue and locking its current state for Interrupt and Steer. **Subsystem affected** Server task admission. **Current behavior** Local functions in the issue route select the ordered queue and apply its locking rules. **Proposed behavior** The existing route handlers call the same implementation through the wake-queue boundary. **Additional context** Depends on #22272. This supplies the current board view for the steering extraction discussed in #13160. ## What Changed - Move the existing board snapshot and lock into a Postgres adapter. - Use the shared reader from GET, Interrupt and Steer, including acknowledgement replay. ## Verification Fifteen focused Postgres route tests passed on the extracted implementation. They cover live queue reads, Interrupt, acknowledgement replay, concurrent run updates, stale targets and timeouts. Run `pnpm exec vitest run server/src/__tests__/issue-queued-comments-routes.test.ts` and `node scripts/check-module-boundaries.mjs`. Review the move with `git diff --color-moved`. ## Risks A change to these shared reads could affect which messages users see or whether a pending input can be interrupted. The move preserves the queries, lock order, rich interaction entries and caller-specific live probe behavior. ## Model Used OpenAI GPT-6.2 Sol (`gpt-6.2-sol`) implemented the change. OpenAI Codex directed the work, reviewed the diff, and ran qualification. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Paperclip <noreply@paperclip.ing>