fix(hooks): deploy hook script runtime context#2028
Conversation
APM Review Panel -- PR #2028Ship recommendation: APPROVE What this PR doesCloses a runtime crash: hook scripts that CorrectnessThe fix is implemented across 6 focused private helpers feeding two call sites SecurityPath traversal is guarded at every materialisation point via Test evidenceTwo new integration tests run Minor suggestions (non-blocking)
Panel: python-architect, supply-chain-security, test-coverage, performance, devx-ux, cli-logging, ceo-synthesizer |
There was a problem hiding this comment.
@WilliamK112 Panel review complete. All findings are non-blocking nits. The PR needs rebase and fix CI and potential conflicts
Summary
./ponytail-configare present after install.package.jsoninto the deployed hook runtime directory so hook scripts keep the package module semantics instead of inheriting the consumer project'spackage.jsontype.type=module, proving the deployed CommonJS hook can run and load its sibling module.Closes #2023.
Preflight
Validation
uv run --extra dev pytest tests/integration/test_hook_script_runtime_deployment_e2e.py -q(2 passed)uv run --extra dev pytest tests/unit/integration/test_hook_integrator.py tests/integration/test_hook_script_runtime_deployment_e2e.py tests/integration/test_hook_routing_combined_manifest_e2e.py tests/integration/test_hook_integrator_copilot_casing_e2e.py tests/integration/test_integrators_hooks_execution.py tests/integration/test_integrators_hooks_phase3c.py -q(444 passed)uv run --extra dev ruff check src testsuv run --extra dev ruff format --check src testsgit diff --checkuv run --extra dev pytest -qwas also attempted; this repo's default marker configuration skipped 29592 tests and deselected 173, so the targeted hook suite above is the relevant behavior evidence.