Skip to content

[CONT16-01] Continue original work after needs-you hand-back - #464

Merged
chayapats merged 4 commits into
mainfrom
jit/459-computer-continuation
Nov 17, 2026
Merged

chayapats merged 4 commits into
mainfrom
jit/459-computer-continuation

Conversation

@chayapats

@chayapats chayapats commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #459.

After the owner hands back a needs-you computer, the Bot automatically continues the existing task without another message. A durable screen-event cursor and per-card binding schedule one fresh CHAT receipt/VM session/MODEL step while retaining the original work grant, frozen task, physical-computer workspace, model pin and charged allowance. Decline, expiry, ordinary takeover and routine occurrences do not schedule this path.

The scheduler waits for active work, coalesces a run that already carried the outcome, recovers only unclaimed queued requests and never replays an interrupted claim. Bounded prior observations are separate data; handoff facts still use ADR 0092's existing outcome source and publication-only delivery. Original policy, stop, Bot/private scope, unknown claims and memory/file withdrawal fences remain current. Copied instructions never become new owner ingress or interpretation history.

English/Thai cards project actual continuation state, the transcript labels host continuation, and usage maps exact work plus MODEL step to its receipt. ADR 0094 and the browser contract document the scoped behavior and alternatives.

Validation and review follow-up at head a8d8630:

  • Continuation composition suite: 29 passed, including production/fallback sources, workspace continuity, cumulative budgets, two-member affinity, quick hand-back, duplicates, persisted queued/claimed-state restart recovery, coalescing, stop/revocation/owner/budget/unknown fences, forget before/during/after, rollback, usage attribution and public-input forgery refusal.
  • Native Chromium English/Thai browser fixture on immutable final head a8d8630: 2 passed / 116 assertions, including real password/cookie reload, automatic continuation, opening the guarded result after 34 newer requests, focus/mobile/session loss.
  • Typecheck, upstream provenance and diff whitespace checks passed.
  • Initial immutable-head full suite: 5082 passed, 81 skipped, 1 failure caused by the desktop lease fixture using macOS's overlong temporary path (vm_state_path_too_long). The fixture now uses the existing QEMU tests' short-root convention; its 21 tests passed. Production path validation is unchanged.
  • Four valid review findings fixed with regressions: stranded queues, shared-drain wake scheduling, newest-history retention, and historical result navigation. All four review threads have replies and are resolved. Fresh exact-head Greptile review is APPROVED and all 15 required checks pass.
  • Complete local suite on immutable final head a8d8630: 5086 passed / 81 opt-in skips / 0 failures, 5167 tests across 301 files (857.59 seconds).

Restart tests reopen journals and explicitly seed an interrupted claim; they do not certify physical power loss. Models, guest protocol and hypervisor input are fixtures. Live guest/account/SSH/sudo/subscription/native-device evidence and owner-host adoption remain separate (#431/#432). No upstream runtime/dependency/source was imported.

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no new actionable issue was found.

Summary

Automatically continues the original task after a needs-you hand-back, without another owner message.

  • A resumed computer hand-back starts the same task again.
  • Needs-you cards show each continuation and open its result.
  • The desktop lease test uses a shorter temporary folder.

All four earlier findings are addressed: stranded queues no longer block scheduling, each wake checks continuations, bounded history retains the latest progress, and older results load through the guarded request endpoint.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Owner hands computer back] --> B[Durable resumed event]
  B --> C[Per-card continuation binding]
  C --> D{Original work may continue?}
  D -->|No| E[Show hold or stopped state]
  D -->|Yes| F[Queue fresh request under original grant]
  F --> G[Fresh session on original computer]
  G --> H[Guard model calls and tools]
  H --> I[Commit result and outcome delivery]
  I --> J[Show continuation result]
Loading

Reviews (2) · Last reviewed commit: "fix(computers): keep continuation schedu..." · Reviewed by Greptile

Comment thread src/s16/computers/continuation.ts Resolved
Comment thread src/s15/composition.ts Resolved
Comment thread src/s16/web/ComputerNeedsYouCard.tsx Resolved

Copy link
Copy Markdown
Owner Author

@greptileai please re-review exact head a8d8630c2a2edb16998b2a62a28110a5f527a7f0. All four inline findings have concrete fixes, evidence-backed replies and resolved threads. New regressions cover stranded ordinary queues after restart, a held unrelated conversation, nine successive handoffs and opening a retained result after 34 newer requests through the guarded endpoint. Continuation 29 tests, desktop lease 21 tests, typecheck/provenance and native English/Thai 2 tests (116 assertions) pass. Exact-head required CI passes; the complete local suite is still running and will be recorded before merge.

@chayapats
chayapats merged commit 48c29b9 into main Nov 17, 2026
15 checks passed
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.

[Frontier] [CONT16-01] Continue original work automatically after needs-you hand-back

1 participant