Skip to content

test(computer): an agent on a computer sets off triggers and wakes for world events as the clock jumps - #718

Merged
earakely-scale merged 2 commits into
mainfrom
edgararakelyan/triggers-on-a-computer-env
Nov 16, 2026
Merged

earakely-scale merged 2 commits into
mainfrom
edgararakelyan/triggers-on-a-computer-env

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Part of FD-5421.

Why

No test ran triggers on a multi env that has a computer. The HB2 spike checked that combination for the Hark bench, and this test keeps what it found from regressing.

What it pins

One slow-tier test, tst/integration/computer/computer_triggers_test.py, on a multi env of the items MCP server and the shipped desktop computer. A scripted agent calls as role person, and the real advance-to-next-event hook moves the frozen clock.

  • Computer calls set off triggers. A desktop_computer_click sets off an action trigger.
  • Input calls re-run state checks; others don't. A pointer move re-runs a state check. A write by an unwatched role doesn't, and neither does a read-only desktop_computer_wait.
  • The hook wakes the agent at the right times.
    • At 10:00 Denver, for a world event: a time trigger writes the mail as world and sends a notify on Mail.
    • At 12:00, for a check the agent scheduled.
    • It then passes a counterpart's 18:00 fire that his working hours defer, jumps to 09:00 the next day when they open, lets him act, and ends with nothing_can_wake_the_agent.
  • The computer follows the clock. Its session clock shows the gateway's time after every jump.
  • The env trajectory has virtual time. It records the agent's computer calls and the counterpart's calls with their virtual_time.

The spike's other findings are in the design page, Triggers on Computers, and in FD-5944 and FD-4151. This PR changes no behaviour.

Testing

pytest tst/integration/computer/computer_triggers_test.py passed on a Linux host with Docker and the local registry. It took 1 min 56 s with the desktop image already composed, and 5 min 26 s composing it from scratch; the slow tier caches computer images.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds a slow integration test for computer calls, triggers, scheduled checks, and clock jumps.

  • A computer integration test follows triggers as virtual time jumps.

Reviews (2) · Last reviewed commit: "test(computer): let the click's state ch..." · Reviewed by Greptile

…r world events as the clock jumps

A multi env of the items server and the desktop computer: the agent's computer calls set off action and state
triggers (input calls only), a world event and a scheduled check wake it through the advance-to-next-event hook,
a counterpart waits for his working hours, and the computer's clock follows each jump.

Part of FD-5421.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale marked this pull request as ready for review November 16, 2026 19:59
@earakely-scale
earakely-scale requested a review from a team as a code owner November 16, 2026 19:59
…ed write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 3cac69f into main Nov 16, 2026
61 of 63 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/triggers-on-a-computer-env branch November 16, 2026 20:52
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