Skip to content

Commit 8d5bc8b

Browse files
committed
refactor(replay): declare the dispatch options once in contracts
The daemon's request-private half now extends ReplayDispatchOptions from @agent-device/contracts/replay and the replay port emits the same type, so a key renamed on either side fails to compile. The Maestro mapping keeps its satisfies guard. SessionScope and DaemonInstallSource lose their aliases, doc blocks sit above the functions they describe, and the handler test pins the private-half merge order. Rebased onto main. Main threads `publicNetworkOnly` from the handler into the Maestro runtime port and pins it on `ReplayCommand`, which this commit now declares once in contracts: main's explicit threading stays, the duplicate `publicNetworkOnly?: boolean` member the merge left behind goes, so the contract stays `?: true`. Main's three "a local request is trusted" assertions move from `false` to absent, which is how the envelope shape says local. The handler trust-mapping test hoists its replay-facade doubles, because the daemon importer of the facade now reaches them before a plain `const` initializes.
1 parent 9fa23c4 commit 8d5bc8b

41 files changed

Lines changed: 338 additions & 214 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
appId: com.example.app
2+
---
3+
- evalScript: ${output.sum = 1 + 2}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"type":"replay_test_attempt_start","ts":"2026-09-19T14:27:51.710Z","replayPath":"/tmp/agent-device-test-run-23838-sCm2rx/agent-device-maestro-remote-test-faJ9EM/01-flow.yaml","session":"default:test:req-maestro-test-wire-true:1-01-flow:attempt-1","requestId":"req-maestro-test-wire-true:test:1:01-flow.yaml:attempt:1"}
2+
{"type":"replay_test_attempt_stop","ts":"2026-09-19T14:27:51.712Z","session":"default:test:req-maestro-test-wire-true:1-01-flow:attempt-1","ok":true,"timedOut":false,"durationMs":2}
3+
{"type":"replay_test_finalize_start","ts":"2026-09-19T14:27:51.712Z","session":"default:test:req-maestro-test-wire-true:1-01-flow:attempt-1"}
4+
{"type":"replay_test_finalize_stop","ts":"2026-09-19T14:27:51.712Z","session":"default:test:req-maestro-test-wire-true:1-01-flow:attempt-1","ok":true,"durationMs":0}
5+
{"type":"replay_test_cleanup_start","ts":"2026-09-19T14:27:51.712Z","session":"default:test:req-maestro-test-wire-true:1-01-flow:attempt-1"}
6+
{"type":"replay_test_cleanup_stop","ts":"2026-09-19T14:27:51.712Z","session":"default:test:req-maestro-test-wire-true:1-01-flow:attempt-1","ok":true,"durationMs":0}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
appId: com.example.app
2+
---
3+
- evalScript: ${output.sum = 1 + 2}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
file: /tmp/agent-device-test-run-23838-sCm2rx/agent-device-maestro-remote-test-faJ9EM/01-flow.yaml
2+
session: default:test:req-maestro-test-wire-true:1-01-flow:attempt-1
3+
attempt: 1/1
4+
status: passed
5+
replayed: 1
6+
healed: 0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
appId: com.example.app
2+
---
3+
- evalScript: ${output.sum = 1 + 2}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"type":"replay_test_attempt_start","ts":"2026-09-19T14:27:51.713Z","replayPath":"/tmp/agent-device-test-run-23838-sCm2rx/agent-device-maestro-remote-test-faJ9EM/02-flow.yaml","session":"default:test:req-maestro-test-wire-true:2-02-flow:attempt-1","requestId":"req-maestro-test-wire-true:test:2:02-flow.yaml:attempt:1"}
2+
{"type":"replay_test_attempt_stop","ts":"2026-09-19T14:27:51.714Z","session":"default:test:req-maestro-test-wire-true:2-02-flow:attempt-1","ok":true,"timedOut":false,"durationMs":1}
3+
{"type":"replay_test_finalize_start","ts":"2026-09-19T14:27:51.714Z","session":"default:test:req-maestro-test-wire-true:2-02-flow:attempt-1"}
4+
{"type":"replay_test_finalize_stop","ts":"2026-09-19T14:27:51.714Z","session":"default:test:req-maestro-test-wire-true:2-02-flow:attempt-1","ok":true,"durationMs":0}
5+
{"type":"replay_test_cleanup_start","ts":"2026-09-19T14:27:51.714Z","session":"default:test:req-maestro-test-wire-true:2-02-flow:attempt-1"}
6+
{"type":"replay_test_cleanup_stop","ts":"2026-09-19T14:27:51.714Z","session":"default:test:req-maestro-test-wire-true:2-02-flow:attempt-1","ok":true,"durationMs":0}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
appId: com.example.app
2+
---
3+
- evalScript: ${output.sum = 1 + 2}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
file: /tmp/agent-device-test-run-23838-sCm2rx/agent-device-maestro-remote-test-faJ9EM/02-flow.yaml
2+
session: default:test:req-maestro-test-wire-true:2-02-flow:attempt-1
3+
attempt: 1/1
4+
status: passed
5+
replayed: 1
6+
healed: 0
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
appId: com.example.app
2+
---
3+
- evalScript: ${output.sum = 1 + 2}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"type":"replay_test_attempt_start","ts":"2026-09-19T14:27:51.718Z","replayPath":"/tmp/agent-device-test-run-23838-sCm2rx/agent-device-maestro-remote-test-QE9WSU/01-flow.yaml","session":"default:test:req-maestro-test-wire-undefined:1-01-flow:attempt-1","requestId":"req-maestro-test-wire-undefined:test:1:01-flow.yaml:attempt:1"}
2+
{"type":"replay_test_attempt_stop","ts":"2026-09-19T14:27:51.718Z","session":"default:test:req-maestro-test-wire-undefined:1-01-flow:attempt-1","ok":true,"timedOut":false,"durationMs":0}
3+
{"type":"replay_test_finalize_start","ts":"2026-09-19T14:27:51.718Z","session":"default:test:req-maestro-test-wire-undefined:1-01-flow:attempt-1"}
4+
{"type":"replay_test_finalize_stop","ts":"2026-09-19T14:27:51.719Z","session":"default:test:req-maestro-test-wire-undefined:1-01-flow:attempt-1","ok":true,"durationMs":1}
5+
{"type":"replay_test_cleanup_start","ts":"2026-09-19T14:27:51.719Z","session":"default:test:req-maestro-test-wire-undefined:1-01-flow:attempt-1"}
6+
{"type":"replay_test_cleanup_stop","ts":"2026-09-19T14:27:51.719Z","session":"default:test:req-maestro-test-wire-undefined:1-01-flow:attempt-1","ok":true,"durationMs":0}

0 commit comments

Comments
 (0)