diff --git a/docs/semantic-parity.md b/docs/semantic-parity.md index 23fd142..e1bef63 100644 --- a/docs/semantic-parity.md +++ b/docs/semantic-parity.md @@ -10,7 +10,10 @@ prove today; its status reflects current evidence only. > new contract against pin `d4dd2f0127e8934d125b2a26a90fe88239ca98a2`; rows > below still describe the f29815c-era audit and are being re-proved through > the gate (the differential oracle and archive-client e2e now run upstream's -> d4dd2f0 client against Stream). +> d4dd2f0 client against Stream). One deliberate non-port: upstream's +> PDS-direct fleet bootstrap and its four backfill flags +> (environment_contract.py `upstream_unported`) — Stream's bootstrap +> remains relay-getRepo until that design is ported on purpose. ## Audit basis diff --git a/tests/environment_contract.py b/tests/environment_contract.py index 0f525c5..c20236e 100644 --- a/tests/environment_contract.py +++ b/tests/environment_contract.py @@ -64,10 +64,28 @@ def exact_pinned_map_case() -> None: stream_only = { "JETSTREAM_REBLOOM_SWEEP": "rebloom-sweep", } + # Upstream variables Stream knowingly has NOT ported: the PDS-direct + # fleet bootstrap (upstream specs/notes/2026-08-03-pds-direct-backfill- + # design.md, landed by d4dd2f0). Stream's bootstrap remains relay-getRepo; + # declaring these flags without the behavior would mislead operators. + # Each entry is asserted ABSENT from Stream's map, so porting the feature + # forces this list to shrink rather than rot. + upstream_unported = { + "JETSTREAM_BACKFILL_GLOBAL_DOWNLOADS", + "JETSTREAM_BACKFILL_HOST_WORKERS_MAX", + "JETSTREAM_BACKFILL_MAX_ACTIVE_HOSTS", + "JETSTREAM_BACKFILL_MAX_HOSTS", + } assert not (stream_only.keys() & upstream.keys()), ( f"stream_only entries collide with upstream: {sorted(stream_only.keys() & upstream.keys())}" ) - expected = upstream | stream_only + assert upstream_unported <= upstream.keys(), ( + f"upstream_unported names not declared upstream anymore: {sorted(upstream_unported - upstream.keys())}" + ) + assert not (upstream_unported & stream.keys()), ( + f"unported variables now present in stream; remove them from upstream_unported: {sorted(upstream_unported & stream.keys())}" + ) + expected = {k: v for k, v in upstream.items() if k not in upstream_unported} | stream_only assert stream == expected, ( f"environment map drift\n" f"missing/wrong: {sorted(expected.items() - stream.items())}\n"