From b93ce1db50598611939f0df8f2d53fd30e1059e5 Mon Sep 17 00:00:00 2001 From: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com> Date: Wed, 11 Nov 2026 22:17:39 +0000 Subject: [PATCH 1/2] release: pin the chock 1.1.0 engine 2f3be6d in the README The README install line moves from a6ec2f3 to the final 1.1.0 engine commit 2f3be6d04349a7ec433657e16a294efc62b51d4f. No other occurrence of the old sha exists in the repo. Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fd6fbb..e51ab68 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Tiers: `commit` is a git hook or CI gate that exits non-zero. `in-agent` is the chock is on PyPI, but the release there (0.15.2, 30 Sep 2026) is older than the engine this page describes. Install the frozen engine from its commit (Python 3.11 or newer): ```bash -pip install "chock @ git+https://github.com/open-coder-ai/chock@a6ec2f3603da832ed43fabace95504e5e13b013b" +pip install "chock @ git+https://github.com/open-coder-ai/chock@2f3be6d04349a7ec433657e16a294efc62b51d4f" ``` ### Two ways to adopt it From af48717a5a08d546abdd0236f7a9733c8965adf8 Mon Sep 17 00:00:00 2001 From: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com> Date: Wed, 11 Nov 2026 17:23:31 -0500 Subject: [PATCH 2/2] release: sync the compiled policies for chock at 2f3be6d04349 Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com> --- .chock/bin/gate.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.chock/bin/gate.py b/.chock/bin/gate.py index f3af6e6..41abf26 100755 --- a/.chock/bin/gate.py +++ b/.chock/bin/gate.py @@ -1302,6 +1302,7 @@ def _verdict(result: GateResult, declared: str, level: str = ROLLOUT_ENFORCE) -> _CUSTOMISE_POINTER = ( "A person customises this policy's rules in .agents/policies/{policy}/manifest.yaml; an agent cannot loosen them." ) +_SCRIPT_KIND = "script" def _for_agent(text: str) -> str: @@ -1331,10 +1332,15 @@ def _reason(result: GateResult, spec: dict, event: str = "commit", policy_id: st return "\n".join([*matches, _summary(result, policy_id), policy]) +def _may_waive(spec: dict, event: str) -> bool: + """Whether the policy can honour a waiver: an `allowlist_pragma`, or a script that reads its own.""" + return spec.get("kind") == _SCRIPT_KIND or bool(_waiver_pattern(spec.get("params") or {}, event)) + + def _report_refusal(result: GateResult, spec: dict, judged: str, signal: str | None, policy_id: str | None) -> None: reason = _reason(result, spec, judged, policy_id) print(_encodable(ci_inert(reason) if judged == "ci" else reason, sys.stderr), file=sys.stderr) - if judged == AGENT_COMMIT_EVENT and signal and _waiver_pattern(spec.get("params") or {}, judged): + if judged == AGENT_COMMIT_EVENT and signal and _may_waive(spec, judged): print(_AGENT_COMMIT_NOTE.format(signal=signal), file=sys.stderr)