Repository navigation
[3794 by GPT-6.2 Astra] Runtime parity for Sprites/Fly Machines: extensions, workflow markers, timeouts, pool robustness - #3796
Conversation
Implemented #3794 for Docker and Sprites. Both runtimes now share workflow marker capture, secret redaction, cost monitoring, watchdogs, and diagnostics. Sprites refuses extension runs at admission, and a failing workflow hook now fails the run. Sprites validates uploads before acquiring a worker, starts the agent timeout at launch, and lets cancelled provisioning finish into the pool. Cleanup has bounded waits, replaces failed Sprites in the background, and skips credential export when the launcher never started. A dropped connection gets one reattach attempt. The SDK is pinned to `0.2.5` with a Node 22 CI smoke test. The core build, typecheck, lint, and 124 focused tests passed. Redis-dependent integration checks skipped because `redis-server` was unavailable. Fly Machines was absent from this branch. Before merge, a maintainer still needs to run `test/spritesRuntime.live.test.ts` with `PROPR_SPRITES_LIVE_TOKEN` to verify behavior against the live service. ProPR-Agent: codex/gpt-6.2-astra
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR meaningfully consolidates Docker and Sprites execution handling and improves Sprites admission and cleanup. No merge-blocking defect was verified from the supplied code. Merge readiness remains unconfirmed because live-service compatibility has not been demonstrated. ✅ Shared output processing — Both runtimes now use the same redaction, workflow-marker capture, session inspection, and cost-monitoring pipeline. ✅ Earlier payload validation — Sprites validates and prepares uploads before acquiring a worker, with tests covering invalid workspaces and organization-token exposure. ✅ Bounded cleanup — Restore and deletion operations now have explicit deadlines, and replacement provisioning runs outside the release path. This was a static review; no commands or tests were run. The authoritative checks report no failures and five pending checks. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Exercise actual connection failuresThe reconnect test simulates an S2: 🟢 Expand SDK smoke coverageThe new CI smoke test verifies SDK construction and filesystem-object creation. A follow-up could exercise more of the pinned SDK’s execution and streaming interfaces on Node 22 without requiring production credentials. This is optional compatibility hardening beyond the existing smoke test and separate live suite. ScoreThe implementation is cohesive and has useful focused coverage, with no verified code blocker. The explicitly outstanding live-service validation is a material verification gap, particularly for the new detachable-session recovery behavior. Score: 7/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
|
Live verification at head c9d1ba5
|
|
ℹ️ Analyzed the follow-up request by @integry Analysis SummaryThe maintainer reports that No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
/review Re-review with the live evidence in #3796 (comment): the live Sprites test passes at this head. |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationMerge-ready within the reviewed scope, conditional on the remaining checks passing. The shared pipeline is proportionate to the runtime-parity objective. ✅ Shared execution behavior — Docker and Sprites now share workflow-marker capture, output redaction, cost accounting, watchdogs, and diagnostics. ✅ Earlier admission checks — Unsupported extensions are refused explicitly, and upload payload validation occurs before acquiring a Sprite. ✅ Live verification supplied — The reported pass at This review used the supplied diff and context only; no commands were run. The authoritative check summary reports no failures, with 10 checks pending. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Exercise realistic reconnect streamsThe reconnect test verifies one attachment and successful settlement, but its fake emits complete output on both connections. An optional regression test could interrupt a connection between output chunks and exercise failed reattachment, checking final output and cleanup. This would strengthen recovery coverage beyond the supplied live test; the reviewed code does not establish a concrete reconnect defect. ScoreThe implementation addresses the stated objective with focused tests and supplied live verification. No merge-blocking regression was established; readiness remains conditional on completion of pending checks. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/ultrafix goal=8 max=4 Independent maintainer review at c9d1ba5. Fix these; the live Sprites test already passes at this head. BLOCKERS
ALSO FIX |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 4) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR makes useful progress toward Docker/Sprites runtime parity, but needs significant corrections before merge. The principal risks are credential freshness, stream completion, admission authority, and failure handling around pooled Sprites. ✅ Shared output handling — Both runtimes now use one pipeline for workflow markers, redaction, cost observation, watchdogs, and diagnostics. ✅ Separate provisioning and execution budgets — Sprites provisioning has its own bound, while the agent timeout starts immediately before execution. ✅ Validation evidence — The authoritative checks report 25 passed and no failures; the supplied maintainer report confirms live Sprites verification at c9d1ba5. This is a static review of the supplied diff and context. No commands were run or files modified. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Credential snapshots precede lengthy provisioning
F2: 🔴 Exit handling discards trailing stream data
F3: 🔴 Definition admission uses API-local runtime selection
F4: 🔴 Cleanup can replace a cost refusal
F5: 🔴 Optional capability breaks registered Docker runtimes
F6: 🔴 Failed replacement aborts an unrelated acquisition
SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Verify reconnect output continuityThe reconnect test verifies attachment selection but not output continuity. The supplied context does not establish whether the pinned SDK replays, resumes, or omits disconnected output, so I cannot substantiate a separate reconnect blocker. Add a contract test with partial records and hook-failure markers across disconnect: either establish deduplication/resumption guarantees or explicitly report incomplete output and unobserved workflow reports. S5: 🟢 Avoid repeated transcript rescanning
S6: 🟢 Consolidate extension refusal behaviorThe registry emits S7: 🟢 Document timeout scopeDocument that provisioning has its own bound and the configured agent timeout begins at execution. The implementation intentionally makes this distinction, but the added runtime documentation does not explain it. Rerun the live suite after lifecycle corrections; the supplied successful live result remains valid evidence for this head. ScoreThe shared pipeline and passing checks are valuable, but six verified regressions remain in launch preparation, output capture, admission, and recovery. These need correction before merge. Score: 5/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit bc750c5
Summary of ChangesAddressed F1–F6 on PR #3796.
The runtime docs now distinguish the launch-time agent timeout from the provisioning deadline. Verification: Core build, repository typecheck, and changed-source lint passed. The focused suites had 110 passes and one skip requiring root or passwordless sudo. The maintainer’s live Sprites rerun remains pending. Review digestRisk-tiered paths
Diff size: 11 files changed, +278/−66 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
Addressed F1–F6 on PR #3796. - Sprites validates launch inputs before acquisition, then reads credentials and rechecks the final payload immediately before upload. - Normal exit drains stdout and stderr with a two-second grace period. A fake-SDK regression verifies that trailing output and a late hook-failure marker reach the pipeline. - Definition admission uses explicit runtime capabilities without constructing a runtime. Worker-selected runtimes defer to launch. Docker-kind runtimes retain extension support when the optional flag is absent. - Pre-spawn refusals and timeouts settle independently of cleanup. A failed background replacement triggers one fresh provisioning attempt while respecting cancellation and shutdown. The runtime docs now distinguish the launch-time agent timeout from the provisioning deadline. **Verification:** Core build, repository typecheck, and changed-source lint passed. The focused suites had 110 passes and one skip requiring root or passwordless sudo. The maintainer’s live Sprites rerun remains pending. PR: #3796 Comment by: @propr-ultrafix (ID: 0) Model: GPT-6.2 Astra ProPR-Agent: codex/gpt-6.2-astra
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR substantially improves runtime parity, but the new reconnect path still needs correction before merge. This review is based solely on the supplied code; no commands were run. ✅ Credential freshness — Validation precedes acquisition, while credential materialization and env-file reads occur after acquisition, immediately before upload. ✅ Output draining — Normal exits now wait for both output streams, with a bounded grace period and a regression test covering delayed workflow markers. ✅ Bounded cleanup — Provisioning and restoration have separate deadlines, and unused-slot cleanup no longer replaces pre-spawn refusal outcomes. The shared pipeline is appropriate to the objective. Current checks have no failures, with five still pending; the reported live verification applies to c9d1ba5. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F7: 🔴 Reattach blindly appends replayed output
SuggestionsThese are optional follow-ups and are not sent to S8: 🟢 Avoid rescanning transcript snapshots
S9: 🟢 Consolidate extension refusal ownershipThe registry now provides a structured capability error, but ScoreThe lifecycle improvements and focused tests are strong, but reconnect output integrity remains unresolved. Pending checks alone do not lower the rating. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 67b72a6
Summary of ChangesFixed F7. The pinned Sprites SDK exposes no resume offset, so reattach now observes process exit without appending replayed bytes. The worker retrieves the workspace, then reports incomplete output and marks workflow reports unobserved. A zero exit after reconnect cannot turn the run into a success. Regression tests cover a disconnect inside a provider record, replayed workflow markers, and workspace retrieval before failure. Across four suites, 120 tests passed and one privilege-dependent test skipped. Core typecheck and lint passed. The live Sprites rerun remains with the maintainer. Review digestRisk-tiered paths
Diff size: 7 files changed, +102/−25 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
Fixed F7. The pinned Sprites SDK exposes no resume offset, so reattach now observes process exit without appending replayed bytes. The worker retrieves the workspace, then reports incomplete output and marks workflow reports unobserved. A zero exit after reconnect cannot turn the run into a success. Regression tests cover a disconnect inside a provider record, replayed workflow markers, and workspace retrieval before failure. Across four suites, 120 tests passed and one privilege-dependent test skipped. Core typecheck and lint passed. The live Sprites rerun remains with the maintainer. PR: #3796 Comment by: @propr-ultrafix (ID: 0) Model: GPT-6.2 Astra ProPR-Agent: codex/gpt-6.2-astra
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryResolved all nine conflict blocks across the five files for PR #3796. A workspace-wide scan found no remaining merge conflict markers. Git still lists the five paths as unmerged because
Verification: All 201 tests passed across the five focused suites. Whitespace checks passed. TypeScript passed with 🤖 Resolution Details
System-triggered merge conflict resolution |
Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - docs/docs/architecture/agent-runtime.md - 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: #3796 Model: GPT-6.2 Sol
Checks FailedValidation failed during setup, tests, CLI packaging, linting, or build checks. View Logs |
|
CI failed: Validate Changes Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit 144c34a Processed 2 comments:
Summary of ChangesFixed the lint failure on PR #3796. Core lint passed locally with zero warnings, the core package built successfully, and all 32 Sprites runtime tests passed in demo mode. Review digestRisk-tiered paths
Diff size: 1 file changed, +7/−5 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
Fixed the lint failure on PR #3796. `runEnvironment` now takes the existing `SpriteLaunch` object, reducing its parameter count from five to three and preserving validation and launch behavior. Core lint passed locally with zero warnings, the core package built successfully, and all 32 Sprites runtime tests passed in demo mode. PR: #3796 Comment by: @github-actions[bot] (ID: 7147527641) Comment by: @propr-dev[bot] (ID: 7147529208) Model: GPT-6.2 Astra ProPR-Agent: codex/gpt-6.2-astra
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR substantially delivers shared Docker/Sprites execution handling and addresses the demonstrated lifecycle issues. No merge blocker is verified from the supplied diff; merge readiness remains conditional on current-head checks, whose status is unavailable. This was a static review; no commands were run. ✅ Fresh credential materialization — Credentials, environment-file contents, and the Claude seed are read after acquiring a Sprite, immediately before upload. ✅ Conservative reconnect handling — Reattached runs report incomplete output, invalidate workflow observations, and retrieve the workspace before the dispatcher reports failure. ✅ Improved lifecycle coverage — Added tests exercise output arriving after exit, pre-spawn refusal, cancelled provisioning, and failed replacement recovery. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S10: 🟢 Make transcript redaction incremental
S11: 🟢 Consolidate extension refusal behavior
S12: 🟢 Distinguish drain timeout from completion
ScoreThe implementation has strong targeted coverage and no verified PR-introduced blocker. Current-head validation remains unverified, and the transcript handling and refusal paths have worthwhile follow-ups. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
Maintainer verification at 144c34a (includes the merged #3793)
|
AI Implementation Summary
Closes #3794
Branch:
3794/gpt-6.2-astra-runtime-parity-for-sprite-20261124-2136-9kpCommits: ✅ Changes committed (c9d1ba5)
AI Processing Completed
Execution Details:
Summary:
Implemented #3794 for Docker and Sprites. Both runtimes now share workflow marker capture, secret redaction, cost monitoring, watchdogs, and diagnostics. Sprites refuses extension runs at admission, and a failing workflow hook now fails the run.
Sprites validates uploads before acquiring a worker, starts the agent timeout at launch, and lets cancelled provisioning finish into the pool. Cleanup has bounded waits, replaces failed Sprites in the background, and skips credential export when the launcher never started. A dropped connection gets one reattach attempt. The SDK is pinned to
0.2.5with a Node 22 CI smoke test.The core build, typecheck, lint, and 124 focused tests passed. Redis-dependent integration checks skipped because
redis-serverwas unavailable. Fly Machines was absent from this branch.Before merge, a maintainer still needs to run
test/spritesRuntime.live.test.tswithPROPR_SPRITES_LIVE_TOKENto verify behavior against the live service.Review digest
Risk-tiered paths
.github/workflows/pr-build-check.yml(+3/−0): CI or workflow filepackage-lock.json(+1/−1): lockfilepackages/core/package.json(+1/−1): dependency manifestpackages/core/src/agents/runtime/dockerRuntime.ts(+1/−0)packages/core/src/agents/runtime/registry.ts(+12/−5)packages/core/src/agents/runtime/runPipeline.ts(added, +102/−0)packages/core/src/agents/runtime/runtimeSelection.ts(+6/−4)packages/core/src/agents/runtime/sprites/spritesExecution.ts(+79/−80)packages/core/src/agents/runtime/sprites/spritesProvisioning.ts(+64/−17)packages/core/src/agents/runtime/sprites/spritesRun.ts(+24/−9)packages/core/src/agents/runtime/spritesRuntime.ts(+42/−18)packages/core/src/agents/runtime/types.ts(+2/−0)packages/core/src/claude/docker/dockerExecutor.ts(+42/−123)packages/core/src/extensions/extensionLaunch.ts(+2/−9)packages/core/src/extensions/extensionLaunchContext.ts(added, +10/−0)packages/core/src/services/agents/agentRunTrigger.ts(+20/−4)docs/docs/architecture/agent-runtime.md(+2/−0)test/agentRunTrigger.test.ts(+4/−0)test/helpers/fakeSprites.ts(+10/−5)test/spritesRuntime.test.ts(+157/−23)Diff size: 20 files changed, +584/−299 lines
View task for the run's logs and conversation.
This PR was created automatically by ProPR after processing issue #3794.
💡 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!