Skip to content

fix(build): main is RED — hf_snapshot.h calls HfSnapshot before it is declared (#551, #546) - #555

Closed
localai-bot wants to merge 1 commit into
mainfrom
row/BUILD-HF-SNAPSHOT-ORDER
Closed

fix(build): main is RED — hf_snapshot.h calls HfSnapshot before it is declared (#551, #546)#555
localai-bot wants to merge 1 commit into
mainfrom
row/BUILD-HF-SNAPSHOT-ORDER

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

main does not build. Closes #551 and #546.

Nemotron35LightningSnapshot() landed with the Nemotron-3.5 goldens (#517) ten lines above the HfSnapshot definition it calls. Name lookup in the body of a non-template function only sees declarations that precede it, so the header does not compile:

tests/parity/hf_snapshot.h:52:10: error: 'HfSnapshot' was not declared in this scope
   52 |   return HfSnapshot("models--nvidia--NVIDIA-Nemotron-3.5-Lightning-30B-A3B-NVFP4",
      |          ^~~~~~~~~~

That header is included by 16 test translation units, including the SACRED 27B and 35B parity gates, so CPU builds fail outright — build-test-cpu is red on main at 8b00f79f2 and on every PR branched from it.

The fix puts the accessor where every other accessor in this file already sits: below HfSnapshot, next to the Qwen and DFlash ones. Nothing else moves and the pinned revision constant stays with its documentation.

Evidence

  • RED before: g++ -std=c++20 -fsyntax-only on the header fails at the line above.
  • GREEN after: compiles clean. That compile is the test, and the 16 TUs already run it in CI.
  • The two checkers that PARSE this header for its pins stay green: test_check_snapshot_pins 19/19, test_online_gate_server_binary 20/20.
  • scripts/agent-preflight.sh --staged: All gates green.

Worth recording: Nemotron35LightningSnapshot() has no caller yet — it is staged for the gate #517 owes, which is why nothing but the build noticed.

FOLLOWING_AGENTS_PROTOCOL

…s declared (#551, #546)

`Nemotron35LightningSnapshot()` landed with the Nemotron-3.5 goldens (#517) ten
lines ABOVE the `HfSnapshot` definition it calls. Name lookup in the body of a
non-template function only sees declarations that precede it, so the header does
not compile:

  tests/parity/hf_snapshot.h:52:10: error: 'HfSnapshot' was not declared in this scope

That header is included by 16 test translation units, including the SACRED 27B
and 35B parity gates, so CPU builds fail outright -- `build-test-cpu` is red on
main at 8b00f79 and on every PR branched from it.

The fix is to put the accessor where every other accessor in this file already
sits: below `HfSnapshot`, next to the Qwen and DFlash ones. Nothing else moves,
the pinned revision constant stays with its documentation, and the two checkers
that PARSE this header for its pins -- test_check_snapshot_pins and
test_online_gate_server_binary -- stay green (19 and 20 tests).

RED before: the header fails `g++ -std=c++20 -fsyntax-only` at the line above.
GREEN after: it compiles clean. That compile IS the test, and the 16 TUs already
run it in CI.

Worth recording: `Nemotron35LightningSnapshot()` has no caller yet. It is staged
for the gate that #517 owes, which is why nothing but the build noticed.

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [Claude Code]
@localai-bot

Copy link
Copy Markdown
Collaborator Author

Superseded by #556 (fafa16f0f), which landed the same fix on main eleven minutes after this branch was cut. Closing rather than merging, because merging would be actively harmful:

git merge-tree --write-tree origin/main HEAD resolves with no conflict#556 moved the block to just after HfSnapshot (line 68), this branch moved it to the end of the namespace (line 168), so git sees a delete-plus-insert on each side and takes both. The merged header defines Nemotron35LightningSnapshot() twice, at lines 75 and 188:

merged.h:188:20: error: redefinition of 'std::string parity::Nemotron35LightningSnapshot()'
merged.h:75:20: note: previously defined here

GitHub reports MERGEABLE, so nothing would have warned. This is the hazard AGENTS.md names directly: merging two such edits cleanly is worse than conflicting.

The defect itself is fixed on main and verified: g++ -std=c++20 -fsyntax-only is clean on origin/main's copy of the header. The review that caught this also mutation-tested the class — moving the block back above HfSnapshot fails to compile, a forward declaration makes it compile, and a declaration without a definition fails at link — so the build genuinely is the regression guard here and no extra checker is owed.

No objection to #556's placement; this branch's end-of-namespace variant is not worth a follow-up.

@localai-bot
localai-bot deleted the row/BUILD-HF-SNAPSHOT-ORDER branch August 13, 2026 00:20
VikashLoomba added a commit to VikashLoomba/vllm.cpp that referenced this pull request Aug 13, 2026
…e, committed as the RED anchor of the forward-divergence fix

Issue mudler#41 M4, second model. The GDN sibling of the Qwen3-dense gate:
test_qwen35_paged_engine drives the standard 16-prompt battery through the
full paged engine and holds our ROCm tokens against the pinned vLLM-ROCm
oracle (555967922 / 0.23.1rc1.dev1511+g555967922, same container as the 0.6B
lane) via the anchor + <=0.5-nat near-tie band, with the GDN backend proof
(all 15 dispatched ops selections>0 and declines==0).

VERDICT AT LANDING: RED BY DESIGN -- the gate FAILS 13/16 prompts
(0/16 strict, 3/16 near-tie band, max teacher-forced gap 14.125 nats;
first-token divergences on 6 prompts). This is the known 0.8B CPU/ROCm
divergence, now oracle-measured: a REAL forward divergence, not a
distributional near-tie. The oracle K=10 capture is deterministic in every
cell. Backend proof is GREEN (kPagedAttention 1,536 / kGdnDecode 4,320
selections, 0 declines) -- the divergence is numerical, not dispatch.

This commit is the RED test of the fix lifecycle: the gate goes GREEN when
the 0.8B forward lands. Goldens carry a manifest.json (oracle identity +
the real HF revision 2fc06364...); the gate resolves the checkpoint through
parity::HfSnapshot at that pinned revision (check-snapshot-pins clean).
hf_snapshot.h gains the kQwen35_08BRevision pin + resolver, and a forward
declaration fixing the call-before-declaration order hipcc rejects (mudler#555
carries the canonical main-side fix).

FOLLOWING_AGENTS_PROTOCOL

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: pi:kimi-k3 [pi]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main is RED: hf_snapshot.h calls HfSnapshot before it is declared, blocking 14 parity TUs including the SACRED gates

2 participants