Skip to content

fix(hooks): the commit gate decides by change class, and each leg runs once (opencharly/opencharly#602, #645, #498) - #660

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/pre-commit-change-class
Oct 24, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/pre-commit-change-class

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

What this closes. Three umbrella issues, all about the umbrella's own commit gate:

The change: the gate is DECIDED, and the decision has ONE owner. hooks/pre-commit-gate.sh
decides by CHANGE CLASS:

  • the self-test leg — the umbrella's own committed builders' --self-tests — is cheap
    (3.4 s measured 2026-10-24), and needs no binary, no project and no submodule, so it runs
    on every commit;
  • the pin check leg — 29 s measured 2026-10-24 over the umbrella's whole pin set — runs
    only when the staged diff moves a gitlink.

The change class is EXACT, not a heuristic. Every value the pin check compares is an
INDEX entry, and a checkout's HEAD can only disagree with the index when the diff moved it
— so a commit that moves no gitlink cannot violate it. The checkout DRIFT the same verb
also sees (a checkout dirty, or at another commit, caused by no commit) stays where the
rulebook puts it: charly task verify (AGENTS.md Part II #1).

Three defects die with the old code.

  1. The duplication — the charly-backed pair ran twice per commit, once in the binary
    branch and once under the banner. The gate is called ONCE now, and the fixture asserts
    that count, with a mutation arm that turns the gate red if a second call comes back.
  2. The needs_charly flag — only the NO-BINARY branch consulted it, so the
    binary-present branch ran BOTH legs on a diff that could violate neither; and the
    no-binary branch fell THROUGH to a run_charly with an EMPTY binary, so the hook died
    on a command-not-found. The no-binary path now fails LOUD only when the change class
    needs the pin check, and a docs-only commit in a fresh worktree PASSES.
  3. The main-clone binary fallback — deleted. It was a DIFFERENT source's build, and in a
    linked worktree it cannot load the project at all (R9: the binary equals the source).

The self-test set has one owner too. It used to exist only as the TEXT of the
self-test task, so the commit gate could reach it only through charly task self-test —
which needs the binary and a loadable project, and therefore could not run at all in a
fresh session worktree. It now lives in scripts/self-test.sh, and the task and the gate
both call that file, so the set of judged builders is declared once (R2).

One precision the old hook lacked. Git sets GIT_INDEX_FILE to a TEMPORARY index for a
path-limited commit (git commit <path>), and that temporary index — not the repository's
own — is the set of paths the commit carries. The old hook scrubbed GIT_INDEX_FILE before
computing the class, so a path-limited commit was judged on a SUPERSET of itself. The new
hook captures the index before the scrub and hands it to the gate, which reads the staged
diff from it.

file what it carries
charly.yml the self-test task calls the script; verify runs the script and the new gate, plus the new gate's self-test mode
hooks/pre-commit the driver: capture the index the commit carries, scrub the git vars, call the gate ONCE, then the node gates
hooks/pre-commit-gate.sh the change-class decision and the two legs — the ONE owner of the charly-backed pair
scripts/check-pre-commit-gate.mjs the gate's own assertion — static readings over the shipped text, plus FIRED assertions in a scratch git repository
scripts/self-test.sh the self-test SET, in one place, callable without the binary

How tested

The head and the base — the committed tree this body describes:

$ git rev-parse HEAD
dd23668804c03908dfdb167f301bd0fa33927fb0
$ git rev-parse origin/main
7359f159b0bcf68a3bb27fc18555e02a3675ba30

The worktree-local binary (R9 — binary equals source), never a shared install:

$ ./charly/bin/charly version
2026.297.0121

The gate, run live on the committed tree — the real builders' own self-tests, and the
skip the change class produces, printed by the gate itself:

self-test: scripts/sync-pin-evidence.sh --self-test
sync-pin-evidence: self-test OK (compact <path> <staged> <remote> <flag> rows both ways; coverage both directions; bounded_rows emits all under budget and >=1 + elision notice over budget; staged-gitlink reads the index + falls back to HEAD; evidence_legend states BOTH readings of a non-distro-* ! and the check that tells them apart)
self-test: scripts/sync-pr-body.sh --self-test
sync-pr-body self-test: fleet-scale (412-pin) rendered body = 41019 bytes (< 65536)
sync-pr-body: self-test OK (fleet-scale BODY — the umbrella's live submodule count, read from .gitmodules — carries the COMPLETE compact evidence table — every path named, no elision — and stays under the 65536 cap; the caller's evidence file keeps a convenience copy; neither names a CI run artifact; small input names its paths with no elision; the producer excerpt is verbatim for BOTH the retired per-pin and current summary shapes; the body carries the four required sections, the Change classification's change class + verification gate + attribution tier, and rule 7's two-line footer — the Agent: line directly above the italic Assisted-by trailer as the FINAL line, and exactly ONE literal 'Assisted-by:' in the body so squash_body.py's prose contract holds; an unset SYNC_AGENT fails loud, and the Agent: line is shown to TRACK its variable rather than a literal; a trailer with no (tier) fails loud; over-cap trips the hard guard; a .gitmodules with no submodule entry counts as 0 and reaches the floor guard's own message instead of aborting on grep's exit status)
self-test: scripts/sync-dispatcher.sh --self-test
sync-dispatcher: self-test OK (splice writes, steady-state passes, stale fails)
self-test: scripts/init-submodules.sh --self-test
  PASS  the working set is derived from the four committed sources
  PASS  source 4 discriminates — a gate's QUOTED path joins the set, a commented one does not
  PASS  --paths materializes exactly the named paths (and the comma split is the split)
  PASS  a named path outside the working set is selectable
  PASS  an undeclared named path fails loud and is named
  PASS  the working set materialized, and the undeclared set stayed out
  PASS  every materialized path sits at its recorded gitlink
  PASS  the materialization is blobless (promisor, filter, history's blob absent)
  PASS  --all materialized every declared path
  PASS  an undeclared path fails loud and is named
  PASS  a derived path that is not a declared submodule fails loud and is named
  PASS  a checkout behind its recorded gitlink is advanced to it
  PASS  a checkout with its own commits is reported, not clobbered
  PASS  the materialization criterion rejects a path that git calls fine (no index, no files)
  PASS  a checkout that never landed is repaired (index and files are back, at the pin)
  PASS  the criterion accepts the repaired path
  PASS  CHARLY_INIT_MODE=list reports the working set and changes nothing
  PASS  CHARLY_INIT_MODE=all reaches every declared path
  PASS  CHARLY_INIT_PATHS selects the named paths and splits the comma list
  PASS  an unknown mode fails loud, names the value, and executes nothing
  PASS  the command line wins over the environment (the set axis)
  PASS  the command line wins over the environment (the other way round)
  PASS  a derivation that fails (absent manifest, empty derivation) fails loud and never reports 0 of 0
  PASS  a direct --land on a dirty checkout is refused and the work survives
init-submodules --self-test: OK (every claim is live)
self-test: scripts/measure-clone.sh --self-test
  PASS  a tree a branch holds is cloned with the tree
  PASS  a tree no branch holds is fetched by its SHA
  PASS  a failed clone names git's own error
measure-clone: the self-test passed.
pre-commit: NOTICE — the pin check is SKIPPED: this commit moves no gitlink.
  The pin check judges the index's gitlinks and the checkouts a gitlink move
  touches, so a commit that moves no gitlink cannot violate it. Run
  ./charly/bin/charly task pin-check to run it anyway.
GATE_EXIT=0

The gate's own assertion, run live — static readings over the shipped text, and the gate
FIRED in a scratch git repository with a recording charly, so the counts are what the gate
actually did and not what its text says it does:

$ node scripts/check-pre-commit-gate.mjs
  PASS  hooks/pre-commit-gate.sh + hooks/pre-commit: one owner for the legs, each run once, the skip visible, the missing binary loud, no main-clone fallback, and the index the commit carries read
  PASS  the gate FIRED: a commit that moves a gitlink runs the pin check EXACTLY once and the self-test EXACTLY once
  PASS  the gate FIRED: a commit that moves no gitlink SKIPS the pin check visibly (0 invocations) and still runs the self-test once
  PASS  the gate FIRED: a docs-only commit in a tree with NO charly binary PASSES (exit 0) — the fresh-worktree path
  PASS  the gate FIRED: a commit that moves a gitlink with NO charly binary FAILS LOUD (exit 1) and names the fix
  PASS  the gate FIRED: a FAILING pin check fails the gate (exit 1) — the verdict is not swallowed
  PASS  the gate FIRED: a path-limited commit is judged on the index IT carries, not on the repository's own index
  PASS  the gate FIRED: with no index given, the repository's own index is judged (the staged gitlink fires the check)
check-pre-commit-gate: OK
GATE_EXIT=0

$ node scripts/check-pre-commit-gate.mjs --self-test
  PASS  mutation 'the change class is ignored' is caught (gate red)
  PASS  mutation 'the pin check runs twice' is caught (gate red)
  PASS  mutation 'the missing binary does not fail loud' is caught (gate red)
  PASS  mutation 'the self-test leg is skipped' is caught (gate red)
  PASS  mutation 'the main-clone binary comes back' is caught (gate red)
  PASS  mutation 'the hook calls the gate twice' is caught (gate red)
  PASS  mutation 'the hook takes the pin check back' is caught (gate red)
  PASS  the unmutated copy is GREEN
check-pre-commit-gate --self-test: OK (7 arms)
GATE_SELFTEST_EXIT=0

$ node scripts/check-pre-commit-gate.mjs --root <the OLD tree, from origin/main>
  FAIL  hooks/pre-commit-gate.sh exists
  FAIL  firing hooks/pre-commit-gate.sh (ENOENT: no such file or directory, lstat '/tmp/r1-repro/oldroot/hooks/pre-commit-gate.sh')
check-pre-commit-gate: 2 finding(s)
OLD_TREE_EXIT=1

$ node scripts/check-pre-commit-gate.mjs --root <the HYBRID: the OLD hook + the NEW gate>
  FAIL  hooks/pre-commit calls the gate EXACTLY once (found 0)
  FAIL  hooks/pre-commit does not invoke the pin check itself (it lives in the gate)
  FAIL  hooks/pre-commit does not invoke the self-test task itself (it lives in the gate)
  FAIL  hooks/pre-commit captures GIT_INDEX_FILE before the scrub
  FAIL  hooks/pre-commit hands the captured index to the gate
  FAIL  hooks/pre-commit keeps its node gates (found 11, expected at least 12)
  PASS  the gate FIRED: a commit that moves a gitlink runs the pin check EXACTLY once and the self-test EXACTLY once
  PASS  the gate FIRED: a commit that moves no gitlink SKIPS the pin check visibly (0 invocations) and still runs the self-test once
  PASS  the gate FIRED: a docs-only commit in a tree with NO charly binary PASSES (exit 0) — the fresh-worktree path
  PASS  the gate FIRED: a commit that moves a gitlink with NO charly binary FAILS LOUD (exit 1) and names the fix
  PASS  the gate FIRED: a FAILING pin check fails the gate (exit 1) — the verdict is not swallowed
  PASS  the gate FIRED: a path-limited commit is judged on the index IT carries, not on the repository's own index
  PASS  the gate FIRED: with no index given, the repository's own index is judged (the staged gitlink fires the check)
check-pre-commit-gate: 6 finding(s)
HYBRID_EXIT=1

The coverage that fails without the change — the same fixture against the OLD tree
(taken from origin/main), which has no gate to fire, and against the HYBRID, which pairs
the old hook with the new gate and satisfies none of the obligations the new hook carries:

$ node scripts/check-pre-commit-gate.mjs --root <the OLD tree, from origin/main>
  FAIL  hooks/pre-commit-gate.sh exists
  FAIL  firing hooks/pre-commit-gate.sh (ENOENT: no such file or directory, lstat '/tmp/r1-repro/oldroot/hooks/pre-commit-gate.sh')
check-pre-commit-gate: 2 finding(s)
OLD_TREE_EXIT=1

$ node scripts/check-pre-commit-gate.mjs --root <the HYBRID: the OLD hook + the NEW gate>
  FAIL  hooks/pre-commit calls the gate EXACTLY once (found 0)
  FAIL  hooks/pre-commit does not invoke the pin check itself (it lives in the gate)
  FAIL  hooks/pre-commit does not invoke the self-test task itself (it lives in the gate)
  FAIL  hooks/pre-commit captures GIT_INDEX_FILE before the scrub
  FAIL  hooks/pre-commit hands the captured index to the gate
  FAIL  hooks/pre-commit keeps its node gates (found 11, expected at least 12)
  PASS  the gate FIRED: a commit that moves a gitlink runs the pin check EXACTLY once and the self-test EXACTLY once
  PASS  the gate FIRED: a commit that moves no gitlink SKIPS the pin check visibly (0 invocations) and still runs the self-test once
  PASS  the gate FIRED: a docs-only commit in a tree with NO charly binary PASSES (exit 0) — the fresh-worktree path
  PASS  the gate FIRED: a commit that moves a gitlink with NO charly binary FAILS LOUD (exit 1) and names the fix
  PASS  the gate FIRED: a FAILING pin check fails the gate (exit 1) — the verdict is not swallowed
  PASS  the gate FIRED: a path-limited commit is judged on the index IT carries, not on the repository's own index
  PASS  the gate FIRED: with no index given, the repository's own index is judged (the staged gitlink fires the check)
check-pre-commit-gate: 6 finding(s)
HYBRID_EXIT=1

The wall clock, before and after, on this tree — the same commit class (a commit that
moves no gitlink), the same tree, the same builders:

$ git show origin/main:hooks/pre-commit > /tmp/r1-repro/pre-commit-old
$ { time bash /tmp/r1-repro/pre-commit-old > /tmp/r1-repro/hook-old.log 2>&1 ; } 2>&1 | grep -E "^real"
real	1m29.152s
$ grep -c "policy pin(s) hold" /tmp/r1-repro/hook-old.log
2
$ { time bash hooks/pre-commit > /tmp/r1-repro/hook-new2.log 2>&1 ; } 2>&1 | grep -E "^real"
real	0m4.501s
$ grep -E "NOTICE" /tmp/r1-repro/hook-new2.log
pre-commit: NOTICE — the pin check is SKIPPED: this commit moves no gitlink.

The OLD hook ran the pin check twice on a commit that moves no gitlink at all. The NEW hook
skips it — visibly — on the same commit class, and runs it ONCE (29 s measured 2026-10-24)
when a gitlink does move.

The umbrella's own gate, on the committed tree — every step, the whole plan:

plugin github.com/opencharly/plugin-example-kind/candy/plugin-example-kind: served from /home/atrawog/.cache/charly/plugin-build/views/plugin-example-kind-660763c18b405ea9 (build sha256:643e81502274cd1f42bcf3ba7f05a981effba9654ec6eb219e85dbdfa156bb65); source /home/atrawog/.cache/charly/repos/github.com/opencharly/[email protected]/candy/plugin-example-kind
plugin github.com/opencharly/plugin-example-structkind/candy/plugin-example-structkind: served from /home/atrawog/.cache/charly/plugin-build/views/plugin-example-structkind-f39364ecc01e5411 (build sha256:e2c98e2435e2e0110c2fc29f08a76ccf6464efaecb40a95190752286d1f16a35); source /home/atrawog/.cache/charly/repos/github.com/opencharly/[email protected]/candy/plugin-example-structkind
plugin github.com/opencharly/plugin-jetkvm/candy/plugin-jetkvm: served from /home/atrawog/.cache/charly/plugin-build/views/plugin-jetkvm-2728452fcfb25529 (build sha256:9bdf8390f86de24e7ee3030e2dfdb5140aab232d5df4b40bd1510c18d64f0658); source /home/atrawog/.cache/charly/repos/github.com/opencharly/[email protected]/candy/plugin-jetkvm
task verify: 33 step(s), 0 failed
  [pass] check — the pin contract holds — every distro-* gitlink equals charly's own box/* gitlink (the EDGE), and every submodule is clean and checked out at its recorded gitlink (the CHECKOUT AUDIT), composed ONCE through `pins`
      verify: 6 policy pin(s) hold across 412 submodule(s); 13 checkout(s) clean at their gitlink; 399 uninitialized (pin audited, no checkout): charly-alpine, charly-arch, charly-debian, charly-fedora, charly-jetkvm, charly-lib, charly-openwrt, charly-registry, charly-streamer, charly-ubuntu, clawsweeper, crabbox, crabhelm, docs, dotgithub, eval-omarchy, gst-wayland-display, layer-a11y-tools, layer-agent-forwarding, layer-agentteams, layer-agentteams-cli, layer-agentteams-openclaw, layer-agentteams-snapshot, layer-android-apidemos, layer-android-sdk, layer-android-test-apps, layer-asciinema, layer-blogwatcher, layer-build-toolchain, layer-cachyos-extras, layer-camsnap, layer-charly, layer-charly-check, layer-charly-internals-extra, layer-charly-tools, layer-check-base-layer, layer-check-builder-npm, layer-check-composition-layer, layer-check-cross-local-driver-layer, layer-check-group-layer, layer-check-local-layer, layer-check-retention-fixture, layer-check-stack-layer, layer-check-structkind-layer, layer-check-substrate-layer, layer-check-tier1-layer, layer-chrome, layer-chrome-sway, layer-claude-code, layer-clawhub, layer-codex, layer-container-nesting, layer-crabbox, layer-cstream-desktop, layer-cua, layer-cuda, layer-cue, layer-debootstrap-builder, layer-debug-tools, layer-desktop-fonts, layer-desktop-media, layer-dev-tools, layer-devops-tools, layer-direnv, layer-docker-ce, layer-docs-site, layer-examplebuilder-consumer, layer-examplestep-consumer, layer-examplestep-deploy-consumer, layer-fastfetch, layer-ffmpeg, layer-fonts-extended, layer-forgecode, layer-gemini, layer-gh, layer-gifgrep, layer-github-actions, layer-gnupg, layer-gocryptfs, layer-gogcli, layer-golang, layer-google-cloud, layer-google-cloud-npm, layer-goplaces, layer-grafana-tools, layer-gst-wayland-display, layer-helm-chart, layer-hermes-playwright, layer-heroic, layer-himalaya, layer-java-openjdk, layer-jupyter-mcp, layer-k3s, layer-k3s-kernel, layer-kde-shell, layer-keepassxc, layer-kimi, layer-kind, layer-kubernetes, layer-kubevirt, layer-kubevirt-operator, layer-language-runtimes, layer-libnotify, layer-llama-cpp, layer-maplibre-versatiles-styler, layer-mcporter, layer-nano-pdf, layer-nerdctl, layer-nodejs, layer-notebook-finetuning, layer-notebook-graph, layer-notebook-llm-on-supercomputers, layer-notebook-ollama, layer-notebook-openrouter, layer-notebook-osm, layer-notebook-templates, layer-nvenc-headers, layer-nvidia, layer-ollama-cuda, layer-ollama-rocm, layer-omarchy-base, layer-omarchy-boot, layer-omarchy-desktop-apps, layer-omarchy-dev, layer-omarchy-fonts, layer-omarchy-gpu-nvidia, layer-omarchy-hardware, layer-omarchy-hyprland, layer-omarchy-media, layer-omarchy-network, layer-omarchy-shell, layer-omarchy-terminal, layer-omarchy-themes, layer-oracle, layer-ordercli, layer-pacstrap-builder, layer-pavucontrol, layer-pi-agent, layer-pixi, layer-playwright, layer-pod-addcandy-marker, layer-pre-commit, layer-punktfunk, layer-punktfunk-client, layer-python, layer-python-ml, layer-qdrant, layer-ripgrep, layer-rocm, layer-rpmfusion, layer-rust, layer-sag, layer-selkies-kde-desktop, layer-sherpa-onnx, layer-shortbread, layer-socat, layer-songsee, layer-sqlite, layer-ssh-client, layer-steam, layer-stepkind-build-consumer, layer-summarize, layer-supervisord, layer-sway-desktop, layer-sway-desktop-vnc, layer-tailscale, layer-tailscale-up, layer-thunar, layer-tmux, layer-typst, layer-unsloth, layer-uv, layer-vectorchord, layer-versatiles-fonts, layer-versatiles-style, layer-vscode, layer-wacli, layer-wf-recorder, layer-whisper, layer-wl-overlay, layer-wl-record-pixelflux, layer-wl-screenshot-grim, layer-wl-screenshot-pixelflux, layer-wl-tools, layer-workspace-mount, layer-xdg-portal, layer-xfce4-terminal, layer-xterm, layer-xurl, layer-yay, lobster, omarchy-eval-artifacts, openclaw, openclaw-enterprise, pi-asciinema, pi-fabric, pi-lsp, pi-review-action, pixelflux, pkg-arch, pkg-debian, pkg-fedora, plugin-adb, plugin-addr, plugin-agent, plugin-agent-pi, plugin-agentteams, plugin-alias, plugin-appium, plugin-authoring, plugin-boot-kind, plugin-box, plugin-bpf, plugin-build, plugin-builder, plugin-builder-aur, plugin-builder-cargo, plugin-builder-npm, plugin-builder-pixi, plugin-cache, plugin-candy, plugin-candy-kind, plugin-cardwire, plugin-cdp, plugin-check, plugin-clean, plugin-cmd, plugin-command, plugin-crabbox, plugin-cstream, plugin-cua, plugin-dbus, plugin-deploy-local, plugin-deploy-pod, plugin-deploy-vm, plugin-desktop-kind, plugin-distro, plugin-dns, plugin-docs, plugin-doctor, plugin-dsh, plugin-egress, plugin-enc, plugin-example, plugin-example-bootstrap, plugin-example-builder, plugin-example-command, plugin-example-deploy, plugin-example-dispatch, plugin-example-external, plugin-example-kind, plugin-example-lifecycle, plugin-example-require, plugin-example-step, plugin-example-stepkind, plugin-example-structkind, plugin-examplerunverb, plugin-feature, plugin-file, plugin-fleet, plugin-generate-packages, plugin-gh, plugin-gpu, plugin-harness-kind, plugin-helm, plugin-herdr, plugin-http, plugin-init, plugin-installstep, plugin-interface, plugin-jetkvm, plugin-k8sgen, plugin-kernel-param, plugin-kube, plugin-kubevirt, plugin-loader, plugin-lobster, plugin-marketplace, plugin-matching, plugin-mcp, plugin-media, plugin-migrate, plugin-mise, plugin-mount, plugin-nerdctl, plugin-oci, plugin-ollama, plugin-omarchy, plugin-openclaw, plugin-package, plugin-pipeline, plugin-pod, plugin-port, plugin-preempt, plugin-process, plugin-punktfunk, plugin-qdrant, plugin-quickshell, plugin-record, plugin-refs, plugin-resource, plugin-review, plugin-secrets, plugin-service, plugin-settings, plugin-sidecar, plugin-spice, plugin-ssh, plugin-status, plugin-substrate, plugin-task, plugin-tmux, plugin-tunnel, plugin-udev, plugin-unit, plugin-unix-group, plugin-user, plugin-vision, plugin-vm, plugin-vnc, plugin-wl, pod-agentteams-controller, pod-agentteams-element, pod-agentteams-higress, pod-agentteams-manager, pod-agentteams-matrix, pod-agentteams-minio, pod-agentteams-worker, pod-airflow, pod-android-emulator-layer, pod-appium-server, pod-charly-automation, pod-charly-hooks, pod-charly-mcp, pod-charly-versa, pod-check-keepalive, pod-check-redis-init-layer, pod-check-tier23-layer, pod-chrome-cdp, pod-chrome-devtools-mcp, pod-chrome-headless, pod-cloud-init, pod-comfyui, pod-crabbox, pod-cstream, pod-dbus, pod-dsh, pod-filebrowser, pod-github-runner, pod-herdr, pod-hermes, pod-hermes-full, pod-hyprland, pod-immich, pod-immich-ml, pod-jupyter, pod-jupyter-ml, pod-k8s-layer, pod-kde-desktop, pod-kde-selkies, pod-labwc, pod-maputnik, pod-marimo, pod-mcp-layer, pod-nested-podman-socket, pod-ollama, pod-openwebui, pod-os-layer, pod-osm-tools, pod-pipewire, pod-pmtiles-viewer, pod-postgresql, pod-qdrant, pod-qemu-guest-agent, pod-redis, pod-redis-client-layer, pod-redis-server-layer, pod-selkies, pod-selkies-core, pod-selkies-desktop, pod-sshd, pod-sway, pod-swaync, pod-testapi, pod-traefik, pod-unsloth-studio, pod-valkey, pod-versatiles, pod-versatiles-frontend, pod-virtualization, pod-waybar, pod-waybar-labwc, pod-wayvnc, pod-web-layer, rpiv-todo, sdk, spec, vm-k3s-agent, vm-k3s-server
  [pass] check — each pin's CURRENCY — the pin is at the ref its intent names (the question the consistency half above does not answer)
      currency: 7 of 412 pin(s) NOT current [1 behind, 1 blocked-by charly:box/cachyos (behind), 405 cur, 5 differs (no checkout to judge ancestry)]; intents: 406 upstream leaf/leaves (406 implicit), 6 derived-from edge(s); NOT CURRENT: distro-cachyos: blocked-by charly:box/cachyos (behind); intent derived-from:charly; recorded 1893455d3a; served 6abe895225 (charly:box/cachyos branch); marketplace: behind; intent upstream:main (implicit: .gitmodules branch=); recorded 42b8789543; served 3162f78099 (branch); plugin-crabbox: differs (no checkout to judge ancestry); intent upstream:main (implicit: .gitmodules branch=); recorded d5eea8fd15; served 72a7abe4a3 (branch); plugin-nerdctl: differs (no checkout to judge ancestry); intent upstream:main (implicit: .gitmodules branch=); recorded a0051aec96; served 5b5d97cd84 (branch); pod-charly-automation: differs (no checkout to judge ancestry); intent upstream:main (implicit: .gitmodules branch=); recorded ca58c6f843; served e4f278f19e (branch); pod-charly-hooks: differs (no checkout to judge ancestry); intent upstream:main (implicit: .gitmodules branch=); recorded fb0dd7c4c6; served a7b5a24c38 (branch); pod-crabbox: differs (no checkout to judge ancestry); intent upstream:main (implicit: .gitmodules branch=); recorded 64852170aa; served c7a7297d82 (branch); producer-first legs: marketplace (42b8789543 -> 3162f78099) -> distro-cachyos (blocked-by charly:box/cachyos (behind))
  [pass] check — every submodule's branch equals its remote default — KEPT INLINE, deliberately, because no verb owns this clause, and it is the expensive half (one git ls-remote per submodule, hence the timeout below)
      exit=0
  [pass] check — charly's own nested submodules are at their gitlinks — KEPT INLINE, because the verb has no recursive-nested clause
      exit=0
  [pass] check — the nested-submodule step above — an uninitialized nested path is a NOTICE, a `+`/`U` drift still FAILS (fixtures)
      exit=0
  [pass] check — the branch-audit step above — every branch= is compared against the remote default, and EVERY mismatch is named (fixtures)
      exit=0
  [pass] check — the branch-audit gate discriminates — each mutation turns it RED (fixtures)
      exit=0
  [pass] check — no `command:` step in this file carries a braced reference in its text — the plan runner CLAIMS one, and an unresolvable one SKIPS the step instead of failing it, so the gate would read green over a check that never ran (fixtures)
      exit=0
  [pass] check — the command-text gate discriminates — each mutation turns it RED (fixtures)
      exit=0
  [pass] check — the README's MEASURED figures agree with each other — the table, the prose that quotes it, and the date every dated figure carries — and every count of a collection that GROWS is derived from that collection or dated (fixtures)
      exit=0
  [pass] check — the measurement gate discriminates — each mutation turns it RED, the figures and the shape counts alike (fixtures)
      exit=0
  [pass] check — the body/diff reconciliation gate discriminates — a file table that omits a changed file, one that lists an unchanged file, and a pasted `git rev-parse HEAD` that is not the head, each turn it RED (fixtures)
      exit=0
  [pass] check — the umbrella's own committed builders pass their self-tests — the set the commit gate runs, owned by scripts/self-test.sh
      exit=0
  [pass] check — the commit gate decides by CHANGE CLASS and runs each leg EXACTLY ONCE — the pin check only when the diff moves a gitlink, the skip visible, the missing binary loud, and the index the commit carries read (fixtures)
      exit=0
  [pass] check — the commit-gate gate discriminates — each mutation turns it RED (fixtures)
      exit=0
  [pass] check — every step of every task in this file declares a `context:` the plan runner activates — a set disjoint from [build, runtime] (the `[deploy]` this file used to carry) is a no-op in EVERY mode (fixtures)
      exit=0
  [pass] check — the opencode gate plugin contract (the check-opencode-plugin gate the former verify-pins.sh ran)
      exit=0
  [pass] check — the PR-watch plugin's pure logic + its shipped (uncommented) SDK delivery primitives
      exit=0
  [pass] check — the agent-progress monitor+control plugin — static (no .sh), the classifier (RCA regression), and a read-only store
      exit=0
  [pass] check — the session tracker plugin — the durable ledger (rule 9 invariant), the three tools, and the real-binary load
      exit=0
  [pass] check — every harness-config surface parses and is wired (rule 5)
      exit=0
  [pass] check — the harness-config gate discriminates — each mutation turns it RED (fixtures)
      exit=0
  [pass] check — the pi gate extension fails CLOSED, uses the rule-2 worktree path, and wires both gate scripts
      exit=0
  [pass] check — the validator enforces only what the rulebook states — rulebook check ids == the AGENTS.md "What the validator checks" table, every cited skill resolves, and the committed rulebook == the live AI_REVIEW_PROMPT (opencharly/opencharly#446)
      exit=0
  [pass] check — the validator rule-map gate discriminates — each mismatch fixture turns it RED
      exit=0
  [pass] check — the coordination closed set is the SAME nine labels on every surface that enumerates it (opencharly/opencharly#567)
      exit=0
  [pass] check — the coordination closed-set gate discriminates — each mutation turns it RED (fixtures)
      exit=0
  [pass] check — the pi wake binding delegates to the neutral watchers, wakes, re-arms, cleans up, and ships inert + wired
      exit=0
  [pass] check — the pi PR-status tool parses, normalises the state, finds the run by head SHA, reads jobs via REST, and classifies INCONCLUSIVE
      exit=0
  [pass] check — the pi `question` tool is dependency-free, headless-safe, serialized, and wired into .pi/settings.json
      exit=0
  [pass] check — the harness-neutral R10 bed watcher classifies exit codes and parses summary.yml (self-test)
      exit=0
  [pass] check — every canonical root narrative exists and every root-file reference in the agent surfaces resolves (the #356 content-loss gate)
      exit=0
  [pass] check — the root-ref gate discriminates — each mutation turns it RED (fixtures)
      exit=0
VERIFY_EXIT=0

The R5 claim-keyed sweep — each removed mechanism, named by its own token, against
hooks/, and then against the whole tree so that every surviving hit is classified rather
than assumed away:

$ git grep -n -F "needs_charly" -- hooks/ ; echo "grep exit=$?"
grep exit=1

$ git grep -n -F "run_charly" -- hooks/ ; echo "grep exit=$?"
grep exit=1

$ git grep -n -F "git-common-dir" -- hooks/ ; echo "grep exit=$?"
grep exit=1

$ git grep -n -F "task self-test" -- hooks/ ; echo "grep exit=$?"
grep exit=1

$ git grep -n -F "task pin-check" -- hooks/ ; echo "grep exit=$?"
hooks/pre-commit-gate.sh:21:#   2. the pin check — `charly task pin-check`: every pin_map edge equals its
hooks/pre-commit-gate.sh:71:  echo "  ./charly/bin/charly task pin-check to run it anyway."
hooks/pre-commit-gate.sh:87:CHARLY_PLUGIN_ONLY=1 "$CHARLY" task pin-check
grep exit=0

$ git grep -n -F "needs_charly" -- . ; echo "grep exit=$?"
CHANGELOG/2026.281.0829.md:23:- `charly task policy-b` is the hook's own `verb:git-submodules verify` — it judges **gitlink** state, so a diff that changes no gitlink cannot violate it. The diff establishes this by **failing closed** on exactly that input: with a gitlink staged and no binary anywhere, `needs_charly=1` and the hook exits 1 naming the candidates (case (c1) below); an *added* submodule (`:000000 160000`) is matched, which is the pin-bump case the first version of my test missed.
CHANGELOG/2026.281.0829.md:35:  CHARLY='' needs_charly='0' -> SKIP + NOTICE (correct)
CHANGELOG/2026.281.0829.md:38:  CHARLY='' needs_charly='1' -> HARD FAIL (fail-closed, correct)
CHANGELOG/2026.281.0829.md:41:  CHARLY='' needs_charly='1' -> HARD FAIL (fail-closed, correct)
CHANGELOG/2026.294.0129.md:433:- **Blast radius.** The hook's `needs_charly` guard is read on only one of its two paths, so
CHANGELOG/2026.297.0042.md:247:  `needs_charly` change-class gate in the binary-present branch; root fix — filed as
scripts/check-pre-commit-gate.mjs:6:// once under the banner — and decided what to run with a `needs_charly` flag that
grep exit=0

The four greps against hooks/ return exit 1: the needs_charly flag, the run_charly
fall-through, the git-common-dir main-clone lookup and the hook's own task self-test
invocation are all absent from the hook. The task pin-check token now lives in ONE file,
hooks/pre-commit-gate.sh, and the fixture asserts the gate invokes it exactly once. The
repo-wide needs_charly sweep returns the CHANGELOG's own history of the old mechanism
(three files, each a record of what that mechanism was) and this change's fixture prose,
which names the mechanism it replaced so the assertion can name it too. History belongs in
CHANGELOG/ and is not rewritten; the fixture's line is what keeps the mechanism from
coming back.

Rulebook compliance

  • R0 — the skills this change's area loads were read before the first tool action:
    /charly-internals:git-workflow (the branch, the commit, the PR body, the push) and
    /charly-internals:strict-policy with /charly-internals:root-cause-analyzer (the
    analysis that produced this change).
  • R1 — every finding this change touched is dispositioned. The umbrella's
    check-readme-measurements.mjs raised three findings against the NEW files in this
    change (undated counts of a collection that grows), and all three are FIXED here: the
    counts are gone and the wall clocks carry the day they were measured. The three defects
    in the OLD hook were filed as umbrella pre-commit: the main-clone binary fallback cannot load the project from a linked worktree, so every docs-only worktree commit dies in the hook #602, the umbrella's pre-commit hook runs its charly-backed assertions TWICE per commit — the pin-check audit is the slowest leg, and it is duplicated #645 and A fresh session worktree cannot commit an umbrella change: the pre-commit hook runs charly task, and the worktree has neither an initialized charly submodule nor a bootstrapped binary #498 and are FIXED
    here, in this change, by the diff below. The path-limited-commit imprecision the old
    hook carried is FIXED here. Nothing is filed away, and no finding raised on this PR is
    filed: a finding raised on the PR is fixed or rebutted on the thread.
  • R2 — one owner per behaviour: hooks/pre-commit-gate.sh owns the change-class
    decision and both legs, and scripts/self-test.sh owns the self-test set that the task
    and the gate both call, so the two callers cannot drift.
  • R3 — no workaround: no sleep, no retry, no suppression, no fallback branch, no
    hand-rolled substitute. The skip is VISIBLE and names the command that would run it
    anyway, and the missing binary fails LOUD with the fix, rather than a silent pass over a
    check that never ran.
  • R4 — the product was fixed before the prose: the gate's own coverage is the change,
    and every comment in the two shell files says what the code does.
  • R5 — the legacy forms are gone, and the claim-keyed sweep above names every place the
    tokens still appear in the tree.
  • R6 — git status was stated before the branch was cut and before the commit; the
    work is in the session worktree at .worktrees/precommit/opencharly/ on branch
    feat/pre-commit-change-class, branched off fresh origin/main
    7359f159b0bcf68a3bb27fc18555e02a3675ba30. No force-push, no amend after the push, no
    direct push to main, no hook bypass, and no other session's branch, worktree or file
    touched. No submodule was edited: the umbrella records gitlinks only, and this diff moves
    no gitlink.
  • R7 — the changed path executed live (the gate, the hook, the builders' self-tests and
    the umbrella's whole plan, all pasted above), and this change's own coverage fails
    without the change: the fixture is RED on the old tree and RED on the hybrid, and each of
    its seven mutation arms is RED on the mutated copy while the unmutated copy is GREEN.
  • R8 — the pin check ran LIVE against the real index, in the commit that carries this
    change and in the umbrella's plan above; nothing was mocked. The fixture's fired
    assertions use a RECORDING charly, and what they judge is the gate's DECISION — how many
    times it invokes a leg, whether the skip is visible, whether the missing binary is loud
    — not the verb's verdict, which the live runs above exercise.
  • R9 — the worktree-local, CalVer-stamped build is used (printed above), never a shared
    install, and the main-clone fallback that used to break that rule is deleted.
  • R10 — the change-class gate ran on the committed tree being pushed, with zero failed
    steps and no warning: charly task verify (33 steps, 0 failed) plus the changed gate's
    own --self-test (7 arms, each RED on its mutation). No disposable: true target is
    affected: this change touches no build, no deploy and no bed, and the umbrella declares
    no candy or box.
  • Part II ci: adopt org-wide validation chain — pr-validator + tag-on-merge, drop custom auto-merge #2 — the edit happens in the session worktree, on a branch off fresh
    origin/main; every tracked submodule checkout stays at its gitlink.
  • Part II chore: sync all submodule pins; spec no longer charly-pinned #6/fix: escape backticks in umbrella-gates rules template (pi extension parse error) #7/chore: sync gitlinks to the landed sdk de-submodule cutover #11 — the work is claimed on the three issues it resolves, the
    coordination records are posted on the threads it touches, and each resolved issue is
    closed with an explicit RESOLVED record when this PR lands — a Closes keyword does not
    close an issue by itself, which is measured on chore(pins): the umbrella's consumer leg of the ellipsis cutover — two gitlinks to their producers' merged mains, and the gate prints the product's own token #654.

Change classification

One gate's own decision. The diff carries the umbrella's own commit gate: the hook, the
gate it delegates to, the gate's own assertion, the self-test set the gate runs, and the
manifest's two references to them. No submodule content, no Go source, no schema, no
gitlink, no pin, no deploy and no bed.

The gates that own this class are the changed gate's own --self-test (the coverage this
change adds) and the umbrella's charly task verify (the aggregate gate, which runs that
self-test and the new fixture among its 33 steps) — both run on the committed tree above,
and the changed path itself ran live.

On the attribution tier. The tier is fully tested and validated: the change-class
gate passed on the final tree with zero warnings, the changed path ran live, and the
before/after measurement above is retained in this body.

Filed issues

No new issue was filed by this change: every finding this change's scope touched is fixed
in it.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

…s once (#602, #645, #498)

The umbrella's pre-commit hook ran its charly-backed pair TWICE per commit - once
in the binary branch and once under the banner - and decided what to run with a
`needs_charly` flag that only the NO-BINARY branch consulted, so the
binary-present branch ran BOTH legs on a diff that could violate neither. Worse,
the no-binary branch FELL THROUGH to a `run_charly` with an EMPTY binary, so a
fresh session worktree - which AGENTS.md Part II #2 mandates for every session,
and which has no binary of its own - could not commit AT ALL: the hook died on
a command-not-found. Measured, and filed as #602, #645 and #498.

What changes:

  * The gate is DECIDED, and the decision lives in ONE place:
    hooks/pre-commit-gate.sh. It reads the staged diff of the INDEX THE COMMIT
    CARRIES (git builds a temporary index for a path-limited commit, so the
    hook captures GIT_INDEX_FILE before it scrubs the git vars and hands that
    index to the gate), and runs the pin check only when that diff moves a
    gitlink. That is EXACT, not a heuristic: every value the pin check compares
    is an index entry, and a checkout's HEAD can only disagree with the index
    when the diff moved it - so a commit that moves no gitlink cannot violate
    it. The checkout DRIFT the same verb also sees stays where the rulebook
    puts it: `charly task verify` (AGENTS.md Part II #1).

  * The two legs each run EXACTLY ONCE. The duplication cannot come back:
    scripts/check-pre-commit-gate.mjs asserts the hook calls the gate exactly
    once and invokes neither leg itself, and a mutation arm turns the gate red
    if a second call appears.

  * The missing binary fails LOUD only when the change class needs the pin
    check, and names the fix. A docs-only commit in a fresh worktree now
    PASSES - the path that could not commit at all. The main-clone binary
    fallback is DELETED (R9: the binary equals the source; a different source's
    build cannot load the project in a linked worktree).

  * The self-test set moves out of the TEXT of the `self-test` task and into
    scripts/self-test.sh, so the task and the commit gate call ONE owner and
    cannot drift (R2). The builders' --self-tests need no binary, no project
    and no submodule: all five pass standalone in 3.4 s (2026-10-24), which is
    why they are the CHEAP leg that runs on every commit.

Proof, on this tree:

  OLD hook (origin/main), measured: 1m29.152s, and the pin check ran TWICE.
  NEW hook, same tree, same commit class (no gitlink moved): 4.66s, the pin
  check SKIPPED visibly.
  NEW hook, a commit that DOES move a gitlink: the pin check runs ONCE (29 s
  measured 2026-10-24 over the umbrella's whole pin set), not twice.

  The new fixture is RED on the old tree (the gate file is absent) and, in the
  hybrid (old hook + new gate), RED on six specific obligations: the hook
  calls the gate zero times, takes both legs back, never captures
  GIT_INDEX_FILE, never hands it to the gate, and keeps only 11 node gates.
  Its own --self-test mode mutates the gate seven ways and every mutation is
  caught; the unmutated copy is GREEN.

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS

The commit gate's change-class decision is pushed and open for review: #660.

Head. dd23668804c03908dfdb167f301bd0fa33927fb0 on feat/pre-commit-change-class, branched off fresh origin/main 7359f159b0bcf68a3bb27fc18555e02a3675ba30. The branch is pushed and nothing is amended after this push.

What is done. The gate's DECISION and its two legs live in ONE owner (hooks/pre-commit-gate.sh), each leg runs EXACTLY ONCE, the pin check runs only when the staged diff of the index the commit CARRIES moves a gitlink, the skip is visible, the missing binary fails loud and names the fix, and the main-clone binary fallback and the needs_charly flag are gone. The self-test set has one owner too (scripts/self-test.sh), so the self-test task and the commit gate cannot drift.

The proof, on the committed tree. charly task verify — 33 steps, 0 failed, VERIFY_EXIT=0, no warning. The new fixture's --self-test — 7 arms, each RED on its mutation, the unmutated copy GREEN. The wall clock on the same tree and the same commit class: the OLD hook 1m29.152s with the pin check running TWICE, the NEW hook 0m4.501s. The coverage that fails without the change: the fixture is RED on the old tree and RED on the hybrid (the old hook with the new gate beside it). The pre-push body lint and the body/diff reconciliation both pass on the body this PR carries.

What is next. The fresh charly/pr-validator's verdict. Every finding it raises is fixed or rebutted on this thread BEFORE any next push, and every new comment here is read in full.

Next update due: on the validator's verdict, or when the next round's commit is pushed — whichever comes first.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

What the PR does (re-derived from the diff)

The change splits the umbrella's commit gate into a decision owner (hooks/pre-commit-gate.sh) and a thin driver (hooks/pre-commit), extracts the builders' self-test set into scripts/self-test.sh, deletes the main-clone binary fallback and the needs_charly/run_charly duplication, and adds scripts/check-pre-commit-gate.mjs (static readings + fired assertions in a scratch repo + 7 mutation arms). charly.yml rewires the self-test task and adds three verify steps.

I checked each file line by line:

  • hooks/pre-commit — COMMIT_INDEX="${GIT_INDEX_FILE:-}" is captured before unset GIT_DIR GIT_INDEX_FILE …, then cd "$ROOT", then a single bash "$ROOT/hooks/pre-commit-gate.sh" "$COMMIT_INDEX", then the node gates (now 12, including the new check-pre-commit-gate.mjs). The old run_charly task pin-check/run_charly task self-test under the banner are gone, so the charly-backed pair is invoked exactly once. Correct.
  • hooks/pre-commit-gate.sh — leg 1 always runs scripts/self-test.sh; leg 2 reads git diff --cached --raw from the passed index (or the repo index when empty), cut -f1,2 | grep -c '160000', prints a visible SKIPPED notice and exits 0 on a no-gitlink diff, otherwise fails loud if charly/bin/charly is absent and runs CHARLY_PLUGIN_ONLY=1 "$CHARLY" task pin-check. The grep -c + || true correctly avoids the pipefail broken-pipe trap the comment describes. Correct.
  • scripts/self-test.sh — one array of the five builders, run in order with a named banner, cd "$ROOT" from BASH_SOURCE. Matches the task's old command set exactly. Correct.
  • scripts/check-pre-commit-gate.mjs — the static assertions (gate called once, hook invokes neither leg, each leg invoked once, skip visible, fix named, no git-common-dir/main clone in code after stripComments, index captured before scrub and handed over, ≥12 node gates) and the fired fixtures F1–F6b are coherent with the shipped text. The --self-test arms each target a real substring of the shipped source and go red for the reason claimed. Correct.
  • charly.yml — self-test now calls the script; verify adds the script, the fixture, and the fixture's --self-test. Consistent with the body's table.

Tests

The fixture is the kind that fails without the change: the body's own transcripts show it RED on the old tree (gate missing) and RED on the hybrid (old hook + new gate: gate-call count 0, hook still invoking both legs, no index capture, 11 node gates). The mutation arms cover exactly the regressions the PR claims to prevent (change class ignored, pin check duplicated, silent missing binary, self-test skipped, main-clone fallback, hook calling the gate twice, hook reclaiming the pin check). The body's pasted counts (8 PASS lines = 1 static + 7 fired; 7 mutation arms + GREEN) match the code's output shape.

Security / scope

No secrets, no injection surface (the index path is always quoted, spawnSync uses argv arrays), no new dependencies. Legacy forms (needs_charly, run_charly, git-common-dir, hook-side task self-test) are gone from hooks/; the repo-wide needs_charly hits are CHANGELOG history plus the fixture's own explanatory prose, as the body states. Scope is coherent and complete.

Non-blocking observations (do not change the verdict)

  1. Wording vs. reality on the "EXACT" claim. The body (and the gate comment) says "every value the pin check compares is an INDEX entry, and a checkout's HEAD can only disagree with the index when the diff moved it — so a commit that moves no gitlink cannot violate it." That is not strictly true for the checkout audit: a submodule can be dirtied or moved to another commit without the umbrella index changing. The very next sentence in both the body and the gate comment discloses exactly this ("The checkout DRIFT … caused by no commit") and defers it to charly task verify per AGENTS.md Part II chore: harness parity with charly — rulebook, pi/claude/opencode/reasonix config, skills #1. So the design is intentional and documented; only the "every value is an index entry" phrasing is imprecise. Worth tightening, but it is not a functional defect and the body is transparent about the carve-out.
  2. Coverage trade-off. The old hook ran the checkout audit on every commit (twice); the new gate runs it only on gitlink-moving commits. Because the rulebook places dirty-submodule detection in verify (and verify runs in the umbrella plan / CI), this aligns with the project's own policy, and it is what buys the 1m29s → 4.5s improvement the body measures. The maintainer should consciously accept that the commit gate no longer audits checkout drift.

Comments

The comment thread is empty (0 comments); nothing to disposition.

Verdict

The change does what the body claims, the body's evidence is internally consistent and reproduced by the diff, the coverage fails without the change, legacy paths are removed, and no security or scope problem is present. The one imprecision in the "EXACT" wording is disclosed and rulebook-aligned.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS

Disposition of the two non-blocking observations from the charly/pr-validator's PASS on this
PR. Observation 1 is CONFIRMED, and it is stronger than the review framed it: it is not an
imprecise phrasing, it is a functional defect in the change class. The follow-up that fixes it
is #661, on branch feat/pin-check-class-inputs.

Observation 1 — the "EXACT" claim. CONFIRMED, and a defect, not a wording slip.

The review read the claim as "not strictly true for the checkout audit" and called it a
phrasing imprecision, noting the next sentence discloses the carve-out. The checkout-drift half
is indeed disclosed and rulebook-aligned, and this follow-up leaves it exactly where the
rulebook puts it. But the claim is false for a second reason the review did not name, and
that one is functional:

Mechanism. charly task pin-check composes verb:git-submodules in mode: verify. The
class was derived by judgement — "the staged diff moves a gitlink" — instead of from what the
verb actually reads. The verb reads three commit-carried inputs: the index's gitlinks, the
manifest that declares the pin contract (charly.yml's pins: block, with its pin_map
and pinned_from), and the declared path set (.gitmodules). The declaration and the path
set are FILES, and the edge's want side is read from the pinned_from checkout's HEAD
tree
. So a commit that edits the manifest, or the path set, violates the pin check without
moving a gitlink
— and the gate skipped the check that would have caught it. The word "EXACT"
was not an overstatement of a true rule; it was a false premise.

Missed control. The gate's own fixture asserted the class as written, so it could never
falsify it. There was no control that derived the class from the verb's read-set, and none that
tied the gate's comment to what the verb reads. A green fixture therefore certified a rule that
was wrong.

Blast radius. The fast commit gate skipped the pin check for manifest-only and path-set-only
commits. Bounded, because charly task verify composes the SAME verb and catches the violation
on the merge path — so the umbrella's fast gate read green on a diff the full gate would fail.
The wider blast radius is the claim: the body told readers the class was exact, so the same
wrong model was re-derivable in the next repo that implements a change class from it. That
corpus copy is filed as opencharly/layer-charly-internals#146, with the same RCA, in the repo
that authors it (producer-first: layer-charly-internals → marketplace → docs → the
umbrella's gitlinks).

Root fix. The class is derived from the verb's read-set, the rule lives ONCE
(scripts/pin-contract-inputs.sh), and both places that ask the question ask it of that one
definition: the commit gate's change class, and the wave body's coverage decision — whose own
copy of the question was narrower still (it decided coverage by "a distro-* pin moved", so a
diff that moved charly's own gitlink, or edited the manifest, was described in a PR body as a
diff the pin check "cannot fail on"). That was false too, and it under-claimed what the gate
proves. The coverage is now one fired assertion and one mutation arm per input, so a dropped
leg goes red.

The checkout-drift half is unchanged and stays where the rulebook puts it — charly task verify (AGENTS.md Part II #1). The class is a deliberate superset of the violation set: a
charly.yml edit that touches no pin block still fires the check, because the check reads the
whole manifest, so a change to it can change what the check compares (R3 forbids cleverness in
place of a rule).

Observation 2 — the coverage trade-off. Deliberate, unchanged by the follow-up, and now visible.

The review asked the maintainer to consciously accept that the commit gate no longer audits
checkout drift. That is the state this PR already merged in, and the follow-up removes no
coverage it had
: the class is a superset of the merged one, so the commit gate now fires
on more diffs than before, not fewer, and the checkout-drift half stays exactly where it was
— charly task verify, composed by the umbrella plan and CI, which is the rulebook's placement
(AGENTS.md Part II #1). The follow-up's one deliberate change to the gate's behaviour is that the
SKIP notice now says what the skipped check would have covered and what it does not cover
(checkout drift included), so the trade-off is visible in the commit's own output instead of
only in a comment.

Nothing about the trade-off is expanded by the follow-up, so no new maintainer acceptance is
asked for by it. This comment records the disposition; the acceptance question the review
raised belongs to the operator, on the merged state.

State

Next update: when the follow-up PR is open, with its head.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

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.

1 participant