Skip to content

fix(proof-harvest): no proxy tar leak on missing holdout shard - #237

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-proof-harvest-proxy-tar-leak-9018
Sep 8, 2026
Merged

fix(proof-harvest): no proxy tar leak on missing holdout shard#237
cursor[bot] merged 2 commits into
mainfrom
cursor/fix-proof-harvest-proxy-tar-leak-9018

Conversation

@echobt

@echobt echobt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

CI on main (#235 / 8b39d24f) failed tests::missing_holdout_shard_does_not_leak_a_proxy_tar while the sibling live_extras_holdout_refuse_does_not_leak_a_proxy_tar passed.

Holdout-first packing in live_extras is already correct: a missing/mismatched shard returns HoldoutStoreMissing before pack_proxy_tar_to, so that refuse path does not create a proxy tar. The CI failure was a leftover-scan race: leak tests listed /tmp/proof-proxy-{pid}-*.tar, and a concurrent unit test (pack_helpers_succeed_on_operator_staged_trees / a live score() pack) still held a tar in the same process temp dir.

This PR:

  • Stages leak-test proxy tars into an isolated per-test directory and scans only that dir.
  • Names proxy tars with a process-wide sequence so concurrent harvests cannot clobber the same /tmp path.
  • Adds a guard test that a successful live_extras writes into the configured dir and ProxyTarGuard deletes it on drop.

Does not change StubWin, FORCE_SIM, pins, overlays, or eval digests.

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-harvest --lib (both leak tests + guard test; 10 repeats of the leak tests)
  • cargo clippy -p proof-harvest --all-targets -- -D warnings
  • cargo run -p xtask -- loc-cap
  • cargo fmt --all -- --check (formatted proof-harvest; workspace fmt not re-run)

Risk

Test isolation + unique tar names on the harvest control plane only. No deploy, miner CVM, signature domain, or emission impact.

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, unless this PR’s purpose is a coordinated
cutover documented in docs/NAMING.md.

Open in Web Open in Cursor 

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

Summary

  • Proxy-tar staging is isolated for concurrent test execution.
  • Generated proxy-tar filenames include a process-wide sequence to avoid same-process collisions.
  • Leak checks and cleanup coverage use dedicated staging directories.

Confidence Score: 5/5

Safe to merge.

There are no outstanding findings.

Reviews (2): Last reviewed commit: "fix(proof-harvest): case-insensitive lef..." | Re-trigger Greptile

cursoragent and others added 2 commits September 8, 2026 10:24
Isolate leftover-tar scans to a per-test staging dir so concurrent
pack_helpers/score tests cannot false-fail the holdout refuse checks.
Name proxy tars with a process-wide seq so concurrent packs cannot
clobber the same /tmp path.

Co-authored-by: Mathis <echobt@users.noreply.github.com>
Co-authored-by: Mathis <echobt@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/fix-proof-harvest-proxy-tar-leak-9018 branch from 2417b06 to 4873539 Compare September 8, 2026 10:25
@cursor

cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown

@greptileai review

@cursor
cursor Bot merged commit 0d113e1 into main Sep 8, 2026
7 checks passed
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