Skip to content

[3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones - #3795

Closed
propr-dev[bot] wants to merge 16 commits into
3758-epic-runtime-abstraction-sc0from
3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l
Closed

propr-dev[bot] wants to merge 16 commits into
3758-epic-runtime-abstraction-sc0from
3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3765

Branch: 3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l
Commits: ✅ Changes committed (3a5a18c)


AI Processing Completed

Execution Details:

Summary:
I've implemented #3765 by extending the existing SpritePool rather than replacing it. All the new and existing tests pass, but nothing has run against real Sprites yet. That matters most for warm clones.

Shared, bounded pool (Redis leases)

  • PROPR_SPRITES_MAX (default 2) caps how many runners there are across every worker using the same Sprites token. It is never allowed above PROPR_SPRITES_ORG_LIMIT (default 3, the Free-plan limit); a larger value is lowered with a warning.
  • When every runner is busy, runs wait in a first-come, first-served queue. If the max is lowered, extra runners are deleted as they are released.
  • Lease holders send a heartbeat every 15 s and are treated as dead after 60 s of silence. Each worker can now reuse an idle runner another worker released.
  • A runner is health checked with one exec before each lease. If the check fails, or the restore after a run fails, it is destroyed and replaced in the same slot.
  • The pool logic is in packages/core/src/agents/runtime/spritesPool.ts and the sprites/spritesPool*.ts and spritesRunnerPool.ts files.

Orphan reaping

  • Every runner is created with a propr-pool label and a per-pool label.
  • On startup a worker deletes its pool's labelled Sprites that have no lease record. It also deletes unlabelled propr-<uuid> Sprites from older versions once they are over 24 h old, and drops records whose Sprite no longer exists.
  • If a worker dies mid-run, its runner is deleted before that slot is reused.
  • A finished run that was never released is marked retained and is never deleted automatically, because it may hold the only copy of a result. It keeps its slot until someone recovers the result and deletes it by hand.

Warm clones (PROPR_SPRITES_WARM_CLONES=on, off by default)

  • The clone transport script now accepts an optional root-owned reference repository, used as Git alternates. Only new objects are fetched, and the reference is refreshed from the fetch the script has already verified, before the agent starts. Symlinked or foreign-owned references are ignored.
  • On release, the reference is parked in /tmp, the clean checkpoint is restored, and the reference is put back and saved as a warm checkpoint. A later run of the same repository starts from it without a restore. A run of a different repository waits for a clean restore first.

Status and run usage

  • propr admission, GET /api/agent-run-admission and the get_agent_run_admission MCP tool show a new spritesPool section. propr remote-status, GET /api/status and the Web UI system status menu show a one-line summary such as "2/2 busy · 1 queued".
  • Each run's compute usage now records runnerPool: queue wait, provisioning time, health check and restore timings.
  • I regenerated the OpenAPI spec and client types, and updated the docs, the configuration reference, .env.example and the changelog.

Things to check before merging

  • Untested live: the warm-clone release path, labels on createSprite, and listAllSprites reaping. I tested the transport script locally with real git.
  • Queue wait counts toward the run's timeout.
  • Warm checkpoints pile up on each runner: the @fly/sprites 0.2.5 SDK has no call to delete a checkpoint.
  • Graceful shutdown only deletes the idle runners that worker last used; other workers' idle runners stay in the pool.
  • The sprites runtime now needs Redis at REDIS_HOST/REDIS_PORT.

Tests

  • New: test/spritesRunnerPool.test.ts (shared pool across simulated workers) and test/spritesPoolRedis.test.ts. The Redis test runs 24 concurrent acquisitions across separate connections against a real Redis; it skips when no Redis is available.
  • I checked that the bound and Redis tests fail when I break the logic they cover. The first-come, first-served check made the queue test hang rather than fail, so I added timeouts.
  • Also added: a transport-script test, API, CLI and UI tests, and the existing Sprites tests updated. Lint and typecheck are clean.

The preview screenshots caught the queued summary overflowing the status menu, so I shortened the label and text. The previews show the menu with the pool full and a run queued, and with an orphaned runner flagged.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (29 files)
    • .env.example (+6/−0)
    • packages/api/mcp/presentation.ts (+14/−1)
    • packages/api/mcp/tools.ts (+2/−2)
    • packages/api/mcp/toolsAdmission.ts (+2/−2)
    • packages/api/openapi/routeDocsSystem.ts (+2/−2)
    • packages/api/openapi/schemasAdmission.ts (+28/−0)
    • packages/api/routes/agentRunAdmissionRoutes.ts (+1/−0)
    • packages/api/routes/statusRoutes.ts (+36/−3)
    • packages/api/services/agentRunAdmissionReport.ts (+22/−3)
    • packages/cli/src/api/admission.ts (+16/−0)
    • packages/cli/src/api/system.ts (+13/−0)
    • packages/cli/src/commands/admissionCommands.ts (+23/−1)
    • packages/cli/src/commands/systemCommands.ts (+14/−0)
    • packages/client/src/generated/apiTypes.ts (+46/−0)
    • packages/core/src/agents/runtime/computeUsage.ts (+50/−0)
    • packages/core/src/agents/runtime/sprites/spritesPoolState.ts (added, +242/−0)
    • packages/core/src/agents/runtime/sprites/spritesPoolStore.ts (added, +158/−0)
    • packages/core/src/agents/runtime/sprites/spritesProvisioning.ts (+67/−75)
    • packages/core/src/agents/runtime/sprites/spritesRun.ts (+5/−2)
    • packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts (added, +359/−0)
    • packages/core/src/agents/runtime/spritesPool.ts (added, +172/−0)
    • packages/core/src/agents/runtime/spritesRuntime.ts (+60/−15)
    • packages/core/src/git/workspaceTransportScript.ts (+21/−0)
    • packages/core/src/index.ts (+5/−0)
    • propr-ui/src/api/proprTypes.ts (+11/−0)
    • propr-ui/src/api/systemStatusApi.ts (+21/−1)
    • propr-ui/src/components/GlobalHeaderComponents.tsx (+15/−0)
    • propr-ui/src/components/MobileBottomNavigation.tsx (+1/−0)
    • propr-ui/src/hooks/useHeaderStatsHelpers.ts (+4/−1)
  • Low risk (14 files)
    • CHANGELOG.md (+18/−0)
    • docs/docs/architecture/agent-runtime.md (+31/−3)
    • docs/docs/operations/configuration-reference.md (+3/−0)
    • docs/static/openapi/propr-api.yaml (+142/−2)
    • packages/api/test/agentRunAdmissionRoutes.test.ts (+31/−1)
    • packages/cli/src/commands/admissionCommands.test.ts (+17/−1)
    • propr-ui/src/api/proprApi.status.test.ts (+13/−0)
    • propr-ui/src/components/GlobalHeaderComponents.status.test.tsx (+16/−0)
    • test/helpers/fakeSprites.ts (+49/−9)
    • test/spritesPoolRedis.test.ts (added, +108/−0)
    • test/spritesRunnerPool.test.ts (added, +297/−0)
    • test/spritesRuntime.live.test.ts (+5/−1)
    • test/spritesRuntime.test.ts (+2/−1)
    • test/workspaceTransport.test.ts (+29/−0)

Diff size: 43 files changed, +2,177/−126 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3765.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!


Visual preview

System status: Sprites runner needing attention

System status: Sprites runner needing attention

The same menu when a stopped worker left an orphaned runner: the row turns amber and explains that the runner will be deleted before its slot is reused.

Full-size original

System status: Sprites runner pool full, run queued

System status: Sprites runner pool full, run queued

The header's system status menu at 1440px with both Sprites runners busy and one run queued (amber dot).

Full-size original

I've implemented #3765 by extending the existing `SpritePool` rather than replacing it. All the new and existing tests pass, but nothing has run against real Sprites yet. That matters most for warm clones.

Shared, bounded pool (Redis leases)
- `PROPR_SPRITES_MAX` (default 2) caps how many runners there are across every worker using the same Sprites token. It is never allowed above `PROPR_SPRITES_ORG_LIMIT` (default 3, the Free-plan limit); a larger value is lowered with a warning.
- When every runner is busy, runs wait in a first-come, first-served queue. If the max is lowered, extra runners are deleted as they are released.
- Lease holders send a heartbeat every 15 s and are treated as dead after 60 s of silence. Each worker can now reuse an idle runner another worker released.
- A runner is health checked with one exec before each lease. If the check fails, or the restore after a run fails, it is destroyed and replaced in the same slot.
- The pool logic is in `packages/core/src/agents/runtime/spritesPool.ts` and the `sprites/spritesPool*.ts` and `spritesRunnerPool.ts` files.

Orphan reaping
- Every runner is created with a `propr-pool` label and a per-pool label.
- On startup a worker deletes its pool's labelled Sprites that have no lease record. It also deletes unlabelled `propr-<uuid>` Sprites from older versions once they are over 24 h old, and drops records whose Sprite no longer exists.
- If a worker dies mid-run, its runner is deleted before that slot is reused.
- A finished run that was never released is marked `retained` and is never deleted automatically, because it may hold the only copy of a result. It keeps its slot until someone recovers the result and deletes it by hand.

Warm clones (`PROPR_SPRITES_WARM_CLONES=on`, off by default)
- The clone transport script now accepts an optional root-owned reference repository, used as Git alternates. Only new objects are fetched, and the reference is refreshed from the fetch the script has already verified, before the agent starts. Symlinked or foreign-owned references are ignored.
- On release, the reference is parked in `/tmp`, the clean checkpoint is restored, and the reference is put back and saved as a warm checkpoint. A later run of the same repository starts from it without a restore. A run of a different repository waits for a clean restore first.

Status and run usage
- `propr admission`, `GET /api/agent-run-admission` and the `get_agent_run_admission` MCP tool show a new `spritesPool` section. `propr remote-status`, `GET /api/status` and the Web UI system status menu show a one-line summary such as "2/2 busy · 1 queued".
- Each run's compute usage now records `runnerPool`: queue wait, provisioning time, health check and restore timings.
- I regenerated the OpenAPI spec and client types, and updated the docs, the configuration reference, `.env.example` and the changelog.

Things to check before merging
- Untested live: the warm-clone release path, labels on `createSprite`, and `listAllSprites` reaping. I tested the transport script locally with real git.
- Queue wait counts toward the run's timeout.
- Warm checkpoints pile up on each runner: the `@fly/sprites` 0.2.5 SDK has no call to delete a checkpoint.
- Graceful shutdown only deletes the idle runners that worker last used; other workers' idle runners stay in the pool.
- The `sprites` runtime now needs Redis at `REDIS_HOST`/`REDIS_PORT`.

Tests
- New: `test/spritesRunnerPool.test.ts` (shared pool across simulated workers) and `test/spritesPoolRedis.test.ts`. The Redis test runs 24 concurrent acquisitions across separate connections against a real Redis; it skips when no Redis is available.
- I checked that the bound and Redis tests fail when I break the logic they cover. The first-come, first-served check made the queue test hang rather than fail, so I added timeouts.
- Also added: a transport-script test, API, CLI and UI tests, and the existing Sprites tests updated. Lint and typecheck are clean.

The preview screenshots caught the queued summary overflowing the status menu, so I shortened the label and text. The previews show the menu with the pool full and a run queued, and with an orphaned runner flagged.

ProPR-Agent: claude/claude-opus-5-5

integry commented Nov 24, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=10

@propr-dev propr-dev Bot added the ultrafix label Nov 24, 2026
@propr-dev

propr-dev Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements shared Redis leases, bounded acquisition, warm clones, and useful status reporting. It needs significant corrections before merge, particularly around deletion bookkeeping and result preservation.

✅ Atomic acquisition transitions — Runner reservations are recorded before provisioning, and Redis WATCH/MULTI retries competing state changes.

✅ Useful operational visibility — Pool counts, waiting runs, restore timings, and retained results flow through API, CLI, MCP, and UI surfaces.

✅ Relevant coverage — Added tests exercise cross-worker reuse, queue cancellation, failed health checks, and concurrent Redis acquisitions.

This review uses static traces of the supplied code; no commands or tests were run. Current checks show 31 passed, three pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Keep surplus runners counted until deletion succeeds

  • Category: correctness

  • Required behavior: The shared bound must count existing runners, including runners whose deletion fails.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesPoolState.ts, releaseSpriteRunner; packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, release and leaseIdle.

    1. Lower the configured maximum from two to one while two runner records still exist.
    2. A runner finishes resetting. releaseSpriteRunner deletes its record immediately and returns discard.
    3. The subsequent deleteSprite call fails. Both callers handling this outcome only log the failure.
    4. Redis now reports one runner, but two Sprites still exist. Subsequent acquisitions cannot discover or retry deletion of the unrecorded surplus runner; it continues consuming organization capacity until another startup reconciliation.

    The transaction protects the record mutation, but deletion happens afterward. Unlike deleteRunner, these branches cannot leave a failed deletion counted as orphaned because the record is already gone. The supplied lowering-bound test covers successful deletion only. Verification provenance: static trace.

  • Minimum fix: Transition surplus runners to a counted deletion state, delete through the existing lease-aware deletion path, and forget the record only after successful deletion. Preserve an orphaned record on failure in both affected callers.

F2: 🔴 Reconcile manually deleted retained runners

  • Category: correctness

  • Required behavior: Recovering a retained result and manually deleting its Sprite must free its pool slot, as documented.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, initialize, reconcile, and acquire; packages/core/src/agents/runtime/sprites/spritesPoolState.ts, acquireSpriteRunner.

    1. A worker dies after marking a runner finished. A replacement worker initializes while that Sprite still exists, preserving it as retained.
    2. With a maximum of one, the replacement worker's next run queues behind that retained record.
    3. An operator recovers the result and deletes the Sprite using the documented sprite destroy command.
    4. Every subsequent acquisition still counts the retained Redis record. It is neither idle nor orphaned, so acquisition keeps returning wait, even though no Sprite exists.

    Missing-Sprite records are removed only by reconcile, and initialize caches its promise permanently. Queue polling and heartbeats never check existence. The documented recovery action therefore leaves the live pool blocked until a worker restarts or someone edits Redis. Verification provenance: static trace.

  • Minimum fix: Add a bounded reconciliation opportunity for blocked acquisitions, or another periodic mechanism that removes retained records after confirming their Sprites no longer exist. Preserve the existing transactional state checks when forgetting records.

F3: 🔴 Preserve legacy results during startup reaping

  • Category: correctness

  • Required behavior: Automatic cleanup must not destroy the only recoverable copy of a run result.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, reconcile, particularly the legacy predicate and subsequent deleteSprite.

    1. Before upgrading, a clone run fails to retrieve its result. Existing workspace cleanup intentionally leaves its privately named propr-<uuid> Sprite available for recovery.
    2. The operator upgrades after that Sprite is more than 24 hours old.
    3. The new worker lists it. It has no new pool label or Redis record, so the legacy predicate accepts it solely from its name and creation age.
    4. Startup deletes the Sprite without inspecting or preserving its unrecovered result.

    The supplied unchanged cleanup contract explicitly retains sandboxes with pending results. Creation age provides no evidence that such a result was recovered. The new finished/retained protection cannot help legacy Sprites because they never had these Redis records. Verification provenance: static trace.

  • Minimum fix: Exclude untracked legacy Sprites from automatic deletion unless there is affirmative evidence that deletion is safe. Reporting them for operator review is sufficient; retain automatic reaping for tracked, demonstrably orphaned pool runners.

F4: 🔴 Validate compatibility before cross-worker reuse

  • Category: correctness

  • Required behavior: A reused runner must provide the pinned CLI versions and trusted setup expected by the worker launching the run.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesPoolState.ts, SpriteRunnerRecord and acquireSpriteRunner; packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, leaseIdle; packages/core/src/agents/runtime/spritesRuntime.ts, poolFor.

    1. Worker A provisions a runner using its checkout's CLI pins and setup scripts, then releases it.
    2. During a rolling deployment, worker B starts with updated pins or setup scripts but the same Sprites token and Redis.
    3. Both workers use the same token-derived pool scope. B's startup reconciliation preserves A's idle runner, and acquisition selects it.
    4. leaseIdle checks only /bin/true and checkpoint availability. B launches on A's older installed CLIs and trusted setup despite expecting its own versions.

    Runner records contain no setup fingerprint, and acquisition has no compatibility filter. A successful health check proves executability, not version compatibility. Previously, idle runners were local to their provisioning process; cross-worker adoption newly exposes this mismatch. Verification provenance: static trace.

  • Minimum fix: Record a fingerprint covering the pinned tools and trusted setup when provisioning. Before reuse, replace incompatible runners within their existing counted slots. Keep the organization-wide bound shared across revisions.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise the real warm-clone lifecycle

The fake implements the intended checkpoint and carry semantics directly, while the existing live test uses an empty listing and does not exercise warm-clone release. An opt-in live smoke test covering labels, discovery, carry/restore/install, and repeat-repository reuse would strengthen confidence in SDK integration. This is additional validation, not an independently demonstrated defect.

Score

The implementation has substantial functional coverage, but deletion bookkeeping, legacy result preservation, recovery liveness, and cross-version reuse need correction. Passing checks do not cover these failure sequences.

Score: 4/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 2m 14s
  • Tokens: 89,391 (86,473 in / 2,918 out)
  • Cost: $0.88

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 F2 F3 F4 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 0f24857

Addressed 1 AI review comment (IDs: 7145865881)

Addressed findings F1, F2, F3, F4

Summary of Changes

Addressed F1–F4 in PR #3795.

  • F1 Surplus runners stay counted until deletion succeeds. A failed deletion leaves an orphaned record for retry, including when a health check is cancelled.
  • F2 Queued workers periodically check retained Sprites. A confirmed 404 frees the slot if the record is still retained. Transient lookup failures preserve it.
  • F3 Startup preserves untracked legacy Sprites of any age and logs their names for operator review.
  • F4 Workers fingerprint the CLI pins and trusted setup files used to provision each runner. A missing or mismatched fingerprint triggers replacement within the existing counted slot.

Verification: 42 tests passed. Two Redis integration tests skipped because no Redis server was available. Core typechecking and lint passed. Provider behavior was tested with simulated Sprites.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (3 files)
    • packages/core/src/agents/runtime/sprites/spritesPoolState.ts (+11/−5)
    • packages/core/src/agents/runtime/sprites/spritesProvisioning.ts (+13/−6)
    • packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts (+71/−32)
  • Low risk (3 files)
    • docs/docs/architecture/agent-runtime.md (+3/−3)
    • test/helpers/fakeSprites.ts (+5/−0)
    • test/spritesRunnerPool.test.ts (+256/−2)

Diff size: 6 files changed, +359/−48 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @propr-ultrafix
  • Time: 7m 28s
  • Tokens: 1,271,914 (1,262,074 in / 9,840 out)
  • Cost: $1.26
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

Addressed F1–F4 in PR #3795.

- **F1** Surplus runners stay counted until deletion succeeds. A failed deletion leaves an orphaned record for retry, including when a health check is cancelled.
- **F2** Queued workers periodically check retained Sprites. A confirmed 404 frees the slot if the record is still retained. Transient lookup failures preserve it.
- **F3** Startup preserves untracked legacy Sprites of any age and logs their names for operator review.
- **F4** Workers fingerprint the CLI pins and trusted setup files used to provision each runner. A missing or mismatched fingerprint triggers replacement within the existing counted slot.

**Verification:** 42 tests passed. Two Redis integration tests skipped because no Redis server was available. Core typechecking and lint passed. Provider behavior was tested with simulated Sprites.

PR: #3795
Comment by: @propr-ultrafix (ID: 0)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements a shared Redis-backed runner pool, warm clone reuse, and status reporting across the API, CLI, and UI. It needs changes before merge because two coordination failures can undermine exclusive ownership or result preservation.

✅ Counted provisioning — Reservations precede Sprite creation, and ambiguous create failures keep the possible Sprite counted until reaping.

✅ Checkpoint compatibility — Reuse checks a fingerprint covering CLI pins and uploaded setup scripts, replacing incompatible runners within their reserved slot.

✅ Recovery coverage — Added tests cover cancellation, failed deletion, retained-result recovery, and ownership loss during setup.

This review is based on static tracing of the supplied code; no commands were run. The authoritative checks show 29 passed, five pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F5: 🔴 Serialize configuration publication with lease transactions

  • Category: correctness

  • Required behavior: Shared Redis transactions must preserve exclusive runner ownership, including when multiple pools use the same store.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesPoolStore.ts, publishConfig, serialized, and transact

    1. Two runtime instances share an injected RedisSpritePoolStore, which the new constructors support. One instance starts acquiring an idle runner while the other initializes its pool.
    2. The acquisition executes WATCH and reads the idle record. During its awaited Redis operations, initialization calls publishConfig.
    3. publishConfig bypasses serialized and executes its own MULTI/EXEC on the same connection. Redis clears that connection's watched keys on EXEC.
    4. Another worker, using a separate connection, claims the idle runner.
    5. The original acquisition commits its stale transition without an effective watch, overwrites the other worker's lease, and also receives the runner.

    This permits two workers to use the same sandbox. The transaction queue protects only transact calls; configuration publication bypasses it. The existing separate-connection acquisition test does not interleave configuration publication on a watched connection. static trace: the connection is shared by both methods, and publishConfig performs an unqueued EXEC.

  • Minimum fix: Run configuration publication through the same serialization queue as lease transactions, or use a separate connection for it. Add a regression covering publication during acquisition.

F6: 🔴 Preserve finished state after Redis write failure

  • Category: correctness

  • Required behavior: A completed, unreleased run that may hold the only result must become retained when its worker disappears, rather than being automatically reaped.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, finished and startHeartbeat; packages/core/src/agents/runtime/spritesRuntime.ts, execution finalization

    1. An execution completes with its result on the Sprite, but the transaction recording state: 'finished' fails during a transient Redis outage.
    2. finished catches the error and resolves, so the runtime returns the execution result while Redis still records the runner as leased.
    3. Workspace result retrieval fails and cleanup preserves the sandbox, as the supplied clone-transport caller requires.
    4. Redis recovers. Subsequent successful heartbeats update only heartbeatAt; they never retry the missing finished transition.
    5. The worker later stops. Once its heartbeat expires, another acquisition converts the persisted leased record to orphaned and deletes the Sprite, including the unrecovered result.

    Retention protects only records persisted as finished; neither continuing heartbeats nor the logged warning repairs this failure. static trace: finished suppresses persistence errors, heartbeatSpriteLease changes only timestamps, and effectiveRunnerState maps expired leased records to orphaned.

  • Minimum fix: Keep failed completion transitions pending and retry them when Redis connectivity returns, including through subsequent heartbeats. Preserve the sandbox while that transition is unresolved; merely propagating an error into automatic release would not protect the result.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Exercise the real warm-clone lifecycle

The fake Sprite explicitly models checkpoint exclusion of /tmp, reference carrying, and warm installation. An opt-in live test covering two runs of one repository followed by another repository would validate those provider assumptions. This is additional integration confidence, not a demonstrated defect; warm clones default to off.

Score

The implementation has substantial coverage and useful operational reporting, but exclusive leasing and preservation of unrecovered results still have verified failure paths. Both need localized corrections before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 49s
  • Tokens: 91,143 (88,868 in / 2,275 out)
  • Cost: $0.89

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F5 F6 S2

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 696abd7

Addressed 1 AI review comment (IDs: 7146386011)

Addressed findings F5, F6

Summary of Changes

F5 and F6 are fixed. Configuration publication now shares the lease transaction queue for each Redis connection, including when two stores wrap the same client. A competing worker’s acquisition therefore invalidates the stale lease attempt.

A completed run now keeps its completion intent until release. If Redis rejects the initial write, subsequent heartbeats retry it while the same lease still owns the runner. Once persisted, the finished runner becomes retained on expiry. If the worker disappears before Redis accepts any completion write, that recovery window remains.

All 48 focused tests passed, including the publication race against real Redis and completion retries during reset and lease takeover. The core TypeScript check passed. ESLint had no matching configuration for the changed files.

Separate finding: I verified that publishConfig can report success when Redis returns a command-level error inside EXEC, such as WRONGTYPE on the pool scopes key. That error-handling issue is outside F5 and F6.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • packages/core/src/agents/runtime/sprites/spritesPoolStore.ts (+5/−4)
    • packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts (+17/−2)
  • Low risk (2 files)
    • test/spritesPoolRedis.test.ts (+42/−0)
    • test/spritesRunnerPool.test.ts (+69/−0)

Diff size: 4 files changed, +133/−6 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 33s
  • Tokens: 872,720 (867,278 in / 5,442 out)
  • Cost: $0.88
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

**F5 and F6 are fixed.** Configuration publication now shares the lease transaction queue for each Redis connection, including when two stores wrap the same client. A competing worker’s acquisition therefore invalidates the stale lease attempt.

A completed run now keeps its completion intent until release. If Redis rejects the initial write, subsequent heartbeats retry it while the same lease still owns the runner. Once persisted, the finished runner becomes retained on expiry. If the worker disappears before Redis accepts any completion write, that recovery window remains.

All 48 focused tests passed, including the publication race against real Redis and completion retries during reset and lease takeover. The core TypeScript check passed. ESLint had no matching configuration for the changed files.

**Separate finding:** I verified that `publishConfig` can report success when Redis returns a command-level error inside `EXEC`, such as `WRONGTYPE` on the pool scopes key. That error-handling issue is outside F5 and F6.

PR: #3795
Comment by: @propr-ultrafix (ID: 0)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements a shared Redis-backed runner pool, warm clone reuse, and consistent status reporting. It needs changes before merge because a failed completion write can still lead to deletion of an unrecovered result.

✅ Shared allocation — Runner reservations precede provisioning, and Redis transactions serialize competing acquisitions.

✅ Compatibility checks — Reused runners are checked against CLI pins and uploaded setup-script contents before handoff.

✅ Recovery coverage — Tests exercise failed deletions, ownership changes, ambiguous creates, and completion-write retries.

This review used static analysis of the supplied code; no commands were run. The authoritative checks show 30 passed, four pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F7: 🔴 Preserve results after failed completion writes

  • Category: correctness

  • Required behavior: A finished run whose result has not been released must survive worker failure and must not be automatically deleted as an abandoned execution.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, finished, heartbeat, reconcile, and deleteClaimed; packages/core/src/agents/runtime/spritesRuntime.ts, execution finalization.

    1. An execution finishes with its only recoverable workspace result on the Sprite.
    2. The Redis transaction in finished() fails. The method catches the failure, so wait() resolves successfully while the persisted runner remains leased. The new completion-retry test explicitly establishes this intermediate state.
    3. Result retrieval fails, leaving the sandbox unreleased, and the worker stops before its next successful heartbeat. The completion marker exists only in the lost process’s finishedRunners map.
    4. After lease expiry, another worker initializes. expireSpritePool() classifies the persisted leased record as orphaned; deleteClaimed() deletes its Sprite without checking for a completed result.

    This destroys the result that cleanup deliberately preserved. Lease transactions prevent competing ownership, but they do not repair the missing completion evidence. Heartbeat repair protects only workers that remain alive long enough to successfully write again.

    static trace: Traced the swallowed completion-write failure through runtime finalization, the supplied result-retention caller, expiry, and startup deletion. proposed regression: Extend the completion-write failure test by stopping the original worker before repair, expiring its lease, and reconciling from another worker; assert that the bundle survives.

  • Minimum fix: Before automatically deleting an expired execution lease, inspect durable completion/result evidence on the Sprite and retain runners holding an unrecovered result. Preserve the runner when that inspection is inconclusive. Apply this protection to both startup reaping and acquisition-driven reaping.

Suggestions

These are optional follow-ups and are not sent to /fix.

S3: 🟢 Exercise warm reuse against Sprites

The fake provider models checkpoint exclusion of /tmp, reference carrying, and checkpoint installation directly. An opt-in live test covering two same-repository runs followed by a repository switch would validate those provider assumptions. This is additional integration confidence, not a demonstrated implementation defect.

Score

The implementation has substantial targeted coverage and a coherent allocation design, but the remaining result-loss path prevents merge readiness. Pending checks alone do not reduce the score.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 4m 39s
  • Tokens: 94,730 (91,431 in / 3,299 out)
  • Cost: $0.97

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F7 S3

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 7d625fa

Addressed 1 AI review comment (IDs: 7146949165)

Addressed finding F7

Summary of Changes

Fixed F7. Both startup and acquisition-driven reaping now inspect the Sprite before deleting an expired execution lease. They retain the runner when they find completion or result evidence, or when inspection is inconclusive. Both paths recheck lease ownership after inspection.

All 50 runner-pool and runtime tests passed, including regressions showing that the only bundle survives a failed Redis completion write and worker loss before heartbeat repair. Core typecheck and lint passed. Verification used simulated Sprites and a local filesystem check.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (2 files)
    • packages/core/src/agents/runtime/sprites/spritesPoolState.ts (+9/−1)
    • packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts (+36/−3)
  • Low risk (2 files)
    • test/helpers/fakeSprites.ts (+5/−0)
    • test/spritesRunnerPool.test.ts (+69/−0)

Diff size: 4 files changed, +119/−4 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @propr-ultrafix
  • Time: 5m 45s
  • Tokens: 982,156 (976,237 in / 5,919 out)
  • Cost: $0.99
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

Fixed F7. Both startup and acquisition-driven reaping now inspect the Sprite before deleting an expired execution lease. They retain the runner when they find completion or result evidence, or when inspection is inconclusive. Both paths recheck lease ownership after inspection.

All 50 runner-pool and runtime tests passed, including regressions showing that the only bundle survives a failed Redis completion write and worker loss before heartbeat repair. Core typecheck and lint passed. Verification used simulated Sprites and a local filesystem check.

PR: #3795
Comment by: @propr-ultrafix (ID: 0)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from 3758-epic-runtime-abstraction-sc0 into 3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l in commit 0502e85

Conflicting Files

  • packages/core/src/agents/runtime/sprites/spritesProvisioning.ts
  • packages/core/src/agents/runtime/sprites/spritesRun.ts
  • packages/core/src/agents/runtime/spritesRuntime.ts
  • test/helpers/fakeSprites.ts

Resolution Summary

Resolved all four file conflicts for PR #3795. A workspace-wide scan found no remaining merge conflict markers. Git still lists the files as conflicted in its index because the read-only filesystem prevented Git from creating index.lock.

  • Provisioning. The PR moved runner ownership into the shared lease pool, while the target branch added network-policy cleanup to the old pool. I kept the PR’s provisioning and checkpoint code and added a cleanup hook that runs after a successful restore, before the shared pool can make the runner available again. spritesProvisioning.ts
  • Run upload. Both branches changed uploadRun. I combined the PR’s warm-clone reference with the target branch’s restricted-network environment defaults. Runs can use both, and explicitly configured environment values still take precedence. spritesRun.ts
  • Runtime. Both branches changed acquisition and release. I kept the PR’s lease lifecycle and added policy verification before upload and credential export. A policy mismatch at release discards the runner through the shared pool, which provisions a replacement when needed. If policy clearing or its read-back fails after restore, the pool’s existing reset-failure path replaces the runner. spritesRuntime.ts
  • Test helper. Both branches added state to FakeSprite. I kept the PR’s health, inventory, and checkpoint fixtures alongside the target branch’s network-policy state and failure controls so both sets of tests could exercise the merged behavior. fakeSprites.ts

npm run typecheck, git diff --check, and all 78 focused tests passed. A separate check confirmed that a restricted runner could clear its policy after restoration and be reused with its warm clone.


🤖 Resolution Details

  • Model: GPT-6.2 Sol
  • Time: 6m 19s

View Task Execution


System-triggered merge conflict resolution

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- packages/core/src/agents/runtime/sprites/spritesProvisioning.ts
- packages/core/src/agents/runtime/sprites/spritesRun.ts
- packages/core/src/agents/runtime/spritesRuntime.ts
- test/helpers/fakeSprites.ts

PR: #3795
Model: GPT-6.2 Sol
@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

CI failed: Validate Changes, Full Test Suite Shard 4/4, Run Full Test Suite

Please investigate and fix these CI failures.

Failure evidence

.github:8
Process completed with exit code 1.

.github:415
Process completed with exit code 1.


Failure evidence

.github:11
Process completed with exit code 1.

.github:49606
Process completed with exit code 1.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/


Depends on the failed job(s): Full Test Suite Shard 4/4. It may have failed only because they did; check them first.

Failure evidence

.github:67
Process completed with exit code 1.

.github:66
Full test suite shards finished with result 'failure'.

.github:4
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960, actions/download-artifact@018cc2c. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@github-actions

Copy link
Copy Markdown

Checks Failed

Validation failed during setup, tests, CLI packaging, linting, or build checks.

View Logs
Build check diagnostics for run 45510632918, attempt 1
Checkout outcome: success

--- GitHub Actions workflow lint ---
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667: Pulling from rhysd/actionlint
589002ba0eae: Pulling fs layer
c09af8888d6a: Pulling fs layer
4ccd7d76ca98: Pulling fs layer
b6b4b7b0e257: Pulling fs layer
b6b4b7b0e257: Waiting
c09af8888d6a: Verifying Checksum
c09af8888d6a: Download complete
589002ba0eae: Verifying Checksum
589002ba0eae: Download complete
4ccd7d76ca98: Verifying Checksum
4ccd7d76ca98: Download complete
b6b4b7b0e257: Verifying Checksum
b6b4b7b0e257: Download complete
589002ba0eae: Pull complete
c09af8888d6a: Pull complete
4ccd7d76ca98: Pull complete
b6b4b7b0e257: Pull complete
Digest: sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
Status: Downloaded newer image for rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667

--- Release shell script lint ---

--- Toolchain ---
v22.23.5
10.9.9

--- Dependency installation ---
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@fly/[email protected]',
npm warn EBADENGINE   required: { node: '>=24.0.0' },
npm warn EBADENGINE   current: { node: 'v22.23.5', npm: '10.9.9' }
npm warn EBADENGINE }
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]

added 1113 packages, and audited 1123 packages in 30s

318 packages are looking for funding
  run `npm fund` for details

8 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

--- CLI release package ---
Verifying propr-cli release package...

> [email protected] cli:pack
> node packages/cli/scripts/build-publish.mjs


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc && node scripts/copy-assets.mjs

copy-assets: copied 9 file(s) into the CLI package.

Staged [email protected] at /home/runner/work/propr/propr/dist-publish/propr-cli
npm notice
npm notice 📦  [email protected]
npm notice Tarball Contents
npm notice 32.0kB README.md
npm notice 36.3kB dist/agentSkill.js
npm notice 477B dist/api/admission.js
npm notice 754B dist/api/agentRuntime.js
npm notice 7.1kB dist/api/agents.js
npm notice 2.6kB dist/api/agentTank.js
npm notice 4.4kB dist/api/automations.js
npm notice 13.3kB dist/api/client.js
npm notice 5.9kB dist/api/errors.js
npm notice 1.6kB dist/api/followupHandoffs.js
npm notice 16.9kB dist/api/goals.js
npm notice 6.0kB dist/api/implement.js
npm notice 2.9kB dist/api/index.js
npm notice 1.9kB dist/api/logs.js
npm notice 7.7kB dist/api/plans.js
npm notice 586B dist/api/pullRequests.js
npm notice 4.2kB dist/api/relay.js
npm notice 12.5kB dist/api/repos.js
npm notice 2.5kB dist/api/repositoryEvents.js
npm notice 16.2kB dist/api/settings.js
npm notice 2.0kB dist/api/stats.js
npm notice 1.6kB dist/api/syntheticPools.js
npm notice 1.8kB dist/api/system.js
npm notice 5.9kB dist/api/tasks.js
npm notice 2.9kB dist/api/todos.js
npm notice 86B dist/api/types.js
npm notice 313B dist/api/visualPreviewAuth.js
npm notice 34.9kB dist/assets/env.example.txt
npm notice 5.9kB dist/auth/githubLogin.js
npm notice 5.0kB dist/auth/verifyToken.js
npm notice 12.1kB dist/commands/admissionCommands.js
npm notice 19.7kB dist/commands/agentCommands.js
npm notice 4.2kB dist/commands/agentPoolCommands.js
npm notice 4.3kB dist/commands/agentSkillCommands.js
npm notice 30.0kB dist/commands/agentValidation.js
npm notice 31.2kB dist/commands/automationCommands.js
npm notice 73.1kB dist/commands/checkCommands.js
npm notice 8.9kB dist/commands/configCommands.js
npm notice 14.6kB dist/commands/connectCommand.js
npm notice 3.1kB dist/commands/deploy/flyBrowserAuth.js
npm notice 7.6kB dist/commands/deploy/flyctlBackend.js
npm notice 18.3kB dist/commands/deploy/flyDeployRunner.js
npm notice 7.3kB dist/commands/deploy/flyIntake.js
npm notice 13.6kB dist/commands/deploy/flyLegacyDocker.js
npm notice 18.4kB dist/commands/deploy/flyMachineConfig.js
npm notice 7.8kB dist/commands/deploy/flyMachinesApi.js
npm notice 2.7kB dist/commands/deploy/flyOrgPlan.js
npm notice 8.4kB dist/commands/deploy/flyRelay.js
npm notice 2.3kB dist/commands/deploy/flyStaleMachineConfig.js
npm notice 24.7kB dist/commands/deployFly.js
npm notice 12.2kB dist/commands/eventCommands.js
npm notice 5.5kB dist/commands/githubAppApi.js
npm notice 27.7kB dist/commands/githubAppCommands.js
npm notice 60.8kB dist/commands/goalCommands.js
npm notice 9.4kB dist/commands/handoffCommands.js
npm notice 3.7kB dist/commands/idleShutdownCheck.js
npm notice 2.4kB dist/commands/imageCommands.js
npm notice 8.6kB dist/commands/implementCommands.js
npm notice 2.1kB dist/commands/index.js
npm notice 8.4kB dist/commands/initCommands.js
npm notice 14.1kB dist/commands/initStack.js
npm notice 6.1kB dist/commands/logCommands.js
npm notice 26.5kB dist/commands/planCommands.js
npm notice 3.1kB dist/commands/prCommands.js
npm notice 8.4kB dist/commands/relayCommands.js
npm notice 41.4kB dist/commands/repoCommands.js
npm notice 2.7kB dist/commands/repoValidate.js
npm notice 7.5kB dist/commands/runtimeCommands.js
npm notice 19.8kB dist/commands/settingCommands.js
npm notice 4.6kB dist/commands/setup/agentHostActions.js
npm notice 123B dist/commands/setup/agents.js
npm notice 4.7kB dist/commands/setup/engine.js
npm notice 51B dist/commands/setup/github.js
npm notice 37.3kB dist/commands/setup/hostActions.js
npm notice 3.2kB dist/commands/setup/imagePlatform.js
npm notice 27.3kB dist/commands/setup/sequential.js
npm notice 51B dist/commands/setup/state.js
npm notice 51B dist/commands/setup/types.js
npm notice 10.7kB dist/commands/setupCommand.js
npm notice 4.4kB dist/commands/stackCommands.js
npm notice 1.8kB dist/commands/startCommand.js
npm notice 4.8kB dist/commands/statsCommands.js
npm notice 4.9kB dist/commands/statsCostCommand.js
npm notice 15.4kB dist/commands/systemCommands.js
npm notice 3.5kB dist/commands/tankCommands.js
npm notice 47.6kB dist/commands/taskCommands.js
npm notice 29.7kB dist/commands/todoCommands.js
npm notice 31.0kB dist/commands/tunnelCommand.js
npm notice 2.7kB dist/commands/uiDocsCommands.js
npm notice 8.3kB dist/completion.js
npm notice 27.3kB dist/config/ConfigManager.js
npm notice 276B dist/config/index.js
npm notice 989B dist/config/rootKey.js
npm notice 345B dist/config/types.js
npm notice 46.0kB dist/connectIdentity.js
npm notice 25.0kB dist/connectRootAuthority.js
npm notice 32.5kB dist/connectWindowsAuthority.js
npm notice 2.2kB dist/desktopDiscovery.js
npm notice 13.3kB dist/desktopLocalSetup.js
npm notice 17.4kB dist/index.js
npm notice 4.5kB dist/native/darwin-authority-broker.c
npm notice 8.9kB dist/native/directory-operations.c
npm notice 50.1kB dist/native/prebuilds/darwin-arm64/connect-authority-broker
npm notice 54.2kB dist/native/prebuilds/darwin-arm64/directory-operations.node
npm notice 17.1kB dist/native/prebuilds/darwin-x64/connect-authority-broker
npm notice 24.3kB dist/native/prebuilds/darwin-x64/directory-operations.node
npm notice 28.9kB dist/native/prebuilds/linux-arm64/directory-operations.node
npm notice 17.4kB dist/native/prebuilds/linux-x64/directory-operations.node
npm notice 1.2kB dist/native/README.md
npm notice 3.1kB dist/orchestrator/format.js
npm notice 14.4kB dist/orchestrator/index.js
npm notice 302B dist/orchestrator/manifest.json
npm notice 137.3kB dist/orchestrator/orchestrator.mjs
npm notice 408B dist/orchestrator/types.js
npm notice 6.2kB dist/rootHelp.js
npm notice 237B dist/skill/propr/agents/openai.yaml
npm notice 8.9kB dist/skill/propr/SKILL.md
npm notice 4.5kB dist/tui/AgentTableApp.js
npm notice 4.5kB dist/tui/app.js
npm notice 11.6kB dist/tui/CheckApp.js
npm notice 5.4kB dist/tui/render.js
npm notice 32.5kB dist/tui/SetupApp.js
npm notice 18.4kB dist/tui/SetupApp.test.js
npm notice 8.4kB dist/tui/StartApp.js
npm notice 3.8kB dist/utils/apiErrorPresentation.js
npm notice 12.0kB dist/utils/directoryDescriptor.js
npm notice 739B dist/utils/dockerPort.js
npm notice 5.0kB dist/utils/envFile.js
npm notice 520B dist/utils/index.js
npm notice 5.7kB dist/utils/io.js
npm notice 717B dist/utils/localSetupPlatform.js
npm notice 1.5kB dist/utils/nativeArtifact.js
npm notice 544B dist/utils/parseState.js
npm notice 417B dist/utils/positiveInteger.js
npm notice 4.5kB dist/utils/privateFilesystem.js
npm notice 4.2kB dist/utils/resolveProject.js
npm notice 7.2kB dist/vendor/local-setup/agents.js
npm notice 64.5kB dist/vendor/local-setup/engine.js
npm notice 5.0kB dist/vendor/local-setup/envFile.js
npm notice 11.4kB dist/vendor/local-setup/github.js
npm notice 188B dist/vendor/local-setup/index.js
npm notice 27.5kB dist/vendor/local-setup/publicInstanceIdentity.js
npm notice 14.6kB dist/vendor/local-setup/state.js
npm notice 2.8kB dist/vendor/local-setup/types.js
npm notice 13.2kB dist/vendor/shared/acceptanceCriteria.js
npm notice 1.0kB dist/vendor/shared/accountStatusTimestamp.js
npm notice 7.7kB dist/vendor/shared/activityEvents.js
npm notice 2.8kB dist/vendor/shared/agentConfigRedaction.js
npm notice 4.4kB dist/vendor/shared/agentDefinitions.js
npm notice 2.3kB dist/vendor/shared/agentFailureLine.js
npm notice 3.4kB dist/vendor/shared/agentLogin.js
npm notice 3.1kB dist/vendor/shared/agentTank.js
npm notice 1.2kB dist/vendor/shared/agentTankHistory.js
npm notice 2.8kB dist/vendor/shared/analyticsTimeframe.js
npm notice 4.4kB dist/vendor/shared/antigravityCompatibility.js
npm notice 5.1kB dist/vendor/shared/apiOrigin.js
npm notice 3.5kB dist/vendor/shared/assignment.js
npm notice 17.2kB dist/vendor/shared/automationDefinitions.js
npm notice 9.2kB dist/vendor/shared/automationReportPreview.js
npm notice 2.4kB dist/vendor/shared/automationRunProductivity.js
npm notice 6.4kB dist/vendor/shared/automationTemplateContract.js
npm notice 18.5kB dist/vendor/shared/automationTemplates.catalog.json
npm notice 1.3kB dist/vendor/shared/automationTemplates.js
npm notice 3.4kB dist/vendor/shared/changedFileKinds.js
npm notice 1.4kB dist/vendor/shared/claudeCompatibility.js
npm notice 12.1kB dist/vendor/shared/commitSubject.js
npm notice 8.5kB dist/vendor/shared/connectDiscovery.js
npm notice 9.6kB dist/vendor/shared/cronSchedule.js
npm notice 254B dist/vendor/shared/demoMode.js
npm notice 4.3kB dist/vendor/shared/desktopPairing.js
npm notice 481B dist/vendor/shared/desktopTokenRevocation.js
npm notice 8.9kB dist/vendor/shared/events.js
npm notice 13.0kB dist/vendor/shared/extensionLibrary.js
npm notice 703B dist/vendor/shared/extensionOAuth.js
npm notice 4.0kB dist/vendor/shared/extensionPackages.js
npm notice 2.9kB dist/vendor/shared/extensionProfiles.js
npm notice 2.7kB dist/vendor/shared/fleetData.js
npm notice 2.5kB dist/vendor/shared/githubAppManifest.js
npm notice 1.6kB dist/vendor/shared/githubAuthMode.js
npm notice 2.0kB dist/vendor/shared/githubEventIntakeMode.js
npm notice 12.8kB dist/vendor/shared/goalBlockers.js
npm notice 6.0kB dist/vendor/shared/goalCheckpoints.js
npm notice 4.0kB dist/vendor/shared/goalCreation.js
npm notice 5.1kB dist/vendor/shared/goalWait.js
npm notice 9.1kB dist/vendor/shared/idleShutdown.js
npm notice 14.7kB dist/vendor/shared/index.js
npm notice 214B dist/vendor/shared/instanceAuthorization.js
npm notice 54B dist/vendor/shared/instanceCatalog.js
npm notice 584B dist/vendor/shared/instanceStorage.js
npm notice 4.0kB dist/vendor/shared/intakeModePrerequisites.js
npm notice 2.9kB dist/vendor/shared/labelUtils.js
npm notice 21.0kB dist/vendor/shared/modelDefinitions.js
npm notice 3.5kB dist/vendor/shared/notificationLinks.js
npm notice 51.3kB dist/vendor/shared/notifications.js
npm notice 2.9kB dist/vendor/shared/openCodeCompatibility.js
npm notice 16.9kB dist/vendor/shared/planItemGraph.js
npm notice 7.5kB dist/vendor/shared/previewStorage/v1.js
npm notice 866B dist/vendor/shared/projectSlug.js
npm notice 3.8kB dist/vendor/shared/proprCompatibility.js
npm notice 884B dist/vendor/shared/proprRuntimePaths.js
npm notice 13.0kB dist/vendor/shared/proprServiceUrls.js
npm notice 17.0kB dist/vendor/shared/prTemplate.js
npm notice 6.9kB dist/vendor/shared/prTitleStatusSlot.js
npm notice 2.2kB dist/vendor/shared/publishedVisualPreviews.js
npm notice 2.7kB dist/vendor/shared/reasoningLevels.js
npm notice 1.8kB dist/vendor/shared/repositoryEvents.js
npm notice 6.7kB dist/vendor/shared/repositoryEventWait.js
npm notice 1.2kB dist/vendor/shared/repositoryIcon.js
npm notice 1.4kB dist/vendor/shared/repositoryIconUrl.js
npm notice 3.9kB dist/vendor/shared/repositoryPresentation.js
npm notice 10.4kB dist/vendor/shared/reviewContextBudget.js
npm notice 5.8kB dist/vendor/shared/reviewFeedbackIds.js
npm notice 2.7kB dist/vendor/shared/reviewPrompt.js
npm notice 907B dist/vendor/shared/runCostCap.js
npm notice 861B dist/vendor/shared/sessionSecret.js
npm notice 392B dist/vendor/shared/sqliteTimestamp.js
npm notice 603B dist/vendor/shared/statusKeys.js
npm notice 7.5kB dist/vendor/shared/syntheticAgents.js
npm notice 2.2kB dist/vendor/shared/taskIdentifiers.js
npm notice 2.0kB dist/vendor/shared/taskLifecycle.js
npm notice 733B dist/vendor/shared/taskReplacement.js
npm notice 957B dist/vendor/shared/text.js
npm notice 2.6kB dist/vendor/shared/tokenOutlierSettings.js
npm notice 1.9kB dist/vendor/shared/ultrafixCycle.js
npm notice 1.8kB dist/vendor/shared/unfinishedRun.js
npm notice 9.8kB dist/vendor/shared/usageTips.catalog.json
npm notice 5.0kB dist/vendor/shared/usageTips.js
npm notice 335B dist/vendor/shared/usageTypes.js
npm notice 1.1kB dist/vendor/shared/userWhitelist.js
npm notice 758B dist/vendor/shared/validateRelayUrl.js
npm notice 2.2kB dist/vendor/shared/validateRoutingUrl.js
npm notice 7.1kB dist/vendor/shared/visualPreviewCapacity.js
npm notice 9.3kB dist/vendor/shared/voice.js
npm notice 222B dist/vendor/shared/workEvidence.js
npm notice 828B package.json
npm notice Tarball Details
npm notice name: propr-cli
npm notice version: 0.9.3
npm notice filename: propr-cli-0.9.3.tgz
npm notice package size: 594.3 kB
npm notice unpacked size: 2.4 MB
npm notice shasum: ba37151133392bfefcec67b5cb88ff82e534dd3b
npm notice integrity: sha512-Cc9bGZyI3JipC[...]ZVJuTCa8GKCbg==
npm notice total files: 235
npm notice
propr-cli-0.9.3.tgz

Dry run only. Re-run with --publish to publish to npm.
✅ propr-cli release package verified
Starting changed-area validation process...
Reusing this job's @propr/shared build from CLI packaging.
Reusing this job's @propr/local-setup build from CLI packaging.

--- Core Service: Lint & Build ---
✅ Core Lint passed
✅ Core Source Build passed

--- UI: Typecheck, Lint & Build ---
✅ Client Package validation passed
✅ UI Typecheck passed
✅ UI Lint passed
✅ UI Build passed

--- Docs: Typecheck & Build ---
✅ Docs Typecheck passed
✅ Docs Build passed
✅ Docs Static Serving Check passed

--- Core Package: Build & Lint ---
✅ Core Package Build passed
❌ Core Package Lint FAILED

/home/runner/work/propr/propr/packages/core/src/agents/runtime/sprites/spritesRun.ts
  74:8  warning  Async function 'uploadRun' has a complexity of 21. Maximum allowed is 20  complexity

✖ 1 problem (0 errors, 1 warning)

ESLint found too many warnings (maximum: 0).

--- CLI: Lint ---
✅ CLI Lint passed

--- API: Build & Lint ---
✅ API Build passed
✅ API Lint passed

--- API Reference: OpenAPI Spec & Client Contract ---
✅ OpenAPI spec is current and valid
✅ @propr/client matches the OpenAPI spec

--- Stage outcomes ---
Workflow lint: success
Release shell lint: success
Pre-setup gate: skipped
Node setup: success
Toolchain: success
Dependency install: success
Release metadata: success
CLI packaging: success
Change detection: success
Changed-area checks: failure
Chromium install: skipped
PWA and mobile browser smoke: skipped

View Workflow

@propr-dev

propr-dev Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

❌ Failed to apply follow-up changes requested by @propr-dev[bot], @github-actions[bot]

Push rejected

Reason: Unknown (unknown)

The push failed for a reason ProPR could not classify. See the remote output below.

Recovery: The commits were saved to the git bundle /usr/src/app/data/rescue/integry/propr/pr-comments-batch-integry-propr-3795-1795563376078.bundle on the ProPR host. Recover them with: git fetch /usr/src/app/data/rescue/integry/propr/pr-comments-batch-integry-propr-3795-1795563376078.bundle HEAD && git checkout -B 3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l FETCH_HEAD, then push the branch.

Remote output
To https://github.com/integry/propr.git
!	refs/heads/3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l:refs/heads/3765/claude-opus-5-5-sprites-runner-pool-with--20261124-2108-n3l	[remote rejected] (Internal Server Error)
Done
Pushing to https://github.com/integry/propr.git
POST git-receive-pack (1403 bytes)
remote: Internal Server Error        
remote: Request ID A386:14A45C:976A2F:DFDA64:6B062061        
remote: Time 2026-11-24T23:40:17Z
error: failed to push some refs to 'https://github.com/integry/propr.git'

View task


Comment IDs: 7147587253✓, 7147588157✓

@integry

integry commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Live finding for the pool (from runs on #3793 and #3796): the Sprites API sometimes answers sprite.restart() at release with restart outcome unknown. I saw it on about 2 of 5 releases. The pool then discards the Sprite and re-provisions it: about 36 s or more of setup, and it uses Free-plan quota. That is safe, but costly. When the restart result is ambiguous, poll the Sprite's status (and run a trivial execFile('true')) until it is running again, with a bounded wait, for example 60 s. Then continue the reset (wipe /tmp, restore checkpoint). Discard only if it never comes back. Add a fake-Sprite test for an ambiguous restart.

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit b7527c5

Summary of Changes

On restart outcome unknown, the pool now waits up to 60 seconds for the Sprite to report running and pass /bin/true. It then wipes /tmp, restores the checkpoint, and reuses the same Sprite. If recovery times out, the pool replaces it.

Fake-Sprite tests cover recovery after a transient exec failure and replacement after a hung status request. All 52 pool and runtime tests passed. Core typechecking and linting of the changed runtime file passed. Live Sprites were not exercised.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts (+26/−1)
  • Low risk (1 file)
    • test/spritesRunnerPool.test.ts (+54/−0)

Diff size: 2 files changed, +80/−1 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @integry
  • Time: 5m 17s
  • Tokens: 502,649 (500,196 in / 2,453 out)
  • Cost: $0.48

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7148138627✓

Fixed F10. Startup now counts pool-labelled and eligible legacy orphans before cleanup begins. Each orphan keeps its slot until deletion succeeds or the provider confirms it is gone. Cleanup rechecks ownership before deleting.

A two-worker regression verifies that with `PROPR_SPRITES_MAX=2`, one undeleted orphan leaves room for exactly one new runner. Additional tests cover stalled deletion, inventory failures, and ownership changes during cleanup.

91 tests passed with simulated Sprites. Core typechecking and lint passed. Four Redis integration tests skipped because `redis-server` and a reachable Redis endpoint were unavailable.

PR: #3795
Comment by: @propr-ultrafix (ID: 0)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements a shared Redis-backed runner pool, warm-clone reuse, and status reporting, with extensive lifecycle tests. It needs a targeted correctness fix before merge.

✅ Shared capacity accounting — Reservations precede provisioning, and failed deletions remain counted until reconciliation.

✅ Ambiguous restart recovery — The reset path polls running status and verifies execution before proceeding, with bounded waits and dedicated tests.

✅ Result preservation — Expired execution leases are inspected for recoverable results, and retained runners remain unavailable for reuse.

The supplied current-head status reports no failed checks and five pending checks. This review uses static tracing only; no commands were run.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F11: 🔴 Definitively rejected late creates strand capacity

  • Category: correctness

  • Required behavior: Failed provisioning must allow its reserved capacity to be recovered once the provider conclusively rejects creation.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesProvisioning.ts, createReservedSprite and inspectSpriteReservation; packages/core/src/agents/runtime/sprites/spritesPoolState.ts, acquireSpriteRunner.

    1. A worker begins createSprite, then shuts down while that request is awaiting its response. The shutdown signal interrupts startupStep, and the reservation is recorded as pending, leaving an orphan with pendingCreate.
    2. The outstanding request subsequently returns a definitive rejection, such as HTTP 401. The late rejection handler records an outcome only for HTTP 409, so this reservation remains pending.
    3. A subsequent worker sees the orphan, but acquisition and startup claiming explicitly exclude pending creates from reaping.
    4. Provider lookups return 404 because creation was rejected. inspectSpriteReservation deliberately does not treat 404 as missing while pendingCreate exists. Consequently, repeated reconciliation cannot remove the reservation.

    The nonexistent Sprite permanently occupies a pool slot; at a bound of one, subsequent runs repeatedly time out without provisioning. Transactions preserve this incorrect state, and heartbeat expiry does not clear pendingCreate. static trace: followed the shutdown interruption, late rejection callback, orphan selection, and inventory lookup branches. The existing late ambiguous-failure test covers a Sprite eventually appearing, not a definitive rejection with no Sprite.

  • Minimum fix: Reconcile late definitive provider rejections as not-created, using the existing reservation identity checks. Continue retaining ambiguous transport failures. Add a regression covering shutdown during creation followed by a definitive rejection and successful acquisition by another worker.

Suggestions

These are optional follow-ups and are not sent to /fix.

S10: 🟢 Remove generated test artifacts

The three newly committed .propr/sprites*/output files and their SQLite databases are local test artifacts rather than implementation or reusable fixtures. Removing them would reduce repository noise and avoid stale test transcripts being mistaken for current validation. This is optional cleanup.

S11: 🟢 Exercise warm clones live

The fake Sprite tests verify lifecycle ordering but simulate filesystem movement and checkpoint restoration. A live test covering reference preservation across release and switching repositories would strengthen confidence in the optional warm-clone feature. This is additional integration evidence, not a demonstrated code defect.

Score

The implementation has substantial coverage and useful recovery safeguards, but a late definitive creation rejection can permanently consume shared capacity. The correction is localized; current checks have no reported failures but remain incomplete.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 27s
  • Tokens: 144,424 (142,665 in / 1,759 out)
  • Cost: $1.40

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F11 S10 S11

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 871474b

Addressed 1 AI review comment (IDs: 7151434712)

Addressed finding F11

Summary of Changes

Fixed F11. A definitive create rejection now releases the matching reservation, even after shutdown. Tests confirm that another worker can acquire a one-slot pool after either an initial create or a background replacement is rejected. Ambiguous late failures keep the slot reserved.

97 tests passed. Core typechecking and lint passed. Four Redis integration tests skipped because Redis was unavailable.

Separate finding. I reproduced an immediate transport failure that clears pendingCreate while the provider may still finish creating the Sprite. A peer can then acquire the slot and exceed the pool limit. This remains outside F11.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • packages/core/src/agents/runtime/sprites/spritesProvisioning.ts (+10/−3)
  • Low risk (1 file)
    • test/spritesRunnerPool.test.ts (+81/−55)

Diff size: 2 files changed, +91/−58 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (xhigh)
  • Requested By: @propr-ultrafix
  • Time: 8m 46s
  • Tokens: 1,127,560 (1,115,902 in / 11,658 out)
  • Cost: $1.29
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

Fixed F11. A definitive create rejection now releases the matching reservation, even after shutdown. Tests confirm that another worker can acquire a one-slot pool after either an initial create or a background replacement is rejected. Ambiguous late failures keep the slot reserved.

97 tests passed. Core typechecking and lint passed. Four Redis integration tests skipped because Redis was unavailable.

**Separate finding.** I reproduced an immediate transport failure that clears `pendingCreate` while the provider may still finish creating the Sprite. A peer can then acquire the slot and exceed the pool limit. This remains outside F11.

PR: #3795
Comment by: @propr-ultrafix (ID: 0)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements shared Redis leases, runner reuse, warm clones, status reporting, and bounded recovery from ambiguous restarts. It needs changes before merge: a worker crash can permanently consume pool capacity, and the queue does not consistently preserve arrival order.

✅ Atomic pool transitions — Redis transactions serialize competing acquisitions, and the added integration tests exercise separate connections.

✅ Bounded restart recovery — Ambiguous restarts require both running status and a successful exec before reset continues, with tests covering recovery and a stalled lookup.

This review used static analysis of the supplied code; no commands were run. Current checks report 29 passed, five pending, and no failures.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F12: 🔴 Crashed create reservations can block forever

  • Category: correctness

  • Required behavior: Crashed workers’ reservations must have a recovery path so abandoned runners do not permanently prevent queued runs from proceeding.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts, provision and checkInventory; packages/core/src/agents/runtime/sprites/spritesProvisioning.ts, inspectSpriteReservation.

    1. With a one-runner bound, provision commits pendingCreate: leaseId to Redis.
    2. The worker exits after that transaction completes but before createReservedSprite sends the provider request. No Sprite exists.
    3. After heartbeat expiry, another worker sees an orphaned record with pendingCreate. Both acquisition and claimSpriteRunners exclude it from reaping.
    4. Inventory lookup returns 404, but inspectSpriteReservation deliberately returns no conclusion for a pending create. checkInventory consequently leaves the record unchanged.
    5. Every subsequent acquisition waits or times out. Restarting workers repeats the same lookup; the documented recovery command cannot delete a Sprite that never existed.

    The late-response callback cannot repair this case because its process died. Heartbeats, transactions, and periodic inventory checks preserve the reservation indefinitely rather than resolve it. static trace: this follows directly from the persisted reservation, orphan filtering, and pending-create 404 branch; no provider timing assumption is needed.

  • Minimum fix: Provide a safe terminal recovery path for abandoned pending-create reservations, including an explicit operator-confirmed clearance mechanism if provider evidence cannot establish absence safely. Document that recovery and test a worker dying between reservation persistence and request submission; do not simply expire potentially successful creates.

F13: 🔴 Equal timestamps break FIFO ordering

  • Category: correctness

  • Required behavior: Queued runs must receive runners in first-come, first-served order.

  • Evidence: packages/core/src/agents/runtime/sprites/spritesPoolState.ts, acquireSpriteRunner, particularly the queue comparator using a.localeCompare(b).

    1. While the pool is full, acquisition A enters the queue.
    2. Acquisition B enters later within the same millisecond, receiving the same joinedAt value. Its random lease UUID sorts before A’s UUID.
    3. After a runner is released, A’s next acquisition attempt computes position 1 and waits because only one runner is available.
    4. B computes position 0 and leases that runner ahead of A.

    Redis serialization establishes which request arrived first but does not preserve that order in the stored ordering key. Heartbeats leave joinedAt unchanged. The added FIFO test separates requests with 20 ms delays, so it does not cover this case. static trace: the comparator deterministically reverses arrival order for equal timestamps and oppositely ordered UUIDs.

  • Minimum fix: Assign a stable sequence within the atomic enqueue transition and use it to preserve arrival order, including timestamp ties. Add a regression with two sequential enqueues at the same clock value.

Suggestions

These are optional follow-ups and are not sent to /fix.

S12: 🟢 Remove generated test artifacts

The three .propr/sprites*/output files and accompanying SQLite databases are local execution artifacts rather than implementation or reusable fixtures. Removing them would reduce review noise and repository churn. This is optional cleanup; the supplied contents do not establish a runtime defect.

S13: 🟢 Exercise warm clones live

The fake filesystem models checkpoint restoration and /tmp preservation directly. An opt-in live test covering reference carry, restore, installation, and a subsequent clone would provide stronger integration evidence. This is a follow-up because the supplied code does not itself establish a failure in that path.

Score

The implementation has substantial lifecycle coverage and useful operational reporting, but abandoned reservations can halt a pool and the queue violates its FIFO contract. Both need correction before merge.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 52s
  • Tokens: 146,577 (144,049 in / 2,528 out)
  • Cost: $1.44

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F12 F13 S12 S13

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit aefbcb3

Addressed 1 AI review comment (IDs: 7151921218)

Addressed findings F12, F13

Summary of Changes

Both findings are fixed, with regressions that fail on the previous code and pass now. No visual change, so no previews were created.

F13, FIFO on equal timestamps (packages/core/src/agents/runtime/sprites/spritesPoolState.ts)

  • Each waiter now gets an arrival number assigned inside the atomic enqueue transition, one above every request still queued. The queue sorts by that number first, then by timestamp and ID only as a fallback.
  • The Redis decoder accepts waiters written without the number and sorts them by timestamp, so a mixed deployment still orders.
  • Regression: two enqueues at the same clock value with oppositely ordered IDs. The old comparator served the second arrival first; the test now checks the first arrival leases and a newcomer never overtakes a queued request.

F12, abandoned pending-create reservations

  • A lookup returning 404 for a pending create now reports unsettled instead of nothing. The new resolveSpriteInventoryCheck in the state module keeps the slot reserved while the reservation has been orphaned for less than the create deadline plus the lease timeout (22 minutes), then forgets the record and frees the slot, with a warning naming the Sprite. The reasoning: a live holder gives up its create at the 21-minute provisioning deadline and records the outcome itself, so a Sprite still absent that long after orphaning was never created. A Sprite that appears anyway is still released for reaping, never leaked.
  • The same path also resolves a sibling case I traced: a live worker whose late create callback ends in a non-definitive error (such as a 500) left the record orphaned with pendingCreate set forever too.
  • Startup inventory and queued acquisitions already ran this check periodically, so no new scheduling was needed. The 21-minute provisioning timeout is now a shared constant instead of a literal.
  • Docs in agent-runtime.md describe the automatic recovery and the manual clearance: confirm absence with the Sprites CLI, then remove the record from the pool's Redis runners hash.
  • Regressions: a worker that dies after committing the reservation and before the request reaches the provider (the slot stays reserved within the deadline, then a peer provisions into it); and a create that lands late after the deadline (the Sprite is deleted, not leaked).

Verification

  • Runner pool suite: 68 pass. Sprites runtime suite: 32 pass. The Redis integration suite skipped for lack of a Redis server in this container.
  • Core typecheck and zero-warning lint pass on the changed files.

Not done: nothing from the two findings. I left the FIFO test in the Redis suite untouched since it only reads ordering by timestamp with well-separated joins.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (4 files)
    • packages/core/src/agents/runtime/sprites/spritesPoolState.ts (+52/−3)
    • packages/core/src/agents/runtime/sprites/spritesPoolStore.ts (+3/−1)
    • packages/core/src/agents/runtime/sprites/spritesProvisioning.ts (+11/−4)
    • packages/core/src/agents/runtime/sprites/spritesRunnerPool.ts (+11/−9)
  • Low risk (2 files)
    • docs/docs/architecture/agent-runtime.md (+2/−0)
    • test/spritesRunnerPool.test.ts (+110/−2)

Diff size: 6 files changed, +189/−19 lines


🤖 Implementation Details

  • Model: Claude Fable 5.1 (medium)
  • Requested By: @propr-ultrafix
  • Time: 11m 24s
  • Tokens: 2,552,902 (2,522,987 in / 29,915 out)
  • Cost: $3.61

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

Both findings are fixed, with regressions that fail on the previous code and pass now. No visual change, so no previews were created.

**F13, FIFO on equal timestamps** (`packages/core/src/agents/runtime/sprites/spritesPoolState.ts`)
- Each waiter now gets an arrival number assigned inside the atomic enqueue transition, one above every request still queued. The queue sorts by that number first, then by timestamp and ID only as a fallback.
- The Redis decoder accepts waiters written without the number and sorts them by timestamp, so a mixed deployment still orders.
- Regression: two enqueues at the same clock value with oppositely ordered IDs. The old comparator served the second arrival first; the test now checks the first arrival leases and a newcomer never overtakes a queued request.

**F12, abandoned pending-create reservations**
- A lookup returning 404 for a pending create now reports `unsettled` instead of nothing. The new `resolveSpriteInventoryCheck` in the state module keeps the slot reserved while the reservation has been orphaned for less than the create deadline plus the lease timeout (22 minutes), then forgets the record and frees the slot, with a warning naming the Sprite. The reasoning: a live holder gives up its create at the 21-minute provisioning deadline and records the outcome itself, so a Sprite still absent that long after orphaning was never created. A Sprite that appears anyway is still released for reaping, never leaked.
- The same path also resolves a sibling case I traced: a live worker whose late create callback ends in a non-definitive error (such as a 500) left the record orphaned with `pendingCreate` set forever too.
- Startup inventory and queued acquisitions already ran this check periodically, so no new scheduling was needed. The 21-minute provisioning timeout is now a shared constant instead of a literal.
- Docs in `agent-runtime.md` describe the automatic recovery and the manual clearance: confirm absence with the Sprites CLI, then remove the record from the pool's Redis runners hash.
- Regressions: a worker that dies after committing the reservation and before the request reaches the provider (the slot stays reserved within the deadline, then a peer provisions into it); and a create that lands late after the deadline (the Sprite is deleted, not leaked).

**Verification**
- Runner pool suite: 68 pass. Sprites runtime suite: 32 pass. The Redis integration suite skipped for lack of a Redis server in this container.
- Core typecheck and zero-warning lint pass on the changed files.

**Not done**: nothing from the two findings. I left the FIFO test in the Redis suite untouched since it only reads ordering by timestamp with well-separated joins.

PR: #3795
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Fable 5.1

ProPR-Agent: claude/claude-fable-5-1
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR implements a shared Redis-backed Sprites pool, warm-clone reuse, operational reporting, and bounded recovery from ambiguous restarts. The supplied code supports the effective objective; I found no verified merge blocker. Merge readiness is conditional on the five pending checks completing successfully.

✅ Counted resource lifecycle — Reservations precede Sprite creation, failed deletions remain counted, and replacement provisioning preserves the occupied slot.

✅ Result preservation — Finished leases become retained after expiry, while expired execution leases receive result inspection before deletion. Tests cover failed completion writes and ownership changes during inspection.

✅ Bounded restart recovery — Ambiguous restart responses trigger status polling and a successful trivial exec before reset continues, with tests covering recovery and a stalled status request.

This was a static review of the supplied diff and caller context; no commands or tests were run.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S14: 🟢 Remove generated test artifacts

The three added .propr/sprites*/output files and accompanying SQLite databases are generated test artifacts rather than implementation or reusable fixtures. Removing them would reduce repository noise and avoid confusing historical test output with current validation. This is optional cleanup.

S15: 🟢 Exercise warm cloning live

The fake Sprite tests cover the intended carry, restore, install, and checkpoint sequence, while the transport test exercises Git locally. A live test combining both would provide additional confidence that the separate /tmp disk preserves the carried reference through checkpoint restoration and that subsequent repository switches remain clean. This is additional integration evidence, not a demonstrated defect.

Score

The implementation includes substantial lifecycle and failure-path coverage, with no verified blocker in the supplied code. Current checks report 29 passed, five pending, and no failures; live warm-clone integration remains less directly validated.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 1m 11s
  • Tokens: 149,804 (148,419 in / 1,385 out)
  • Cost: $1.42

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S14 S15

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 25, 2026
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 1/4, Run Full Test Suite

Please investigate and fix these CI failures.

  • Check: Full Test Suite Shard 1/4
  • Result: failure
  • Commit: aefbcb3feae9 (aefbcb3feae9fac76fa89e624883fca532778304)
  • Run: View CI failure

Failure evidence

.github:11
Process completed with exit code 1.

.github:41800
Process completed with exit code 1.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/


Depends on the failed job(s): Full Test Suite Shard 1/4. It may have failed only because they did; check them first.

Failure evidence

.github:67
Process completed with exit code 1.

.github:66
Full test suite shards finished with result 'failure'.

.github:4
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960, actions/download-artifact@018cc2c. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit c54822a

Summary of Changes

Fixed the flaky FIFO assertion in spritesPoolRedis.test.ts. Concurrent Redis transactions can commit in a different order from their request timestamps. The test now uses the stored enqueue sequence to identify which waiter should receive the released runner.

I reproduced the CI failure locally before the fix. Afterward, all 72 Redis and runner-pool tests passed, and the Redis suite passed 10 consecutive runs. Verification covered the affected suites only.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk: none
  • Low risk (1 file)
    • test/spritesPoolRedis.test.ts (+2/−1)

Diff size: 1 file changed, +2/−1 lines


🤖 Implementation Details

  • Model: GPT-6.2 Astra (medium)
  • Requested By: @propr-dev[bot]
  • Time: 5m 0s
  • Tokens: 731,406 (729,364 in / 2,042 out)
  • Cost: $0.62

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7152463984✓

Fixed the flaky FIFO assertion in [spritesPoolRedis.test.ts](/home/node/workspace/test/spritesPoolRedis.test.ts:85). Concurrent Redis transactions can commit in a different order from their request timestamps. The test now uses the stored enqueue sequence to identify which waiter should receive the released runner.

I reproduced the CI failure locally before the fix. Afterward, all 72 Redis and runner-pool tests passed, and the Redis suite passed 10 consecutive runs. Verification covered the affected suites only.

PR: #3795
Comment by: @propr-dev[bot] (ID: 7152463984)
Model: GPT-6.2 Astra

ProPR-Agent: codex/gpt-6.2-astra
@propr-dev propr-dev Bot changed the title 🔨 [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones ✅❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026
@integry

integry commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Pausing this PR; it stays open as a reference. The review loop stalled at 6/10 on orphan-cleanup edge cases. It is restarted as #3799 with a narrow scope: a Redis-backed shared cap with lease TTLs, deletion only of orphans that carry this deployment's marker and exceed an age limit, retry on restart outcome unknown, and pool status. No orphan result recovery, about 1,000 lines.

@propr-dev propr-dev Bot changed the title ✅❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones 🔨 [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @integry

Analysis Summary

Work on #3795 is paused. It stays open as a reference. I made no changes, ran no tests, and generated no previews.

#3799 carries the narrower scope of about 1,000 lines: a Redis-backed shared cap with lease TTLs, deletion only of orphans that carry this deployment’s marker and exceed the age limit, bounded retry on restart outcome unknown, and pool status. Orphan result recovery is out of scope.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: GPT-6.2 Astra (medium)
  • Time: 3m 46s
  • Tokens: 44,350 (44,158 in / 192 out)
  • Cost: $0.09

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7155044704✓

@propr-dev propr-dev Bot changed the title 🔨 [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones ✅❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026
@integry

integry commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Maintainer decision: this PR reached 8/10 and passes the live Sprites test, but an independent review found that another worker can delete a live runner. That happens after a lost heartbeat (a Redis outage) or after a Redis flush, when the startup inventory reaps live runners. The PR also commits test leftovers (.propr/* TAP output and SQLite files). Continuing with the restart in #3799, which now lists these pitfalls. This PR stays open as a reference.

@propr-dev propr-dev Bot changed the title ✅❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones 🔨 [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026
@propr-dev

propr-dev Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @integry

Analysis Summary

I left #3795 open as a reference and made no changes. The maintainer directed follow-up work to #3799, which already records both live-runner deletion risks—a lost heartbeat during a Redis outage and startup cleanup after a Redis flush—along with the tracked .propr/ test artifacts.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: GPT-6.2 Astra (medium)
  • Time: 3m 2s
  • Tokens: 45,147 (44,945 in / 202 out)
  • Cost: $0.09
  • Subscription usage: Weekly +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 7155199397✓

@propr-dev propr-dev Bot changed the title 🔨 [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones ✅❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026
@propr-dev propr-dev Bot changed the title ✅❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones ⚠️❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026

integry commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Superseded by #3800 (Sprites runner pool restart on a focused spec), which is merged into the epic after live verification on real Sprites.

@integry integry closed this Nov 25, 2026
@propr-dev propr-dev Bot changed the title ⚠️❽ [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones [3765 by Claude Opus 5.5] Sprites runner pool with checkpoint reset and warm clones Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant