Skip to content

test(workspaces): await final Issue handoff cleanup - #1745

Draft
luokerenx4 wants to merge 1 commit into
devfrom
fix/1461-observe-lease-cleanup
Draft

luokerenx4 wants to merge 1 commit into
devfrom
fix/1461-observe-lease-cleanup

Conversation

@luokerenx4

@luokerenx4 luokerenx4 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

The Issue handoff integration test intermittently fails even though completion cleanup is still progressing normally. This is #1461's test synchronization defect, not evidence that users lose the resume lease. Scope: one test file, both existing terminal and web-session cases.

sequenceDiagram
    participant Runtime as Existing Workspace runtime
    participant Test as Handoff test
    Runtime->>Test: Task status becomes done
    Note over Runtime: Completion bookkeeping still pending
    Note over Test: Before FAIL assumes done means lease released
    Runtime->>Runtime: Finish bookkeeping and release active resume lease
    Test->>Runtime: After observe done plus paused plus inactive together
    Runtime-->>Test: Final cleanup invariant satisfied
Loading

Reuse the existing bounded vi.waitFor and its unchanged 10-second budget to observe the complete invariant. Remove the immediate state/lease checks that ran after observing only task output status. Retain takeover approval, blocked competing dispatch and stop-order assertions. No production lifecycle, lease timing, persistence or new completion abstraction.

Tradeoff: this tests eventual cleanup, not that done is a cleanup barrier; current source explicitly publishes it earlier. The same bounded wait fails if the lease never clears.

Validation on Linux / Node 24.19.0, dev 4813c1b8:

  • Unmodified file passed 5/5, consistent with an intermittent race.
  • Controlled reproduction: temporary 150 ms pause after task completion publication and before delivery/bookkeeping. Both original handoff cases failed on active lease; both revised cases passed under the identical pause. No artificial delay retained.
  • Final unchanged-runtime spec: 5/5 passed with isolated temporary homes and fake headless execution. No broker or messaging operations.
  • Tests TypeScript project passed; diff whitespace passed. Full monorepo not rerun for this test-only change.

Draft for review; no merge or issue closure. CI is reported against the pushed SHA separately.

Included increment:

  • 079bafa7 — Observe task completion, paused session and lease release together.

Boundary touch: tests only. Production runtime, permissions, trading, credentials, persistence and packaging are unchanged. Non-goals include unrelated sidebar work and dual-sided/hedge position design.

Verified pushed head: 079bafa7b783c2cb610b3bfe87f8e5b533661227. Dev PR clean-build: SUCCESS.

@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openalice-demo Ready Ready Preview Oct 2, 2026 10:20am UTC

Request Review

@luokerenx4 luokerenx4 added area:workspace Workspace, Session, templates, or sidebar lifecycle theme:reliability Failure recovery, retries, loading, or resilience workflow:parallel Autonomous parallel contribution; leave open for later acceptance labels Oct 2, 2026 — with ChatGPT Codex Connector

This branch was successfully deployed

1 active deployment
Preview — 079bafa7 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workspace Workspace, Session, templates, or sidebar lifecycle theme:reliability Failure recovery, retries, loading, or resilience workflow:parallel Autonomous parallel contribution; leave open for later acceptance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants