Commit d840e53
agentHost: cover the rejected-RPC path of the script-safety fail-closed guard
`session.options.update` reports `success: true` for any patch the runtime
accepts and signals real problems by failing the request, so a rejected RPC —
not a `success: false` body — is the path a genuine enablement failure takes.
Both existing fail-closed tests drove the `success: false` branch, leaving the
`catch` that logs the reason and aborts the launch uncovered.
Adds a test that rejects the update and asserts the launch fails closed, the
original error propagates, and the orphaned session is disconnected.
Also drops the managed rules from the success test. They no longer gate the
behavior, so passing a `deny` rule implied a dependency that is exactly the one
the fail-closed change removed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c0398af commit d840e53
1 file changed
Lines changed: 34 additions & 3 deletions
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
887 | | - | |
888 | | - | |
889 | | - | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
890 | 891 | | |
891 | 892 | | |
892 | 893 | | |
| |||
966 | 967 | | |
967 | 968 | | |
968 | 969 | | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
969 | 1000 | | |
970 | 1001 | | |
971 | 1002 | | |
| |||
0 commit comments