Skip to content

[Fix] PR screenshots disappear when proof completion races timeout - #2090

Open
roomote-roomote[bot] wants to merge 9 commits into
developfrom
fix/reconcile-visual-proof-artifacts
Open

[Fix] PR screenshots disappear when proof completion races timeout#2090
roomote-roomote[bot] wants to merge 9 commits into
developfrom
fix/reconcile-visual-proof-artifacts

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @mrubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Each visual-proof step persists a unique attempt ID before direct browser capture begins.
  • Capture and PR delivery construct attempt-specific paths from the actual state-file value rather than encoded pseudo-path placeholders.
  • Timeout recovery and PR creation/refresh only select listed artifacts whose path matches that concrete attempt prefix.
  • Attempt markers are removed after delivery, cancellation, terminal provider errors, wedged-turn recovery, and task lifecycle completion, preventing stale proof reuse.
  • Worker tests inject per-harness attempt-state paths so parallel harness cleanup cannot delete another test's marker.

Why this change was made

The five-minute visual-proof deadline can interrupt the active capture turn after screenshots upload but before its result is retained. Without durable attempt identity and complete lifecycle cleanup, those uploads are indistinguishable from artifacts produced by an earlier, cancelled, terminally failed, or wedged proof cycle.

Impact

PR delivery can recover screenshots after a lost capture result without attaching stale artifacts. The implementation is aligned with the direct-capture architecture introduced by #2091; the obsolete hidden proof-runner files remain deleted. Raw skill instructions construct paths from the actual attemptId value and contain no encoded or literal angle-bracket placeholders. The full worker suite passes 1,838 tests, including the previously failing timeout case; focused workflow tests, package type checks, worker lint, formatting, merge validation, and repository pre-push checks also pass. Browser proof is not applicable to this hidden orchestration behavior.

@roomote-community

roomote-community Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

  • apps/worker/src/sandbox-server/lib/harnesses/opencode-server/harness.ts:338 — Timeout recovery cannot identify artifacts from the current proof attempt after the child result is lost.
  • apps/worker/src/sandbox-server/lib/harnesses/opencode-server/harness.ts:2389 — Cancelling proof leaves its attempt marker available for later delivery to reuse.
  • apps/worker/src/sandbox-server/lib/harnesses/opencode-server/harness.ts:4289 — Terminal provider errors leave the proof-attempt marker available to a later resumed delivery cycle.
  • apps/worker/src/sandbox-server/lib/harnesses/opencode-server/harness.ts:5334 — The terminal wedged-turn path aborts a proof task without clearing its persisted attempt marker, so a later resumed delivery can still attach artifacts from that failed attempt.

Reviewed d02fabc

Comment thread apps/worker/src/sandbox-server/lib/harnesses/opencode-server/harness.ts Outdated
@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review September 2, 2026 21:03
@roomote-roomote

roomote-roomote Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in d02fabc: wedged-turn recovery now clears visual-proof attempt state before either queued replay or terminal abort. The CI test-isolation fix is in 68367a6, with the stale export cleanup in dbb12ae. The full worker suite passes all 1,838 tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant