Repository navigation
[2886 by Claude Opus 5.5] Complete and link repository to-dos to the GitHub issue opened when a task is launched from them - #2887
Conversation
… are now marked complete and linked to that issue. The new and affected test suites pass, and type checks pass for the root, `core`, `api`, `cli` and the UI. I didn't run `npm run migrate` against a real database; the migration's apply and rollback are only tested on an in-memory SQLite database. Where it happens: `packages/api/routes/taskSubmissionRoutes.ts` has a new `linkSubmissionTodos` helper. It runs after every resumed submission, in both `submit` and `retry`; MCP `create_task` goes through the same route. It does nothing until the submission has an issue number. Any error is logged as a warning and never changes the response. It can be swapped out in tests through `services.completeTodos`. Database and service: - Migration `20261013000000_add_todo_issue_link.js` adds `linked_issue_repository`, `linked_issue_number` and `linked_task_id` to `repo_todos`, plus an index. Rolling back removes them. - `completeTodosForIssue` only updates to-dos that match the to-do id, the submitting user and the issue's repository. Running it again with the same issue changes nothing. Relaunching a reopened to-do points it at the new issue. It's exported from `@propr/core`. - Repository match: the comparison ignores case, because submissions store the repository in lowercase. - The plan path (`linked_draft_id` and its functions) is unchanged. Where the link shows up: - REST API: to-dos now include `linkedIssueRepository`, `linkedIssueNumber` and `linkedTaskId`, in demo mode too. - MCP: `list_todos` returns a `linked_issue` object; `get_todo` gets the new fields through the REST route. - CLI: the `RepoTodo` type has the new fields, and `todo show` prints a "Linked Issue" line. - Web UI: a new `TodoIssueLink` chip shows `#<issue number>` and opens the GitHub issue in a new tab. It appears on active to-dos (next to "Linked to plan") and in Completed Items. Clicking it doesn't select or drag the to-do. Docs and changelog: the sentence in `launching-work.md` that said launching leaves the to-do open now describes the new behaviour, and there's an Unreleased → Changed entry in `CHANGELOG.md`. Tests: - `repoTodosIssueLink.test.ts` (new): checks that other users' and other repositories' to-dos are left alone, that repeating the call is harmless, and that the migration rolls back cleanly. - `taskSubmissionRoutes.test.ts`: a new case covers submit, retry and a repeated submit producing a single completion, and a failing to-do write still returning 200 and `queued`. - `TodoIssueLink.test.tsx` (new): covers the chip's rendering. - Existing tests: I updated the expected MCP summary in `mcpIntegration.test.ts` and the test data in `QuickAddTodo.test.tsx`. The new code adds no lint warnings. To avoid a new complexity warning in `SortableTodoItem`, I moved the chip row into a small helper component. The one lint warning left is in `dockerResultProcessor.ts`, which this change doesn't touch. I also captured a preview image of the to-do panel with the new chip, rendered with sample data.
|
/ultrafix |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds issue linkage across persistence, REST, MCP reads, CLI output, and the UI. It needs changes before merge because replaying an accepted submission can overwrite subsequent user actions. ✅ Ownership scoping — Completion checks both the submitting user and repository, with tests covering foreign users and repositories. ✅ Failure isolation — To-do write failures are caught without failing an already accepted submission. ✅ Visible issue links — Both active and completed to-dos display the GitHub issue link. The supplied current-head checks report 41 passed and no failures or pending checks. This review used static analysis only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Submission replay overwrites later to-do state
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Align the MCP capability claim
ScoreThe implementation covers the main persistence and presentation paths, with passing checks and focused tests. The replay defect requires correction before merge because it can erase a newer issue association or undo deliberate reopening. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
❌ Failed to apply follow-up changes requested by @propr-ultrafix An error occurred while processing your request: Comment ID: 0✓ |
… to-dos. A duplicate POST or a retry used to complete a to-do the user had reopened, or point it back from a newer issue to the older one. Now it does neither. I fixed F1: replaying an older submission no longer changes to-dos. A duplicate POST or a retry used to complete a to-do the user had reopened, or point it back from a newer issue to the older one. Now it does neither. **Fix** - **New column:** migration `20261013010000_add_task_submission_todos_linked.js` adds a `todos_linked` flag to `task_submissions`, default false. Rolling back drops it. `TaskSubmission` now has the field. - **Route helper:** `linkSubmissionTodos` in `packages/api/routes/taskSubmissionRoutes.ts` now does nothing if the submission's to-dos have already been linked. Otherwise, in one transaction, it sets `todos_linked` (only if it is still false) and completes the to-dos. - If the to-do update fails, the whole transaction rolls back, the flag stays false, and a later retry can still apply it. Failures are still only logged, and the response is unchanged. - If two replays run at the same moment, the one that loses doesn't touch the to-dos. - **Other callers:** `submit`, `retry` and MCP `create_task` all go through the same `resume` wrapper, so the one guard covers all of them. `completeTodosForIssue` itself is unchanged; a genuinely new submission still relinks a reopened to-do to its new issue, as intended. **Tests** (in `packages/api/test/taskSubmissionRoutes.test.ts`) - **New regression:** submission A links issue #42. The user reopens the to-do, then A is replayed by both a duplicate POST and its retry endpoint; the to-do stays open. Then submission B links it to #43, A is replayed again by both paths, and the to-do keeps #43. - **Updated existing test:** duplicates and retries no longer call the completion step again (2 calls instead of 4). A submission whose to-do write failed links the to-do on its later retry. - **Checked against the old code:** both of these tests fail on the old code and pass with the fix. - **Results:** the route, `repoTodosIssueLink`, `taskSubmissionService`, `mcpTaskSubmissions` and `mcpIntegration` suites pass, and type checks pass for the root and `api`. I didn't run the new migration against a real database, only in-memory SQLite. **One side effect:** the issue link records `linked_task_id` from the submission at the moment of linking. The task id is usually set later by the worker, and retries used to fill it in on the to-do afterwards. Since replays now skip that step, `linked_task_id` will usually stay null. The completion and the issue link are unaffected. I left this alone because it's outside F1. There's no visible UI change, so I didn't capture a preview. The claude.ai Gmail, Google Calendar, Google Drive and ProPR connectors need to be authorized in your claude.ai connector settings before they can be used. This task didn't need them. PR: #2887 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
✅ Applied the requested follow-up changes in commit 1a7b6fb Processed 2 comments:
Summary of ChangesI fixed the CI failure. The API lint step failed because
ESLint passes on both files with zero warnings allowed, the whole API lint run reports nothing, and both test files pass. There's no visual change, so I didn't create a preview. The ProPR server on claude.ai needs authorizing in your claude.ai connector settings; until then it can't be used from these sessions. This fix didn't need it. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ackages/api/test/taskSubmissionRoutes.test.ts` had grown to 439 lines, over ESLint's 400-line `max-lines` limit, and CI treats any warning as an error. I fixed the CI failure. The API lint step failed because `packages/api/test/taskSubmissionRoutes.test.ts` had grown to 439 lines, over ESLint's 400-line `max-lines` limit, and CI treats any warning as an error. - **New file:** I moved the two to-do tests this PR added into `packages/api/test/taskSubmissionTodos.test.ts` (143 lines). It has its own copies of the request/response helpers and an in-memory database setup that includes the to-do migrations. The tests themselves are unchanged. - **Original file:** `taskSubmissionRoutes.test.ts` is now 342 lines. I removed the imports and migration steps that only the moved tests used, so it is back to what it imported before this PR. ESLint passes on both files with zero warnings allowed, the whole API lint run reports nothing, and both test files pass. There's no visual change, so I didn't create a preview. The ProPR server on claude.ai needs authorizing in your claude.ai connector settings; until then it can't be used from these sessions. This fix didn't need it. PR: #2887 Comment by: @propr-dev[bot] (ID: 6067385931) Comment by: @github-actions[bot] (ID: 6067386756) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements issue links across persistence, REST, MCP reads, CLI output, and the UI. It needs a targeted correction before merge: recovery of an older failed to-do update can overwrite a newer launch’s link. ✅ Scoped updates — Completion restricts writes to the submitting user and the issue’s repository. ✅ Transactional receipt — The receipt and to-do update commit together, preventing successfully applied submissions from completing reopened to-dos again. ✅ Relevant coverage — Tests cover ownership boundaries, rollback, successful-submission replay, and issue chips on active and completed items. Current checks report 39 passed and no blocking failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Older recovery overwrites newer issue links
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Correct the MCP launch claim
ScoreThe implementation has useful coverage and passing blocking checks, but failed-write recovery can corrupt a newer launch’s association. A targeted ordering guard and regression test are needed. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 33c0c11
Summary of ChangesI added a per-to-do freshness guard for F2. F1 was already fixed by the previous commit on this branch, so it needed no new changes. The affected suites pass (27 tests), and the two new regression tests fail when the guard is taken out. F1 (replaying a submission undoes later to-do changes). The required fix is already on the branch:
F2 (an older submission's retry replaces a newer issue link). In
Regression tests:
Checks run:
One trade-off: the guard orders launches by when their issue was created, not when they were submitted. Suppose submission A failed before creating an issue, then B created #42, and A's retry later created #43. The to-do would end up on #43, which is the most recently opened issue. There's no visible UI change, so I didn't capture a preview. The claude.ai Gmail, Google Calendar, Google Drive and ProPR connectors need to be authorized in your claude.ai connector settings before they can be used; this task didn't need them. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…fixed by the previous commit on this branch, so it needed no new changes. The affected suites pass (27 tests), and the two new regression tests fail when the guard is taken out. I added a per-to-do freshness guard for F2. F1 was already fixed by the previous commit on this branch, so it needed no new changes. The affected suites pass (27 tests), and the two new regression tests fail when the guard is taken out. **F1 (replaying a submission undoes later to-do changes).** The required fix is already on the branch: - **The record:** each submission row now has a `todos_linked` flag. It is set in the same transaction as the to-do update. - **Replays:** duplicate POSTs and retries skip the to-do update once the flag is set. - **Failures:** if the update fails, the flag stays false, so a later retry can still apply it. - **Callers:** form submit, the retry endpoint and the MCP `create_task` tool all go through this one guarded path. - **Test:** the existing test reopens the to-do and relaunches it before replaying the older submission. Both cases are covered. **F2 (an older submission's retry replaces a newer issue link).** In `completeTodosForIssue` (`packages/core/src/services/repoTodosService.ts`), a submission now leaves a to-do alone if it is already linked to a higher-numbered issue in the same repository. - **Why issue numbers:** GitHub issue numbers only increase within a repository, so a higher number means a newer launch. This needs no new column. - **Still allowed:** to-dos with no link yet, a re-apply of the same issue, and a link to a higher-numbered issue. If the stored link points to a different repository, the numbers can't be compared, so the update is allowed. - **When a to-do is skipped:** the older submission's flag is still set. It doesn't retry forever and simply counts as replaced by the newer launch. **Regression tests:** - `packages/api/test/taskSubmissionTodos.test.ts`: submission A opens issue #42 but its to-do write fails. Submission B opens #43 and links the to-do. Retrying A leaves the to-do on #43 and sets A's flag, and a further retry doesn't attempt the update again. - `packages/core/test/repoTodosIssueLink.test.ts`: a link from an older issue doesn't replace the newer issue number or task ID, and doesn't complete a reopened to-do. A link from a newer issue still does. **Checks run:** - **Tests:** `repoTodosIssueLink`, `taskSubmissionTodos`, `taskSubmissionRoutes` and `mcpTaskSubmissions` all pass. - **Types:** type checks pass for `api` and `core`. - **Lint:** ESLint passes on the changed service and API test. `packages/core/test` is excluded by the lint config, so the core test file wasn't linted. **One trade-off:** the guard orders launches by when their issue was created, not when they were submitted. Suppose submission A failed before creating an issue, then B created #42, and A's retry later created #43. The to-do would end up on #43, which is the most recently opened issue. There's no visible UI change, so I didn't capture a preview. The claude.ai Gmail, Google Calendar, Google Drive and ProPR connectors need to be authorized in your claude.ai connector settings before they can be used; this task didn't need them. PR: #2887 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements issue linking and completion for repository to-dos through the task-submission routes. It is merge-ready within the reviewed scope, conditional on the two pending checks completing successfully. ✅ Atomic replay protection — The submission receipt and to-do updates share a transaction, preventing successful replays from undoing a later reopening while leaving failed writes retryable. ✅ Scoped updates — Completion filters by submitting user and repository. Tests cover foreign IDs, relaunches, and recovery of older submissions. ✅ Visible issue links — The new fields reach REST, MCP reads, and CLI details; both active and completed UI items render the issue link. This assessment uses static inspection of the supplied diff and context. No commands or tests were run. Reported checks show 39 passed, none failed, and two pending. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Clarify MCP launch supportThe new ScoreThe implementation addresses the original submission-path defect with transactional replay protection and focused regression coverage. No merge-blocking defect was established; final readiness remains conditional on the pending checks. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #2886
Branch:
2886/claude-opus-5-5-complete-and-link-reposit-20261008-1428-1ryCommits: ✅ Changes committed (ada39cb)
AI Processing Completed
Execution Details:
Summary:
When a task launched from to-dos opens its GitHub issue, those to-dos are now marked complete and linked to that issue. The new and affected test suites pass, and type checks pass for the root,
core,api,cliand the UI. I didn't runnpm run migrateagainst a real database; the migration's apply and rollback are only tested on an in-memory SQLite database.Where it happens:
packages/api/routes/taskSubmissionRoutes.tshas a newlinkSubmissionTodoshelper. It runs after every resumed submission, in bothsubmitandretry; MCPcreate_taskgoes through the same route. It does nothing until the submission has an issue number. Any error is logged as a warning and never changes the response. It can be swapped out in tests throughservices.completeTodos.Database and service:
20261013000000_add_todo_issue_link.jsaddslinked_issue_repository,linked_issue_numberandlinked_task_idtorepo_todos, plus an index. Rolling back removes them.completeTodosForIssueonly updates to-dos that match the to-do id, the submitting user and the issue's repository. Running it again with the same issue changes nothing. Relaunching a reopened to-do points it at the new issue. It's exported from@propr/core.linked_draft_idand its functions) is unchanged.Where the link shows up:
linkedIssueRepository,linkedIssueNumberandlinkedTaskId, in demo mode too.list_todosreturns alinked_issueobject;get_todogets the new fields through the REST route.RepoTodotype has the new fields, andtodo showprints a "Linked Issue" line.TodoIssueLinkchip shows#<issue number>and opens the GitHub issue in a new tab. It appears on active to-dos (next to "Linked to plan") and in Completed Items. Clicking it doesn't select or drag the to-do.Docs and changelog: the sentence in
launching-work.mdthat said launching leaves the to-do open now describes the new behaviour, and there's an Unreleased → Changed entry inCHANGELOG.md.Tests:
repoTodosIssueLink.test.ts(new): checks that other users' and other repositories' to-dos are left alone, that repeating the call is harmless, and that the migration rolls back cleanly.taskSubmissionRoutes.test.ts: a new case covers submit, retry and a repeated submit producing a single completion, and a failing to-do write still returning 200 andqueued.TodoIssueLink.test.tsx(new): covers the chip's rendering.mcpIntegration.test.tsand the test data inQuickAddTodo.test.tsx.The new code adds no lint warnings. To avoid a new complexity warning in
SortableTodoItem, I moved the chip row into a small helper component. The one lint warning left is indockerResultProcessor.ts, which this change doesn't touch.I also captured a preview image of the to-do panel with the new chip, rendered with sample data.
Detailed Logs:
f365fa67-972a-4dab-a033-a12497c9b5ceLog files stored at:
/tmp/claude-logs/issue-2886-2026-10-08T14-36-43-244Z-conversation.json/tmp/claude-logs/issue-2886-2026-10-08T14-36-43-244Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #2886.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
To-do issue link chips
Repository To-Dos panel components rendered with sample data: an active to-do launched as issue #2891 and a completed to-do launched as #2886 show the new GitHub issue chip; the plan-linked to-do keeps its 'Linked to plan' chip.
Original unavailable: managed storage is unavailable or the upload has expired.