From f760093a855b211968a3c9aff5019c03eae36cf1 Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Mon, 10 Aug 2026 02:04:20 -0500 Subject: [PATCH] environment-contract: honor STREAM_UPSTREAM_REPO like every other suite This suite alone read JETSTREAM_UPSTREAM and otherwise assumed the upstream checkout sits at ~/{forge}/{org}/{repo}, so it failed on any box that lays it out differently -- the gate host keeps it at /home/stoat/jetstream. Co-Authored-By: Claude Opus 5 (1M context) --- justfile | 2 +- tests/environment_contract.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 05babb9..28389a7 100644 --- a/justfile +++ b/justfile @@ -31,7 +31,7 @@ logging-contract: # source precedence, root/inspect inheritance, and typed serve parsing. environment-contract: zig build -Doptimize=ReleaseSafe - python3 tests/environment_contract.py + STREAM_UPSTREAM_REPO='{{upstream}}' python3 tests/environment_contract.py # Offline: validate the vendored upstream Grafana dashboard and its parser. dashboard-test: diff --git a/tests/environment_contract.py b/tests/environment_contract.py index 0dcacd0..2a8469e 100644 --- a/tests/environment_contract.py +++ b/tests/environment_contract.py @@ -19,8 +19,15 @@ import urllib.request BIN = "./zig-out/bin/stream" PIN = "f29815c391fc2644f8a3dd36b899fb3697dd1ea6" ROOT = pathlib.Path(__file__).resolve().parents[1] +# STREAM_UPSTREAM_REPO is the name the justfile, scripts/admit, and the other +# oracles already use; this file was the only one reading JETSTREAM_UPSTREAM, +# so on any box that does not lay the upstream out as ~/{forge}/{org}/{repo} +# it looked for a checkout that was never there. JETSTREAM_UPSTREAM still wins +# when set, for anyone who has it in their shell. UPSTREAM = pathlib.Path( - os.environ.get("JETSTREAM_UPSTREAM", pathlib.Path.home() / "github.com/bluesky-social/jetstream") + os.environ.get("JETSTREAM_UPSTREAM") + or os.environ.get("STREAM_UPSTREAM_REPO") + or (pathlib.Path.home() / "github.com/bluesky-social/jetstream") ).resolve() -- 2.51.2