From d93bcc5dedf196db308bfb718ce62932cf5e9a5e 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:48 +0000 Subject: [PATCH 1/2] Pin README install to engine 1.1.0 final (2f3be6d0) Move the chock install pin from a6ec2f3603da to the final 1.1.0 engine commit 2f3be6d04349a7ec433657e16a294efc62b51d4f. 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 247e170..d165049 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 ee0faa80f6325d71835aa93931e7d4d940c2a6fd Mon Sep 17 00:00:00 2001 From: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com> Date: Wed, 11 Nov 2026 17:28:49 -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 100644 --- 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)