Repository navigation
Conversation
…w starts a new run on the same issue, and never queues a PR-comment job or makes a `GET /pulls` call. The 80 follow-up/review route tests and the MCP and OpenAPI tests pass, and lint and typecheck are clean. I haven't run it against real GitHub, so the live acceptance step (follow-up → new run → eventually a PR) is still untested. What happens now when you follow up on a task without a PR (new file `packages/api/routes/taskIssueFollowup.ts`): 1. Checks first, nothing posted if they fail: - PR commands like `/review`, `/fix`, `/use` or `/switch` are rejected with 400, since there's no PR. - The task's latest state must be `failed`. - No run for that issue can already be queued or running. - The issue must be open and not marked done or cancelled. Each of these returns a 409 with a plain explanation, which the modal shows as the error. 2. Posts your request on the issue as plain text, with no hidden marker. The issue run reads all issue comments, so it becomes part of the prompt. 3. Removes and re-adds the trigger label (e.g. `AI`, preferring the label the failed run used). This matters for issues created through task submission: the worker only re-runs those after a new label event, so just queuing a job would be skipped. 4. Queues the normal issue job with your user ID, through the same function plan and submission implementations use. The model comes from the issue's existing `llm-*` labels, so the same model runs again. Deduplication and reported results: - The route briefly claims the same "recently triggered" key the label webhook uses. When the bot re-adds the label, that webhook skips instead of queuing a second run without your user ID. A repeated click gets a 409. - The response only reports `queued` once the job was actually added. - If the label can't be re-added, it reports `failed` and frees that key. - If the queue call fails, it reports `unknown` with the job ID, matching the existing PR route. PR routing: - Second broken case: a follow-up with no target on an implementation task that *did* create a PR was also going to the issue number as if it were a PR. It now goes to the task's real PR (`pr_number`), branch lookup included. - Unchanged: PR-comment tasks, `/review`, and anything explicitly targeted at the PR keep their old routing. Other changes: - New tests (`packages/api/test/taskFollowupIssueRoutes.test.ts`, plus fixture updates) cover: - issue-only success, with the actor, label order and absence of a PR read checked. - repeated requests and an already-queued run. - six slash commands. - non-failed, closed and done issues. - label-write and queue failures. - the issue comment being ignored by the PR webhook. - issue-with-PR and PR-comment tasks. - Existing MCP test changed: `packages/api/test/mcpWorkflows.test.ts` had encoded the bug — a completed task with no PR expecting a PR job keyed by the issue number. It now records the created PR (#42), which is what a completed implementation actually stores. - API docs: the OpenAPI docs now list the 409 responses and the new `intent`/`issueNumber` fields. I regenerated `docs/static/openapi/propr-api.yaml` and the client's generated API types. Limitations: - Only failed runs can be retried. Completed-without-PR or cancelled issue tasks get a 409 rather than a retry; I kept the scope to what the issue described. - MCP progress for an issue retry can show "unknown" after a while. For `send_task_followup`, the returned job ID belongs to the short-lived job that starts the run. Once that job finishes, MCP progress tracking can only report "unknown" (accurate, but vague) instead of following the new run. No UI changes, so no previews.
|
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 6dc6c13 Processed 2 comments:
Summary of ChangesI fixed the lint failure. It came from 21 What changed: each
Verification:
This changes nothing visible, so there are no previews. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
… errors in three files this PR never touched: `packages/api/authSession.ts`, `test/browserSessionShutdown.test.ts` and `test/taskWatcher.test.ts`. They were added on main in f3de8e2 (#3112), which this branch is based on, so main's API lint fails the same way. None of the follow-up changes on this branch caused it. I fixed the lint failure. It came from 21 `no-explicit-any` errors in three files this PR never touched: `packages/api/authSession.ts`, `test/browserSessionShutdown.test.ts` and `test/taskWatcher.test.ts`. They were added on main in f3de8e2 (#3112), which this branch is based on, so main's API lint fails the same way. None of the follow-up changes on this branch caused it. **What changed:** each `any` is replaced with a proper type. None of the code's behaviour changes. - **`authSession.ts`:** the store-method wrapper arguments and the callback results are now typed as `unknown[]`. - **`browserSessionShutdown.test.ts`:** the fake request/response objects are cast `as never`, the session data uses the cast the file already uses elsewhere, and the server address is typed as `AddressInfo` (imported from `node:net`). - **`taskWatcher.test.ts`:** the private-field access on the manager uses a small typed view instead of `as any`. **Verification:** - `npm run lint` in `packages/api` is clean. - `tsc --noEmit` is clean, but the API tsconfig doesn't include the test files, so the edited tests are not typechecked by it. - The two edited test files pass (43 of 43). They need a GitHub login setting to start, so I ran them with `PROPR_DEMO_MODE=true NODE_ENV=test`. This changes nothing visible, so there are no previews. PR: #3125 Comment by: @propr-dev[bot] (ID: 6188074477) Comment by: @github-actions[bot] (ID: 6188075436) Model: Claude Opus 5.5
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryI resolved both merge conflicts. No conflict markers are left anywhere in the repo, and both test files now match What the conflicts were: Both conflicted files are test files. This PR never touched them except for its last commit (6dc6c13), which fixed the 21
How I resolved it: I replaced both files with Verification:
🤖 Resolution Details
System-triggered merge conflict resolution |
…ssue-task-follow--20261015-0802-lkh Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - packages/api/test/browserSessionShutdown.test.ts - packages/api/test/taskWatcher.test.ts PR: #3125 Model: Claude Opus 5.5
|
/review gpt-6-astra |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — gpt-6-astraOverall EvaluationThe PR corrects the issue-versus-PR routing error, but needs a localized correction before merge: an immediate retry can report success while the dispatcher skips it. ✅ Correct job routing — Failed tasks without a PR now enqueue ✅ Useful refusal coverage — Tests cover active runs, closed/done issues, unsupported commands, label failures, and uncertain queue submissions. The supplied current-head status shows no failures and four pending checks. This review is based on static analysis; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Immediate retries can be silently skipped
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise the actual relabel webhookThe test named “the relabel webhook and a repeated request do not queue a second run” only submits the API request twice. Delivering the actual label event would strengthen coverage of the shared deduplication contract. This is optional additional coverage; the supplied production paths do use the same Redis key and claim mechanism. ScoreThe routing fix is focused and has useful route coverage, but a downstream admission boundary can still reproduce the central symptom: success without a new run. Current checks report no failures, with four pending. 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/fix F1 S1 |
|
✅ Applied the requested follow-up changes in commit 108f49b
Summary of ChangesI fixed F1 and added S1's coverage. On a submission-backed issue, a retry posted in the same second the run failed now starts a new run, instead of reporting "queued" and running nothing. F1: retries in the failure's second were skipped
S1: the relabel test now delivers the real label webhook Verification: 110 tests pass across the follow-up route suites, the core submission tests, Separate discovery, not addressed: the comparison is between the time our database records for the failure and GitHub's clock. If those two clocks disagree, the wait can still be wrong. The wait is capped at 2 seconds so a database clock running ahead can't stall the request. Closing this fully would mean re-reading GitHub's timeline and resolving the retry before reporting "queued". GitHub may not show a new event right away, so that risks false failures; I left it out. There's no visible UI change, so I made no previews. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…issue, a retry posted in the same second the run failed now starts a new run, instead of reporting "queued" and running nothing. I fixed F1 and added S1's coverage. On a submission-backed issue, a retry posted in the same second the run failed now starts a new run, instead of reporting "queued" and running nothing. **F1: retries in the failure's second were skipped** - **Fix:** before re-adding the processing label, the route now waits until the second after the failure. GitHub records label events only to the second, and the dispatcher treats an event in the failure's own second as the original trigger. In practice the wait is at most a second. The change is in `packages/api/routes/taskIssueFollowup.ts`. - **Shared rule:** the "earliest second a retry can count" rule now lives in one place, a new `submissionRetryAdmissibleAt` in `packages/core/src/services/taskSubmissionRetry.ts`. `resolveTaskSubmissionRetry` uses the same "latest run finished, and when" lookup, so the route and the dispatcher can't drift apart. The dispatcher's decision itself is unchanged. - **Same defect, second path:** if the issue's latest run isn't recorded as finished (still running, or no valid timestamp), the dispatcher would also skip the new trigger, yet the route would have reported "queued". The route now refuses these with a 409, before posting the comment. - **Regression test:** it runs the route and then the real dispatcher on the job the route queued. The run fails at 10:00:00.500 and the retry arrives at 10:00:00.700, the case in the finding. The label event lands at 10:00:01 and the dispatcher dispatches. With the wait disabled, the same test gets `skipped`, so it catches the defect. A second new test covers the refusal. **S1: the relabel test now delivers the real label webhook** That test now passes the label event through the production webhook handler (`processDetectedIssue`) and checks it is dropped as a duplicate. It then clears the shared duplicate-request block and delivers the event again; this time it queues a run. That shows the block, not some other check, is what stops the second run. **Verification:** 110 tests pass across the follow-up route suites, the core submission tests, `mcpWorkflows` and the issue-detection integration test. Lint and typecheck are clean for the API and core packages. The fix has not been run against real GitHub. **Separate discovery, not addressed:** the comparison is between the time our database records for the failure and GitHub's clock. If those two clocks disagree, the wait can still be wrong. The wait is capped at 2 seconds so a database clock running ahead can't stall the request. Closing this fully would mean re-reading GitHub's timeline and resolving the retry before reporting "queued". GitHub may not show a new event right away, so that risks false failures; I left it out. There's no visible UI change, so I made no previews. PR: #3125 Comment by: @integry (ID: 6189190840) Model: Claude Opus 5.5
|
/review gpt-6-astra |
…eipt now shows up immediately between the comment box and the buttons, gets focus and is announced. Post Comment can no longer resend the same text. The new browser test passes at 900×650, 390×844, 320×640 and 900×650 at 200% zoom, and fails on the old code at the point where it looks for the receipt. What changed (`propr-ui/src/components/TaskDetails/FollowupModal.tsx`) - Layout: the header, comment box, feedback and buttons are now four separate areas. The dialog is never taller than the window, and the comment box shrinks first, so the feedback and buttons stay on screen. The comment box still scrolls with keyboard and touch. On very short windows (200% zoom, or a phone turned sideways) the whole dialog scrolls instead, and the receipt is scrolled into view. - Feedback: the receipt is an alert that takes focus when it appears. It shows the server's message plus the state, comment ID and job ID exactly as returned. The text you typed stays in the box and the dialog stays open. - Duplicate posts: - If the server says the comment was posted, or the outcome is unknown, Post Comment stays disabled until you edit the text. A note under the receipt explains why and suggests checking the GitHub thread first. Once you edit, it says the edited text will be posted as a new comment. - Only a reply that explicitly says nothing was posted lets you resend the same text. - A quick double-click now sends only one request. - When a comment may be on GitHub already, Cancel reads "Close". - Wiring: `TaskDetails/index.tsx` now hands the modal the server's full reply instead of a flattened error message. The backend is unchanged, and the issue-vs-PR routing is left to PR #3125. Decision for you: if the request fails without any reply from the server (network failure or an HTTP error), I treat the outcome as unknown and require an edit before posting again. A 500 can happen after GitHub has already accepted the comment, so this is the safe choice. The cost is that clear rejections like a 400 also need an edit before retrying. Telling the cases apart would mean exposing the HTTP status from the shared `handleApiResponse`, which I didn't touch. Tests - `FollowupModal.test.tsx` (new): covers the posted-but-failed, unknown and no-reply cases, a reply saying nothing was posted (retry allowed), and the double-click. All TaskDetails unit tests pass (294); typecheck and lint are clean. - `e2e/task-followup-feedback.pw.ts` (new): at each of the four sizes, it simulates the real failed reply after a long comment and checks that: - the receipt and buttons are fully visible, with the receipt focused. - the text is kept and a forced click on the disabled button sends nothing. - the comment box scrolls with the keyboard. - an edited comment does post. I simulated 200% zoom by halving the window size rather than using real browser zoom; the layout result is the same. I captured screenshots of the failed-receipt state at all four sizes as preview evidence.
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — gpt-6-astraOverall EvaluationThe PR correctly separates issue retries from PR follow-ups and adds focused regression coverage. It needs a localized correction before merge: the bounded admission wait can still report a queued retry that the dispatcher will reject. ✅ Correct issue routing — Failed implementations without a PR enqueue ✅ Preserved PR behavior — Implementations with a recorded PR and historical PR-comment tasks continue through PR routing. ✅ Focused coverage — Tests cover refusal paths, webhook deduplication, queue uncertainty, and retry admission within the failure second. This review is based on static inspection only; no commands were run. The supplied current-head checks show no failures, with 12 checks pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Refuse retries when admission remains premature
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Complete live acceptance verificationRun the original failed-task follow-up scenario against GitHub and verify that a new task starts and eventually records its PR. The supplied tests provide useful route and dispatcher coverage, but mock GitHub timing and queue behavior. This is additional confidence rather than a separate code blocker. ScoreThe primary routing fix is sound and well covered, but the admission-wait boundary can reproduce the original misleading-success outcome. A localized correction is needed; current checks have no reported failures. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/fix F2 |
|
✅ Applied the requested follow-up changes in commit 3042a13
Summary of ChangesI fixed F2. If the bounded wait ends before a new run could actually start, a follow-up on a failed issue task now gets a refusal instead of a success message for a run that never begins. What changed (
Regression test ( Same-defect check: Verification: the issue follow-up, PR follow-up and MCP workflow tests all pass (3 files). The API package typechecks, and ESLint passes on both changed files. I found nothing outside F2 to report separately. This change has nothing visual, so there are no previews. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
… actually start, a follow-up on a failed issue task now gets a refusal instead of a success message for a run that never begins.
I fixed F2. If the bounded wait ends before a new run could actually start, a follow-up on a failed issue task now gets a refusal instead of a success message for a run that never begins.
**What changed** (`packages/api/routes/taskIssueFollowup.ts`):
- `waitUntil` still caps its sleep at 2 seconds. Afterwards it now reports whether the API clock has reached the admission time.
- The wait and that check now happen before the dedup claim, the comment post and the relabel. If the time still hasn't arrived, the route returns 409 ("…would not start a run yet. Try again in a few seconds."). Nothing has been posted, relabelled, queued or claimed at that point, so a refusal leaves no partial follow-up behind.
- On the normal path the order is the same as before (wait, then post the comment, then relabel), so the relabel still lands after the failure's second.
**Regression test** (`packages/api/test/taskFollowupIssueRoutes.test.ts`): this is the scenario from the review. The failure timestamp is set five seconds ahead of the injected clock. The test checks that the route returns 409 after a single 2000 ms sleep, posts no comment, writes no labels, queues no job and holds no dedup claim. It fails against the previous route code and passes with the fix.
**Same-defect check:** `submissionRetryAdmissibleAt` and `waitUntil` have no other callers, so this route was the only place that needed the fix. Database/API clock skew is a real race, so the route can only wait a bounded time and then refuse; it can't guarantee the retry gets in.
**Verification:** the issue follow-up, PR follow-up and MCP workflow tests all pass (3 files). The API package typechecks, and ESLint passes on both changed files.
I found nothing outside F2 to report separately. This change has nothing visual, so there are no previews.
PR: #3125
Comment by: @integry (ID: 6189489687)
Model: Claude Opus 5.5
|
/review gpt-6-astra |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — gpt-6-astraOverall EvaluationThe PR correctly separates issue retries from PR follow-ups, but needs a localized correction to preserve the retry requester through submission-backed dispatch. ✅ Correct issue routing — Failed tasks without a PR now enqueue ✅ Retry admission coverage — Tests cover terminal-state checks, same-second label events, duplicate submissions, and uncertain queue outcomes. The supplied current-head status has no failures; 15 checks remain pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Preserve the retry requester through dispatch
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Verify retry instructions reach the agentAdd an integration or live acceptance check that follows the posted comment through ScoreThe routing fix and focused tests are strong, but the submission-backed path loses the authenticated retry requester. Correct that identity propagation before merging; current checks show no failures. 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/fix F3 S3 |
|
✅ Applied the requested follow-up changes in commit d785cb7
Summary of ChangesI fixed F3 and S3. The new focused tests, the related suites (296 tests) and typecheck all pass, and lint shows no new warnings in the files I changed. I haven't run any of this against real GitHub. F3: the retry now runs as the user who asked for it.
S3: the retry instructions now reach the agent. The check S3 asked for found a real gap. The route posts the comment with the app's GitHub credentials, so it's authored by
Both new checks fail if their fix is reverted. This is a code-level check with stubbed GitHub responses, not a live run. Found separately, not changed: only the most recent retry comment is exempt from the bot filter. If someone retries the same issue twice, the second run sees the new instructions but not the earlier app-posted ones. There's no visual change, so I didn't make previews. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…s (296 tests) and typecheck all pass, and lint shows no new warnings in the files I changed. I haven't run any of this against real GitHub. I fixed F3 and S3. The new focused tests, the related suites (296 tests) and typecheck all pass, and lint shows no new warnings in the files I changed. I haven't run any of this against real GitHub. **F3: the retry now runs as the user who asked for it.** - The follow-up route now also records who asked for the retry in a new job field, `retryRequesterId` (`packages/api/routes/taskIssueFollowup.ts`, `packages/api/routes/planIssueHelpers.ts`, `packages/core/src/queue/taskQueue.types.ts`). - For an issue created from a submission, the dispatcher uses that person only when the dispatch is an accepted retry. It's a new helper in `src/jobs/issueJobDispatcher.ts`, which also keeps that function under the lint complexity limit. - Ordinary webhook deliveries never set the field, so they still run as the original submitter. The existing test where a webhook retry stays with `alice` still passes. - The dispatcher test now has the submitter and the requester as different users, and checks that the run's `userId` is the requester's. **S3: the retry instructions now reach the agent.** The check S3 asked for found a real gap. The route posts the comment with the app's GitHub credentials, so it's authored by `propr-dev[bot]`. `fetchIssueComments` drops comments from bot accounts, so the retry request never reached the prompt. - **Fix:** the route now passes the posted comment's ID in the job (`retryCommentId`). `fetchIssueComments` (`src/jobs/issueJob/github.ts`) always keeps that one comment; every other bot comment is still filtered out. - **Test:** it takes the actual job the dispatcher produces, runs it through `fetchIssueComments` and `generateClaudePrompt`, and checks that the request text is in the prompt and an unrelated bot comment isn't. Both new checks fail if their fix is reverted. This is a code-level check with stubbed GitHub responses, not a live run. **Found separately, not changed:** only the most recent retry comment is exempt from the bot filter. If someone retries the same issue twice, the second run sees the new instructions but not the earlier app-posted ones. There's no visual change, so I didn't make previews. PR: #3125 Comment by: @integry (ID: 6189664289) Model: Claude Opus 5.5
… acceptance secret scanner, not a leak and not caused by this PR's code. I fixed the scanner and added a regression test. The CI failure was a false positive in the packaged desktop acceptance secret scanner, not a leak and not caused by this PR's code. I fixed the scanner and added a regression test. **What failed.** The "Validate unsigned linux-x64 package" job runs the packaged acceptance journeys and, at cleanup, scans the temporary profile directory for secret-shaped text. It threw `Secret-shaped value found in .../desktop/profiles.journal.0` from the scanner in `apps/desktop/scripts/acceptance-artifacts.mjs`. **Why it is noise.** - Commit `1c2ffc17c` touched only API, core and worker files. The branch has no changes under `apps/desktop` or `.github` relative to main, and main has no newer commits. - The same job passed on the three preceding commits of this PR. - The profile journal stores its payload as base64url ciphertext in one printable run. Uniformly random base64url spells a `gh[pousr]_` token prefix followed by 20 token characters purely by chance. A local measurement over random 4 KB journals matched about once in two thousand, which fits a job that is green most of the time and fails occasionally. **The fix.** The two token-prefix patterns, for `propr_it_` and GitHub `gh?_` tokens, now require a token boundary: they must not be preceded by an identifier or base64url character. A real token is never glued onto the end of another identifier, so detection of standalone tokens in JSON values, after `=` or `:`, after whitespace, after a path separator, or at the start of a printable run is unchanged. Only mid-ciphertext coincidences are excluded. **Regression test.** A new case in the scanner's contract test writes a synthetic journal record whose ciphertext embeds both token prefixes mid-run and asserts the scan passes, then asserts that the same tokens still reject when they appear as a JSON value, after whitespace, after `token=`, and after a URL path separator. **Verification.** - New test fails on the unfixed scanner with the exact CI error, and passes on the fixed one. - Full scanner contract file: 18 pass, 0 fail, 2 pre-existing platform skips. - The csp-reload test that consumes the scanner: 47 pass, 0 fail, 1 pre-existing skip. - eslint on both touched files is clean. I did not re-run the packaged acceptance job itself, since it needs the built Linux package, Xvfb and a keyring daemon. No visual previews were created because the change is not user-visible. PR: #3125 Comment by: @propr-dev[bot] (ID: 6202624614) Model: Claude Fable 5.1
|
/review codex:gpt-6-astra Review exact combined head1f99c7a8669d6d35115d41aa05de44ea07a1f415. CompletedF33/F34/S18 recovery correction is parent1c2ffc17c3c7179eba8dc769f531095310c61a72. The only new changes on1f99 are apps/desktop/scripts/acceptance-artifacts.mjs and its contract test, from completed automatedLinux-package CI repair6202624614/6202628968. No implementation writer is active. Main remains8aad09; retain all native authority/result integration and one-line BullMQ Job mock CI correction. Root independent execution at production-identical1c2 is already positive:18probes,0fail/skip/cancel, normalexit16.721s. Ten earlierboundary cases and BOTHactualBullMQ/Redis/SQLite single-worker F31/F32 regressions staypositive, including currentreceipt preservation, retentionmapping persistence and genuinelylater work. FOURadditional label cases (bothbacked/issue-only, with/without an evennewer unconfiguredAI event) now selecteligibleimplement3, ignoreunconfiguredAI4 asnewwork, and runonce without oldrequest adoption. BOTHinitialpublication lapse cases (superseded byB thenB abandons; stillowned butclockexpired) nowadd0events/0children and return publicstatefailed,postedtrue ratherthanunknown/queued. These tests preserve beforefix scripts/hash evidence; newshared fixtureprocessingLabels set consistently, assertions strengthened for truthful receipt. Realqueue worker cases retain foreignsentinel/namespace safety; HTTP/provider and clocks remain controlledfixtures, not live intended-user acceptance. Independent root22-file mandatory-isolated-Redis focused suite (previous21 plus newtaskFollowupIssueLabelChange.test.ts) and separatewithdrawal/automaticretry/finalizer suite are stillrunning at1c2; no final outcome inferred. Shared/corebuilds pass. Finalsource independenttypes/lint/scanner contracts and source-bound probe checks willfollow completedrootprocesses before anymerge. FullgreenCI/freshreview are gates; final signing/installedLinux/mobile acceptance remainsopen. Assess F1–F34 preservation and S18: retained accepted/consumed identities in rawhistory throughlabelchange, orderingOnly events excluded from eligibility AND own-request matching, receipts retained during settlement/guarded writer/route reconciliation, bounded truthfulmissinghistory, no staleordinarychild or receipt regression, retiredmapping retention, cancellation/fencing/matrix/orphan/restarted publication guards. Firstadd ownership+actualwindow recheck after awaitedremove must stopwithdefinite no-write reporting; initial and restart sharehelper. The acknowledged shortcheck-to-GitHubPOST gap is not claimed atomic; distinguish the demonstrated avoidable awaited-removal defect from a demand for external-service atomicity or unrelated redesign. Review the additional artifact-scanner correction as a privacy gate, not just a greenCI fix. The unsignedLinuxx64 acceptancejob failed at cleanup because genericprefix regexmatched within ownedfixtureprofiles.journal.0 base64url ciphertext. Author nowrequires preceding tokenboundary for GitHub/propr_it prefixes and tests deterministic midciphertext coincidence versus bounded JSON/whitespace/tokenassignment/URL-path leaks. Verify the actual leak contract and known-forbidden-value sentinel checks stay fail-closed; assess false-negative consequences of boundary exclusions rather than accepting the author's claim that realtokens are neveradjacent to identifiers without inspection. No actual secretvalues were posted. Avoid inventing guarantees the scanner doesn't make; report actionable findings based on actual contracts. Rootwill independently execute these contracts. No implementation, credential/grant/userDB changes or productiondeploy in this review. |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR correctly redirects failed implementations without a PR into issue execution and adds substantial recovery protection. Changes are required before merge: issue-only recovery can select an older consumed receipt because it orders requests by a timestamp captured before reservation. ✅ Correct issue routing — Failed issue tasks enqueue ✅ Persistent acceptance evidence — Request-specific queue records and transactional fencing protect accepted children after completion, removal, and stalled-parent recovery. ✅ Ordering versus eligibility — Retained historical receipts are marked This is a static review; no commands were run. The supplied current-head status has no failures and 12 pending checks. The reported independent results were not re-executed here. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F35: 🔴 Order consumed requests by reservation sequence
SuggestionsThese are optional follow-ups and are not sent to S19: 🟢 Cover escaped token boundariesThe scanner’s new lookbehind also excludes a token immediately following the literal ScoreThe implementation addresses the original routing defect and provides extensive recovery coverage, but the consumed-request ordering defect still permits duplicate execution. Current checks show no failures, with verification still pending. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/fix F35 S19 Fix the sole blocker F35 and directly related scanner coverage S19 from completed Astra review6202902607 at1f99c7a8669d6d35115d41aa05de44ea07a1f415. No implementation writer is active. Keep Claude/ProPR finalization, all F1–F34/S13–S18 guards and tests, main8aad09 native authority/result integration, prior Job mockCI correction, and completed artifact-scanner repair. No credentials/grants/userDB repair or unrelated redesign. F35: requestedAt is captured BEFORE the asynchronous Redisclaim/reservation and cannot order serialized consumed runs. A pausesafterits successful nonrenewing30secSET; B afterexpiry reserves/runs/consumes/removes; Aresumes, legitimatelyreservesafterB and refreshespublishes/runsnewE3, butits earlierrequestedAt makes latestConsumedRun chooseB/E2 and retention discardA/E3. Use durable inserted reservation sequence consistently in consumed selection AND retention, preserving requestedAt as provenance rather than rewriting it to pretend monotonicity. Regression should exercise actual APIclaim pause/Bcompleted/Aresumed and both freshpolls before/after productioncleanup onanotherissue; assert noordinaryduplicates/lostownership and genuinelylater work stillrunnable. Keep boundedrecords(one latest mappingperissue), tie/delay safety, no finite expiry substitute or blanket suppression. RealBullMQ where feasible; synthetic scheduling mustbeaccuratelydescribed. S19: add serialized/escaped newline, tab or other relevant token-boundary cases through actual scanAcceptancePaths as well as rawscanner fixtures. Preserve deterministicmidciphertext false-positive correction AND fail-closed exact forbidden-value/sentinel checks; detect real token-shaped values after decoded whitespace without arbitrary file exclusions. No realsecrets in tests/comments. Check the actual artifact contract, not just a regexunitassertion, and report precise expected skips. Do not claim scanner proves arbitrary encoded-secret absence. Independent checks: productioncorrection1c2 root22focusedfiles544pass+3withdrawal/automaticretry/finalizerfiles195pass=739,0fail/skip/cancel,normalexits; verified1f99 changes ONLYscanner+contracttest so recoverycodebyte-identical. ALL18probes re-executed onexact1f99 pass,0fail/skip/cancel,normalexit15.690s. They include BOTH realworker F31/F32, all earlierpositiveguards, BOTH label-change/eligibility variants, BOTH publication lapse cases including publicstatefailed/postedtrue with0events/children. Exact1f99 root/APItypes and changedprodroot/core/API/desktopzero-warninglint pass. Scanner+CSPcontract files65pass0fail,3expectedskips(twoDarwinfilesystem,oneprovisionedstockChromium boundary covered byseparateCIjob). Shared/corebuilds passatproduction-identical1c2. OwnRedis willbeclosedafterevidence. Preserve all these and foreignnamespace safety. Fresh exact resulting-head independentchecks/Astra/fullgreenCI requiredbeforemerge/signing/native/mobile finalacceptance. Keep scope narrow and report actual testoutcomes/limits. |
|
✅ Applied the requested follow-up changes in commit 52a62a9
Summary of ChangesWaiting for the live suite to finish on its own before I run lint, typecheck and the simulated follow-up suites, so the queue timings aren't skewed by concurrent load. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…n lint, typecheck and the simulated follow-up suites, so the queue timings aren't skewed by concurrent load. Waiting for the live suite to finish on its own before I run lint, typecheck and the simulated follow-up suites, so the queue timings aren't skewed by concurrent load. PR: #3125 Comment by: @integry (ID: 6202980497) Model: Claude Fable 5.1
|
/review codex:gpt-6-astra Review exact head 52a62a9. Independent review, no implementation. Claude has completed F35 and selected S19 from review6202902607. Check durable reservation-id ordering in both consumed selection and retention, actual delayed successful claim / B reserved and consumed / A resumed and consumed with earlier captured requestedAt, correct requester/comment and no repeated ordinary work before/after retention; genuinely later triggers must remain runnable. Check scanner serialized escape boundaries through actual filesystem artifact contract while preserving mid-ciphertext false-positive repair and deterministic known-sentinel checks. Do not claim heuristic arbitrary-encoding absence. Preserve all F1–F34/S13–S18 requirements, actual single-worker F31/F32 guards, label-change/eligibility selection, first-trigger publication ownership/window and truthful stranded public state, separate requested children and global withdrawal/automatic-retry/finalizer guards, main native-authority/result changes. Prior production-identical 1c2/1f99 had 739 regression passes and 18 independent positive probes; those numbers are prior-head evidence, not new-head claims. Exact-head independent full regression/live isolated Redis/probes/scanner/type/lint validation is now running and full CI in progress. Distinguish static review from executed checks. No credentials, grants, user database changes or implementation writer. |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR fixes issue-versus-PR routing and adds durable retry ownership and recovery. It needs a localized correction before merge: a requested retry can still inherit the original submitter when the initial dispatch receipt was never recorded. ✅ Consistent reservation ordering — Consumed selection and retention both use the inserted reservation ✅ Scanner contract coverage — The supplied tests exercise serialized escape boundaries through filesystem scanning, trace sanitization, and manifest verification while retaining ciphertext and exact-sentinel checks. This does not establish detection of arbitrary encodings. This was a static review; no commands or tests were run. The omitted Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F36: 🔴 Preserve requester before initial receipt completion
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe reservation-ordering correction and scanner coverage are sound on static inspection, but the remaining requester mismatch blocks merge. Runtime verification remains unconfirmed in this review, and current CI is still pending. Score: 6/10 🤖 Review Details
Files omitted from review diff1 file was omitted from the review diff. Large, binary, generated, and lockfile changes are deprioritized. No patch content from GitHub (a larger review budget cannot recover these)
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/fix F36 Address sole blocker F36 from completed Astra review6203373857 at exact52a62a93b9bcc91a23af87f7afe1f7138c19d85f. Claude through ProPR; no other implementation writer is active. Scope is requester ownership when a submission's initial dispatch receipt remains incomplete. Derive the execution owner from the selected durable request whenever it exists, independently of initial dispatch_complete or ordinary retry suffix; no selected request must preserve original submitter ownership. Preserve ALL previous F1–F35/S13–S19 recovery/scanner/withdrawal protections, request-specific child IDs/atomic acceptance, and main native-authority/result integration. No credentials/grants/userDB changes or unrelated redesign. Independently reproduced on exact52a: actual dispatcher accepts the original child for submitter, injected actual recordDispatch receipt write fails SQLITE_BUSY, real SQLite retains dispatch_complete=false. Queue/task fixture then represents terminal failed-noPR/noactivework; actual API followup as user-2 queues, dispatcher selects its real durable request and emits request-specific child with retryRequesterId=user-2 and correct retryCommentId6157569382 BUT userId=submitter. Independent assertion expecteduser-2 fails (1test1fail0skip/cancel, normalexit1). Queue/provider and terminal-task/exhaustion fixture controlled; no actual worker exhaustion/provider execution claim. Please add regression with actual child acceptance + receipt-write failure and a different user's API followup; actual single-worker recovery coverage where practical; also prove ordinary no-request deliveries retain submitter ownership and completed/issue-only paths retain existing ownership behavior. Exact52a completed independent validation:22focused requiredfiles545pass plus3withdrawal/automaticretry/finalizerfiles195pass =740,0fail/skip/cancel; all19independent probes pass0fail/skip/cancel, including preserved F35 candidate (no duplicate before/after retention, latertrigger stillruns), both actualRedis/BullMQ F31/F32 workers, all prior label/ownership/window cases. Scanner/CSPfilesystemcontracts67pass0fail/3expectedplatformskips; independent escapednewline generic+knownsentinel bothdetected. Shared/corebuilds,root/APItypes and changedroot/core/API/desktopzero-warninglint pass. Initial rootlintpath typo corrected with actualsrc/daemon/issueDetection.ts; invalidharnesslog retained and corrected invocationexit0. CIstillrunning/0failcurrently; fresh finalhead independentchecks/Astra/fullgreenCI requiredbeforemerge/signing/native/mobile. Do not treat priorhead counts as newhead results. |
|
✅ Applied the requested follow-up changes in commit 36c6243
Summary of ChangesRoot and API typecheck both pass. The live suite has 37 tests passed so far and is still running; its completion notification is the only remaining dependency, so I'm waiting for it. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ts passed so far and is still running; its completion notification is the only remaining dependency, so I'm waiting for it. Root and API typecheck both pass. The live suite has 37 tests passed so far and is still running; its completion notification is the only remaining dependency, so I'm waiting for it. PR: #3125 Comment by: @integry (ID: 6203403414) Model: Claude Fable 5.1
|
/review codex:gpt-6-astra Review exact completed immutable head36c62439ed0792157ac4c6e387dc704045bc12e7. Claude F36 correction: selected durable request determines execution owner independently of initial receipt completion; no-request deliveries retain submitter. Inspect actual production diff and new taskFollowupIssueInitialReceipt.test.ts plus live lifecycle F36 regression. Independent original negative probe is now being re-executed unchanged against exacthead, alongside full23focused-requiredfiles (including NEWInitialReceiptfile), withdrawal/automaticretry/finalizers, all19priorprobes, scannercontracts/types/lint. Do not treat previous-head counts or agent completion text saying tests still running as new-head pass evidence. Prior completed independent52a evidence:740regression+19recoveryprobespass, scanner67pass3expectedskips, builds/types/lintpass; unchanged independentF36 negative reproduced actual initial dispatcher child acceptance+SQLITE_BUSYreceipt failure then actual API/durable request dispatcher has userId=submitter although retryRequesterId=user-2/correctcomment. Queue/provider and terminalfailedtask/exhaustion controlled there. New in-tree lifecycle test uses actual isolatedRedis/BullMQ: initial child fails, parent exhausts3receipt-writefailures and is removed, user-2followup runs actualrequestchild once; initialsubmitter and laterordinaryowner guards innewInitialReceiptfile. Preserve all F1–F35/S13–S19, withdrawal/recovery/retention/label-eligibility/publication-window guards and nativeauthority/results. Distinguish static inspection from execution. No implementation or permission changes. Previous review omitted lifecycle file because GitHub supplied no patch; report any omission honestly. Independent reviewer root has inspected the actual full local immutable new lifecycle and InitialReceipt content; this does not erase your review-scope limitation. CI and exacthead validations are in progress, merge only once independently accepted and fullapplicablegreen. |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe supplied code addresses the original issue-routing defect and statically resolves F36: a selected durable request determines execution ownership even when the submission’s initial dispatch receipt is incomplete. ✅ Requester ownership corrected — ✅ Issue routing preserved — Failed implementations without a PR enter ✅ Focused ownership coverage — No code correction is established by this review, but unconditional merge approval remains withheld because verification is incomplete. The supplied diff explicitly omits The supplied authoritative check status is 0 failed, 17 pending, 10 passed, and 14 neutral/skipped. Merge remains conditional on completed exact-head validation and review of the omitted lifecycle coverage. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe inspected implementation fixes F36 and includes focused regression assertions. The omitted lifecycle file creates a material verification gap; pending checks alone are not the reason for this score. Score: 7/10 🤖 Review Details
Files omitted from review diff1 file was omitted from the review diff. Large, binary, generated, and lockfile changes are deprioritized. No patch content from GitHub (a larger review budget cannot recover these)
🤖 Review by ProPR |
|
/review codex:gpt-6-astra Supplemental review on unchanged exact head36c62439ed0792157ac4c6e387dc704045bc12e7, focused on the material F36 lifecycle-coverage gap noted in6203628130. No implementation writer is active. Your prior exact-head review found no code blockers and confirms selected durable requester ownership. This request supplies the omitted NEW F36 regression and its full queue/worker harness directly below. These are immutable local-source excerpts, not invented test descriptions. Do not treat this as the entire large lifecycle file; other unchanged cases are not reproduced here. Scope any remaining omission honestly and assess whether the supplied F36 coverage and root runtime evidence close the stated verification gap. Exact-head root mandatory isolated Redis23file run COMPLETED:550tests44suites0fail/skip/cancel, normal113.276s; includes new taskFollowupIssueInitialReceipt.test.ts and the full lifecycle file. The realworker F36 case is ok76: initial ordinary child failed once, three real parent receipt failures exhaust/remove, differentuser request-specific child executes once with matching userId/retryRequesterId/comment, pending rows consumed. The unchanged independent pre-fix negative probe now passes onexacthead (1test0fail/skip/cancel,exit0), recording actual initial dispatcher acceptance+receiptfailure then differentuser API request dispatcher correctowner. Types/root/API and changed-filezero-warninglint pass. Remaining withdrawal/automaticretry/probes/scanner suite and CI still running: not yet fullgreen, not merged/published. Prior52a counts are not substituted fornewhead. GitHub no-patch limitation is why these source excerpts are attached; larger diff budget does not recover missing patch. Source file SHA256: fbe964593d99f3ffd632c9059bd386f2344ce362cc52475e7e4c1a9e07219281. Actual queue namespace, connection, cleanup, channels, withLiveQueue production dispatcher/worker integration and all F36 assertion helpers (source lines 55–425): type RetryRunChild = import('../../core/src/services/issueRetryRun.js').RetryRunChild;
const { processDetectedIssue } = await import('../../core/src/daemon/issueDetection.js');
const REDIS_HOST = process.env.REDIS_HOST ?? '127.0.0.1';
const REDIS_PORT = Number.parseInt(process.env.REDIS_PORT ?? '6379', 10);
const RUN_ID = `${process.pid}-${Date.now()}-${randomUUID()}`;
// The suite's own keys; nothing outside this namespace is written or deleted, but the sentinels.
const NAMESPACE = `propr-itest:issue-retry:${RUN_ID}:`;
const JOB_ID = 'issue-integry-propr-14';
const ORIGINAL = 'Retry with the original instructions';
const DAY_MS = 24 * 60 * 60_000;
// Unrelated recovery evidence and a duplicate claim, outside the namespace, as another request or process
// using the same Redis would keep them; they expire on their own should the suite be killed.
const SENTINEL_TTL_MS = 60 * 60_000;
const SENTINELS: Record<string, string> = {
[`issue:retry-outcome:sentinel-${RUN_ID}:1760522400000`]: 'possible',
[`issue:dedup:propr-itest-sentinel-${RUN_ID}:propr:14`]: 'sentinel-claim',
};
function connect(keyPrefix?: string): Redis {
const client = new Redis({
host: REDIS_HOST, port: REDIS_PORT, connectTimeout: 250, enableReadyCheck: false,
lazyConnect: true, maxRetriesPerRequest: null, retryStrategy: () => null, ...(keyPrefix ? { keyPrefix } : {}),
});
client.on('error', () => {});
return client;
}
// `raw` reads the namespace and the sentinels by full key, and carries BullMQ, which takes its own prefix;
// `owned` is the route's, deliveries' and dispatcher's Redis, whose every key is in the namespace.
const raw = connect();
const owned = connect(NAMESPACE);
const reachable = await raw.connect().then(() => owned.connect()).then(() => raw.ping()).then(() => true, () => false);
if (!reachable && process.env.PROPR_REQUIRE_REDIS_INTEGRATION === '1') {
throw new Error(`Redis is required for the issue retry queue integration suite but is not reachable at ${REDIS_HOST}:${REDIS_PORT}`);
}
const skip = reachable ? false : `Redis is not reachable at ${REDIS_HOST}:${REDIS_PORT}`;
const clients: Redis[] = [];
/** The full names of the suite's keys matching `pattern` within its namespace. */
async function ownedKeys(pattern = '*'): Promise<string[]> {
const keys: string[] = [];
let cursor = '0';
do {
const [next, batch] = await raw.scan(cursor, 'MATCH', `${NAMESPACE}${pattern}`, 'COUNT', 1000);
keys.push(...batch);
cursor = next;
} while (cursor !== '0');
return keys;
}
/** Deletes the suite's keys matching `pattern`, and no other. */
async function clearOwnedKeys(pattern = '*') {
const keys = await ownedKeys(pattern);
if (keys.length > 0) await raw.del(...keys);
}
const outcomeKeys = () => ownedKeys('issue:retry-outcome:*');
/** The queue's records of requested retries' runs, under its BullMQ prefix in the namespace, that are not retired. */
async function runRecords(): Promise<string[]> {
const records: string[] = [];
for (const key of await ownedKeys('bull:*:retry-run:*')) if (!await raw.hexists(key, 'consumed')) records.push(key);
return records;
}
/** The records of runs whose requests were recorded consumed, kept as their tombstones. */
async function retiredRecords(): Promise<string[]> {
const records: string[] = [];
for (const key of await ownedKeys('bull:*:retry-run:*')) if (await raw.hexists(key, 'consumed')) records.push(key);
return records;
}
async function assertSentinelsUnchanged() {
for (const [key, value] of Object.entries(SENTINELS)) {
assert.equal(await raw.get(key), value, `the unrelated ${key} is kept`);
const ttl = await raw.pttl(key);
assert.ok(ttl > 0 && ttl <= SENTINEL_TTL_MS, `the unrelated ${key} keeps its expiry`);
}
}
if (reachable) {
for (const [key, value] of Object.entries(SENTINELS)) assert.equal(await raw.set(key, value, 'PX', SENTINEL_TTL_MS, 'NX'), 'OK');
}
after(async () => {
try {
if (reachable) {
await clearOwnedKeys();
await raw.del(...Object.keys(SENTINELS));
}
} finally {
for (const client of [raw, owned, ...clients]) client.disconnect();
}
});
type Settled = { event: 'completed'; job: Job<IssueJobData>; result: JobResult } | { event: 'failed'; job: Job<IssueJobData>; error: Error };
/** A child job's actual run: the job, and the prompt its agent would have been given. */
interface ChildRun { jobId: string; data: IssueJobData; prompt: string }
// How long a test waits for a job to settle before it fails, well within its own timeout, so its
// cleanup closes the worker and drops its keys instead of leaving them to the next test.
const SETTLE_TIMEOUT_MS = 15_000;
/** Settled jobs in arrival order, each taken once by a waiter, or a failure when none settles in time. */
function channel(what: string) {
const ready: Settled[] = [];
const waiting: Array<(settled: Settled) => void> = [];
return {
push: (settled: Settled) => { const next = waiting.shift(); if (next) next(settled); else ready.push(settled); },
next: (): Promise<Settled> => {
const settled = ready.shift();
if (settled) return Promise.resolve(settled);
return new Promise((resolve, reject) => {
const timer = setTimeout(() => {
waiting.splice(waiting.indexOf(take), 1);
reject(new Error(`No ${what} job settled within ${SETTLE_TIMEOUT_MS}ms`));
}, SETTLE_TIMEOUT_MS);
const take = (next: Settled) => { clearTimeout(timer); resolve(next); };
waiting.push(take);
});
},
/** Settled jobs no waiter took. */
pending: () => ready.length,
};
}
interface LiveQueue {
queue: Queue;
/** Every child the dispatcher added, deduplicated by BullMQ or not. */
children: Array<{ jobId: string; data: IssueJobData }>;
/** The child jobs BullMQ actually ran. */
runs: ChildRun[];
/** What each dispatch the workers ran returned or threw, as it returned, whether or not its job still held its lock. */
dispatches: Array<JobResult | Error>;
/** The jobs the workers' stalled checks moved back to wait. */
stalls: string[];
/** Starts a worker, with `options` over the suite's; the latest started is the one `restartWorker` restarts. */
startWorker: (options?: Partial<WorkerOptions>) => Worker;
/** Closes the worker, as when the worker process stops, and starts a fresh one. */
restartWorker: () => Promise<void>;
/** The next parent (dispatcher) job to settle. */
settled: () => Promise<Settled>;
/** The next child job to settle. */
childSettled: () => Promise<Settled>;
/** Holds every child run that starts until the returned release runs. */
holdChildren: () => () => void;
/** Whether each child run that starts fails right away, as on an agent authentication failure. */
failChildren: (fail: boolean) => void;
/** Waits until no job is waiting, delayed or running. */
drained: () => Promise<void>;
/** Waits until the job is in `jobState`. */
reaches: (jobId: string, jobState: string) => Promise<void>;
}
/** Polls `done` until it holds, failing with `what` after ten seconds. */
async function until(done: () => Promise<boolean>, what: string) {
for (let polls = 0; polls < 200; polls++) {
if (await done()) return;
await new Promise(resolve => setTimeout(resolve, 50));
}
assert.fail(what);
}
// The queue the next requested run is added through, in place of the real one, once.
let nextRunQueue: ((queue: Queue) => Queue) | undefined;
// Run once, after the next read of a request's run record by a dispatch's selection that finds a run, before it returns.
let nextRunRead: (() => Promise<void>) | undefined;
// Run once, before the next read of a request's run record by a dispatch's selection.
let beforeRunRead: (() => Promise<void>) | undefined;
// Run once, after Redis next accepts a follow-up's claim of the issue's label-event window, before the route continues.
let afterClaimSet: (() => Promise<void>) | undefined;
/**
* The queue seen through a connection that loses the reply to every
* transaction: after Redis ran it, or before it reached Redis at all.
*/
function replyLosingQueue(queue: Queue, ran: boolean): Queue {
const bind = (target: object, prop: string | symbol) => {
const value = Reflect.get(target, prop, target) as unknown;
return typeof value === 'function' ? value.bind(target) : value;
};
const losing = (client: object) => new Proxy(client, { get: (target, prop) => prop !== 'multi' ? bind(target, prop) : () => {
const transaction = (target as { multi(): { exec(): Promise<unknown> } }).multi();
const exec = transaction.exec.bind(transaction);
transaction.exec = async () => {
if (ran) await exec();
throw new Error(ran ? 'Connection lost after the transaction ran' : 'Connection lost before the transaction was sent');
};
return transaction;
} });
return new Proxy(queue, { get: (target, prop) => prop === 'client' ? target.client.then(losing) : bind(target, prop) });
}
/**
* A real queue the route, deliveries and the dispatcher's children use, and a
* worker that runs its dispatcher jobs and child jobs, as the issue worker
* routes them, in arrival order.
*/
async function withLiveQueue(body: (live: LiveQueue) => Promise<void>) {
await clearOwnedKeys('issue:*');
const prefix = `${NAMESPACE}bull`;
const queue = new Queue(`issue-retry-itest-${randomUUID()}`, { connection: raw, prefix });
const children: LiveQueue['children'] = [];
const runs: ChildRun[] = [];
const dispatches: Array<JobResult | Error> = [];
const stalls: string[] = [];
// Runs are added to the real queue, with their record, in one transaction; the storage lifecycle guard is the production queue's.
const selectionRuns = { ...retryRuns, read: async (held: Parameters<typeof retryRuns.read>[0]) => {
const before = beforeRunRead;
beforeRunRead = undefined;
await before?.();
const run = await retryRuns.read(held);
const hook = run ? nextRunRead : undefined;
if (hook) {
nextRunRead = undefined;
await hook();
}
return run;
} };
const store = retryRequestStoreFor(redisRetryOutcomeEvidence(() => owned), (held, runChildren, receiptEventId) => {
const through = nextRunQueue?.(queue) ?? queue;
nextRunQueue = undefined;
return enqueueIssueRetryRun(through, held, runChildren, { receiptEventId, use: run => run() });
}, selectionRuns);
const deps = {
...dispatcherDeps(children, store),
issueQueue: {
add: async (name: string, data: IssueJobData, options: { jobId: string }) => {
children.push({ jobId: options.jobId, data });
return queue.add(name, data, options);
},
},
} as unknown as Parameters<typeof handleDispatchWithDeps>[1];
const parents = channel('parent');
const childOutcomes = channel('child');
let hold: Promise<void> | null = null;
let releaseHold = () => {};
let childrenFail = false;
let worker: Worker | undefined;
const workers: Worker[] = [];
// The route takes its Redis from the issue queue; it is the namespaced client, while BullMQ keeps its own,
// so the queue's keys, such as its run records, are named relative to the namespace there. A test may suspend
// the route once Redis has accepted its claim, before the route continues from that await.
const routeRedis = new Proxy(owned, { get: (target, prop) => {
if (prop === 'set') return async (...args: unknown[]) => {
const result = await (target.set as unknown as (...setArgs: unknown[]) => Promise<unknown>)(...args);
const hook = result === 'OK' && args[0] === dedupKey ? afterClaimSet : undefined;
if (hook) {
afterClaimSet = undefined;
await hook();
}
return result;
};
const value = Reflect.get(target, prop, target) as unknown;
return typeof value === 'function' ? value.bind(target) : value;
} });
useLiveQueue(new Proxy(queue, { get: (target, prop) => {
if (prop === 'client') return Promise.resolve(routeRedis);
if (prop === 'toKey') return (type: string) => target.toKey(type).slice(NAMESPACE.length);
const value = Reflect.get(target, prop, target) as unknown;
return typeof value === 'function' ? value.bind(target) : value;
} }));
const runChild = async (job: Job<IssueJobData>): Promise<JobResult> => {
await hold;
runs.push({ jobId: job.id!, data: job.data, prompt: await promptFor(job.data) });
if (childrenFail) throw new Error('Claude authentication failed');
return { status: 'completed', issueNumber: job.data.number };
};
const dispatch = async (job: Job<IssueJobData>) => {
try {
const result = await handleDispatchWithDeps(job, deps);
dispatches.push(result);
return result;
} catch (error) {
dispatches.push(error as Error);
throw error;
}
};
const startWorker = (options: Partial<WorkerOptions> = {}) => {
const connection = connect();
clients.push(connection);
const started = new Worker<IssueJobData, JobResult>(queue.name, job => job.data.isChildJob ? runChild(job) : dispatch(job),
{ connection, prefix, concurrency: 2, ...options });
worker = started;
workers.push(started);
started.on('completed', (job, result) => (job.data.isChildJob ? childOutcomes : parents).push({ event: 'completed', job, result }));
started.on('failed', (job, error) => { if (job) (job.data.isChildJob ? childOutcomes : parents).push({ event: 'failed', job, error }); });
started.on('stalled', jobId => { stalls.push(jobId); });
// A worker whose job another recovered cannot record its outcome; BullMQ reports that as an error event.
started.on('error', () => {});
return started;
};
try {
await body({
queue, children, runs, dispatches, stalls, startWorker,
restartWorker: async () => {
await worker?.close();
startWorker();
},
settled: parents.next,
childSettled: childOutcomes.next,
holdChildren: () => {
hold = new Promise(resolve => { releaseHold = () => { hold = null; resolve(); }; });
return releaseHold;
},
failChildren: fail => { childrenFail = fail; },
drained: () => until(async () => Object.values(await queue.getJobCounts('waiting', 'delayed', 'active')).every(jobs => jobs === 0),
'the queue did not drain'),
reaches: (jobId, jobState) => until(async () => await (await queue.getJob(jobId))?.getState() === jobState, `${jobId} did not become ${jobState}`),
});
assert.equal(parents.pending(), 0, 'no parent job settled that the test did not expect');
} finally {
useLiveQueue(null);
// A held child would keep the worker from closing after a failed assertion; a forced close does not wait for
// active jobs, and every worker the test started is closed, so none outlives it into the next test.
releaseHold();
await Promise.all(workers.map(started => started.close(true)));
await queue.obliterate({ force: true });
await queue.close();
await clearOwnedKeys();
}
assert.deepEqual(await ownedKeys(), [], 'the suite leaves none of its keys behind');
await assertSentinelsUnchanged();
}
/** The issue as the daemon's poll detects it, through the real queue and Redis. */
const livePoll = () => processDetectedIssue({
id: 1014, number: 14, title: 'Issue', url: 'https://github.com/integry/propr/issues/14', repoOwner: 'integry', repoName: 'propr',
labels: [...state.issueLabels], createdAt: '2026-10-15T09:00:00Z', updatedAt: '2026-10-15T10:00:01Z',
triggeredBy: 'propr-dev[bot]', triggeredById: '99', source: 'polling',
}, 'live-poll', owned);
/** The settled job dispatched a run carrying `requester`'s request and instructions. */
async function assertDispatched(settled: Settled, child: { data: IssueJobData } | undefined, { requester, commentId, instructions }: { requester: string; commentId: number; instructions: RegExp }) {
assert.equal(settled.event, 'completed', settled.event === 'failed' ? settled.error.message : undefined);
assert.equal(settled.event === 'completed' && settled.result.status, 'dispatched');
assert.ok(child);
assert.equal(child.data.userId, requester);
assert.equal(child.data.retryRequesterId, requester);
assert.equal(child.data.retryCommentId, commentId);
assert.match(await promptFor(child.data), instructions);
}
/** The child job ran once, for `requester`'s request with its instructions and none of `foreign`. */
function assertChildRun(run: ChildRun | undefined, { jobId, requester, commentId, instructions, foreign }: {
jobId: string; requester: string; commentId: number; instructions: RegExp; foreign?: RegExp;
}) {
assert.ok(run);
assert.equal(run.jobId, jobId);
assert.deepEqual([run.data.userId, run.data.retryRequesterId, run.data.retryCommentId], [requester, requester, commentId]);
assert.match(run.prompt, instructions);
if (foreign) assert.doesNotMatch(run.prompt, foreign);
}
const routings = [['submission-backed', true], ['issue-only', false]] as const;
/** The failed parent (dispatcher) attempt, failing with `error`. */
function assertFailedAttempt(settled: Settled, error: RegExp) {
assert.equal(settled.event, 'failed');
assert.match(settled.event === 'failed' ? settled.error.message : '', error);
}
/** The settled parent job completed with `result`. */
function assertCompleted(settled: Settled, result: JobResult) {
assert.equal(settled.event, 'completed', settled.event === 'failed' ? settled.error.message : undefined);
assert.deepEqual(settled.event === 'completed' && settled.result, result);
}
const alreadyDispatched = (backed: boolean): JobResult => backed
? { status: 'skipped', reason: 'submission_already_dispatched', issueNumber: 14 }
: { status: 'skipped', reason: 'retry_request_already_dispatched', issueNumber: 14 };Actual NEW F36 regression (source lines 718–755): test('a submission-backed follow-up by another user, after the initial dispatch ran the submitter\'s actual child but exhausted its attempts without recording its receipt, runs its own actual child once for that user', { skip, timeout: 60_000 }, async () => {
await onIssue(true, 'live-initial-receipt-unrecorded', async () => {
await withLiveQueue(async live => {
live.startWorker();
// The submission's initial delivery: each attempt adds the submitter's child, which fails fast, but cannot record the receipt.
live.failChildren(true);
state.recordDispatchFails = true;
assert.notEqual((await livePoll()).status, 'ignored');
for (let attempt = 0; attempt < 3; attempt++) assertFailedAttempt(await live.settled(), /database is locked/);
assert.equal((await live.childSettled()).event, 'failed');
await live.drained();
state.recordDispatchFails = false;
const initialChild = 'issue-integry-propr-14-claude-claude-opus-5-5-main';
assert.deepEqual(live.children.map(child => child.jobId), [initialChild, initialChild, initialChild], 'every attempt adds the same ordinary child');
assert.equal(live.runs.length, 1, 'which BullMQ deduplicates, so it ran once');
assert.deepEqual([live.runs[0].data.userId, live.runs[0].data.retryRequesterId, live.runs[0].data.retryCommentId], ['submitter', undefined, undefined]);
assert.equal(await (await live.queue.getJob(initialChild))?.getState(), 'failed', 'the failed child is kept, and blocks nothing');
assert.equal(await live.queue.getJob(JOB_ID), undefined, 'the exhausted parent is removed');
assert.equal(await receiptRecorded(), false, 'the receipt is still not recorded');
// The run failed without a PR; another user follows up, and their own child runs for them, once.
live.failChildren(false);
state.now += 60_000;
await owned.del(dedupKey);
const next = await postFollowup({ body: 'Second user instructions' }, 'failed-issue-task', 'user-2');
assert.equal(next.json.state, 'queued', String(next.json.message ?? next.json.error));
assert.equal(next.json.restartedRequest, undefined);
await assertDispatched(await live.settled(), live.children.at(-1), { requester: 'user-2', commentId: FIRST_COMMENT_ID, instructions: /Second user instructions/ });
assert.equal((await live.childSettled()).event, 'completed');
await live.drained();
assert.equal(live.runs.length, 2, 'the submitter\'s initial child did not run again');
assertChildRun(live.runs[1], { jobId: await requestChildId(), requester: 'user-2', commentId: FIRST_COMMENT_ID, instructions: /Second user instructions/ });
assert.equal(await receiptRecorded(), true, 'the receipt records the request\'s dispatch');
assert.deepEqual(await openRequests(), []);
assert.deepEqual(await runRecords(), []);
});
}, { receipt: false });
}); |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe supplied F36 regression and reported exact-head runtime results close the identified lifecycle-coverage gap at ✅ Requester ownership is independent of receipts — ✅ F36 exercises real queue transitions — The supplied ✅ Completed evidence covers this head — The reported mandatory Redis run completed with 550 tests, zero failures/skips/cancellations, including F36; the unchanged independent negative probe now passes. These are supplied execution results, not tests I ran during this review. The harness uses real BullMQ workers and production dispatcher/request-enqueue logic, with controlled GitHub and child execution. It does not exercise the full production issue processor or a live provider. Other portions of the omitted lifecycle file remain outside this source inspection; that limitation does not leave the supplied F36 scenario unreviewable. The authoritative check snapshot has zero failures and nine pending checks, so this is not a full-green declaration. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe ownership correction and supplied lifecycle assertions address the specific verification gap without requiring further implementation changes. Remaining checks are pending, and the review’s source coverage excludes the unsupplied portions of the lifecycle file. Score: 8/10 🤖 Review Details
Files omitted from review diff1 file was omitted from the review diff. Large, binary, generated, and lockfile changes are deprioritized. No patch content from GitHub (a larger review budget cannot recover these)
🤖 Review by ProPR |
|
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 abbeb4e Processed 2 comments:
Summary of ChangesThe CI failure was the API lint gate, not a test failure: the "Validate Changes" job runs What changed
Verification
Every new file is well under the limit. The largest is the harness module at 328 code lines. Test discovery scans the directory, so the new file names need no registration. No visual preview applies, since this is a test-only change. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…he "Validate Changes" job runs `eslint . --max-warnings 0` inside `packages/api`, and two follow-up test files had grown past the 400-code-line `max-lines` limit. I split both along their existing thematic boundaries, without changing any test body. The CI failure was the API lint gate, not a test failure: the "Validate Changes" job runs `eslint . --max-warnings 0` inside `packages/api`, and two follow-up test files had grown past the 400-code-line `max-lines` limit. I split both along their existing thematic boundaries, without changing any test body. **What changed** - `taskFollowupIssueLiveQueue.ts` is new: the real-Redis harness that used to head the lifecycle suite. It holds the namespaced Redis clients, sentinels, cleanup hook, the live queue, and the shared assertions. The four test-set `let` hook variables became one exported `hooks` object, since module-level `let` cannot be assigned from importers. Production modules stay behind `await import()` after the fixture so its module mocks still apply. - The lifecycle suite's 46 tests now live in six files by theme: `QueueLifecycle` (retries through actual child runs), `QueueRestarts`, `QueueRunTransactions`, `QueueStalledRecovery`, `QueueFreshPolls` and `QueueRecoveryHistory`. The per-group suspension helpers moved with the only group that uses them. - The ownership suite's 40 tests split into `taskFollowupIssueRetryOwnership.test.ts` (which trigger a request owns) and the new `taskFollowupIssueRetrySettlement.test.ts` (how an accepted run settles it). The one assertion both need, `assertIndependentRun`, moved into the existing dispatch helper. **Verification** | Check | Result | |---|---| | `eslint . --max-warnings 0` in packages/api | 0 problems | | `tsc --noEmit` in packages/api | clean | | Six real-Redis suites against a private Redis 7.2.5 built from source | 46 passed, 0 failed, 0 skipped, no keys left behind | | Ownership + settlement suites | 40 passed, matching the original file's 40 | | Three sibling suites importing the changed dispatch helper | 50 passed | Every new file is well under the limit. The largest is the harness module at 328 code lines. Test discovery scans the directory, so the new file names need no registration. No visual preview applies, since this is a test-only change. PR: #3125 Comment by: @propr-dev[bot] (ID: 6203970585) Comment by: @github-actions[bot] (ID: 6203970777) Model: Claude Fable 5.1
|
/review codex:gpt-6-astra Review exact immutable headabbeb4e05a73e9832835ac0a0e9a1d72ec1ddf86 after the automatic CI test-lint repair. No implementation writer remains. Scope the new changes relative to36c62439ed0792157ac4c6e387dc704045bc12e7: production tree is byte-identical (verified gitdiffquiet excluding packages/api/test); ten changed/added test/helper files split oversized suites and migrate four shared hook variables into exported hooks properties. Your completed exact36c supplemental review6203669797 was8/no blockers and closed F36 coverage. Keep prior production findings/guards intact; no production behavior or lint-rule weakening is intended. Independent preservation comparison: all44 original test-call names/options/callbacks/assertions remain;41calls are exact TypeScript-printed AST matches excluding comments,3differ only by shared hooks.nextRunQueue/nextRunRead/beforeRunRead/afterClaimSet qualification. Explicitly normalizing those four hook properties makes all44 test-call ASTs match. This does NOT prove moved helper equivalence, outer-loop wiring or runtime behavior; inspect those and fixture mock import/teardown/namespace ownership carefully. No deleted regression or weaker assertion is acceptable. The new fullAPIlint gate and exact-head29file mandatoryRedis suite (ALL6new.test.ts files included), withdrawal/finalizer and20independentprobes/scannercontracts are running; no claimed newheadpasscounts yet. Prior36c CI: allfulltestshards/nativepackages/checksums and464browser/PWAcases passed; finaljob failed solely max-lines warnings in2testfiles. Root fullAPIlint reproduced same2warnings0errors. Currentrepair uses smaller files, no eslintdisables/rulechange. Priorroot745regression+20probe/67scannerpasses3expectedskips/types/lint evidence is priorhead only. Fresh applicable CI still required before authorizedmerge/signing/finalnative/mobile acceptance. Main has advanced under another agent; finalmainmerge tree must match completedCI syntheticmerge, not assume36c's olderbase. Report static vs executed and any omitted diff scope honestly. |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationNo merge-blocking regression identified in the requested test-refactor scope. The PR addresses failed implementations without a PR through issue retries, preserving the requester and instructions. Ready within the reviewed scope, conditional on applicable pending checks completing successfully for the final merge tree. ✅ Shared hooks remain effective — Tests assign the exported ✅ Fixture isolation survives splitting — The extracted suites use the shared fixture before dynamically importing production modules. Redis namespaces include a process-specific UUID; cleanup targets owned keys and verifies unrelated sentinels. ✅ F36 coverage remains concrete — Verification was static only: I ran no commands or tests. I inspected the supplied helper wiring, loop variants, imports, and cleanup; I did not independently reproduce the reported production-tree equality or 44-test AST comparison. Prior-head execution results are not current-head pass evidence. The authoritative current status reports zero failures and twelve pending checks. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe inspected refactor preserves the important ownership and recovery assertions without visible lint-rule weakening. An 8 reflects no verified blocker, substantial supplied regression coverage, and merge readiness conditional on current validation completing against the final integrated tree. Score: 8/10 🤖 Review Details
🤖 Review by ProPR |
…t does not apply. The fix is verified; no visual preview applies to a test-only change. The test file is outside the core lint config scope, so lint does not apply. The fix is verified; no visual preview applies to a test-only change. Fixed the Shard 3/4 failure in `packages/core/test/extensionAuthorityMigrationCleanup.test.ts`. **Cause.** The test asserted that the last two rows of the historical migration ledger were the two retired tombstone names. Main's merged #3125 added `20261015090000_add_issue_retry_request_resumed_at.js`, which sorts between the epoch and v2 timestamps, so the second-to-last row was no longer the epoch migration. The CI merge-ref included that migration while the test still assumed adjacency. **Fix.** The assertion now filters the ledger for extension-authority names and expects exactly the epoch and v2 entries in order, plus a check that v2 is the final row. The rest of the test, including the tombstone and cleanup checks, is unchanged. **Verification.** The suite passes locally with both tests green. PR: #3155 Comment by: @propr-dev[bot] (ID: 6204682460) Model: Claude Fable 5.1
Follow Up on a failed implementation without a PR now starts a new run on its existing issue, carrying the authenticated requester's comment and execution identity. It no longer treats the issue number as a PR number. Follow-ups on implementations with a PR resolve the actual PR; PR-only commands remain confined to PR workflows.
The retry request is reserved durably before publication, associated with its own label event and child jobs, and reconciled across API/queue failures, delayed GitHub responses, worker restarts and retention cleanup. A selected request owns execution even if the original submission's dispatch receipt was never recorded. Independent later triggers retain their ordinary owner and instructions. Closed, cancelled, completed and already active issue runs remain guarded. Responses distinguish queued, failed and uncertain outcomes rather than treating a posted comment as proof of execution.
Desktop acceptance scanning also distinguishes token prefixes from random mid-ciphertext coincidences and detects prefixes after serialized whitespace escapes while retaining exact forbidden-value checks.
Validation at
abbeb4e05a73e9832835ac0a0e9a1d72ec1ddf86:bf3265d5ed1b187c022685aa414ffd6a9f01068bhas the same complete source tree as the PR head; the actual merged release source3e47d7ec4b3bcde688a2c42d7fed0699fc70b418was verified to have that same complete tree.These checks use controlled GitHub/provider fixtures; they do not prove authenticated live-provider or final installed-package acceptance. Those remain release-validation gates after the signed preview is built. The runtime dependency audit passes with the documented temporary braces exception expiring
2026-10-17T00:00:00Z; packaging audit passes.Closes #3124
Implemented through ProPR with Claude; reviewed with GPT-6 Astra.