test(forge-test): #796 cache pinned binaries in a host store and copy them into the VM #799

Merged
hexajon merged 1 commit from issue-796-host-binary-store into main 2026-10-18 01:56:12 +00:00
Owner

Summary

The forge tests downloaded each pinned binary from upstream on every VM run, and codeberg serves the Forgejo binary at about 80 KB/s, so a run timed out. A new madtea-dev forge-pins ensure command fetches every pinned binary once into a host store, verified by its SHA-256, and run-forge-tests.sh copies that store onto the VM's local disk before the run, so the suite is a cache hit and never downloads from the throttled source. Verified green: the forge suite runs in the VM off the store, with no upstream fetch.

Closes #796

## Summary The forge tests downloaded each pinned binary from upstream on every VM run, and codeberg serves the Forgejo binary at about 80 KB/s, so a run timed out. A new `madtea-dev forge-pins ensure` command fetches every pinned binary once into a host store, verified by its SHA-256, and run-forge-tests.sh copies that store onto the VM's local disk before the run, so the suite is a cache hit and never downloads from the throttled source. Verified green: the forge suite runs in the VM off the store, with no upstream fetch. Closes #796
feat(forge-test): #796 cache pinned binaries in a host store and copy them into the VM
All checks were successful
drift / govulncheck (pull_request) Has been skipped
drift / surface-diff (pull_request) Successful in 11s
drift / forgejo-smoke (pull_request) Has been skipped
ci / mcp-conformance (pull_request) Successful in 1m1s
ci / mcp-conformance (push) Successful in -30s
drift / govulncheck (push) Has been skipped
drift / surface-diff (push) Successful in -39s
drift / forgejo-smoke (push) Has been skipped
ci / gate (push) Successful in 12m39s
ci / gate (pull_request) Successful in 28m15s
592908564e
The forge tests downloaded each pinned binary from upstream on every VM run.
codeberg serves the Forgejo release binary at about 80 KB/s, so the ~113 MB
artifact took ~22 minutes and blew the test deadline.

Add `madtea-dev forge-pins ensure`: it reads forge-pins.json and makes sure
every pinned binary (both forges at baseline and latest, plus Traefik) is in a
host-side cache, fetching any that are missing once and verifying each against
its pinned SHA-256. It reuses the bump command's download client and
ArtifactURL, and testforge.ResolveBinary does the fetch-once, verify and
atomic-write, so no new cache logic is added.

run-forge-tests.sh now warms that host store and copies it onto the VM's local
disk before the run, so the suite is a cache hit and never downloads from the
throttled upstream. The copy is a plain byte stream onto local disk, never a
mount (virtiofs rejects the mmap a forge binary needs). The store location is
read from MADTEA_TESTFORGE_CACHE and defaults to the user cache dir, so no
machine-specific path is baked into the script.

Refs #796
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!799
No description provided.