Skip to content

fix(helios): add missing external_extents field in cache_memory test Core literal - #714

Closed
jcartu wants to merge 1 commit into
NVIDIA:mainfrom
jcartu:fix/cache-memory-test-external-extents
Closed

jcartu wants to merge 1 commit into
NVIDIA:mainfrom
jcartu:fix/cache-memory-test-external-extents

Conversation

@jcartu

@jcartu jcartu commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes cargo test -p flare-helios --features runtime-core compilation on main (45e1c1ad):

  • #711 (45e1c1ad) added external_extents to runtime_core::format::Core and updated the test struct literal at helios/src/runtime_core/cache_memory.rs:1397, but missed the second Core test literal added by #659 (1cc15c01) at helios/src/runtime_core/cache_memory.rs:1659.
  • Adding external_extents: vec![] restores unit-test compilation under --features runtime-core.

Verification

  • cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib cache_memory::tests: 52 passed, 0 failed, 4 ignored (previously failed with error[E0063]: missing field external_extents in initializer of runtime_core::format::Core).

Discord: jcartu

…Core literal

NVIDIA#711 (45e1c1a) added external_extents to runtime_core::format::Core and updated
the test literal at cache_memory.rs:1397, but missed the second Core test literal
added by NVIDIA#659 (1cc15c0) at cache_memory.rs:1659, breaking cargo test on
flare-helios with --features runtime-core.

Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b
Signed-off-by: Joshua Cartu <jcartu@users.noreply.github.com>
@flare-autobot

Copy link
Copy Markdown
Collaborator

A case file has been opened for 714.
Case File Intake Report

Future reviews will auto-run 90 minutes after code updates are pushed.

  • Re-review sooner: Call @flare-autobot after push.
  • Opt-out: Include #autobot:ignore in the PR or any comment.

@flare-autobot flare-autobot added bug Something isn't working priority:P2 Normal bug priority: workflow failure or diagnosis with narrower impact or an available workaround. triage:review Proposed change needs code review; this does not imply merge readiness. labels Dec 3, 2026
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Ready To Merge

The diff is a single inert field initializer (external_extents: vec![],) inside an #[ignore]d GPU test, completing the last missing Core literal in the crate and repairing a semantic conflict between #659 and #711. No code bug, gate violation, or runtime surface change was constructible, and the author's 52 passed / 4 ignored figure reproduces exactly.

  • Blockers: 0 · Should fix: 0 · Subtract/Simplify: 2 · Nits: 3
Walkthrough
  • #711 (format.rs:15-36) added pub external_extents: Vec<ExternalExtentTable> to runtime_core::format::Core and extended the first test literal (cache_memory.rs:1386-1398, field at :1397).
  • #659 had already added a second Core { .. } literal in its sentinel-row GPU test (cache_memory.rs:1659-1671); because it lacked the new field, post-#711 main fails to compile that test module — a semantic (ordering) merge conflict, not a defect in either parent.
  • This PR adds the missing external_extents: vec![], at :1670, completing the 11-field literal (format.rs:25-35) in declaration-adjacent order and matching the other 13 sites (engram.rs:630, format.rs:666, memory.rs:2013, model.rs:1827, persistent_worker.rs:1610/2086/2376/2835, protobuf.rs:589/1670(RankBody)/1864, selection.rs:584).
  • Value correctness verified, not just compilability: the only consumers are protobuf::validate_async_transfers (protobuf.rs:492-511, reached only via format.rs:519 when execution is Some) and NativeResources::prepare_async_transfers (mod.rs:1489-1494, which returns early when async_transfers is empty). With execution: None and no inline channel extents, vec![] is the only valid value — a non-empty table without a matching manifest is actively rejected at export/validation.
  • Exhaustiveness re-derived independently: 14 Core { sites searched in helios/src/runtime_core/ and 14 corresponding external_extents: initializers; model.rs:1829-1832 uses functional-update syntax (..worker_core()), so it needs no field. Wire-side RankBody/CoreBody literals outside runtime_core (core/export.rs, core/protection.rs, core/cache.rs, core/schema.rs) all end in ..Default::default() (e.g. export.rs:3054, schema.rs:1213) or clone (model.rs:1676), so no residual E0063 site exists anywhere in the crate.
Merge Risk: Low · up to 1efb1f0
  • Compile-only reach: the only edited construct is a struct field initializer in a #[cfg(test)] module (cache_memory.rs:896+), inside a test that requires an assigned CUDA GPU (:1637). No served, exported, wire, CLI, or metric surface changes; Core is pub(super) (format.rs:24), so it cannot affect any artifact or default.
  • Restores rather than displaces a check: before the PR the --features runtime-core test build fails with E0063, and the affected test was never in verification/helios-lifecycle/check.py's executed set (:319-338 builds with --features server only, and lists scheduler::cache_memory::tests::* from a different module), so no existing gate is weakened, deleted, or #[ignore]d.
  • Unblocks the queue: native-serving.yml:63 (Linux) and :68 (Windows) run cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server, and roce = ["runtime-core", ...] (helios/Cargo.toml:27); every open helios PR rebasing onto post-#711 main inherits the breakage until this lands.
Pre-merge checks: ✅ 4 passed
  • ✅ Security / malicious screen: One inert field initializer in a test; no new dependency, network, file, env, or privilege surface. No instruction-like or exfiltration content in the PR body.
  • ✅ Charter & value fit: Squarely "PRs that address … a reproducible bug", root cause fixed rather than tolerated (no test deletion, no new #[ignore], no dropped struct field — the helios: skip zero-valued kernel-node attributes the replay driver rejects #397 rule is respected); no per-model branch, flag, alias, format, or wire change. All four required description parts are present, including the Discord: jcartu line (docs/design-review.md:163-169).
  • ✅ Related / duplicate / conflict check: No competing or duplicate fix; it repairs the seam between merged #659 and #711 and supersedes nothing. It is a prerequisite for open #694/#314/#713, which inherit the breakage on rebase (merged #674's review had already asked for merge-order coordination on this file).
  • ✅ Tests & verification evidence: The reported 52 passed, 0 failed, 4 ignored reconciles exactly with the tree: filter cache_memory::tests matches both runtime_core::cache_memory::tests (18 #[test], 2 #[ignore] at :1363/:1637 → 16+2) and scheduler::cache_memory::tests (38 #[test], 2 #[ignore] at :1911/:2025 → 36+2), with pub mod scheduler; unconditional at lib.rs:30. Layer 1 (docs/design-review.md:180-184) is the correct and sufficient layer for a test-literal fix; no TLA+/Kani/mutation/GPU-benchmark trigger applies.

Have your agent review the Full Review for complete verified findings, file:line citations, and suggested changes.

Want a frontier second opinion? If these findings look noisy, request a one-time SuperAgent Review on 1efb1f0 (~3–4 min; re-adjudicates existing findings without re-running discovery).

To opt out, include #autobot:ignore in your post or comment.

lukealonso added a commit that referenced this pull request Dec 4, 2026
…#716)

Why:
Helios's runtime-core engram table decoder hardcoded NVFP4 (`Nvfp4E4m3Global`)
tables to a 160-element width (80 weight bytes and 10 scale bytes per row),
matching Qwen3.8-Flash-Next (`ple_embed_dim=2560`, 16 heads). Qwen4-35B-A3B
uses `ple_embed_dim=2048` across 16 heads (`embedding_width=128`, 64 weight
bytes and 8 scale bytes per row), so core decoding rejected Qwen4-35B-A3B
engram tables even though the protobuf metadata already carries
`embedding_width`.

What changed:
In `helios/src/runtime_core/engram.rs`, `decode()` previously matched
`Encoding::Nvfp4E4m3Global` to the fixed tuple `(160, 16, 80, 10)`. It now
validates `table.embedding_width > 0 && table.embedding_width % 16 == 0`
alongside the positive finite `global_scale` check and derives the row geometry
`(width, 16, width / 2, width / 16)` from `table.embedding_width`. Added unit
test `nvfp4_tables_accept_width_128_and_160_and_reject_unaligned_widths`
covering valid widths 128 and 160 and rejecting 0, 8, and 120.

Benefit:
Existing 160-wide NVFP4 engram cores decode identically while 128-wide
Qwen4-35B-A3B cores (and any other 16-aligned NVFP4 table width) load without
model-specific runtime branches.

Evidence:
- `cargo check --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server`
  succeeded against `origin/main` (`45e1c1ad`).
- Limitation: `cargo test --lib` on `origin/main` (`45e1c1ad`) currently fails
  to compile on an unrelated `Core` literal missing `external_extents` at
  `helios/src/runtime_core/cache_memory.rs:1659` (fixed separately in #714), so
  the new unit test was compile-checked via inspection and requires #714 on
  `main` for `cargo test` execution.

Design-Signed-Off-By: Gemini 4 Neon; design-review=2e5b
Signed-off-by: Luke Alonso <lalonso@gmail.com>
@jcartu

jcartu commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #721 (b10e1221), which already landed the identical external_extents: vec![] fix in helios/src/runtime_core/cache_memory.rs.

Discord: jcartu

@jcartu jcartu closed this Dec 4, 2026
fakoli added a commit to fakoli/hyperflare-inference that referenced this pull request Dec 4, 2026
Why:
Disaggregated prefill-to-decode serving over a shared Selene pool needs
deterministic prompt-endpoint checkpoint publication and ordered visibility
confirmation before an external router dispatches the decode hop. Without
prefill-only request handling, normal checkpoint selection anchors interior
message boundaries and PooledStore::store returns before selene-manager processes
queued NoticeBatch frames.

What changed:
- Scheduler & Helios runtime: Added prefill_only: bool on runtime::Prompt,
  RequestSpec, and LiveRequest (propagated in Incoming::spec()) and
  RequestScheduler::checkpoint_key(). Prefill-only requests anchor at
  prompt_tokens, skip decode/token streaming, call HostStore::announce_gpu when
  headroom defers copy-out, and wait on HostStore::announce_barrier().
- Selene & selene-manager: Added AnnounceBarrier / AnnounceTicket in selene::pool
  (flushing queued NoticeBatch frames before an empty-boundary LookupRequest
  sentinel) and HostStore::announce_gpu / announce_barrier, sharing GPU index
  construction via PooledStore::gpu_index_entry across store() and evicted().
- HTTP API & docs (helios/src/server/http.rs, docs/api.md): Added single-header
  X-Flare-Prefill-Only (`true`/`1`/`false`/`0`; duplicate/malformed headers and
  enabling on count_tokens or multi-prompt completions return HTTP 400), JSON
  object "prefill" responses, X-Flare-Pool-Announced, and X-Flare-Checkpoint-Key.

Claimed benefit:
Allows an external caller to offload prompt prefill and dispatch decode once
X-Flare-Pool-Announced: true is returned without heuristic delays or wire schema
changes, keeping normal scheduling unchanged. Combined 1P1D throughput/latency
results depend on external routing and shared pool hardware.

Evidence:
- 6-crate release test suite (flare-eos 12, flare-selene 589,
  flare-selene-manager 449, flare-helios 1961 with temporary NVIDIA#714 cache_memory
  build fix, flare 255, flare-cli 248): 3,514 passed, 0 failed, 94 ignored.
- verification/helios-lifecycle/check.py --mutations: all 9 TLA+ models,
  observed transition checks, and mutation checks passed.

Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b
Signed-off-by: fakoli <fakoli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority:P2 Normal bug priority: workflow failure or diagnosis with narrower impact or an available workaround. triage:review Proposed change needs code review; this does not imply merge readiness.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants