mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-16 03:31:44 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - GitHub bots publish reviews and report the result of their assigned task. > - A GitHub check and a Paperclip task have separate completion rules. > - The current prompt explains how to wait, but gives little completion guidance. > - A bot can keep a complete review in review while it waits for CI or merge that its assignment does not require. > - This pull request makes the configured completion rules clear in GitHub prompts. > - The benefit is a finite review task with an accurate status and publication evidence. ## Linked Issues or Issue Description Related change: Refs #17318 keeps advisory review waits separate from human attention. This change adds completion guidance in the same GitHub prompt owner. **What happened?** A bot can publish a complete current-head 5/5 review and still wait for CI or merge. Manual request prompts also lack the task completion guidance used by automatic reviews. **Expected behavior** When the configured assignment allows completion at 5/5, a complete published review can finish Done. CI and merge are completion conditions only when the assignment requires them. Explicit tracking rules still apply. **Steps to reproduce** 1. Configure an agent to finish after a complete published current-head 5/5 review. 2. Start a GitHub review with CI results unavailable. 3. Inspect the generated prompt. It explains a response wait but does not explain this completion case or publication safeguards. 4. With this change, automatic, mention, and comment prompts carry the same explicit guidance. **Paperclip version or commit** Base commit: `83541e89ad3b90740ffc61a32c396dddb5834526`. **Deployment mode** Built from source. The prompt change applies to GitHub bot tasks. ## What Changed - Add shared guidance within the GitHub prompt module for configured completion at 5/5 and finite discussion replies. - Require a complete assessment, confirmed publication, and the current head in the 5/5 guidance. - Preserve explicit CI, merge, and below-5 tracking rules. Keep the shared status arbiter and check thresholds unchanged. - Add six prompt cases. State that CI is unavailable in the existing lifecycle completion case. - Document the configuration example and its limits. ## Verification - Six new prompt cases failed before the change. - `pnpm exec vitest run server/src/services/chat-github-review-policy.test.ts`: 40 passed. - `pnpm exec vitest run server/src/services/native-runtime/external-chat-wait.integration.test.ts -t 'settles a published'`: 9 passed. - `pnpm exec vitest run server/src/services/native-runtime/external-chat-wait.integration.test.ts -t 'inherits.*review|published.*guard|unknown publication|pending publication|changed head|inherited.*review'`: 5 passed. - `git diff --check` passed. - `pnpm verify` returned exit 2. The connector document requires broader CI coverage. - Local preflight installed dependencies and built shared and plugin SDK packages. It stopped because Cargo is unavailable. Full local typecheck, build, and test suites were not run. - [Greptile reviewed this commit](https://github.com/paperclipai/paperclip/pull/21748#issuecomment-6894002401) at 5/5 with no actionable findings. Its check passed for `36dd146cdc00b0f3d7f6fc2971f24166ef0f6bf5`. - [CI](https://github.com/paperclipai/paperclip/actions/runs/43711597984) passed for `36dd146cdc00b0f3d7f6fc2971f24166ef0f6bf5`. Typecheck, build, Rust/Runner, all server tests, and all eight E2E test groups passed. The final [CI gate](https://github.com/paperclipai/paperclip/actions/runs/43711597984/job/132808715297) passed at 12:17:58 UTC on 2026-11-15. - At 12:23 UTC, all 61 check records were complete: 57 passed, 1 was neutral, and 3 were skipped. Snyk also passed. No checks failed or remained pending. ## Risks This change gives prompt guidance. It does not enforce a score-to-status rule. Custom assignments can still require CI, merge, or later review. The focused tests check prompt content and existing lifecycle behavior; they do not prove every live agent or webhook journey. ## Model Used OpenAI GPT-6 through Codex, with reasoning, tool use, and code execution. This session does not expose the exact model variant or context window size. ## 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 described the issue in this PR with the bug report fields - [x] I have not referenced internal or instance-local Paperclip issues or links - [x] My public branch name describes the change and contains no internal ticket id - [x] I have run focused 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 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>