Skip to content

fix(gate): a broken pin must be RED, the one buffer ceiling must be the gate's, and the big tracked set must carry committed coverage - #693

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/gate-broken-pin-692
Oct 26, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/gate-broken-pin-692

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Closes #692

Summary

Head c03caec3a27cffdba21dc655b90fa28a2c4cc101 — 2 files changed, 257 insertions(+), 28 deletions(-).

This is #691's review round. The fresh charly/pr-validator on #691 passed the change and raised three minor, non-blocking observations against the gate that #690 introduced and #691 hardened. 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. All three are in code this change owns, and all three are fixable without touching a claim, so all three are fixed here, in the same repo, in the same control, in one commit.

Finding 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 own go.mod requires no plugin-task version" 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 — the checkout is not materialized, the index could not be read) stays a visible SKIP, and broken (the tree is inconsistent with what the check needs — the manifest names no charly path, the index records no gitlink, the pinned charly carries no plugin-task) is RED, in the plain gate and in the --self-test alike, off one classification so the two can never disagree.

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 that passed 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.

Finding 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; nothing in the repo exercised it, so the next change to this file could regress the ceiling and nothing would turn red. 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.

All three are proven able to fail, against the real prior artifacts — origin/main's own copy of the file, and copies of this commit's file with one line reverted:

finding the artifact without the fix this change
the broken pin exit 0 — SKIP — the pinned charly (043a6dd) requires no plugin-task version exit 1 — FAIL charly.yml: the pinned charly (043a6dd) requires no plugin-task version — the tree is BROKEN
the one ceiling exit 1 — FAIL a caller's own maxBuffer replaced the gate's one buffer ceiling (the pre-fix order) exit 0 — the ceiling is the gate's
the >1 MiB tracked set exit 1 — FAIL the gate did not judge a tracked set over the old 1 MiB default (no ceiling at all) exit 0 — 1,305,118 bytes judged

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 what the step does: a broken pin is RED, an unmaterialized checkout is a visible SKIP, and a tracked set over the old 1 MiB default is judged rather than fatal
scripts/check-cited-plugin-task-version.mjs finding 1 — the notice is classified, and a broken pin is RED in both the plain gate and the --self-test; finding 2 — the one ceiling is applied after the caller's options; finding 3 — the four --self-test cases and their fixtures

Nothing else is in this change. #690's prose corrections and #691's buffer/skip work are merged (9189569b, tag v2026.298.0823; 362bc09, tag v2026.299.0004) 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 sequenced after this round so the corpus is not regenerated twice.

How tested

The R10 gate, on the committed tree this PR pushes. The umbrella's own charly task verify, run on c03caec3a27cffdba21dc655b90fa28a2c4cc101 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
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, a version naming another module stays GREEN, a broken pin is RED, an unmaterialized checkout is a visible SKIP, and a tracked set over the old 1 MiB default is judged rather than fatal (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, 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 three findings, each proven able to fail. The "before" artifacts are real: origin/main's own copy of the file for finding 1, and copies of this commit's file with one line reverted for findings 2 and 3.

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

Finding 1 — the broken pin. The fixture is a tree whose pinned charly is materialized and whose go.mod requires no plugin-task — the pin is broken, and the tree carries it in the index, so the gate can read the pin and cannot derive the version from it:

$ FIX=$(node /tmp/pin904/proof2/make-broken-pin.mjs)   # the fixture: a MATERIALIZED pinned charly whose go.mod requires no plugin-task
$ node /tmp/pin904/proof2/gate-BEFORE.mjs --root $FIX   # origin/main's copy of the gate (=#691)
check-cited-plugin-task-version: SKIP — the pinned charly (043a6dd) requires no plugin-task version; the version cannot be derived, so no citation is judged
exit=0

$ node /tmp/pin904/proof2/gate-AFTER.mjs --root $FIX    # this change's copy
  FAIL  charly.yml: the pinned charly (043a6dd) requires no plugin-task version — the tree is BROKEN: the owner of the pin carries no plugin-task, so this repo's citations cannot be judged
check-cited-plugin-task-version: 1 finding(s)
exit=1

Findings 2 and 3 — the one ceiling. The mutation is one line, and the self-test cases that cover it turn red without it:

=== PROOF 2: the one buffer ceiling cannot be overridden by a call ===
$ sed 's/{ ...opts, maxBuffer: MAX_EXEC_BYTES }/{ maxBuffer: MAX_EXEC_BYTES, ...opts }/' gate-AFTER.mjs > gate-MUT-ceiling.mjs   # the pre-fix ORDER
$ node /tmp/pin904/proof2/gate-MUT-ceiling.mjs --root . --self-test
  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)
  PASS  the gate JUDGES a tracked set over the old 1 MiB default — 1305118 bytes of ls-files output, exit 0
  FAIL  a caller's own maxBuffer replaced the gate's one buffer ceiling
  PASS  a pin whose owner carries NO plugin-task version is RED — the check does not skip a broken pin
  PASS  a pin whose checkout is not materialized is still a visible SKIP — the check does not fail closed on it
check-cited-plugin-task-version --self-test: FAIL (1)
exit=1

=== PROOF 3: with no ceiling at all (Node's 1 MiB default) ===
$ sed 's/{ ...opts, maxBuffer: MAX_EXEC_BYTES }/{ ...opts }/' gate-AFTER.mjs > gate-MUT-nobuffer.mjs
$ node /tmp/pin904/proof2/gate-MUT-nobuffer.mjs --root . --self-test
  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)
  FAIL  the gate did not judge a tracked set over the old 1 MiB default (0 bytes, exit 1)
  FAIL  a caller's own maxBuffer replaced the gate's one buffer ceiling
  PASS  a pin whose owner carries NO plugin-task version is RED — the check does not skip a broken pin
  PASS  a pin whose checkout is not materialized is still a visible SKIP — the check does not fail closed on it
check-cited-plugin-task-version --self-test: FAIL (2)
exit=1

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)
  PASS  the gate JUDGES a tracked set over the old 1 MiB default — 1305118 bytes of ls-files output, exit 0
  PASS  the one buffer ceiling cannot be overridden by a call — a caller's own maxBuffer does not replace it
  PASS  a pin whose owner carries NO plugin-task version is RED — the check does not skip a broken pin
  PASS  a pin whose checkout is not materialized is still a visible SKIP — the check does not fail closed on it
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:100:const MAX_EXEC_BYTES = 64 * 1024 * 1024;
scripts/check-cited-plugin-task-version.mjs:108:function gitOut(args, opts = {}) {
scripts/check-cited-plugin-task-version.mjs:271:      kind: "broken",
scripts/check-cited-plugin-task-version.mjs:283:      kind: "broken",
scripts/check-cited-plugin-task-version.mjs:316:    kind: "broken",
scripts/check-cited-plugin-task-version.mjs:665:        `  PASS  the gate JUDGES a tracked set over the old 1 MiB default — ${size} bytes of ls-files output, exit ${judged.code}`,
scripts/check-cited-plugin-task-version.mjs:686:        "  PASS  the one buffer ceiling cannot be overridden by a call — a caller's own maxBuffer does not replace it",
scripts/check-cited-plugin-task-version.mjs:704:        "  PASS  a pin whose owner carries NO plugin-task version is RED — the check does not skip a broken pin",
scripts/check-cited-plugin-task-version.mjs:721:        "  PASS  a pin whose checkout is not materialized is still a visible SKIP — the check does not fail closed on it",
charly.yml:568:      - check: the cited-version gate discriminates — a stale citation, an advanced pin and a moved owner each turn it RED, a version naming another module stays GREEN, a broken pin is RED, an unmaterialized checkout is a visible SKIP, and a tracked set over the old 1 MiB default is judged rather than fatal (fixtures)

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

$ git rev-parse HEAD
c03caec3a27cffdba21dc655b90fa28a2c4cc101

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, origin/main's own copy of the gate run against the broken-pin fixture, and this commit's copy with the ceiling's order and the ceiling itself reverted, all 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)

…he gate's, and the big tracked set must carry committed coverage

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)
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

What the change is

Two files, and the diff matches the body's claimed shape (+257/−28): a one-line description update in charly.yml, and the gate script gaining (1) a kind classification on every "version cannot be derived" return in readPinned, (2) the buffer ceiling applied after the caller's options in gitOut, and (3) four --self-test cases with real fixtures.

Correctness (re-derived from the diff)

  • Finding 2 — the ceiling. gitOut is changed from { maxBuffer: MAX_EXEC_BYTES, ...opts } to { ...opts, maxBuffer: MAX_EXEC_BYTES }. The ceiling now wins by construction, which is exactly what the body claims. Verified against the code, not the prose.
  • Finding 1 — classification. Every readPinned return that cannot derive a version now carries kind: absent for the unreadable-index and missing-checkout (ls-tree throw) cases; broken for "manifest names no charly path", "index records no gitlink", and "pinned charly requires no plugin-task". All notice-returning paths are covered; none still returns a bare {notice}. The --self-test top guard now branches on kind === "absent" for the visible SKIP and fails RED otherwise, and the plain gate's guard is narrowed to !pinned.version && pinned.kind === "absent", so a broken pin no longer short-circuits to exit 0. The broken path then flows into the gate's existing finding-report contract (the proof's FAIL charly.yml: … / N finding(s) shape is that contract), and the shipped end-to-end self-test case C (gateOn(broken) requiring code === 1 and the notice text, with no SKIP) is the guard that would turn red if that path were absent. That is acceptable coverage for the claim.
  • Finding 3 — coverage. Cases A–D are real fixtures with real indexes, run the gate as a subprocess (gateOn), and are cleaned up in finally. Case B (gitOut(..., { maxBuffer: 1024 }) returning >1024 bytes) genuinely discriminates the spread order: with the pre-fix order the caller's 1024 wins and execFileSync throws ENOBUFS, which the catch turns into a FAIL. Case A measures the 1.3 MB tracked set through the same helper and asserts the gate judged it (exit 0 + SKIP). The fixtures (brokenPinFixture, absentCheckoutFixture, bigTrackedSetFixture, shared fixtureRepo) are coherent and match the three behaviors.

Honesty of the body

File count, insertions/deletions, the file table, the evidence line numbers, and the charly.yml description all reconcile with the diff. The three findings map one-to-one onto the three code changes. No contradiction found.

Tests

The change ships coverage that would fail without it: case B fails under the pre-fix spread order, case A fails with no ceiling, case C fails if a broken pin is skipped. The self-test is wired into the repo's verify step (the charly.yml description is updated to match), so the coverage actually runs.

Security / scope

No secrets, no shell interpolation (execFileSync/spawnSync with argv arrays), fixtures in tmpdir and removed. Two coherent files; the legacy unclassified notice and the pre-fix spread order are replaced, not duplicated.

Comments

None to disposition (0 comments).

Minor, non-blocking

  • bigTrackedSetFixture creates 5,000 real files and four subprocess gate runs per self-test invocation; runtime grows but is bounded and cleaned up.
  • The plain gate's broken outcome relies on the pre-existing findings no-version path rather than an explicit block mirroring the self-test's top guard. It is exercised end-to-end by case C, so it is covered; an explicit block would make the symmetry with the self-test more obvious but is not required.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 26, 2026 00:24
@github-actions
github-actions Bot merged commit eb69280 into main Oct 26, 2026
3 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 26, 2026
@aitrawog

Copy link
Copy Markdown
Contributor Author

STATUS — #693 merged; the validator's two minor observations are answered here, with the evidence, rather than left open.

Merge: squash eb692803, tag v2026.299.0024; the CHANGELOG entry 2026.299.0024 arrived on main in the dispatcher's follow-up commit 7df6927 — the tag-on-merge mechanism exactly as #690's prose now describes it. The R10 gate that the body pasted ran on the pushed head c03caec: 35 step(s), 0 failed, 0 skipped, VERIFY_EXIT=0.

Both observations are the validator's own, so both are answered here on the thread. Neither identifies a defect, and the measurements below are the reason.


Observation 1 — "bigTrackedSetFixture creates 5,000 real files and four subprocess gate runs per self-test invocation; runtime grows but is bounded and cleaned up."

The cost is measured, and it is small against the gate that owns it:

$ for i in 1 2 3; do s=$(date +%s%N); node scripts/check-cited-plugin-task-version.mjs --self-test > /dev/null 2>&1; rc=$?; e=$(date +%s%N); echo "run$i: $(( (e-s)/1000000 )) ms  exit=$rc"; done
run1: 402 ms  exit=0
run2: 400 ms  exit=0
run3: 394 ms  exit=0
$ s=$(date +%s%N); node scripts/check-cited-plugin-task-version.mjs > /dev/null 2>&1; rc=$?; e=$(date +%s%N); echo "gate: $(( (e-s)/1000000 )) ms exit=$rc"
gate: 79 ms exit=0

So the whole self-test is ~400 ms, of which the four subprocess gate runs — the coverage itself — are ~320 ms, and the big fixture is ~46 ms. The gate that runs it (charly task verify) takes minutes, most of it the 411-submodule pin audit. The cleanup is in the code, not in a promise: every fixture is created by mkdtempSync and removed in a finally — scripts/check-cited-plugin-task-version.mjs:408-409 (the shared repo fixture), :692-693 (the big tracked set), :710-711 (the broken pin), :727-728 (the absent checkout).

The alternative was measured too, and it is not worth taking. The file count is a function of the shape, and a deeper path buys a smaller count at a real cost in complexity:

$ node /tmp/pin904/proof2/measure-fixture-cost.mjs
flat 200-char names : files=5000 ls-files=1280000 bytes (1.22 MiB) create=27ms add=19ms over1MiB=true
nested 4x250-char paths: files=1000 ls-files=1060000 bytes (1.01 MiB) create=10ms add=10ms over1MiB=true

1,000 files at four nested 250-char levels would clear the 1 MiB default with a fifth of the files and would save ~26 ms of a 400 ms self-test. That is the whole trade: 26 ms, paid for a fixture whose shape is materially harder to read and whose margin over the 1 MiB default is 12 KB instead of 224 KB. The flat shape is the one whose intent is obvious at a glance — "5,000 tracked paths make ls-files bigger than Node's default buffer" — and it is what the committed case asserts. Bounded and cleaned up, as the observation itself says.

A note in the same spirit, since it is the clearest evidence that the ceiling is load-bearing: while measuring this, the measurement script hit Error: spawnSync git ENOBUFS on the very same 5,000-file fixture, because it used Node's default 1 MiB buffer. That is the defect the ceiling exists to remove, reproduced outside the gate.


Observation 2 — "The plain gate's broken outcome relies on the pre-existing findings no-version path rather than an explicit block mirroring the self-test's top guard."

The single path is the design, and adding a second one would work against the file's stated contract. findings() carries this docstring:

/** The contract, in one place, so the gate and --self-test assert the SAME thing. */
function findings(cites, pinned) {

The plain gate's flow is that one contract, and nothing else:

const cites = scanCitations(root);
const pinned = readPinned(root);
if (!pinned.version && pinned.kind === "absent") {
  console.log(`check-cited-plugin-task-version: SKIP — ${pinned.notice}; …`);
  process.exit(0);
}
const n = report(findings(cites, pinned));
if (n) {
  console.error(`check-cited-plugin-task-version: ${n} finding(s)`);
  process.exit(1);
}

A broken pin therefore surfaces as FAIL charly.yml: <the notice> — the same shape as every other finding this gate reports — and exits 1. An explicit broken block beside it would be a second path producing the same outcome in a different shape, and would break the property the docstring states. The observation itself confirms the behaviour is covered end to end: the shipped case C asserts code === 1, the notice text, and the absence of any SKIP.

There is a further reason the asymmetry is right rather than accidental. The self-test's explicit block exists because the self-test has to decide whether it can run at all — its mutations are built FROM the pinned version, so with no version it must abort before building them, and it must not SKIP a broken tree. The plain gate has no such step: it has already computed its findings, and the honest thing to do with a broken pin is to report it as the finding it is. So the two are not doing the same job, and they should not look the same.

One property of that guard is worth stating, because it is the fail-closed direction. Only kind === "absent" skips. A notice that is unclassified — any future readPinned return that forgets its kind — falls through to findings() and is RED, not a skip. The gate's default is to fail closed on a tree it cannot judge.

Nothing here is filed away. Both observations are answered on this thread with the measurements and the code that back them, and the underlying issues — #692 (the three findings #691 raised) and #689 (the umbrella's own prose the tree falsified) — are closed with their own RESOLVED records.

The next leg in the chain is the corpus projection, opencharly/marketplace#578, which stays sequenced after this round so the corpus is regenerated once, from the umbrella's newest tag.

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

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.

R1: the cited-version gate must not SKIP a broken pin, and its one buffer ceiling must not be overridable

1 participant