Skip to content

fix(gate): the cited-version gate must not stop judging on a big tree, and must not fail closed where it cannot run - #691

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/gate-robustness-690
Oct 26, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/gate-robustness-690

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Closes #689

Summary

Head 02ac493d9075f7c2fac060e811724709dcf70955 — 2 files changed, 37 insertions(+), 13 deletions(-).

This is #690's review round, continued after it merged. The fresh charly/pr-validator on #690 passed the change and raised two minor observations against the gate that #690 introduced. R1 is unambiguous about a finding raised on your own PR: it is never filed away — it is fixed, or rebutted on the thread with evidence. Both observations are in code this change owns, and both are fixable without touching a claim, so both are fixed here, in the same repo, in the same control, in one commit.

Observation 1 — the buffer that scales with the repo was Node's 1 MiB default. trackedFiles read the tracked set with git ls-files -s -z and inherited execFileSync's default maxBuffer of 1 MiB. That output grows with the repo: MEASURED on this tree, 1458 entries cost 108,140 bytes — 74.2 per entry — so a tree of ~14,137 files crosses the default, and past it the gate died with ENOBUFS instead of judging. A control that stops judging on the large trees is failing at the job it exists for. Every git call now goes through ONE helper, gitOut, that raises the ceiling to 64 MiB, so the ceiling is set in a single place and every call inherits it — including the two that scale with a repo (ls-files -s -z, ls-tree -r --name-only) and the one that scales with a file (cat-file blob), which carried a ceiling of its own before.

Observation 2 — the --self-test failed closed where it cannot run. The plain gate SKIPS VISIBLY when the pinned charly has no checkout; the --self-test failed there. Its mutations are built FROM the pinned version, so a tree that cannot derive the version cannot run them — and failing anyway turned every such tree's verify red over a check that never ran. That is the fail-closed-infrastructure class this repo's sibling gates refuse on purpose: scripts/check-pr-body-gate.mjs skips a corpus-dependent check rather than fail it, and scripts/check-harness-config.mjs asserts that a tree whose corpus is absent leaves every corpus-dependent check SKIPPING. The self-test now SKIPS VISIBLY, prints the one command that materializes the checkout, and exits 0.

Both fixes are proven able to fail, against the tree #690 actually shipped — origin/main's own copy of the file — not against a hand-made mutation:

observation the shipped gate (#690) this change
the buffer ceiling exit 1 — ENOBUFS on a 20,000-file tree exit 0 — reads the whole set
the self-test in a tree with no pinned checkout exit 1 — FAIL the pinned charly's version could not be derived exit 0 — two visible SKIP lines, and the command that fixes it

The file table is the diff's own file set — the umbrella's own scripts/check-pr-body-diff.mjs reconciles it against the diff on every push.

file what it carries
charly.yml the self-test step's description — it now says the step SKIPS visibly where the pinned charly's checkout is absent, which is what the step does
scripts/check-cited-plugin-task-version.mjs observation 1 — one gitOut helper with a 64 MiB ceiling, and every git call routed through it; observation 2 — the self-test's visible skip

Nothing else is in this change. #690's prose corrections are merged (9189569b, tag v2026.298.0823) and untouched here. The corpus projection of this repo's skill is still the marketplace repo's own regeneration (opencharly/marketplace#578), and that leg is unblocked by the tag this repo has now published.

How tested

The R10 gate, on the committed tree this PR pushes. The umbrella's own charly task verify, run on 02ac493d9075f7c2fac060e811724709dcf70955 with the worktree-local binary:

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 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-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
charly: fetching git metadata for 27 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 30 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 6 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 55 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 60 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 1 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 7 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 9 repo(s) (first run — may take a moment)...
charly: git metadata cached.
charly: fetching git metadata for 7 repo(s) (first run — may take a moment)...
charly: git metadata cached.
task verify: 35 step(s), 0 failed, 0 skipped
  [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 411 submodule(s); 12 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: 1 of 411 pin(s) NOT current [410 cur, 1 differs (no checkout to judge ancestry)]; intents: 405 upstream leaf/leaves (405 implicit), 6 derived-from edge(s); NOT CURRENT: docs: differs (no checkout to judge ancestry); intent upstream:main (implicit: .gitmodules branch=); recorded 9540ca5371; served e5f90075c1 (branch); producer-first legs: none reachable from this repo
  [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 — every plugin-task version this repo's OWN prose cites equals the version the PINNED charly compiles — the version is DERIVED from the pin, and the scan is derived from the tracked file set (fixtures)
      exit=0
  [pass] check — the cited-version gate discriminates — a stale citation, an advanced pin and a moved owner each turn it RED, and a version naming another module stays GREEN (fixtures) — and SKIPS visibly where the pinned charly's checkout is absent
      exit=0
  [pass] check — the body/diff reconciliation gate discriminates — a file table that omits a changed file, one that lists an unchanged file, a pasted `git rev-parse HEAD` that is not the head, a stale count of the diff's new files, and a pasted evidence line that does not resolve in the tree being pushed, 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 touches one of the pin contract's commit-carried inputs (a gitlink, the manifest charly.yml, the declared path set .gitmodules), 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 two fixes, each proven able to fail — the "before" is the tree #690 shipped. The file was taken from origin/main (the merged #690 tree) and the "after" is this commit's copy; neither is a hand-made mutation:

$ git show origin/main:scripts/check-cited-plugin-task-version.mjs > /tmp/pin904/proof/gate-BEFORE.mjs
$ cp scripts/check-cited-plugin-task-version.mjs /tmp/pin904/proof/gate-AFTER.mjs

Observation 1 — the buffer ceiling. A fixture repo with 20,000 tracked files, whose git ls-files -s -z output is 1,280,000 bytes — past Node's 1 MiB default:

$ git -C /tmp/pin904/proof/bigtree ls-files -s -z | wc -c
1280000
$ node /tmp/pin904/proof/gate-BEFORE.mjs --root /tmp/pin904/proof/bigtree
Error: spawnSync git ENOBUFS
  stdout: 100644 e254807b06e1 0	d001/f000.txt 100644 c1b0730e0133447badcfd47fd144e254807b06e1 0	d001/f001.txt ...
  stderr: ''

Node.js v26.11.1
exit=1
$ node /tmp/pin904/proof/gate-AFTER.mjs --root /tmp/pin904/proof/bigtree
check-cited-plugin-task-version: SKIP — the manifest's import: block names no `charly` path; the version cannot be derived, so no citation is judged
exit=0

Observation 2 — the self-test's skip. A fixture repo whose index records no charly gitlink — the shape a session worktree that has not materialized the pinned checkout has:

$ node /tmp/pin904/proof/gate-BEFORE.mjs --root /tmp/pin904/proof/nocharly --self-test
  FAIL  the pinned charly's version could not be derived: the index records no gitlink for charly
exit=1
$ node /tmp/pin904/proof/gate-AFTER.mjs --root /tmp/pin904/proof/nocharly --self-test
  SKIP  the self-test cannot run: the pinned charly's version could not be derived: the index records no gitlink for charly
  SKIP  materialize the pinned charly with: bash scripts/init-submodules.sh  (the working set includes charly)
exit=0

The gate and its self-test, live, on this tree:

$ node scripts/check-cited-plugin-task-version.mjs
check-cited-plugin-task-version: OK — 2 plugin-task version citation(s) in this repo's own prose, all naming the version the pinned charly compiles (v0.2026297.2108) — judged on the INDEX, the tree a commit ships
exit=0
$ node scripts/check-cited-plugin-task-version.mjs --self-test
  PASS  the unmutated tree is GREEN — 2 citation(s), all naming v0.2026297.2108
  PASS  the predicate is calibrated — it matches 2 known positive(s)
  PASS  mutation 'a citation names a version the pin does not compile' is caught by assertion V
  PASS  mutation 'the pinned charly advances to a version the prose has not been re-keyed to' is caught by assertion V
  PASS  mutation 'the pinned charly's go.mod names another version' is caught by assertion V
  PASS  negative control — a version on a line naming another module stays GREEN
  PASS  the gate judges the tree a commit SHIPS — where the worktree and the index disagree, the INDEX is judged (fixture)
check-cited-plugin-task-version --self-test: OK (every assertion is live)
exit=0

The evidence lines, in the tree this PR pushes:

scripts/check-cited-plugin-task-version.mjs:84:const MAX_EXEC_BYTES = 64 * 1024 * 1024;
scripts/check-cited-plugin-task-version.mjs:87:function gitOut(args, opts = {}) {
scripts/check-cited-plugin-task-version.mjs:114:  const raw = gitOut(["ls-files", "-s", "-z"], { cwd: rootDir, encoding: "utf8" });
scripts/check-cited-plugin-task-version.mjs:365:    console.log(`  SKIP  the self-test cannot run: the pinned charly's version could not be derived: ${pinned.notice}`);
charly.yml:568:      - check: the cited-version gate discriminates — a stale citation, an advanced pin and a moved owner each turn it RED, and a version naming another module stays GREEN (fixtures) — and SKIPS visibly where the pinned charly's checkout is absent

The head this evidence belongs to — the two anchor forms the linter compares:

$ git rev-parse HEAD
02ac493d9075f7c2fac060e811724709dcf70955

Rulebook compliance

Change classification

  • Change class: a node gate in this repo's own scripts/ — the verify task's step description and the gate's own robustness. The gate that owns this class is the umbrella's own charly task verify: the diff touches charly.yml (the manifest that declares the pin contract) and the gate the verify task runs, and the changed path — the gate — is executed live inside it.
  • Verification gate: ./charly/bin/charly task verify — the whole log is pasted above — plus the gate's own --self-test, the "before" copy of the gate taken from origin/main and run against the 20,000-file fixture and the no-gitlink fixture, both pasted above.
  • Attribution tier: fully tested and validated — the change-class gate passed on the final tree with zero warnings, and the changed path (the gate, and its self-test) was executed live, with the "before" runs retained.

Filed issues

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

…, and must not fail closed where it cannot run

The fresh validator on #690 raised two minor observations against the gate
that #690 introduced. Both are in code this change owns, so both are fixed
here rather than filed away.

1. The buffer that scales with the repo was Node's 1 MiB default. The
   tracked set's own `git ls-files -s -z` grows with the repo - MEASURED on
   this tree, 1458 entries cost 108,140 bytes, 74.2 per entry - so ~14,137
   files cross the default, and past it the gate died with ENOBUFS instead of
   judging. Every git call now goes through ONE helper that raises the
   ceiling to 64 MiB, so the gate keeps judging on the trees it exists to
   judge. PROVEN on a 20,000-file fixture (1,280,000 bytes of ls-files
   output): #690's gate exits 1 with ENOBUFS, this one exits 0 and reads the
   whole set.

2. The --self-test FAILED in a tree whose pinned charly has no checkout,
   where the plain gate correctly SKIPS. Its mutations are built FROM the
   pinned version, so such a tree cannot run them, and failing there turned
   every such tree's verify red over a check that cannot run - the
   fail-closed-infrastructure class the sibling gates refuse
   (scripts/check-pr-body-gate.mjs, scripts/check-harness-config.mjs). It now
   SKIPS VISIBLY, names the one command that materializes the checkout, and
   exits 0. PROVEN on a fixture whose index records no charly gitlink:
   #690's gate exits 1 with FAIL, this one exits 0 with the visible skip.

Refs #689

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

Copy link
Copy Markdown
Contributor

Review — PASS

Verification of the body's claims against the diff

File count and line counts. Body states "2 files changed, 37 insertions(+), 13 deletions(-)". The two file diffs reconcile exactly: charly.yml (+1/−1) and scripts/check-cited-plugin-task-version.mjs (+36/−12). Hunk-by-hunk: comment rewrite +6/−1, MAX_EXEC_BYTES+gitOut block +13, four gitOut routing hunks +1/−1 each, indexContent +1/−2, readPinned ×2 +1/−1 each, fixture calls +2/−2, self-test skip +9/−2. Totals match the stated counts. Head SHA 02ac493d… matches the commit list. ✓

Observation 1 — buffer ceiling. The diff adds MAX_EXEC_BYTES = 64 * 1024 * 1024 and a single gitOut(args, opts) wrapper ({ maxBuffer: MAX_EXEC_BYTES, ...opts }), and routes every git invocation shown through it — including the two that scale with the repo (ls-files -s -z, ls-tree -r --name-only) and the per-file cat-file blob, whose bespoke 64 MiB maxBuffer is correctly removed so it now inherits the one ceiling. The claim "raised ONCE, every call inherits it" holds for every call present in the diff. The before/after proof is legitimate: the BEFORE copy (from origin/main) dies with ENOBUFS at ls-files (its stdout shows the ls-files record stream), and AFTER reads the full 1,280,000-byte set and proceeds to its manifest skip — i.e. it demonstrably clears the buffer, which is the thing under test.

Observation 2 — self-test skip. The if (!pinned.version) arm is replaced (not complemented) with two visible SKIP lines naming bash scripts/init-submodules.sh and process.exit(0). The proof pair (BEFORE FAIL/exit 1 vs AFTER two SKIP/exit 0) matches the diff exactly. This aligns with the repo's stated sibling-gate convention (check-pr-body-gate.mjs, check-harness-config.mjs), and the charly.yml description is corrected to say the step "SKIPS visibly where the pinned charly's checkout is absent" — consistent with the live verify log, which shows that exact step text as [pass] on a tree that does have the checkout.

Evidence lines. The five pasted evidence anchors (mjs:84, :87, :114, :365, charly.yml:568) are consistent with the hunk offsets (insertion begins at new line 75; MAX_EXEC_BYTES lands ~84, gitOut ~87, trackedFiles call ~114; the self-test block at new line ~356 puts the SKIP log at ~365). The verify log's 35 steps / 0 failed / 0 skipped is coherent with a tree that has the pinned checkout (so the new skip path is not taken).

R-claims. R2 (single ceiling), R3 (no workaround — a real limit, not a retry), R5 (hard-fail arm deleted, no residual fail-closed path), R7/R8 (proofs are the real origin/main copy vs the real fixture repos) are all supported by the diff. Scope is clean: only the two files, no leftover duplicate ceiling, no dead code.

Comments

The comment thread is empty — no maintainer/operator sign-off is present, and none is treated as one. The change stands on its own reproduced evidence, which it does.

Non-blocking observations

  • The self-test's new skip path also fires when a checkout exists but the version genuinely cannot be derived (e.g. malformed go.mod), since both branches return a notice and now skip. This mirrors the plain gate's existing skip semantics, so it is consistent rather than a regression, but it means a broken pin would keep verify green-by-skip. Worth a future tightening, not a blocker here.
  • gitOut places ...opts after maxBuffer, so a future caller passing maxBuffer would override the ceiling; no current caller does, so the single-ceiling invariant holds today.
  • No committed in-repo fixture exercises the >1 MiB tracked set; the buffer fix is proven only by the retained external fixture runs. Acceptable given the repo's live-fixture convention, but a self-test case would harden it.

The change does what it claims, the body's counts/evidence reconcile with the diff, and nothing in scope is dishonest or unsafe.

Verdict: PASS


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

View action run

@aitrawog

Copy link
Copy Markdown
Contributor Author

RESOLVED — superseded by #693.

This PR merged (squash 362bc09d, tag v2026.299.0004), and the fresh charly/pr-validator on it raised three minor, non-blocking observations against the gate it changed:

  1. the gate SKIPPED a broken pin — a materialized pinned charly whose go.mod carries no plugin-task produced a visible SKIP and exit 0, so the citations were compared against nothing;
  2. the one buffer ceiling could be overridden by a call — gitOut spread the caller's options after the ceiling, so a caller passing maxBuffer restored the exact defect the ceiling exists to remove;
  3. the >1 MiB tracked-set case carried no committed coverage — it was proven only by the external fixture runs in this PR's body, so a later change to the file could regress it with nothing turning red.

R1 is unambiguous: a finding raised on your own PR is never filed away — it is fixed, or rebutted on the thread with evidence. All three are in the control this PR owns, so all three are fixed in #693 (issue #692), each proven able to fail against a real prior artifact.

Nothing was lost in this merge: #693 carries every one of the three findings, and this PR's own work (9189569b's prose corrections, 362bc09d's buffer and skip handling) is merged and untouched.

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

github-actions Bot pushed a commit that referenced this pull request Oct 26, 2026
…he gate's, and the big tracked set must carry committed coverage (#693)

The fresh validator on #691 raised three minor, non-blocking observations
against the gate that #690 introduced and #691 hardened. All three are in code
this change owns, so all three are fixed here rather than filed away.

1. The gate SKIPPED a BROKEN pin. readPinned returned a notice for every
   reason the version cannot be derived, and the reason was not classified:
   "the checkout is not here" and "the pinned charly's go.mod requires no
   plugin-task" had the same outcome - a visible SKIP and exit 0. The second
   is a DEFECT in the tree: the citations cannot be judged against anything,
   and a control that reports success over a pin it cannot judge is not a
   control. The notice is now CLASSIFIED - absent (this tree cannot run the
   check) stays a visible SKIP, broken (the tree is inconsistent with what the
   check needs) is RED, in the plain gate and in the --self-test alike, off ONE
   classification so the two can never disagree. PROVEN on a fixture whose
   pinned charly is materialized and whose go.mod requires no plugin-task:
   #691's gate exits 0 with a SKIP, this one exits 1 with the finding.

2. The one buffer ceiling could be overridden by a call. gitOut was
   { maxBuffer: MAX_EXEC_BYTES, ...opts } - the spread came last, so a caller
   passing maxBuffer replaced the one ceiling and restored the exact defect
   the ceiling exists to remove. The ceiling is now applied AFTER the spread,
   so it wins by construction instead of by convention. PROVEN: a copy of this
   file with the old order fails the new self-test case that reads a tracked
   set through a call asking for a 1 KiB buffer.

3. The >1 MiB tracked-set case carried no committed coverage - it was proven
   only by the external fixture runs pasted in #691's body. Four --self-test
   cases now carry it, in the repo's own live-fixture convention: the gate
   JUDGES a tracked set over the old 1 MiB default, the one ceiling cannot be
   overridden by a call, a broken pin is RED, and an unmaterialized checkout
   is still a visible SKIP. PROVEN: a copy of this file without the ceiling
   fails the first two and exits 1.

Refs #692

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)
@aitrawog
aitrawog deleted the feat/gate-robustness-690 branch November 1, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant