codex/codex-rs/app-server/tests
jif 2bf2bdf82c Bind plugin hook approval to plugin contents (#54619)
## Why

A plugin's scripts can change without changing its hook declaration. Declaration-only approval therefore lets changed plugin code run under an existing hook approval.

## What changed

- Fingerprint plugin bundle contents and include the content hash in the approval value returned by `hooks/list`. Persist it as `trusted_content_hash`, keeping `trusted_hash` compatible with older clients.
- Verify contents before each command or MCP hook execution, within the hook's timeout, and require renewed approval when approved contents change.
- Migrate legacy declaration-only approvals to a shared, immutable content baseline per plugin and config home.
- Exclude generated Python bytecode, `.venv`, and `.egg-info` entries from fingerprints. Run app-server hook listing on blocking tasks.

## Testing

Extend integration coverage for plugin upgrades and rollbacks requiring approval, same-turn script changes preventing further hook execution, shared legacy approval baselines, and generated Python artifacts preserving trust.

GitOrigin-RevId: faaf7658210d8adb2534ddd614c72ec993920840
History 2026-10-16 14:38:19 +00:00
..
common Add experimental thread item lookup by ID (#52637) 2026-10-09 16:50:24 +00:00
suite Bind plugin hook approval to plugin contents (#54619) 2026-10-16 14:38:19 +00:00
all.rs [codex] Use expect in integration tests (#28441) 2026-06-15 21:53:47 -07:00
prompt_prefix.rs Add an app-server prompt prefix compatibility test (#51857) 2026-10-07 22:21:33 +00:00