Files
orca/config
Neil 71ebf751a3 fix(hooks): run worktree setup only when its content matches the approved script (#37977)
* fix(hooks): run worktree setup only when its content matches the approved script

Clients may send approvedSetupHash with a create. After git worktree add the
host hashes the created branch's shared setup and default-tab commands with
the prompt's function; on a difference it skips them and returns
setupTrustMismatch with the branch content. Creates without a hash (older
clients, CLI, mobile, orchestration) and older hosts behave as before.

* fix(hooks): send the approved setup hash and re-prompt on a changed branch

The composer and direct work-item creates send the hash of the setup content
the user approved (empty content included; none under repo-wide trust or
local-only policy). When the host reports different branch content, show a
setup-skipped toast and the existing trust prompt with that content.

* test(hooks): hash the prompt's and the host's orca.yaml from the same fixture

Covers CRLF and BOM primary checkouts, the plain-HTTP digest, the hash a
runtime host reports to remote and mobile clients, run-both and local-only
policies, creates without a hash, and pins the digest so a format change is
deliberate.

* style(worktrees): keep the creation flow under the line limit
2026-11-06 14:58:05 -08:00
..