From f942646c959dae29b6addacf1799d3ee6d09edc9 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 12 Aug 2026 23:52:16 +0000 Subject: [PATCH] fix(parity): main was RED -- Nemotron35LightningSnapshot() called HfSnapshot 11 lines before its declaration (#546, #551) FOLLOWING_AGENTS_PROTOCOL My own regression, from af8170154. I added the accessor directly beneath the revision constant it uses, and the revision constants sit ABOVE the HfSnapshot definition they are passed to. Name lookup in a non-template function is immediate, so every TU including tests/parity/hf_snapshot.h failed to compile: hf_snapshot.h:52:10: error: 'HfSnapshot' was not declared in this scope That is 14 parity TUs including the SACRED gates, plus the CPU-only test_hf_snapshot_pinning. Two other sessions hit it and filed #546 and #551 before I noticed, which is the part that stings: main was red for everyone while I was reporting progress. The fix is a pure relocation of the 13-line accessor from above HfSnapshot to below it, beside the other accessors. No behavior, no revision, no golden changes -- git diff is 13 insertions and 13 deletions of the same block. How it got past my gate, recorded so the next person does not repeat it: scripts/agent-preflight.sh does not compile the parity TUs, and I chained the merge push directly to a green preflight. A header-ordering break is invisible to every checker in that set. VERIFIED THIS TIME BY ACTUALLY COMPILING: a 2-line syntax-only TU including the header reproduces the error before and compiles clean after, and a full clean Release -Werror build of test_hf_snapshot_pinning (390/390 targets) links and runs 4 cases / 19 assertions Status: SUCCESS. The rule that would have caught it is already in AGENTS.md -- chain the applicable gate to the push -- but "applicable" for a change to a header that 14 TUs include means a build, not a checker sweep. Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [Claude Code] --- tests/parity/hf_snapshot.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/parity/hf_snapshot.h b/tests/parity/hf_snapshot.h index 7d4018616..82f076b8b 100644 --- a/tests/parity/hf_snapshot.h +++ b/tests/parity/hf_snapshot.h @@ -41,19 +41,6 @@ inline constexpr const char* kQwen27NvfP4Revision = inline constexpr const char* kNemotron35LightningNvfP4Revision = "29f2d1746d8f41e316523194b19018707749b1b1"; -// The Nemotron-3.5-Lightning gate model (#517). Unlike the Qwen pins above, -// this one is NOT in the HF cache: it is staged on the NAS as a `local_dir` -// snapshot at `$CHECKPOINT_ROOT/nemotron-3.5-lightning-30b-nvfp4`, so there is -// no `models--org--name/snapshots/` layout to resolve. The env override is -// therefore the ONLY reachable path, and the cache spelling below exists so the -// revision still names what the golden belongs to. Absent env var => "" => the -// caller emits its loud SKIP, which is the intended behavior off the gate host. -inline std::string Nemotron35LightningSnapshot() { - return HfSnapshot("models--nvidia--NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4", - kNemotron35LightningNvfP4Revision, - "VT_NEMOTRON35_SNAPSHOT"); -} - // Snapshot directory for `` at `revision`, or "" when it is not cached // (the caller then emits its loud SKIP). `env_override`, when set and non-empty, // names an explicit snapshot directory for a deliberate different-checkpoint @@ -78,6 +65,19 @@ inline std::string HfSnapshot(const char* repo_dir, const char* revision, return snap.string(); } +// The Nemotron-3.5-Lightning gate model (#517). Unlike the Qwen pins above, +// this one is NOT in the HF cache: it is staged on the NAS as a `local_dir` +// snapshot at `$CHECKPOINT_ROOT/nemotron-3.5-lightning-30b-nvfp4`, so there is +// no `models--org--name/snapshots/` layout to resolve. The env override is +// therefore the ONLY reachable path, and the cache spelling below exists so the +// revision still names what the golden belongs to. Absent env var => "" => the +// caller emits its loud SKIP, which is the intended behavior off the gate host. +inline std::string Nemotron35LightningSnapshot() { + return HfSnapshot("models--nvidia--NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4", + kNemotron35LightningNvfP4Revision, + "VT_NEMOTRON35_SNAPSHOT"); +} + // The 27B NVFP4 gate model, pinned to the goldens' revision. inline std::string Qwen27NvfP4Snapshot() { return HfSnapshot("models--unsloth--Qwen3.6-27B-NVFP4",