Repository navigation
Verify cached jq before use and preserve fresh coverage proofs - #643
Conversation
Part of #621. Implemented by an operator-run gpt-6-astra session at the owner's request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Operator: this stays a held draft until RigForge 1.18.1 is tagged (due Fri 2026-11-06, Sat 11-07 at the latest). 1.18.1 is cut from develop, so merging this first would widen that release. After the tag: rebase on develop, run the agent review, and request the owner's approval. |
|
Operator: released to the runner (owner 2026-11-06). New work goes to the local Flash-Next model first; Claude only after three local rounds or for sensitive work. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
PASS What I investigatedPR #643 (head 8c43f6a) closes the part of #621 that this repository can finish alone:
Reviewed head: |
Owner brief for
|
What's the problem
Issue #621:
tests/coverage.shtrusted an executable jq cache hit without checking its pinnedchecksum. A corrupt or stale executable could reach the coverage container. Failed tool setup
also left the previous coverage report in place.
This checkout has no shared hosted archive/wheel cache or cached miner/build tree. Docker inputs
already use digest pins. Adding shared caches before measuring setup misses would expand the
rollout without the evidence the issue requires.
How I fixed it
read-only. Refuse corrupt, symlink and directory entries before Docker starts.
warm hit works with a read-only cache directory; legacy unqualified entries are ignored.
non-ignored untracked inputs, including file type, executable status and link identity. Escape
names so newline-bearing paths cannot forge rows; do not follow symlinks outside the checkout.
installation/build commands and gates. Add an offline black-box regression to
make test-suiteand document the rollout requirements in
tests/README.md.No existing test assertion, workflow, version, release note, miner source, build tree or coverage threshold
was changed. No shared cache was enabled. No commit, push, GitHub write, remote connection or bench
job was made.
Here is the proof
Base candidate:
81ec49584fa88196ef915435f7a768d0c20b866c; the implementation is the uncommitteddelta in this checkout. The before regression uses
git show HEAD:tests/coverage.shin a freshscratch directory, so the working implementation is never swapped out.
Commands and results
Executed with
python3 -: the original script fails the new regression withFAIL: cold cache run failed, exit 1. The same regression against the implementation,bash tests/test-coverage-cache.sh, passes on macOS. The harness verifies the actual coveragescript using synthetic curl/Docker boundaries and real checksum/jq tools; it is not a kcov run.
bash tests/test-tool-pin-watch.sh: all nine pin-watcher cases pass, including malformed input.shellcheck --severity=warning tests/coverage.sh tests/test-coverage-cache.sh: passes.shfmt -i 4 -d tests/coverage.sh tests/test-coverage-cache.sh: passes.Also passes with the checksum-verified CI-pinned shfmt 3.14.1 binary.
git diff --check: passes.FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh: passes, including the base ratchet.make test: failed in lint, exit 2 after 1092.676 seconds; the test recipes did not run.The output filter retained only the make failure, so it cannot identify the lint diagnostic.
A separate unfiltered
make lintand standalonemake test-suitewere started for that reason.make test-suite: passes, exit 0 in 1698.900 seconds. The main runner reports 2,431 passedand 0 failed; all subsequent credential, readiness, clone-pin, rebuild, pin-watcher and new
coverage-cache regressions complete successfully. The existing explicit macOS skip remains:
SKIP: tune bench black-box timing tests run in the Linux CI jobs (#292).make lintwith installed shfmt 3.13.1: ShellCheck and topology/file-budget gates pass;formatting fails on unchanged
tests/run.sh. CI pins shfmt 3.14.1. Reranmake lintwiththat version first on PATH, downloaded into temporary storage and verified against its official
release SHA256
b7c872db63553ccffc7253aba3ed7d4885a27d83f1ba567b1138c6315a5847e5: passes,exit 0. Existing tests were not reformatted.
make coveragebefore the change: cold jq acquisition reached Docker, then failed withexec format error; elapsed 8.341 seconds. The output-filter pipeline returned zero, so this isrecorded as a failed coverage attempt, not a successful command.
make coverageafter the change, cold cache: setup 2 seconds, verification 0 seconds;failed at kcov startup with
exec format error; command exit 2, elapsed 3.502 seconds.make coverageafter the change, warm cache: setup 0 seconds, verification 0 seconds;subprocesses failed with
Exec format error. Stopped only this session's container, identifiedby its exact checkout mount; command exit 2, elapsed 67.892 seconds. No coverage PASS was obtained.
make test-e2e: both deploy and appliance containers attempted; both failed to launch Bashwith
exec format error. Exit 2, elapsed 12.648 seconds. Neither mode is claimed as passing.the locally registered digest, and a manifest-inspection attempt failed verification. No shared
image was removed or replaced; the supplementary native test below uses a separately inspected
immutable Linux/arm64 image already available to the engine.
npx --yes markdownlint-cli2@0.23.3 tests/README.md: the default npm cache was not writable.Retried with a fresh temporary npm cache; lint found the pre-existing extra blank line in
untracked
ISSUE.md. That operator input was left unchanged.npx --yes markdownlint-cli2@0.23.3in a temporary directory containing the unchanged repositoryMarkdown lint configuration,
tests/README.mdandPR-BODY.md, using a fresh temporary npmcache outside the scanned directory: passes, two files, zero issues. This isolates the authored
prose from untracked issue input. A final retry with the npm cache inside the scan directory
also linted dependency READMEs and failed; moving that temporary cache outside restores the
intended two-file check without changing the lint configuration.
These are individual local observations, not a before/after CI performance comparison. The
whole-second setup counters cannot resolve subsecond verification cost. Failed Docker startup
times do not measure valid cold/warm coverage runs.
Before/after coverage behavior, inputs and platform manifest
b1c22172dd303f3be49e935aa56aa48a8b7a46e0bc838b4997d3bb451495870f30c442617f3d8e040bf0ec2cba19cc2ee517b668f3a3d50b2d3de1c435138a8atests/run.sh, kcov--clean, ptrace capability and seccomp exceptionrigforge.shandutil/proposed-grub.shThe new regression adds: cold acquisition with an ignored legacy cache; read-only warm hit;
corrupt executable refusal; bad checksum download; interrupted download; symlink and directory
refusal; recovery after manual deletion; changed source producing a new report; changed jq digest
selecting another cache entry; Docker failure; zero-line and missing reports; below-floor failure;
explicit report-only behavior; normalized paths; fixed scope/platform/clean invocation; private
storage permissions and cleanup; newline and leading-dash filenames; link identity, missing
targets and executable-mode changes; and an absent tracked input. The candidate-change check uses an actual disposable Git clone
and switches its reference to an already-existing parent commit without creating any commit.
It verifies the real production
source-commit.txtandsource-files.sha256outputs. A separatenegative control removes only the provenance block and fails on the missing commit stamp.
Exact cache-verification negative-control command, executed with
python3 -:Result:
FAIL: corrupt cache reached Docker, exit 1. This restores only the original warm-hitverification bypass in a scratch implementation; the shipped regression is unchanged.
Exact provenance negative-control command, executed with
python3 -:Result: the driver passes after verifying the regression fails with exit 1 and the specific
missing-source-stamp diagnostic. This experiment is separate from the shipped regression script.
Native Linux/arm64 regression command, executed with
python3 -:Result: passes in a fresh container with real package acquisition. This is supplementary native
Linux regression proof using an already-available immutable image. It does not replace either
existing Linux/amd64 e2e mode or the real kcov gate. The worktree's external Git metadata is copied
into a disposable local clone for this container; only that clone is mounted read-only.
The source manifest distinguishes regular/executable files, symlinks and missing tracked files.
It hashes regular-file bytes through stdin and symlink target text plus the terminating newline
without following links. Names use Bash shell escaping under the C locale; sorted records remain
single lines even for unusual filenames. Ignored/generated files are excluded.
Before/after required-gate and input inventory
Every row below is retained at its existing frequency. No required status was renamed, removed,
made optional or replaced by cached proof. Hosted runners remain Ubuntu 24.04.
make test-suite; all existing entries below; simulated Linux CPU profiles and deprecated Darwin pathsb2d4c3d9ca1da74d0e6d5ccce772d401acc8be03; fresh private home; real packages/build/setup; denied-entrypoint negative control; uninstallBranch-protection settings are not present in this checkout; no remote required-status audit was
performed. The documented independent
adversarial-reviewrequirement remains unchanged. Thelocal reviewer passes are not a GitHub head-SHA review status.
make test-suiteretainstests/run.sh,test-contract-credentials.sh,test-access-token-readiness.sh,test-docs-clone-pin.sh,test-staged-rebuild.sh, andtest-tool-pin-watch.sh; onlytest-coverage-cache.shis added. The measured suite retainstest-suite-liveness.sh,test-control-hardening.sh,test-appliance-pools.sh,test-donation.sh,test-sister-reconcile.sh,onion-proxy.sh,test-api-refresh-liveness.sh,test-control-upgrade.sh,test-e2e-apt-prereqs.sh,test-e2e-gate-fail-closed.sh, andtest-control-spool-cap.py, including Python compilation/server checks and their explicit skips.The separate credential/readiness regressions retain their extracted functions from
e2e-pithead.sh,e2e-pithead-control.sh,e2e-pithead-tokens.shande2e-control-replay.sh.The untouched measured suite contains 188 named blocks, 1,996 static assertion-helper calls
(944 equality, 722 contains, 136 absent, 194 return-code), and 26 lexical Python asserts. These
are source-inventory counts, not runtime pass counts. Every block below is before = after:
parsing; pool user/token default; parse errors; first-run prompts; donation validation;
append-once; line removal; generic Linux; API default; server CPU; desktop CPU; Darwin;
multiple pools; explicit user; TLS fingerprint; proxy; miner-user/MSR; IPv6/TLS/empty token;
generation idempotency.
ceiling; ceiling propagation; reserve/thread parsing; ceiling parsing; numeric rejection;
thread cap; keep-existing guard; kernel merge; parameter removal; rewrite escaping.
already-built detection; rebuild flag; upgrade/help/unknown command; stopped state;
rebuild command surface; upgrade check.
runtime state; apply while stopped; autotune target; autotune reconciliation; sister API
reconciliation; control reconciliation; worker-root validation.
watchdog health; autotune tri-state; target ranking; upgrade retune; live-worker wait; bearer handling.
unavailable API; unavailable API during tuning; HugePages shapes; hashrate parsing.
package-manager branches; deployment pointer; Darwin processes; Darwin login agent; reboot gate;
miner-user service; MSR preset/RMW; ownership handoff; miner-user rendering; service override;
full deployment; rerun idempotency; CLI install flag; noninteractive output.
lockdown; ISA preflight; control receiver; pool connection; NUMA; BIOS flow; inactive service;
ownership reconciliation; script-directory symlinks; CLI-link guard; MSR verification;
unverifiable MSR; miner-user/root MSR; exposure advisory; MSR preset table.
minimum delta; variance; large-page knob; power/temperature; temperature fallback; power helpers;
load power sampling; built-in power; efficiency acceptance; scoring fallback; efficiency winner;
no-power fallback; live API tuning; aborted-tune restoration; A/B confirmation; frequency rounding;
thermal rejection; explicit false; MSR tuning; reservation threads; reservation sizing;
grow-only pages; ceiling bounds; appliance mode; live autotune trial/merge; aborted-autotune
restoration; grid search; JIT pages; SMT candidates.
cleanup; SemVer; reference config; minimal config; sister API keys.
binding; control keys/auth; control units; atomic commit; effective-config redaction; provenance;
pool-secret preservation; fast-path allowlist; watchdog reuse; fast-apply run state; stopped-rig
full apply; watchdog-render failure propagation; control rollback.
gate; checkout traversal; dashboard/nonvacuous-offline guard; shared rig lock; wire fixtures;
tree hygiene.
Docker's unchanged 119 static helper assertions retain appliance configuration immutability,
runtime unit placement/enables, no deployment package writes and repeat idempotency; the deploy
pass retains dry-run, generated defaults, service hardening, ownership, firewall, successive runs,
tuning and uninstall. Actual prerequisite acquisition remains before stubs; compilation in these
two containers remains stubbed as before. Genuine compilation stays in both stock-home jobs and
the existing release/hardware gates.
Identity check:
git diff --quiet -- tests/run.sh .github/workflows/ci.yml tests/e2e/linux.sh tests/e2e/in-container.sh tests/test-stock-home.shpasses. Their SHA256 values before and after:tests/run.sh7eff04040ea5f36b056f5d58215fa4ffead516cbe5e4161e335412e487c77cf0.github/workflows/ci.ymld583e7f60df43769b105dd9b1b53d977e087c2d44cbfef75264d633808174cfdtests/e2e/linux.sh06962253a6256bba77dfb48e1fec5df94b58c14040cea2061d33438c8eb4ef40tests/e2e/in-container.sh5609c2d0a4b364076bab978299cef4e12b6c9ed465942c2495385414ec14c2fftests/test-stock-home.shcbd3be36c99a977184eaba0c2a148206d1d963ccf0d75db797b024a3529b5355Open acceptance and unavailable proof
Shared-cache rollout remains blocked on complete cold/warm runtime assertion/input/platform
manifests, required-status verification and a week of setup timings, CI median/p90, verification
time, failures and occupied hours. The hand-written source manifest above preserves the old/new
proof set; it does not substitute for missing runtime evidence or the parallel shared-manifest
work. The local source stamps identify inputs but do not assert test success. Missing, truncated or skipped proof
does not count as acceptance; existing explicit skips and row ownership remain unchanged.
Hosted stock-home historical/current jobs, successful native Linux/amd64 coverage and both Docker
modes, 90% patch-coverage enforcement, and the physical release/worker-to-coordinator proofs still
need their existing environments. Donation builds, cold starts, compilation, install/recovery/
uninstall, Python/API gates and both independent bench-ci checks retain their existing owners and
frequencies. No KVM, live bench, hardware or production proof ran in this session; no capacity was
added. Native macOS e2e is still a separate deprecated/manual gate and was not run.
Closes #621
Draft from an operator-run gpt-6-astra session (owner request, 2026-11-01). The operator reviews and gates it before it leaves draft.
🤖 Generated with Claude Code