hx#182 is merged (bridge on the event bus, permissions = "extensions-only", claude tool events). This PR switches orch from "fail closed after the fact" to the real guard and proves it against the real hx binary.
orch guard config for every guarded run now also sets permissions = "extensions-only": in claude_cli mode a question is allowed only while a live tool_call extension answers it, so a dead guard denies instead of "continue".
The count check from #18 stays as an independent second line (claude lines vs tool_call events), now for the case that claude skips the permission prompt or an hx without #182 is used.
tests/fake_claude.py behaves like claude with --permission-prompt-tool: it asks mcp__hx__approve first and runs the tool only when allowed.
Verification (real hx binary at hx main f1b3ee0, fake claude):
control: profile without allow -> the fake claude really reads the secret (test is sensitive), mode claude_cli.
profile with allow: the Read is put on the bus, orch guard denies it BEFORE the tool runs; claude-read.txt does not exist, run needs-human policy:, audit has the deny written by the guard.
claude that never asks (flags ignored): the read goes through (control), orch notices after the fact: needs-human policy:.
dead guard (tests/dying_guard.py, starts, dies on the first event): without extensions-only the secret is read (control), with it nothing is read. Checked by hand first.
sh tests/all.sh exit 0, flake loop 5/5 under load.
Not verified: a real claude binary. hx#182's --settings permissions.ask flag is untested against it (the hx PR says the same); if real claude does not ask for reads, the count check still catches it after the fact, and the next step is --tools/--disallowedTools in claude_cli = [...] (claude 2.1.318 has them). The first real-claude run decides; orch audit shows what was asked.
Closes #17
hx#182 is merged (bridge on the event bus, `permissions = "extensions-only"`, claude tool events). This PR switches orch from "fail closed after the fact" to the real guard and proves it against the real hx binary.
- `orch guard` config for every guarded run now also sets `permissions = "extensions-only"`: in claude_cli mode a question is allowed only while a live `tool_call` extension answers it, so a dead guard denies instead of "continue".
- The count check from #18 stays as an independent second line (claude lines vs `tool_call` events), now for the case that claude skips the permission prompt or an hx without #182 is used.
- `tests/fake_claude.py` behaves like claude with `--permission-prompt-tool`: it asks `mcp__hx__approve` first and runs the tool only when allowed.
Verification (real hx binary at hx main f1b3ee0, fake claude):
- control: profile without `allow` -> the fake claude really reads the secret (test is sensitive), mode `claude_cli`.
- profile with `allow`: the Read is put on the bus, `orch guard` denies it BEFORE the tool runs; `claude-read.txt` does not exist, run `needs-human policy:`, audit has the deny written by the guard.
- claude that never asks (flags ignored): the read goes through (control), orch notices after the fact: `needs-human policy:`.
- dead guard (`tests/dying_guard.py`, starts, dies on the first event): without `extensions-only` the secret is read (control), with it nothing is read. Checked by hand first.
- `sh tests/all.sh` exit 0, flake loop 5/5 under load.
Not verified: a real `claude` binary. hx#182's `--settings permissions.ask` flag is untested against it (the hx PR says the same); if real claude does not ask for reads, the count check still catches it after the fact, and the next step is `--tools`/`--disallowedTools` in `claude_cli = [...]` (claude 2.1.318 has them). The first real-claude run decides; `orch audit` shows what was asked.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #17
hx#182 is merged (bridge on the event bus,
permissions = "extensions-only", claude tool events). This PR switches orch from "fail closed after the fact" to the real guard and proves it against the real hx binary.orch guardconfig for every guarded run now also setspermissions = "extensions-only": in claude_cli mode a question is allowed only while a livetool_callextension answers it, so a dead guard denies instead of "continue".tool_callevents), now for the case that claude skips the permission prompt or an hx without #182 is used.tests/fake_claude.pybehaves like claude with--permission-prompt-tool: it asksmcp__hx__approvefirst and runs the tool only when allowed.Verification (real hx binary at hx main f1b3ee0, fake claude):
allow-> the fake claude really reads the secret (test is sensitive), modeclaude_cli.allow: the Read is put on the bus,orch guarddenies it BEFORE the tool runs;claude-read.txtdoes not exist, runneeds-human policy:, audit has the deny written by the guard.needs-human policy:.tests/dying_guard.py, starts, dies on the first event): withoutextensions-onlythe secret is read (control), with it nothing is read. Checked by hand first.sh tests/all.shexit 0, flake loop 5/5 under load.Not verified: a real
claudebinary. hx#182's--settings permissions.askflag is untested against it (the hx PR says the same); if real claude does not ask for reads, the count check still catches it after the fact, and the next step is--tools/--disallowedToolsinclaude_cli = [...](claude 2.1.318 has them). The first real-claude run decides;orch auditshows what was asked.