Skip to content

feat(proof): pin real proof-eval digest and operator topic path - #221

Closed
Mathis (echobt) wants to merge 2 commits into
cursor/proof-emission-2000-8000-payout-modesfrom
cursor/proof-eval-digest-lock
Closed

Mathis (echobt) wants to merge 2 commits into
cursor/proof-emission-2000-8000-payout-modesfrom
cursor/proof-eval-digest-lock

Conversation

@echobt

@echobt Mathis (echobt) commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rebased onto main after #220 merged (7bb56c3b). This PR does not touch challenges.toml or the topic schema.

Pins a real scoring image digest from publish-proof-eval-image run 33892650063 (packaging commit 51f937c7). That digest was pulled after push; harvest-PATH + selftest + baked proxy + 12.5 Gbit/s fabric enforcement proved on those bytes. Contract-only image is not pinned.

eval_image        = "ghcr.io/cortexlm/proof-eval"
eval_image_digest = "sha256:78b614a1f51ce5dd80076c4e343a2b31b85d6c36025e02836cb83929867e7009"
proxy_model       = "Qwen/Qwen3.8-0.6B"
proof_git_sha     = "51f937c7818f0eb1e3ed1412972de98b6994952b"

Empty digest remains fail-closed 503 in code (can_rent / EvalImageUnpinned). This pin is a real sha256, not invented.

Operator path: deploy/scripts/proof-operator-path.sh (prints holdout → baseline-on-pinned-image → xtask proof-topic → admin POST /v1/admin/proof/topics). can_score still needs LIUM harvest wired + ≥1 open signed topic + verified holdout + sealed baseline on the host.

Greptile

Every PR is reviewed by Greptile before merge. Config: .greptile/.

  • Greptile has reviewed this PR; findings are fixed or answered
  • If the bot was silent, I commented @greptileai review

Test plan

  • cargo test -p proof-task -p proof-http -p proof-eval -p trustroot
  • cargo fmt --all -- --check
  • committed_pin_is_proof_with_a_real_eval_digest
  • empty_digest_and_unwired_harvest_are_503 (fail-closed path still present)
  • cargo test --workspace not run (pin + eval packaging + operator script)

Risk

Once merged, Proof submits stop 503-ing on empty digest. Remaining 503s: unwired harvest, no open topic, unsealed baseline. 8000 bps still burns until those land on the droplet. No ceremony/key rotation in this PR.

Naming

I did not rename BASE_* environment variables, deployed host paths
(/opt/base, /run/base, …), GHCR baseintelligence/base package names, or
base-*-v1 cryptographic domain tags.

Open in Web Open in Cursor 

Ship a harvest-compatible proof-eval binary at /usr/bin/proof-eval with
PROOF_METRICS=/PROOF_EVAL_OK markers, baked proxy Qwen/Qwen3.8-0.6B, and
12.5 Gbit/s / no-IB / no-NVLink / no-NCCL-fast-fabric enforcement. The
scoring image (CUDA + torch) is what the control plane will pin; the
contract-only digest is not a pin.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
Stack on the 2000/8000 + WTA/discovery control plane. Pin the scoring
image published by run 33892650063 (sha256:78b614a1…, baked proxy
Qwen/Qwen3.8-0.6B). Empty digest still 503s until a real sha256 is
present; this one was pulled and proved after push. Operator script
covers holdout → baseline-on-image → xtask proof-topic → admin POST.
Does not touch challenges.toml or the topic schema.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
@echobt
Mathis (echobt) marked this pull request as ready for review September 4, 2026 16:27
@greptile-apps

greptile-apps Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Greptile Summary

This change adds the Proof evaluator and supporting operational path, but live scoring cannot reliably run yet. Required holdout data is not delivered to rented pods, long-context evaluation is shortened, bandwidth enforcement can be falsely reported, the baseline command does not transport its files, and a non-public image can still be published for use.

Confidence Score: 0/5

Not safe to merge: the reproduced failures prevent reliable live scoring and can invalidate benchmark measurements.

Five independently reproduced blocking failures affect holdout delivery, evaluation context, bandwidth enforcement, baseline generation, and evaluator image availability. One of them permits a reported resource control to be bypassed.

Files Needing Attention: eval/src/proof_eval/harness.py, eval/src/proof_eval/fabric.py, deploy/scripts/proof-operator-path.sh, and .github/workflows/publish-proof-eval-image.yml

Security Review

Network shaping can be reported as active after the operating system rejects its installation. This permits unrestricted bandwidth to influence measurements intended to be constrained.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced a proof for a posted P1 finding and linked it to the corresponding review comment.
  • A focused scorer probe ran with distinct shared-proxy and miner-artifact paths, showing the tokenizer loaded from the shared proxy and the model weights from /miner/artifact, which confirms that the artifact directory is used for loading.
  • A second posted P1 finding proof was produced and linked to its artifacts.
  • A third posted P1 finding proof was produced, accompanied by a longer set of artifact logs for review.
  • Code changes were reviewed and documented for proof-operator-path.sh, outlining the public-baseline command and related security considerations.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (5)

  1. General comment

    P1 Live Proof scorer does not deliver required holdout shards to rented pods

    • Bug
      • harness.py resolves every holdout record to a content-addressed file in PROOF_HOLDOUT_STORE and refuses scoring when it is absent. The live runner boots the pod and supplies only the serialized request and an optional environment file. No inspected runner path transfers the shard payloads or configures a holdout-store mount. Executed lookup behavior fails with exit 2 when the store is empty and succeeds only after a matching shard file is manually supplied.
    • Cause
      • The request deliberately carries only holdout metadata/content hashes, while LiumEvalPod::run has no holdout-shard staging input and its calls stage only request.json and optionally teacher.env. The Docker image also intentionally has no holdout data baked in.
    • Fix
      • Add an operator-controlled, access-restricted delivery mechanism that writes every verified holdout payload to PROOF_HOLDOUT_STORE/<content_sha256> on the specific rented pod before scoring, and test it end-to-end. Alternatively extend the pod transport with a dedicated sealed-shard input/staging operation. Validate delivery before beginning the paid scoring interval when possible.

    T-Rex Ran code and verified through T-Rex

  2. General comment

    P1 Bandwidth cap is recorded after tc installation fails

    • Bug
      • At eval/src/proof_eval/fabric.py:99-106, _cap_bandwidth calls tc qdisc replace with check=False, discards its return code/stderr, and unconditionally adds tc:<dev> to the returned applied map. The executed reproduction ran without NET_ADMIN, received RTNETLINK answers: Operation not permitted, then directly invoked _cap_bandwidth(12.5), which returned normally and reported the interface capped. Because the qdisc was never installed, the claimed 12.5 Gbit/s limit does not constrain normal socket traffic.
    • Cause
      • The subprocess result from the qdisc installation is ignored, while the success record is written unconditionally after the call.
    • Fix
      • Check subprocess.run(...).returncode (or use check=True) and fail closed with ContractError when any data-interface qdisc cannot be installed. Only add tc:<dev> after a successful command; optionally verify the resulting qdisc with tc qdisc show.

    T-Rex Ran code and verified through T-Rex

  3. General comment

    P1 Long-context holdout is always truncated to 1,024 tokens

    • Bug
      • measure() applies the same max_length=1024 tokenizer limit to every holdout record. The executed focused run passed 9,000-token inputs through all five strata and observed that longctx, declared as 8,192 tokens, was encoded as only 1,024 tokens.
    • Cause
      • eval/src/proof_eval/harness.py:89 uses a fixed tok(text, return_tensors="pt", truncation=True, max_length=1024) call with no split-specific context length or validation against the declared holdout token count.
    • Fix
      • Select and enforce an evaluation length appropriate to each record/stratum. In particular, score longctx at its committed 8,192-32,768-token context (subject to the model's supported maximum), reject unsupported lengths rather than silently truncating, and add a regression test that asserts a longctx record is never reduced below its required context range.

    T-Rex Ran code and verified through T-Rex

  4. General comment

    P1 Baseline operator command has no request or persistent-output transport

    • Bug
      • deploy/scripts/proof-operator-path.sh:59 prints a docker run --rm baseline command using /tmp/proof_eval/request.json and /tmp/proof_eval/baseline.json, but passes neither a volume mount nor another transport mechanism. The controlled execution failed with REQUEST_MISSING:/tmp/proof_eval/request.json; Docker inspection showed no mounts and automatic container removal enabled.
    • Cause
      • The generated command assumes both input and output paths inside the container are shared with the host, but Docker isolates those paths unless a bind mount, named volume, or explicit copy workflow is supplied. --rm then removes any unmounted container filesystem output.
    • Fix
      • Generate a command that bind-mounts an operator-owned working directory at /tmp/proof_eval (or explicitly stages/copies both files), writes a request there before execution, and then validates/transforms the retained baseline into ${SECRETS}/baselines.json keyed by topic ID. Retain --rm only when output is mounted/copied before removal.

    T-Rex Ran code and verified through T-Rex

  5. General comment

    P1 GHCR visibility failure does not block publishing a usable-looking digest

    • Bug
      • A simulated GHCR HTTP 500 was accepted by the visibility step, which exited 0 and printed the error response. The independent digest path then accepted a sha256 digest and wrote the upload payload. Therefore the workflow can report/upload a digest even though the package was not made public, so anonymous pulls may fail.
    • Cause
      • The curl command assigning code ends with || true, and the workflow only logs its HTTP status/body. The later digest validation checks digest syntax only; it does not require a successful public-visibility response or verify an anonymous pull.
    • Fix
      • Remove || true; use curl --fail-with-body (or explicitly require a 2xx status), fail the job on an unsuccessful visibility update, and preferably verify an unauthenticated pull of the exact pushed digest before emitting/uploading it.

    T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "feat(proof): pin real proof-eval digest ..." | Re-trigger Greptile

Comment on lines +41 to +46
store = Path(os.environ.get("PROOF_HOLDOUT_STORE", "/opt/proof-eval/holdout"))
path = store / digest
if not path.is_file():
raise ContractError(
f"holdout shard {digest[:12]}… is not in PROOF_HOLDOUT_STORE; refuse scoring"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Holdout shards are missing

The scorer requires each holdout payload at PROOF_HOLDOUT_STORE/<content_sha256>, but the live pod path supplies only request.json after the pod has been rented. No shard staging or holdout-store mount is provided, so live scoring fails when this lookup cannot find the required private shard. Deliver the sealed shards to the pod before scoring, or verify that delivery is available before renting it.

Knowledge Base Used: Deployment, runtime operations, and image updates

Artifacts

Evidence from the check

  • Runs the scorer's actual content-addressed holdout lookup once with no shard and once with the expected shard file, showing that delivery is required.

Command output from the check

  • Executed the validation script against an empty configured holdout store; the scorer refused the shard and exited 2, confirming missing delivery prevents scoring.

Command output from the check

  • Executed the same validation script with the expected content-addressed shard present; the scorer read it and exited 0, proving the required delivery condition.

Command output from the check

  • Ran focused Proof-harvest and harvest-pod tests; they confirm request metadata staging but do not provide a shard-delivery operation, supporting the missing transport conclusion.

View artifacts

T-Rex Ran code and verified through T-Rex

Comment on lines +99 to +106
for dev in _data_ifaces():
subprocess.run( # noqa: S603
[tc, "qdisc", "replace", "dev", dev, "root", "tbf",
"rate", f"{kbit}kbit", "burst", "256kb", "latency", "50ms"],
check=False,
capture_output=True,
)
applied[f"tc:{dev}"] = f"{kbit}kbit"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 security Bandwidth cap is unverified

The cap installation ignores a failed tc qdisc replace call and still records the interface as limited. If the scoring pod lacks NET_ADMIN, the claimed 12.5-Gbit/s limit is not installed while the reported evaluation state says it is, allowing unrestricted network bandwidth to affect constrained-topic throughput results. Fail scoring when the qdisc cannot be installed and only report a cap after successful installation.

How this was verified: A no-capability execution produced an operation-permitted error while the cap function still returned a successful recorded limit.

Artifacts

Evidence from the check

  • Runs a failing tc qdisc operation and directly exercises the changed bandwidth-cap function with the same failure, ending with the reproducible validation method.

Command output from the check

  • The executed tc qdisc command ran with zero effective capabilities and returned Operation not permitted, proving the rate limiter cannot be installed.

Command output from the check

  • The executed `_cap_bandwidth(12.5)` call returned normally and recorded eth0 as capped after the same failing tc path, proving the enforcement record is false.

View artifacts

T-Rex Ran code and verified through T-Rex

t0 = time.perf_counter()
with torch.no_grad():
for split, text in texts:
enc = tok(text, return_tensors="pt", truncation=True, max_length=1024)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Long context is discarded

Every holdout record is tokenized with a fixed 1,024-token limit, including the longctx stratum. This reduces the required 8,192–32,768-token sequences to short prefixes, so the long-context metric cannot detect submissions that only work at short context lengths. Score longctx records at their required context length and reject unsupported lengths instead of silently truncating them.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Artifacts

Evidence from the check

  • The authored script installs fake runtime components, creates 9,000-token shards for every scored split, and invokes the real harness measure function, demonstrating the token-selection behavior.

Command output from the check

  • The generated validation script was compiled with Python before execution and exited successfully, showing it was executable.

Command output from the check

  • The real harness path was run with 9,000-token inputs and shows every stratum, including longctx declared at 8,192 tokens, encoded to 1,024 tokens, confirming the defect.

Command output from the check

  • The Rust contract test passed while enforcing that an undersized longctx record is refused, establishing the required long-context lower bound.

Command output from the check

  • The existing proof evaluator tests completed successfully with 8 passing tests, showing the current suite does not catch the exercised truncation defect.

View artifacts

T-Rex Ran code and verified through T-Rex

# The image enforces 12.5 Gbit/s / no IB / no NVLink / no NCCL fast path
# before it will emit numbers.
if [ -n "${digest}" ]; then
echo "docker run --rm --entrypoint /usr/bin/proof-eval ${IMAGE}@${digest} baseline --request /tmp/proof_eval/request.json --out /tmp/proof_eval/baseline.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Baseline files are isolated

The generated docker run --rm command reads and writes paths inside the container but supplies neither a request-file mount nor an output mount. The evaluator cannot read /tmp/proof_eval/request.json, and any manually created unmounted output is removed with the container, preventing operators from producing the persistent baseline needed to open a topic. Mount or explicitly copy both the request and retained output.

Knowledge Base Used: Deployment, runtime operations, and image updates

Artifacts

Evidence from the check

  • A non-source-changing validation script builds a deterministic local evaluator fixture, executes the generated command shape, and compares it with a mounted persistent-output invocation; it reproduces the missing transport defect.

Command output from the check

  • The executed generated-command equivalent exits 66 with the request missing, and Docker inspection reports automatic removal with no mounts; it confirms the helper command cannot consume its declared request.

Command output from the check

  • The same evaluator invocation with a bind mount exits 0 and writes the baseline into the host work directory; it demonstrates the required delivery and persistence mechanism.

View artifacts

T-Rex Ran code and verified through T-Rex

Comment on lines +146 to +154
"https://api.github.com/orgs/${OWNER}/packages/container/${enc}/visibility" \
-d '{"visibility":"public"}' || true)
echo "pkg=proof-eval http=${code} body=$(head -c 200 /tmp/vis.json || true)"
- name: report the digest to pin
env:
DIGEST: ${{ steps.push.outputs.digest }}
run: |
set -eu
case "${DIGEST}" in

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Private digest can publish

The workflow ignores a failed GHCR package-visibility update, then independently accepts and uploads the image digest. If publicization fails, the published pin can remain private and anonymous scoring workers cannot pull it, causing scoring to fail after the digest is pinned. Require a successful visibility update and verify that the exact digest is anonymously pullable before publishing it.

Knowledge Base Used: Deployment automation and infrastructure

Artifacts

Evidence from the check

  • Executable shell reproduction of the relevant workflow paths using a controlled HTTP 500 response and a valid digest, showing the failure is ignored before the digest is emitted.

Command output from the check

  • Executed visibility-phase reproduction returned exit code 0 after a simulated GHCR HTTP 500, showing the workflow proceeds despite failed publicization.

Command output from the check

  • Executed digest-phase reproduction returned exit code 0 and wrote the sha256 value as the upload payload, showing no visibility-success dependency.

View artifacts

T-Rex Ran code and verified through T-Rex

@echobt
Mathis (echobt) deleted the branch cursor/proof-emission-2000-8000-payout-modes September 4, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants