Skip to content

chock 1.2.0 - #386

Merged
jothimani-rajendran merged 76 commits into
mainfrom
release/1.2.0
Nov 18, 2026
Merged

jothimani-rajendran merged 76 commits into
mainfrom
release/1.2.0

Conversation

@jothimani-rajendran

@jothimani-rajendran jothimani-rajendran commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What

The combined pull request for chock 1.2.0. Each item was built on its own branch with its own draft PR, reviewed there, and merged into release/1.2.0. This is the one PR to merge; the item PRs are closed.

Items

Reach and proof (previews)

Gate engine

Docs and release

Checks

  • quickstart fails until the catalog tag v1.2.0 exists, because of W1-B. It is not a required check; it turns green once chock-catalog is released and tagged.
  • The required checks (validate 3.11 and 3.12, binary, acceptance (tier 1), dco) were green on every head before R-1; their result on the R-1 merge is this PR's current run.

Claims

No surface is described as enforcing more than it installs. doctor --live, managed emit and --floor each state what they do not prove; managed emit and --floor are previews.

sync writes ">=<major>.<minor>,<<major+1>" derived from the running
engine; `chock check --only verify` fails in one line when the running
engine is outside the lock's constraint, passes the legacy ">=0.1,<0.2"
with a note to re-sync, and fails a missing or unparseable constraint.
No new dependency: version tuples are compared by hand.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
With no --ref and the default catalog, chock add resolves the tag
v<engine version> to its commit, fetches that commit, prints both, and
records source_commit and source_ref in chock.lock. A missing tag fails
with one line naming --ref <40-hex commit> or --ref main; there is no
silent fallback to the default branch. --ref and other --from sources
are unchanged.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…t-from)

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…rmless command

For each target doctor lists, read the pre-tool commands from the very
config file the client reads, run them as written from the repo in that
client's shell, and feed that client's own pre-tool payload. The canary is
the first refusing eval case of the first guard the hook runs (there is no
policy-independent refusal in the runtime that writes no state); it must be
refused, by that policy. A harmless command must be allowed. The probe runs
at log level off and in its own session, whose state file it removes.

The runtime payloads and wire denies move from tests/runtime_payloads.py
into package data; the test module re-exports them.

Part of 1.2.0 (W1-D).

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…bols on a non-UTF console

IR-F75: every manifest_default print site (index builder, registry scan,
compiler, toggles, validation report) goes through manifest.warn_defaults,
which names the artifact and says each (artifact, field) pair once per
command. The index builder's copies had no path; the validation report
skips the ones already printed and dedupes its own findings.

IR-F76: output.py decides once whether a stream is UTF. On any other stream
chock's own symbols (U+2026, em dash, arrows, section sign, box drawing)
print as ASCII; the eval table's truncation uses output.ellipsis(). Other
text is left to the stream's encoder as before.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
lock.py was 357 lines, over the 300-line review budget that
tests/test_repo_standards.py::test_no_file_exceeds_line_budget enforces.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The lookup now matches only refs/tags/<tag> and its peeled ^{} line, so a
ref ending in the same path cannot stand in for it. Adds a lightweight-tag test.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…ngine's runtime

Review finding: --live ran every pre-tool command in the client's hook
file, so a cloned repo's foreign hook strings would run with no trust
prompt. Now an entry runs only when it is byte-equal to an entry this
engine's installer renders for the target (rendered into a scratch copy
from the repo's policies and compiled tree); others are counted in one
INFO row and never run. Nothing runs unless the launcher, the agent
runtime, the shared runtime and every vendored runtime are byte-equal to
what this engine renders. Plugin-route targets are skipped: their hook
commands cannot be re-rendered without the person's selection.

Part of 1.2.0 (W1-D).

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Reviewed by the orchestrator; chock#382 at 17a5e61, 26 of 26 check runs success.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Reviewed by the orchestrator; chock#383 at 80849b7, 26 of 26 check runs success (worker-reported).

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…s gates

The engine half of the server-side floor (W2-A1). The policy set, gate
programs and waiver lines come from the base ref; the installed engine's
runner judges base...head; no head file executes. Head gates that are new or
differ also run when declarative; head script gates are reported, not run.

- event ci-floor: a waiver counts only when the base has the line; ask
  refuses; script gates get `deleted` and a PATH/HOME-only environment
  (script payload contract version 2 in spec/gate-dsl.md)
- tamper rules from src/chock/data/tamper.json: hook-removed,
  gate-removed, gate-weakened, lock-pack-removed, runtime-removed,
  ci-step-removed; regeneration stays silent
- per-commit pass over merge-base..head with the base's content gates
- exit 0 clean, 1 refused, 2 undecided

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Reviewed and security-reviewed by the orchestrator; chock#384 at 9d4a7d0.
--live runs only hook commands byte-equal to what this engine renders, and
nothing when the launcher or a runtime is not this engine's.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
legible() runs on its own line first, so the audited sinks are unchanged
and their existing code-scanning triage stays attached.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The plugin index hash follows the runner source, which W2-A1 changed;
only --index-sha256 moves. spec/gate-dsl.md back to 300 lines.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…ls on a non-UTF console

Reviewed by the orchestrator; chock#385 at 1a60f55, all checks green including CodeQL (IR-F75, IR-F76).

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…ts bundle under --out

`chock emit --managed claude_code --out <dir>` writes, under <dir>/claude_code/
only: managed-settings.d/50-chock.json, a self-contained bundle per policy
(launcher, runtime, guard or gate, from the plugin route), deploy.json and
labels.json. Hook commands name the bundle by absolute path (--deploy-root);
every PreToolUse hook carries onFailure "block" and a 45 s timeout. Stop
hooks carry no onFailure: the vendor docs say it has no effect there.

The command refuses an --out that resolves inside a system path (symlinks
followed) and never writes into an existing <dir>/claude_code. --lock adds
allowManagedHooksOnly; allowManagedPermissionRulesOnly is never emitted.
Every label is best-effort (vendor-docs), unwitnessed; a new `managed`
witness surface holds the rows that may later say otherwise.

The compile-time managed-setting stub is removed: it wrote a shape Claude
Code does not read. Native permissions.deny rules are not emitted yet.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Rework after the adversarial review (rulings 1-10):

- history pass fails closed: a truncated range or a blob it cannot read
  is undecided, naming commit and path; binary blobs are judged (non-utf-8
  read as latin-1); content gates load from both ci-gate and git-hook
- own-folder exemption only for a pack whose chock.lock entry changed,
  listed under floor/pack-changed with its paths
- hook identity is (event, matcher, type, command); only the index pin is
  normalised; Claude Code's disableAllHooks and a committed
  .claude/settings.local.json carrying hooks are refused; other vendors
  are printed as not covered
- every .chock/bin file and the floor's workflow must equal the
  merge-base or this engine's render (indexes re-rendered from the head's
  policy data); anything else is refused by name
- at the floor a waiver counts only on a line the PR leaves unchanged
- a script gate that crashes or cannot run is undecided whatever the rollout
- a changed compiled gate needs a lock change for its pack
- every tamper rule compares the merge-base with the head
- diffs read with --text; a gate naming a path outside the repository is
  undecided; a base with no gates says so
- the 36 review attacks are regression tests asserting the owed exit code

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…dmin, in exec form

W2-B1r, the eight review rulings:

- Every managed hook is exec form: `command` is the required absolute
  `--python`, `args` run an inline bootstrap on the bundled runtime with
  `-I`. No git, sh, launcher, PATH lookup or `chock.python` stands in
  between; the bundle no longer ships launch.sh.
- `--on-failure block|allow` is required. block sets onFailure on
  PreToolUse and makes a missing interpreter or bundle file a refusal;
  allow sets neither and lets the call through with a note. deploy.json
  and the report state the consequence. The matcher-less repo-stop entry
  is no longer emitted. The Stop gate notes and exits 0 when it cannot run.
- The output guard refuses filesystem roots and more system trees, folds
  case on macOS and Windows, and normalises \\?\, \\.\ and admin-share
  spellings. --out naming a file, a non-UTF-8 policy file and a missing
  --repo are one-line refusals.
- deploy.json states admin ownership of the bundle and interpreter, the
  repository stop, the runtime's git use, and every documented --lock
  effect. Docs no longer say the compiler writes managed-settings.json or
  that a user cannot override managed settings; cli-reference gains emit.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…ad (W2-A1v2)

The floor stops judging how a guardrail file changed and reports that it changed.

- base must be an ancestor of head (pass the merge result), else exit 2; every read comes from
  the tree diff base..head (--no-renames, --no-ext-diff, --no-textconv) and the commits in it;
  no merge-base is computed.
- src/chock/data/control_plane.json lists the guardrail paths, matched case-blind; any change to
  one is floor/control-plane-changed, listed first (text and SARIF). The base's
  floor.control_plane decides: refuse (default, exit 1) or listed (exit 0). The base may add or
  remove patterns; the head's config is never read.
- Deleted: tamper.py, tamper_files.py, tamper_hooks.py, tamper.json, the lock-entry exemption,
  the engine-render exception, the head policy set.
- Content gates are the base's and never judge a control-plane path. A waiver counts only on a
  line unchanged in both base and head.
- History pass: one reader (latin-1, utf-8 when valid, utf-16 both orders and alignments for a
  blob with a NUL; lines split on \n only); a finding carries its line digest, so nothing is
  re-counted. The base's rollout and declared action apply to history findings too.
- Every proof from both adversarial passes is a regression test asserting the owed exit.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…gets

The managed emit tests move into two files over a shared helper module,
each under the 300-line budget; the two doc pages are reflowed to fit
theirs. The surface-doc tests pin the corrected wording ("neither compiled
nor installed", "not installed by chock") and now also check that the
compiler has no managed-setting emitter. The README stays in its word
budget.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…json says what happens

Ruling 9: a Python guard, the gate runner and a script gate now start under -I -B -X utf8 through
budget.isolated_child, with the script's own folder put on sys.path explicitly and every PYTHON*
variable removed from the child's environment. A hostile PYTHONPATH, PYTHONHOME, PYTHONPLATLIBDIR
or PYTHONSAFEPATH no longer passes the canary or turns its refusal into an ask.

Rulings 10-12: deploy.json gains stop_files, client_versions (quoted, dated) and not_covered; the
managed bootstrap checks every bundled file, so a missing guard or chock_shellparse follows
--on-failure. Ruling 13: odd deploy-root and python paths, and a normalisation table.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Ruling 9 on the project and plugin routes: the outer interpreter launch.sh starts no longer reads
PYTHONPATH, PYTHONHOME, PYTHONPLATLIBDIR or PYTHONSAFEPATH, or the user site; the probe runs under -I.
-E -s rather than -I: the launcher also starts scripts (chock_bundle.py) that import from their own
folder, which -I's safe path drops. The `-m chock` form is left as it was: it needs site-packages.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…ads (W2-A1v2.1)

L1: the default control-plane list covers the whole folder of every agent
chock or agentseam writes into, plugin folders, .mcp.json, .vscode/settings.json,
.vscode/mcp.json, .env and .env.*; a test checks it against the engine's own
data (vendor hook files, permission files, mcp_clients.json, plugin stores,
the CI installer). Root instruction files stay out.
L2: a diff entry at a parent folder of a pattern matches (symlink, gitlink);
a symlinked control-plane folder's in-repo target, at base or head, is
control plane. Tree data only.
L3: a blob git cannot read at base or head is undecided, never "".
L4: --repo resolves to the top level.
L5: every run states the mode, pattern count and the base's additions and
removals; a removal naming no default pattern is undecided; the history pass
uses --no-renames; --floor help carries the V8 caveat.
L6: help and changelog state the list's limits and the rename cost.
L7: the review-3 proofs are regression tests asserting the owed exit.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…eters in the hook runtime

Reviewed by the orchestrator after two adversarial passes; chock#388 at 0cf04b3.
The managed hook takes its interpreter from the admin, not from git config or
PATH; every child interpreter the runtime starts is isolated on every route.
The vendored runtimes and compiled tree need the owner's sync.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>

Copy link
Copy Markdown
Collaborator Author

validate (3.11, 3.12, 3.13) is red at b965412, and that is expected until the owner sync runs on this branch.

Every other check on this head passed on the item's own PR; the full suite was run locally there (5658 passed, 8 failed, all eight owner-sync and named in the report).


Generated by Claude Code

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…base-sourced gates

Reviewed by the orchestrator after three adversarial passes; chock#387 at e66db5c.
The floor judges a pull request's merge result with the base's gates, executes no
head file, and names every change to a guardrail path instead of judging it.
A fourth adversarial pass with no blocker is a release gate for 1.2.0.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…shes, doctor and rollout pointer, repo-route witness rows)

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
A file git reports as renamed (-M) is judged against its old path's
content, for script and content_regex gates, at commit, at the turn's
end and on the CI range. Copies stay judged as new. The floor context
keeps --no-renames and its own readers.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
… (E-2)

A finding may carry a tier (block, ask, warn). When every finding the
change adds carries a known tier, the verdict is the highest among them;
otherwise the exit code decides, as before. An old block-tier finding in a
touched file no longer turns a new ask-tier finding into a block.

spec/gate-dsl.md documents the field; tests/test_script_gate_tiers.py
covers commit and agent write.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…d (E-2)

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>

Copy link
Copy Markdown
Collaborator Author

validate is red at 0637595 for one reason: compiled_drift on .chock/bin/gate.py. The two engine fixes merged here (the rename baseline and the verdict from new findings) change the gate runner, and the compiled copy, the vendored gate and five plugin goldens are generated from it. Those files are owner-only, so the fix is the owner's sync on this branch (chock sync --repo ., then the goldens), not a change from this PR's items. The other test failures expected on the full run are the same seven derived-copy tests.


Generated by Claude Code

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Adds v2/where-chock-sits.png, rendered by render.mjs from
where-chock-sits.json: you, your agent, the three points where Chock
checks an action, the two outcomes and five things it stops. No prose
added, so the README stays within its word budget. docs/architecture.md
shows the same figure above the existing one. Tests tie the figure to
its data file, the witness ledger and both docs.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The policy flags a floating image tag (no tag, latest, stable, edge), not
an unpinned digest. Reword the strip line and re-render the PNG.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Shows the agent's generic parts (model, agent loop, context, hook point,
tools) between you and your repository, with Chock's four connectors:
rules block in context, hook point, git commit, CI. Same data file and
renderer; tests assert the four connectors, their scopes and the tests
that prove them.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Nine points in session order, each with its scope and a proving test:
session start, rules block, before and after a tool, end of the turn,
MCP gateway, git commit, git push, CI. The test derives the list from
the engine (surfaces, git script events, agent events in use) and fails
when they differ. No prompt-submit hook is wired, so none is drawn.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
… the figure

The paragraph on the CI gate's SARIF output, the baseline step and chock mcp
moves word for word to docs/architecture.md (not stated there before);
the README keeps the Architecture link at the end of the "write your own"
paragraph. The figure gains a git push box and its result label sits on
the return arrow. The figure code moves to where-chock-sits.mjs to keep
render.mjs under the 300-line budget.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Each point where Chock meets the agent or the repository is a marker on the
arrow or box where it happens (solid: every agent; outlined: where the agent
has hooks), with pre-tool and post-tool as separate points and an
allow/block fork on pre-tool. The legend is gone, the stops are five short
chips, and the nine points with what each does are listed in
docs/architecture.md under the figure.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…acts

The harness markers are agentseam.contract.EVENTS exactly. A filled accent
marker is a point Chock acts on today (the agentseam events src/chock uses,
plus rules, MCP gateway, commit, push, CI) and is joined to the Chock box;
a hollow grey one is exposed but unused. A test asserts both sets.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…mple

The five stops are examples. A dashed "+ your own policy" chip with chock new
policy under it shows a reader can add one; a test checks the chip is not a
catalog policy and that the command exists.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Two rows of plain-word steps with one repeat loop; diamonds on the arrows
are the hook points (filled: Chock runs here today; hollow: a hook a policy
of your own can use). No Chock box and no connector lines. The agentseam
events off the main path are a More hooks row. The layout is computed by
flow, and a test checks that no two shapes are closer than 12 px.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Every diamond on the path carries its hook name in small grey text, so
pre-tool and post-tool are two named points. The repeat loop starts after
post-tool and ends at the model step, so both are inside the loop and stop
is outside it. The external-tools tag is joined to the tool step by a short
line with the MCP gateway diamond on it. The empty band is gone.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
The README picture is now the harness: Input, Core and Execution cards
with arrows between neighbours, beside the repository and pipeline. Each
card carries the hooks of that component as badges, filled where Chock
runs today and hollow where a policy of your own can run; the model has
none. The ordered path moves to docs/architecture.md (session-path.png).
Tests cover both figures.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
External tools sits beside Tools, so the row below is gone, and cards
fit their content. Session now points at the agent loop (opens) and the
repository cards are joined by arrows. Every badge is one line; the
instructions badge is shortened and the writes arrow runs under the row.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…gs in

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…ld (E-1c)

A script gate's baseline for a file git reports as renamed is now its old
content judged at its old path, with the findings mapped back to the new
path. A finding keyed by the new name (a refused name) is therefore not in
the baseline and is refused; a content-only finding of a pure rename stays
old, as E-1 had it.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…t is old

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
…on release/1.2.0

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
pyproject.toml version 1.2.0 and every file that states chock's own
current version: CITATION.cff, action.yml default, README install lines,
SECURITY.md supported row (1.2.x), llms.txt, docs/installation.md,
docs/quickstart.sh and the social preview (svg and png, regenerated with
docs/assets/gen_brand_assets.py).

CHANGELOG.md is assembled with tools/changelog.py --assemble --write under
the heading "## 1.2.0 - 2026-11-18"; the folded changelog.d fragments are
deleted. No dependency change.

Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
Signed-off-by: Jothi Mani Rajendran <250249270+jothimani-rajendran@users.noreply.github.com>
@jothimani-rajendran jothimani-rajendran changed the title 1.2.0 working branch: first reach-and-proof previews (combined) chock 1.2.0 Nov 18, 2026
@jothimani-rajendran
jothimani-rajendran marked this pull request as ready for review November 18, 2026 13:11
@jothimani-rajendran
jothimani-rajendran merged commit 5088f2f into main Nov 18, 2026
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants