Repository navigation
[2806 by Claude Opus 5.5] Agents v1 (7/17): Report-run executor — spawn an isolated task run from a definition and store the free-form report - #2839
Conversation
|
/ultrafix |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
⏳ 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 1465a01 Processed 2 comments:
Summary of ChangesI fixed the two lint warnings that failed the Core Lint step of CI.
🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…p of CI. `npx eslint src/ --max-warnings 0` now passes with no warnings, `npm run typecheck` is clean, and `test/processAgentRunJob.test.ts` passes. I didn't run the rest of the test suite. No previews, since nothing visible changed.
I fixed the two lint warnings that failed the Core Lint step of CI. `npx eslint src/ --max-warnings 0` now passes with no warnings, `npm run typecheck` is clean, and `test/processAgentRunJob.test.ts` passes. I didn't run the rest of the test suite. No previews, since nothing visible changed.
- **Too many parameters in `copyAgentInputFiles`** (`src/jobs/agentRuns/workspace.ts`): the optional `log` and `inputRoot` arguments are now one options object, `{ log?, inputRoot? }`. I updated the two calls in the same file and the two in `test/processAgentRunJob.test.ts` to match.
- **Complexity too high in `processAgentRun`** (`src/jobs/processAgentRunJob.ts`): I moved three pieces out into small helpers without changing how a run behaves:
- `reportFromResult` throws if the agent failed or gave an empty report, otherwise returns the report.
- `previousReportsFor` fetches earlier reports only when the definition asks for them.
- `failRunningRun` holds what used to be the `catch` block: it works out the failure reason (including the usage-limit case), marks the run failed, and marks the task failed.
PR: #2839
Comment by: @propr-dev[bot] (ID: 6020576741)
Comment by: @github-actions[bot] (ID: 6020577591)
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 report execution, workspace preparation, report persistence, and autonomy-based completion. It needs changes to handle interrupted execution and cancellation consistently. ✅ Guarded report persistence — The ✅ Workspace cleanup — Preparation failures clean up acquired workspaces, and execution releases them in ✅ Focused execution tests — Tests cover successful reports, invalid definitions, empty output, usage limits, and preservation of cancelled run state. This review used static analysis of the supplied code; no commands were run. Current checks show 13 passed, four pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Interrupted runs cannot recover
F2: 🔴 Late cancellation leaves an unfinished task
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Verify adapter policy enforcementThe new ScoreThe main report path is well organized, but interruption recovery and cancellation leave lifecycle inconsistencies that require correction. Passing checks and focused tests provide useful evidence, while four suite shards remain pending. 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 456bca3
Summary of ChangesI fixed both findings in F1 – interrupted runs. When a job is delivered again and its run is still
F2 – late cancellation. When storing the report is rejected because the run is no longer The same mistake existed on the error path. If the run was cancelled and the agent then failed (for example, its container was killed), the task was marked failed while the run said cancelled. That path now checks the run's state the same way. New tests cover:
What this can't prevent:
The Gmail, Google Calendar and Google Drive connectors need to be authorized in claude.ai's connector settings before they can be used. I didn't need them for this. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…The processor tests pass (20 of 20), and `npm run typecheck` and `npx eslint src/ --max-warnings 0` are clean. Against the previous processor code, 4 of the 5 new tests fail. The fifth, for a duplicate delivery, passes either way because the old code skipped every non-queued run. I didn't run the rest of the test suite. No previews, since nothing visible changed. I fixed both findings in `src/jobs/processAgentRunJob.ts`. The processor tests pass (20 of 20), and `npm run typecheck` and `npx eslint src/ --max-warnings 0` are clean. Against the previous processor code, 4 of the 5 new tests fail. The fifth, for a duplicate delivery, passes either way because the old code skipped every non-queued run. I didn't run the rest of the test suite. No previews, since nothing visible changed. **F1 – interrupted runs.** When a job is delivered again and its run is still `running`, the processor no longer ignores it: - **Abandoned attempt:** the queue only delivers an active job again after its lock has lapsed, so the earlier attempt is treated as dead. The run is moved from `running` to `failed`, with the reason "The worker running this report stopped before it finished; trigger the agent again", and the task is marked failed. I chose not to re-execute, because if the old attempt were in fact still running, the agent would run twice. - **Attempt still running in this worker:** the processor now tracks the runs it is executing. A delivery for one of those is skipped and leaves the run alone. - **Run cancelled in the meantime:** if the move to `failed` loses to a cancel, the task follows the run's actual state instead. **F2 – late cancellation.** When storing the report is rejected because the run is no longer `running`, the processor now reads the run's current state. It marks the task cancelled (or failed, if the run was failed as abandoned) instead of leaving it in post-processing. The task store never overwrites a task that has already finished, so a task the cancel endpoint did stop keeps the state it was given. The same mistake existed on the error path. If the run was cancelled and the agent then failed (for example, its container was killed), the task was marked failed while the run said cancelled. That path now checks the run's state the same way. New tests cover: - a late report after a cancel the endpoint couldn't stop. - a cancel followed by an agent failure. - a delivery after an interrupted worker. - an abandoned run that is cancelled while being recovered. - a duplicate delivery while the run is still executing. **What this can't prevent:** - A worker on another machine that froze long enough to lose its lock may still be running the agent when its run is failed. Its later result is then discarded and its task ends as failed, but its container isn't stopped from here. - The workspace of a worker that died isn't cleaned up. That was already the case and is outside these two findings. The Gmail, Google Calendar and Google Drive connectors need to be authorized in claude.ai's connector settings before they can be used. I didn't need them for this. PR: #2839 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 EvaluationThis PR replaces the report-phase placeholder with workspace preparation, agent execution, report persistence, and task lifecycle handling. It needs changes before merge: interrupted finalization is not recoverable, failed persistence can be acknowledged as success, and attachment copying can follow repository-controlled symlinks outside the workspace. ✅ Guarded report storage — The ✅ Focused lifecycle coverage — Tests cover execution failure, empty reports, usage limits, cancellation, duplicate delivery, and workspace cleanup. The supplied checks show 13 passed, four pending, and no failures. This review uses static analysis of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Recover interrupted report finalization
F4: 🔴 Do not swallow failed state persistence
F5: 🔴 Prevent attachment writes outside the workspace
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Exercise real adapter boundariesThe processor tests mock agent execution, and the workspace tests exercise only the scratch path. A follow-up integration test using a repository worktree and a concrete adapter would strengthen confidence in workspace verification, Git access preparation, and report extraction. This is broader validation beyond the specific corrections above. ScoreThe implementation has useful structure and focused tests, but durable lifecycle recovery and host filesystem containment need correction. Passing checks do not cover the demonstrated failure paths. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 22a392c
Summary of ChangesI fixed F3, F4 and F5. F3 – a redelivery now finishes a run whose report is already stored (
F4 – a failure that can't be saved now fails the delivery
F5 – attachment and context-repo writes can't leave the workspace (
Other problems I found and left alone (outside the selected findings):
🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…d `test/agentRunTrigger.test.ts` pass (30 of 30). Root and `packages/core` typecheck are clean, and eslint reports no warnings on `src/` or the changed core file. I added 10 regression tests, and all 10 fail when run against the previous source. I didn't run the rest of the test suite. No previews, since nothing visible changed.
I fixed F3, F4 and F5. `test/processAgentRunJob.test.ts` and `test/agentRunTrigger.test.ts` pass (30 of 30). Root and `packages/core` typecheck are clean, and eslint reports no warnings on `src/` or the changed core file. I added 10 regression tests, and all 10 fail when run against the previous source. I didn't run the rest of the test suite. No previews, since nothing visible changed.
**F3 – a redelivery now finishes a run whose report is already stored** (`src/jobs/processAgentRunJob.ts`)
- When a delivery arrives for a `report_ready` or `completed` run that already has a report, the processor finishes the remaining steps without running the agent again. A dry run is moved to `completed`. Preview and auto runs stay in `report_ready`. In both cases the report task is marked completed.
- These steps are safe to repeat. A run that was already advanced isn't advanced again, and a task that already ended is left alone, so a duplicate delivery doesn't re-complete the task or send a second Inbox notification.
- The normal path and redeliveries share this code. If finishing fails after the report is stored, the error is now thrown so the next delivery can finish the run. Before, that failure marked a run with a stored report as `failed`.
- A delivery that overlaps a run still executing in the same process is skipped, as it already was for `running`.
**F4 – a failure that can't be saved now fails the delivery**
- When saving the `failed` state to the database throws, the processor now raises a new `AgentRunPersistenceError` instead of treating the run as settled. This covers the validation-failure, execution-failure and abandoned-run paths. A run that another writer had already moved on still returns `false` as before, so the two cases stay separate.
- That error is raised from inside the outer `catch`, so it is no longer turned into a normal `{ status: 'failed' }` result. Workspace cleanup still runs.
- **One change outside the processor:** `AGENT_RUN_JOB_OPTIONS` was `attempts: 1`, so a failed delivery would never be retried and these fixes would have nothing to act on. I changed it to `attempts: 3` with exponential backoff (5 s) in `packages/core/src/services/agents/agentRunTrigger.ts` and updated its test. A retry doesn't spend tokens twice: after the run has started, a retry either fails it as abandoned or finishes it from the stored report. Please check you're happy with that change.
**F5 – attachment and context-repo writes can't leave the workspace** (`src/jobs/agentRuns/workspace.ts`)
- A new `prepareReservedDirectory` checks the path from the workspace root down. Any symlink or file in the way, such as `.propr` itself, is unlinked; the place it points to is never touched. The final directory is always recreated empty, which also removes symlinks to individual files inside it. The function then confirms the directory really resolves inside the workspace.
- `copyAgentInputFiles` uses it for `.propr/agent-inputs`. `prepareRepositoryWorkspace` uses it for `.propr/context` before cloning the additional repositories into it.
**Other problems I found and left alone** (outside the selected findings):
- If marking the task failed or cancelled throws, the error is still swallowed. This happens in `failRunningRun`, `recoverAbandonedRun` and `settleTaskWithRun`. Once the run is `failed` or `cancelled`, a redelivery skips it, so the task can stay stuck in a processing state.
- If an interrupted run is retried after all 3 attempts are used up and saving still fails, the run stays `running`. Retries can't fix that; it would need a separate background sweep.
PR: #2839
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 report execution, workspace preparation, task tracking, and recovery without rerunning an already claimed agent. It needs changes before merge because repository access restrictions, cancellation during preparation, and failed-task recovery remain incomplete. ✅ Recoverable report finalization — Once a report is stored, retries finish lifecycle updates without executing the agent again. ✅ Safer workspace writes — Reserved-directory preparation removes checked-out symlinks before copying inputs or cloning context repositories. ✅ Lifecycle coverage — Tests cover late results, provider failures, duplicate delivery, and interrupted report finalization. The supplied current checks show no failures; four test shards remain pending. This review uses static tracing only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F6: 🔴 Enforce repository access at container launch
F7: 🔴 Cancellation during preparation still launches the agent
F8: 🔴 Failed runs can leave permanently active tasks
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation has useful recovery logic and substantial unit coverage, but the access-boundary and lifecycle defects require correction. Passing checks do not cover these demonstrated integration paths. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit b9b2271
Summary of ChangesI fixed F6, F7 and F8. The agent-run tests and the agent git-access tests pass (6 files). Root and F6: repository access is now enforced when the container launches.
F7: a run cancelled during preparation no longer starts the agent.
F8: failed and cancelled runs no longer leave their task active.
Separately, the Gmail, Google Calendar and Google Drive connectors in this session need authorization in your claude.ai connector settings; they weren't needed for this work. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…t-access tests pass (6 files). Root and `packages/core` typecheck are clean, and eslint reports no warnings on `src/` or the two changed core files. I added 14 regression tests; 12 of them fail when run against the previous source. The other 2 are guards that pass either way: one checks that a `repository_read` run still gets its credential, the other that an already-ended task is left alone. I didn't run the rest of the test suite. No previews, since nothing visible changed. I fixed F6, F7 and F8. The agent-run tests and the agent git-access tests pass (6 files). Root and `packages/core` typecheck are clean, and eslint reports no warnings on `src/` or the two changed core files. I added 14 regression tests; 12 of them fail when run against the previous source. The other 2 are guards that pass either way: one checks that a `repository_read` run still gets its credential, the other that an already-ended task is left alone. I didn't run the rest of the test suite. No previews, since nothing visible changed. **F6: repository access is now enforced when the container launches.** - I added a `repositoryAccess: 'none'` option to `AgentTaskOptions`. When it's set, `prepareAgentGitAccess` returns an empty token and no mounts. It does this before it reads repository settings, mints a token or lists clones. - Every adapter (Claude, Codex, the Codex app server, OpenCode, Vibe, Antigravity) prepares its launch through that function. Their Docker argument builders keep an empty mount list as it is, so no adapter falls back to the default clone mounts. - The processor sets the option, and passes an empty token, unless the run has `repository_read` *and* the workspace actually checked out a repository. That also covers a run with `repository_read` but no repositories, which gets an empty scratch directory. - The new core test sets up existing clones with no context restriction and checks that no token is minted and nothing is mounted. **F7: a run cancelled during preparation no longer starts the agent.** - Right before `executeTask`, after the task is moved to execution, the processor re-reads the run. - If the run is no longer `running`, it settles the task to match and returns without launching. - If the task was stopped directly while the run is still `running`, it cancels the run and returns. - A cancel that lands during the launch itself is still left to the execution layer's existing handling. - The two existing "cancel during execution" tests used to cancel at claim time, so with this check they would never have reached the agent. They now cancel from inside the agent call, so they still test cancellation during execution. **F8: failed and cancelled runs no longer leave their task active.** - If the task can't be updated to match the run, the delivery now fails with a new `AgentRunSettlementError` instead of logging and returning. This applies to ordinary failure, abandoned-run recovery and cancellation settlement, and BullMQ retries the delivery. - When a job is redelivered for a `failed` or `cancelled` run, the processor now ends a task that still exists and is not finished yet. If the task doesn't exist or has already ended, it skips as before. `toolPolicy` is still passed through unchanged; the repository restriction comes from the new launch option, not from `toolPolicy`. Separately, the Gmail, Google Calendar and Google Drive connectors in this session need authorization in your claude.ai connector settings; they weren't needed for this work. PR: #2839 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 report execution, workspace preparation, and recovery without re-executing an already claimed run. It needs changes before merge because two cancellation paths can leave the run and its task inconsistent. ✅ Recovery after report storage — Redelivery completes stored reports without invoking the agent again, with tests covering interrupted finalization. ✅ Workspace path protection — Reserved directories replace checked-out symlinks before host-side writes, with focused regression tests. The supplied checks show no failures; four full-suite shards remain pending. This review is based on static analysis only, as requested. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F9: 🔴 Honor task cancellation during execution
F10: 🔴 Do not cancel the winning claimant's task
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Exercise actual adapter boundariesThe processor tests mock ScoreThe implementation has substantial lifecycle coverage, but direct cancellation and competing-claim handling still produce incorrect persistent state. No current check failures are reported, although the full-suite shards remain pending. 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 1268ad5
Summary of ChangesI fixed F9 and F10 in F9: stopping a task during execution. After
F10: losing the claim. When the
Tests:
To keep the file within its lint limits (400 lines, complexity 20), I moved the run error classes and Separately, the Gmail, Google Calendar and Google Drive connectors need to be authorized in your claude.ai connector settings before they can be used. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
… processor and trigger tests pass (65 of 65), root and `packages/core` typecheck are clean, and `npx eslint src/ --max-warnings 0` reports nothing. I added 7 regression tests; 6 of them fail against the previous processor code. I didn't run the rest of the test suite. No previews, since nothing visible changed. I fixed F9 and F10 in `src/jobs/processAgentRunJob.ts`. The processor and trigger tests pass (65 of 65), root and `packages/core` typecheck are clean, and `npx eslint src/ --max-warnings 0` reports nothing. I added 7 regression tests; 6 of them fail against the previous processor code. I didn't run the rest of the test suite. No previews, since nothing visible changed. **F9: stopping a task during execution.** After `executeTask` returns, the processor now checks whether the task was stopped directly. If it was, the run moves from `running` to `cancelled`, and the result is thrown away whether it succeeded or failed. The failure path makes the same check before marking the run failed. If that check itself errors (say, Redis is down), it logs and still records the failure, so the run doesn't stay `running`. All of these moves are guarded: if another writer already changed the run, the task follows whatever that writer stored. - **Same defect in recovery:** a run whose worker died after its task was stopped used to be failed as abandoned. It is now cancelled. - **Remaining gap:** a stop that lands between this check and storing the report is not caught. Tasks and runs live in different stores, so the check can't be atomic, and a run that already has its report can't be moved to `cancelled`. **F10: losing the claim.** When the `queued → running` claim fails, the processor now rereads the run. - If the run was cancelled or failed, the task is ended to match. - In any other state, another delivery has claimed the run, so this delivery returns `skipped` and leaves the run and its task alone. It no longer goes through abandoned-run recovery. **Tests:** - One test for each F10 case: the stale delivery that loses the claim to a stalled-job redelivery (the claimant's task still completes), and a run failed before the claim. - For F9, a task stopped during execution followed by a successful result, a failed result, and a thrown error. Plus the abandoned-run case. - The guard that passes either way: when the task can't be read, the failure is still recorded. - I rewrote the existing "cancelled between pickup and start" test so the run is actually cancelled. It used to fake a claim that returned null while the run stayed `queued`, which now correctly counts as someone else's claim. To keep the file within its lint limits (400 lines, complexity 20), I moved the run error classes and `reportFromResult` into a new `src/jobs/agentRuns/runErrors.ts`. The error classes are still exported from the processor. I also added a few small helpers in the processor. Separately, the Gmail, Google Calendar and Google Drive connectors need to be authorized in your claude.ai connector settings before they can be used. PR: #2839 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: |
Full Test Suite ResultsValidation failed during: Test shard (shard 1).
View shard 1/4 outputDetails truncated; see the uploaded artifacts for complete failure rows and logs. |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR implements report execution, workspace preparation, task tracking, and recovery without rerunning a claimed agent. It needs changes before merge because cancellation can produce inconsistent terminal states, and repository-free runs unnecessarily depend on GitHub authentication. ✅ Recovery without repeat execution — Deliveries with stored reports finish lifecycle transitions without executing the agent again. ✅ Workspace destination protection — Reserved-directory preparation replaces checked-out symlinks before host-side writes, with targeted test coverage. This review is a static trace of the supplied code; no commands were run. Current checks include 18 passes, one pending check, and a non-blocking shard failure. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F11: 🔴 Cancellation can become a completed run
F12: 🔴 Repository-free runs require GitHub authentication
SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Exercise real repository workspace preparationThe new tests cover scratch workspaces and reserved-directory handling, while processor tests mock repository preparation. A follow-up integration test using local repositories would strengthen coverage of primary worktree creation, additional clones, and cleanup. This is optional coverage beyond the concrete corrections above. ScoreThe implementation has substantial lifecycle coverage and useful recovery safeguards, but the two execution-path defects need localized corrections before merge. Full-suite validation also remains unsettled. 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 93449b0 Summary of ChangesI fixed the shard 1 timeout in Cause: the workspace test calls the real setup code, which runs Fix (test-only):
With the fix, the file passes against both the fake read-only 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…t.ts`. The test file passes (48 of 48 in 2.4s) both normally and with a simulated CI `sudo`; I haven't confirmed it on a real CI runner yet. I fixed the shard 1 timeout in `test/processAgentRunJob.test.ts`. The test file passes (48 of 48 in 2.4s) both normally and with a simulated CI `sudo`; I haven't confirmed it on a real CI runner yet. **Cause:** the workspace test calls the real setup code, which runs `sudo chown -R 1000:1000` on the scratch workspace. My local container has no `sudo`, so the call fails, the code logs a warning and the test finishes. GitHub runners have passwordless `sudo`, so there the chown succeeds. The test process then has to clean up a directory owned by another user, and the file hung until the 180s limit killed it. To reproduce this, I used a fake `sudo` that makes the workspace read-only, and the file hung the same way. **Fix (test-only):** - At the top of the test file, I put a stub `sudo` that does nothing first on `PATH`. `test/worktreeStartRevision.test.ts` already handles the same problem this way. - The `after` hook now closes the database connection in a `finally`, so a failed cleanup can't keep the process alive. With the fix, the file passes against both the fake read-only `sudo` and the normal environment. No other test calls this workspace setup. ESLint ignores files under `test/`, so lint doesn't cover this change. I didn't run the rest of the suite. Nothing visible changed, so there are no previews. PR: #2839 Comment by: @github-actions[bot] (ID: 6021809239) Model: Claude Opus 5.5
|
✅ Applied the requested follow-up changes in commit 9930901
Summary of ChangesI fixed F11 and F12. The processor and trigger tests pass (68 of 68), the root and F11 – a cancel during the "storing report" update no longer ends as a completed run
F12 – runs that don't read repositories no longer need GitHub sign-in
Unrelated change: moving the GitHub-access decision into the processor took it over two eslint limits (function complexity and file length). To stay under them, I moved the agent launch options into a new The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. I didn't need them for this. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…68 of 68), the root and `packages/core` typechecks are clean, and `npx eslint src/ --max-warnings 0` reports nothing. I added 3 regression tests; the 2 that cover these bugs fail when run against the previous source. I didn't run the rest of the test suite. No previews, since nothing visible changed. I fixed F11 and F12. The processor and trigger tests pass (68 of 68), the root and `packages/core` typechecks are clean, and `npx eslint src/ --max-warnings 0` reports nothing. I added 3 regression tests; the 2 that cover these bugs fail when run against the previous source. I didn't run the rest of the test suite. No previews, since nothing visible changed. **F11 – a cancel during the "storing report" update no longer ends as a completed run** - In `src/jobs/processAgentRunJob.ts`, after the `POST_PROCESSING` task update, the processor now reads the task again through `followCancelledTask` before storing the report. If the task was cancelled, the run is cancelled too and the report is dropped. - The check has to come before the report is stored: once a run has a stored report (`report_ready`), the run store won't let it become cancelled. - I looked for the same defect elsewhere. Every other point where the processor waits on something and then changes the run already re-checks for a cancelled task first. The recovery paths for runs with a stored report only pick up runs that already have one, so this check covers them as well. - A small gap remains between that read and storing the report. The tasks and the runs live in two separate stores, so a cancel landing in that moment can't be fully excluded. The unchecked wait on the update itself is gone. - **Regression test:** the task is cancelled during the `POST_PROCESSING` update. The test checks that the run ends `cancelled` with no report, is never marked `report_ready` or `completed`, the task stays `cancelled`, and the workspace is cleaned up. **F12 – runs that don't read repositories no longer need GitHub sign-in** - I added `definitionReadsRepositories()` to `src/jobs/agentRuns/workspace.ts`: true only when the definition has `repository_read` and at least one repository. - The workspace setup, the GitHub sign-in and the agent's repository access now all use that same check. GitHub credentials are fetched only when it's true; otherwise the workspace gets an empty token and no GitHub client, and the agent launches without repository access. - **Regression tests:** - The GitHub-access step throws for three kinds of definition: no capability and no repositories, repositories but no `repository_read`, and `repository_read` with no repositories. In all three the run completes, GitHub access is never requested, and the agent gets no repository access. - A guard test checks that a run which does read repositories still fails cleanly when GitHub access fails. **Unrelated change:** moving the GitHub-access decision into the processor took it over two eslint limits (function complexity and file length). To stay under them, I moved the agent launch options into a new `src/jobs/agentRuns/agentTaskOptions.ts`, along with the `AgentRunToolPolicy` type. `processAgentRunJob.ts` still exports that type, so existing imports keep working. The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. I didn't need them for this. PR: #2839 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 report execution, workspace preparation, task tracking, and recovery without rerunning claimed agents. It needs changes before merge because additional repository checkouts bypass the repository context restriction enforced at launch. ✅ Guarded lifecycle transitions — Run claims and report publication use conditional transitions, preserving cancellation recorded on the run. ✅ Recovery coverage — Tests exercise stored-report recovery and task settlement failures without executing the agent again. The supplied current-head status has no failures; four test shards remain pending. This review is based on static tracing; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F13: 🔴 Additional checkouts bypass context restrictions
SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Exercise actual adapter launchesThe processor tests provide extensive lifecycle coverage, but substitute execution and repository workspace preparation. A follow-up integration test using the real adapter would help verify scratch Git directories, attachment visibility, and additional checkout handling across the launch boundary. This broader coverage is optional beyond the targeted regression needed for F1. ScoreThe lifecycle implementation and recovery tests are substantial, but the repository context bypass prevents merge readiness. Current checks report no failures, with four shards still pending. 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 63efe21
Summary of ChangesI fixed F13: before a report run clones any additional repository, it now checks the primary repository's What changed
I checked for other code that copies repositories into the workspace: Regression tests (3)
One thing to watch: the settings are read when the workspace is prepared and read again at agent launch. If someone tightens them in between, the checkout reflects the older setting while the token follows the newer one. Settings can't be read atomically across both steps, so I left that window as it is. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…sitory, it now checks the primary repository's `contextRepositories` setting and rejects any repository the setting doesn't allow. In the reported case (`acme/web` set to `'none'`, run selecting `['acme/web', 'acme/api']`), the run fails before anything is cloned, with a message naming `acme/api` and how to fix the setting. The processor, trigger and git-access tests pass (92 of 92), both typechecks are clean, and eslint reports no warnings on `src/` or the two changed core files. I didn't run the rest of the test suite. No previews, since nothing visible changed. I fixed F13: before a report run clones any additional repository, it now checks the primary repository's `contextRepositories` setting and rejects any repository the setting doesn't allow. In the reported case (`acme/web` set to `'none'`, run selecting `['acme/web', 'acme/api']`), the run fails before anything is cloned, with a message naming `acme/api` and how to fix the setting. The processor, trigger and git-access tests pass (92 of 92), both typechecks are clean, and eslint reports no warnings on `src/` or the two changed core files. I didn't run the rest of the test suite. No previews, since nothing visible changed. **What changed** - **One shared policy rule** (`packages/core/src/agents/agentGitAccess.ts`): I moved the policy calculation out of `prepareAgentGitAccess` into a new exported function, `resolveEffectiveContextRepositories`. It reads every monitored entry for the repository and keeps only repositories that all of them allow, so conflicting entries never widen access. `prepareAgentGitAccess` now calls it, so the agent's token scope and the workspace checkout can't disagree. It is exported from `@propr/core`. - **Check before cloning** (`src/jobs/agentRuns/workspace.ts`): the new `assertContextRepositoriesAllowed` runs in `prepareRepositoryWorkspace` before the primary checkout and any extra clone. Names are compared ignoring case, and a setting of `'all'` (or none at all) allows everything, as the adapter does. The workspace input takes an optional `resolveContextPolicy` so tests can supply a policy; by default it uses the repository settings. I checked for other code that copies repositories into the workspace: `cloneContextRepository` is the only one, so this was the only occurrence of the defect. **Regression tests (3)** - In `test/processAgentRunJob.test.ts`, a restrictive policy with two repositories is rejected before any clone. This test fails when the check is removed. - Also in that file, the check itself: `'all'` and no setting allow everything, names match regardless of case, `'none'` leaves only the primary repository, and every excluded repository is named. - In `test/agentGitAccess.test.ts`, conflicting entries narrow the policy, `'none'` gives just the primary repository, and `'all'` gives no restriction. One thing to watch: the settings are read when the workspace is prepared and read again at agent launch. If someone tightens them in between, the checkout reflects the older setting while the token follows the newer one. Settings can't be read atomically across both steps, so I left that window as it is. PR: #2839 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 report execution, workspace preparation, task visibility, and retry-based lifecycle recovery. It needs changes before merge: context cloning exposes a worker credential temporarily, and validation failure on redelivery can leave an existing task unsettled. ✅ Guarded lifecycle transitions — Run claims and report publication use compare-and-set transitions, preventing late reports from overwriting cancelled runs. ✅ Recovery without repeat execution — Stored reports are finalized on redelivery without launching the agent again, with focused tests covering settlement failures. ✅ Workspace path protection — Reserved directories replace checked-out symlinks before host-side writes. The supplied checks show no failures, with four test shards pending. This review uses static analysis only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F14: 🔴 Context cloning exposes the worker token
F15: 🔴 Validation retries can strand existing tasks
SuggestionsThese are optional follow-ups and are not sent to S6: 🟢 Verify interrupted-result handling
ScoreThe lifecycle coverage is substantial, and current checks report no failures. The credential exposure and retry-settlement defect require correction before merge. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 69f6637
Summary of ChangesI fixed F14 and F15. The tests for the processor, trigger and worker credentials pass (74 of 74). The root and F14: context clones exposed the worker token.
F15: validation retries could leave a task stuck. When a definition fails validation, the run is still marked failed first. After that, a new helper
I found no other problems while checking these paths. The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. They weren't needed for this fix. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…nd worker credentials pass (74 of 74). The root and `packages/core` typechecks are clean, and `npx eslint src/ --max-warnings 0` reports nothing. I added 3 regression tests, and all 3 fail when run against the previous source. I didn't run the rest of the test suite. There are no previews, since nothing visible changed. I fixed F14 and F15. The tests for the processor, trigger and worker credentials pass (74 of 74). The root and `packages/core` typechecks are clean, and `npx eslint src/ --max-warnings 0` reports nothing. I added 3 regression tests, and all 3 fail when run against the previous source. I didn't run the rest of the test suite. There are no previews, since nothing visible changed. **F14: context clones exposed the worker token.** `cloneContextRepository` in `src/jobs/agentRuns/workspace.ts` now clones from the plain `https://github.com/<owner>/<repo>.git` URL. The token is passed only in the git command's own environment, as an auth header. This is the same helper (`configureGitAuthentication`) that the shared repository clones already use. So the token never appears in the clone URL or in `.git/config`, not even while the clone is running, and the follow-up `remote set-url` step is gone. I exported that helper from `@propr/core` (`packages/core/src/index.ts`). - **Regression test:** it puts a fake `git` on the path that records each command and writes the clone URL into `.git/config` the way real git does. The test checks that the token is never passed on the command line or written to the config, and that it reaches git only through the header. - **Same pattern elsewhere:** the only other repository fetch in the report-run path is the primary checkout through `ensureRepoCloned`, and it already authenticates this way. **F15: validation retries could leave a task stuck.** When a definition fails validation, the run is still marked failed first. After that, a new helper `settleExistingTask` in `src/jobs/processAgentRunJob.ts` ends any report task an earlier attempt already created, using the existing ended-run handling. If there is no task, none is created. If the task can't be read or updated, the error is passed up so the job is retried, and the retry finishes ending it. `reconcileEndedRun` now uses the same helper. - **Regression tests:** - The exact reported sequence: the claim fails during a database outage, the definition becomes invalid, and the retry fails both the run and its existing task without executing anything. - Ending the task fails once: the delivery is rejected, and the retry finishes the job. - **Unchanged:** the existing test where an invalid definition has no task still passes with no task calls. I found no other problems while checking these paths. The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. They weren't needed for this fix. PR: #2839 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements report execution, workspace preparation, task tracking, and recovery after interrupted deliveries. It needs a localized correctness fix before merge. ✅ Recovery without re-execution — Stored reports are finalized on redelivery without launching the agent again. ✅ Repository access isolation — Repository-free launches explicitly remove credentials and clone mounts. ✅ Lifecycle coverage — Tests cover cancellation, competing claims, persistence failures, and task settlement. This review used static analysis only. The supplied status shows no failed checks and four pending test shards. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F16: 🔴 Reject incomplete execution results
SuggestionsThese are optional follow-ups and are not sent to S7: 🟢 Exercise a real adapter boundaryThe processor tests predominantly inject execution and workspace dependencies. A focused integration test using the actual adapter preparation path would strengthen confidence that scratch workspaces, task cancellation, and repository restrictions survive the complete launch path. This is additional coverage, not a separate demonstrated blocker. ScoreThe implementation has substantial lifecycle coverage and careful recovery handling, but incomplete executions can currently become successful reports. The pending checks have not established any additional failure. 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 db4f791
Summary of ChangesI fixed F16. A report run whose result says the provider stopped it early (for example on the turn limit or a timeout) now fails, even if it reported success and returned text. Before, that text was stored as a finished report. Fix: I didn't use the existing Tests: I added 2 regression tests to
Verification:
No previews, since nothing visible changed. The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. They weren't needed for this fix. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…opped it early (for example on the turn limit or a timeout) now fails, even if it reported success and returned text. Before, that text was stored as a finished report. I fixed F16. A report run whose result says the provider stopped it early (for example on the turn limit or a timeout) now fails, even if it reported success and returned text. Before, that text was stored as a finished report. **Fix:** `reportFromResult` in `src/jobs/agentRuns/runErrors.ts` now checks why the run stopped before it accepts the report. It does this with the existing `resolveAgentTerminationReason`, so it covers both a `terminationReason` set on the result and termination signs in the result's other fields. If a reason is found, it throws an `AgentRunReportError` with the message `Agent execution stopped before completion: <description>`. That error goes through the processor's existing failure handling: the run and its task are marked failed, the reason is saved, and the workspace is cleaned up. Because no report is saved, a later run can't pick up the partial text as a previous report. I didn't use the existing `isIncompleteAgentExecution` helper because it only applies when `success === false`, which is exactly the case this bug slipped through. `reportFromResult` is called in only one place (the report step in `processAgentRunJob.ts`), so there were no other copies of the same mistake in this PR's changes. **Tests:** I added 2 regression tests to `test/processAgentRunJob.test.ts`. Each returns a successful, non-empty result with `terminationReason` set to `max_turns` or `timeout`, then checks that: - the run ends as `failed`. - no report is saved. - the failure reason explains why. - the task is failed and the workspace is cleaned up. **Verification:** - The processor and trigger tests pass (75 of 75). - Both new tests fail when run against the previous `runErrors.ts`. - `tsc --noEmit` is clean and `npx eslint src/ --max-warnings 0` reports nothing. - I didn't run the rest of the test suite. - The test files only run with `PROPR_DEMO_MODE=true` and `--experimental-test-module-mocks`. Without the first, startup exits because GitHub auth isn't configured. I also rebuilt `packages/shared` and `packages/core` before running them. No previews, since nothing visible changed. The Gmail, Google Calendar and Google Drive connectors need authorizing in your claude.ai connector settings before they can be used. They weren't needed for this fix. PR: #2839 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 report execution, workspace preparation, task tracking, and recovery without rerunning a claimed agent. The supplied code supports merge readiness, conditional on the four pending test shards completing successfully. ✅ Recovery preserves stored reports — Redelivery finalizes ✅ Repository access is explicitly gated — Repository-free runs skip GitHub authentication, and the adapter returns empty credentials and clone mounts. ✅ Cancellation coverage is substantial — Tests exercise cancellation during preparation, execution, post-processing, and task settlement failures. This was a static review of the supplied diff and context; no commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S8: 🟢 Test actual adapter integrationThe processor tests mock S9: 🟢 Verify interrupted workspace cleanupNormal execution and preparation failures clean up their workspaces, but ScoreThe implementation has substantial lifecycle coverage and no verified merge blocker in the supplied code. Current checks report no failures, with four test shards still pending. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #2806
Branch:
2806/claude-opus-5-5-agents-v1-7-17-report-run-20261006-1606-5i8Commits: ✅ Changes committed (c9ef18c)
AI Processing Completed
Execution Details:
Summary:
The run is still going; I'll pick it up when it reports back.
Detailed Logs:
d57a755b-bd88-4a3d-9f24-cba2704329efLog files stored at:
/tmp/claude-logs/issue-2806-2026-10-06T16-16-07-324Z-conversation.json/tmp/claude-logs/issue-2806-2026-10-06T16-16-07-324Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #2806.
💡 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!