Run harnesses on the Mac mini by default

Every harness gave the same result on the Mac mini as on Linux, except
options and chunk_generation, where Rust's float functions use the platform
libm and round differently on macOS: those stay off the Mac. gate.py and
supervise.py no longer force 8 local harnesses, so parity.py keeps the
desktop to 3. The ThinkPad is listed (2 harnesses, nice 19) but not used by
default. Oracle runs get a 15-minute hang guard instead of 5, since one oracle
on a fully loaded machine can take more than 5 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-12 16:42:07 +02:00
parent cb19f5e7d6
commit a05f9b7b8c
4 changed files with 22 additions and 7 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ def steps(args):
yield "doc tests", ["cargo", "+stable", "test", "--locked", "--workspace", "--doc"]
yield "python tests", [sys.executable, "-m", "unittest", "discover", "-s", "tests", "-q"]
if not args.no_parity:
yield "vanilla harnesses", [sys.executable, "tools/parity.py", "-j", str(args.jobs)]
yield "vanilla harnesses", [sys.executable, "tools/parity.py", *(["-j", str(args.jobs)] if args.jobs is not None else [])]
def head():
@@ -53,7 +53,7 @@ def main():
parser.add_argument("--no-parity", action="store_true", help="skip the vanilla harnesses")
parser.add_argument("--quick", action="store_true", help="only formatting, lints and Python tests")
parser.add_argument("--known-failures", default="", help="comma-separated harnesses allowed to keep failing")
parser.add_argument("-j", "--jobs", type=int, default=max(1, (os.cpu_count() or 4) // 3), help="parallel harnesses")
parser.add_argument("-j", "--jobs", type=int, help="harnesses at once on this machine (default: tools/parity.py's)")
args = parser.parse_args()
logs = ROOT / ".local" / "gate"
logs.mkdir(parents=True, exist_ok=True)
+15 -2
View File
@@ -1,5 +1,5 @@
{
"default": [],
"default": ["macmini"],
"hosts": {
"macmini": {
"ssh": "macmini",
@@ -8,7 +8,20 @@
"setup": "source ~/.cargo/env && export JAVA_HOME=$(/usr/libexec/java_home -v 25) && export PATH=$JAVA_HOME/bin:$PATH",
"python": "/opt/homebrew/bin/python3.13",
"rsync": "/opt/homebrew/bin/rsync",
"jobs": 14
"jobs": 14,
"exclude": {
"options": "Rust's f64::powf uses the platform libm, which rounds differently on macOS",
"chunk_generation": "one ocean ruined portal differs on macOS (platform float math)"
}
},
"thinkpad": {
"ssh": "thinkpad",
"root": "code/horizon-parity",
"shell": "sh -c",
"jobs": 2,
"nice": 19,
"environment": {"PARITY_BUILD_JOBS": "2"},
"note": "hosts the Claude account pool: two harnesses at most, at the lowest priority"
}
},
"local_only": {
+3 -2
View File
@@ -133,7 +133,8 @@ def integrate(args):
if git("rev-parse", "HEAD", cwd=base_tree) == before:
print(f"{names}: nothing new for {args.base}.")
return 0
gate = [sys.executable, "tools/gate.py", "-j", str(args.jobs), "--known-failures", ",".join(known)]
gate = [sys.executable, "tools/gate.py", "--known-failures", ",".join(known)]
gate += ["-j", str(args.jobs)] if args.jobs is not None else []
gate += ["--no-parity"] if args.no_parity else []
if subprocess.run(gate, cwd=base_tree).returncode:
git("reset", "--hard", before, cwd=base_tree)
@@ -158,7 +159,7 @@ def main():
command.set_defaults(run=save)
command = commands.add_parser("integrate")
command.add_argument("branches", nargs="+", help="merged in order, then gated together")
command.add_argument("-j", "--jobs", type=int, default=8)
command.add_argument("-j", "--jobs", type=int, help="harnesses at once on this machine (default: tools/parity.py's)")
command.add_argument("--no-parity", action="store_true", help="skip the vanilla harnesses in the gate")
command.set_defaults(run=integrate)
args = parser.parse_args()
+2 -1
View File
@@ -127,7 +127,8 @@ def compare(reference, candidate):
raise AssertionError('Parity outputs changed during comparison')
def run(command, **kwargs):
subprocess.run(command, cwd=lab.ROOT, check=True, timeout=300, **kwargs)
# A hang guard only: a loaded machine (14 harnesses at once on the Mac mini) can take minutes for one oracle.
subprocess.run(command, cwd=lab.ROOT, check=True, timeout=900, **kwargs)
def source_hashes(sources):