You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 16d4cfc
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(replay): pass the Maestro script-trust flag as a command input (#2663 PR A) (#2675)
* refactor(replay): pass the Maestro script-trust flag as a command input
Part of #2663. The next step of PR A: the replay unit stops reading
`req.internal`. No file moves, no behavior change.
- `ReplayCommand` gains a `publicNetworkOnly?: boolean` field. The daemon
handler computes it from the request's private half and passes it in, so
the Maestro engine decides script trust from an explicit command input
instead of reaching into `req.internal`, mirroring the #2652 pattern.
- `session-replay-maestro-runtime.ts` reads the field once and derives both
engine inputs from it: `trustedScripts: !publicNetworkOnly` for
`executeMaestroFlow`, and the plain `publicNetworkOnly` port option. The
evalScript-sandbox rationale comment moved to the field computation so the
security reasoning stays with the decision.
- The flag threads to the per-test-case `runReplayCommand` in the replay-test
runner, so Maestro flows under `replay test` keep the same trust decision.
- One direct-entry test sets the new field the way the handler does; its
remote-vs-local assertions still exercise the engine input.
This retires 2 of the 3 `req.internal` reads #2668 flagged. The remaining one
(`resolvedSessionScope` in the action runtime) folds an `open` dispatch's
implicit caller scope and its fallback `resolveSessionScope(req)`, and the
`SessionScope` union it carries is shared with the session-lifecycle and
snapshot families — so it moves with the dependencies bag in the next PR A
slice, not here. `internal` is still *written* into nested dispatch (that is
daemon mechanics, not a unit read), so the Maestro envelope is unchanged.
* test(replay): cover script-trust mapping at every entry point
* test(replay): cover both script-trust routes through their handlers
0 commit comments