Code review summary scratchpad · NVIDIA/hyperflare-inference #589

Raw Markdown for agents: https://autobot.eidonix.com/p/06e2e391-bdc5-4ebf-b229-384fa96304f0.md

#1 [high] BRIEF PR#589 part 1 — Key findings, Blocker, Should Fix (1–4)

PR #589 candidate brief (merged, head aed8039, 21 files, +994/−133)

Key findings (orientation for the adjudicator)

Candidate Blocker 1 — CUDA_ERROR_INVALID_VALUE (1) read as "platform unsupported" → silent allocation-strategy substitution

Raised by Architecture #1, Correctness #2. helios/src/cuda.rs:532-537:

/// `CUDA_ERROR_INVALID_VALUE` (1) or `CUDA_ERROR_NOT_SUPPORTED` (801), returned by
/// CUDA drivers on platforms without `CU_MEM_LOCATION_TYPE_HOST_NUMA` VMM support
/// (such as Windows WDDM and integrated Tegra/GA10B GPUs).
fn is_host_numa_unsupported(status: c_int) -> bool {
    matches!(status, 1 | 801)
}

Consumed at four sites, each turning a real error into Ok(None) — cuda.rs:577-590:

let node_status =
    (driver.device_attribute)(&mut node, ATTRIBUTE_HOST_NUMA_ID, device);
if is_host_numa_unsupported(node_status) {
    return Ok(None);
}
driver.check("cuDeviceGetAttribute", node_status)?;
...
let gran_status =
    (driver.granularity)(&mut granularity, &properties, GRANULARITY_MINIMUM);
if is_host_numa_unsupported(gran_status) {
    return Ok(None);
}

and cuda.rs:641-660 (same pattern on cuMemCreate and cuMemSetAccess):

let create_status = (driver.memory_create)(&mut handle, nbytes, &properties, 0);
if is_host_numa_unsupported(create_status) {
    return Ok(None);
}
driver.check("cuMemCreate", create_status)?;
...
let access_status =
    (driver.memory_access)(start, nbytes, access.as_ptr(), access.len());
if is_host_numa_unsupported(access_status) {
    return Ok(None);
}
driver.check("cuMemSetAccess", access_status)?;

What Ok(None) buys, selene/src/offload.rs:631-638:

match slab::SlabPool::try_sized_by_rank(&layout, bytes, intake, &contexts, registrar)? {
    Some(pool) => pool,
    None => {
        let mut pool = slab::SlabPool::sized(&layout, bytes, intake)?;
        pool.register(registrar, context)?;
        pool
    }
}

Why it matters: status 1 is also how CUDA reports genuinely invalid arguments (bad granularity rounding, wrong handle/flags, resident-context mistake). Those now degrade to a registered anonymous mapping (cost documented at selene/src/slab.rs:254-260: "Registering one mapping maps it into every device at about 2 MiB of device memory per GiB") instead of failing. Grounds: AGENTS.md:182-186 "Do not remove validation, suppress errors, silently substitute execution paths" + charter "don't just swallow, skip, or retry an unexplained error (#397)". Internal inconsistency: cuMemMap/cuMemAddressReserve still hard-error, so a HOST_NUMA-less platform can return Err as well as Ok(None) depending on which call reports first. The doc comment at cuda.rs:546-547 ("Returns Ok(None) when the driver reports HOST_NUMA VMM allocation is unsupported on this platform; real failures (such as out-of-memory) return Err") overstates it — only non-INVALID_VALUE errors propagate; the PR description repeats the same overstatement. Fix options: (a) narrow the predicate to CUDA_ERROR_NOT_SUPPORTED (801) and probe capability explicitly before reserving (host-NUMA attribute presence / granularity for CU_MEM_LOCATION_TYPE_HOST_NUMA); (b) if status 1 must be accepted for one driver/platform pair, constrain it to that single call and cite the driver behaviour. Settled only by a GA10B/WDDM run showing which status each of the four calls returns.

Candidate Should Fix 2 — copy_batch's contract states the opposite of the fallback added beneath it

Architecture #2, Prose #1. helios/src/cuda.rs:781-790 (unchanged by the diff):

/// Issue one batched copy of `destinations[i] <- sources[i]` for `sizes[i]`
/// bytes each, in stream order on both sides. Every address is a device
/// address, including the device alias of registered host memory. CPU
/// addresses of registrations are not necessarily GPU-accessible. The batch
/// carries at most [`BATCH_BYTES`] and [`BATCH_ENTRIES`]; larger batches and
/// empty entries are rejected. An empty batch issues nothing.
///
/// # Safety
/// Every range stays valid and, for host sources, unchanged until the
/// stream passes the copy.

vs cuda.rs:824-833 (added):

// Fallback for CUDA < 13.0 drivers (e.g. JetPack 6 / CUDA 12.6 on Jetson Orin
// and discrete CUDA 12.x GPUs) where cuMemcpyBatchAsync_v2 is absent: issue
// individual UVA stream-ordered copies via cuMemcpyAsync, which accepts device
// addresses, registered host aliases, and raw cuMemHostAlloc(..., flags=0) pointers.
for ((&dst, &src), &size) in destinations.iter().zip(sources.iter()).zip(sizes.iter()) {
    self.driver.check("cuMemcpyAsync", unsafe {
        (self.driver.copy_async)(dst, src, size, self.handle as Handle)
    })?;
}

The description says callers really pass those pointers (helios/src/execution/transport.rs frame.input.address() from host_buffer = allocate_host(nbytes, 0), cuda.rs:842-854; mapped_host_buffer is the flags=3 variant). A stale contract on a pub(crate) unsafe fn is a correctness hazard for future callers; AGENTS.md:52-60 treats docstrings as present-state spec. Related: cuMemcpyAsync is now a hard-required entry point — cuda.rs:303 copy_async: symbol!("cuMemcpyAsync"), resolved by the symbol! macro at cuda.rs:239-248, which returns Err when absent — so a driver lacking it fails at Driver::load, not at copy time. docs/prefix-cache-offload.md:645-655 lists the bound symbols and the fallback but not that requirement.

Candidate Should Fix 3 — memory.rs computes the integrated host budget twice, with real divergences

Three lenses (Correctness #4, Conventions #2, Simplicity #4, Subtractive #1).

(a) helios/src/runtime_core/memory.rs:195-221 duplicates limited_budget (same file, 267-298) arm for arm, but saturates instead of erroring:

fn integrated_offload_host_budget(
    memory: MemorySnapshot, loaded: u64, limit: Option<MemoryLimit>, future: u64,
) -> u64 {
    match limit {
        None => flare_selene::offload::host_pool_budget_from(memory.free, memory.total, future, true),
        Some(MemoryLimit::Reserve(reserve)) => memory.free.min(memory.total)
            .saturating_sub(reserve).saturating_sub(future),
        Some(limit) => {
            let physical = memory.free.min(memory.total).saturating_sub(future);
            match limit.occupied_bytes(memory.total) {
                Some(cap) => physical.min(cap.saturating_sub(loaded.saturating_add(future))),
                None => physical,
            }
        }
    }
}

Established limited_budget, memory.rs:288-298:

let Some(cap) = limit.and_then(|limit| limit.occupied_bytes(memory.total)) else {
    return Ok(available);
};
let required = loaded.checked_add(future)
    .ok_or_else(|| invalid("loaded memory footprint overflows the device budget"))?;
let remaining = cap.checked_sub(required).ok_or_else(|| invalid(format!(
    "memory limit is {cap} bytes, but loaded model resources require {required} bytes"
)))?;
Ok(available.min(remaining))

So a misconfigured --memory-limit yields 0 (then floored at intake_slots(layout, 1), offload.rs:174-177) instead of the loud diagnostic the KV path produces. Fix: limited_budget(memory, loaded, limit, 0, /*integrated=*/true, future), or factor the shared "explicit limit wins, else scaled reserve" step. New test integrated_offload_host_budget_matches_small_soc_scaling_and_explicit_limits (memory.rs:1492-1525) pins the copy rather than the shared helper.

(b) helios/src/runtime_core/memory.rs:646-661 (inside integrated_state) vs the per-rank loop at :877-904 — same fold written twice, and they already disagree:

let total = observations.iter().zip(&self.ranks)
    .filter(|(_, r)| r.integrated).map(|(m, _)| m.total).min().unwrap();

vs :879-887:

let memory = MemorySnapshot {
    free: observations.iter().zip(&self.ranks)
        .filter(|(_, r)| r.integrated).map(|(m, _)| m.free).min().unwrap(),
    total: observations[index].total,
};

and :674-681 (m.free.saturating_sub(free) max over integrated ranks) vs :904 (initial[index].free.saturating_sub(memory.free)). Fix: compute per-integrated-rank state once into a Vec after observations (memory.rs:640-645) and index it in both host_budget_for (:684-694) and the loop.

Candidate Should Fix 4 — stale reserve formula in the one comment that explains the second encoding

Conventions #1, Simplicity #5, Correctness #3, Prose #2. helios/src/frontend/mod.rs:1400-1402:

/// That second encoding allocates host memory after the host cache is sized. The memory draws
/// on the headroom `host_pool_budget` (selene/src/offload.rs) leaves unallocated:
/// `HOST_SERVICE_HEADROOM_BYTES` (2 GiB) plus one twentieth of total memory.

The PR replaced exactly that rule — selene/src/offload.rs:805-820:

pub fn host_service_headroom_bytes(total: u64) -> u64 {
    if total <= (16u64 << 30) { 64 << 20 }
    else { HOST_SERVICE_HEADROOM_BYTES.min(total / 32) }
}
/// Implicit host reserve (service headroom plus the system share) when no explicit
/// memory limit overrides it.
pub fn host_reserve_bytes(total: u64) -> u64 {
    host_service_headroom_bytes(total) + total / HOST_SYSTEM_SHARE
}

On an 8–16 GiB Jetson/SoC the real margin is 64 MiB + 5%, not 2 GiB + 5% — overstated by ~1.9 GiB at the only site that spells the constraint out, while HOST_SERVICE_HEADROOM_BYTES is still exported at 2 GiB (offload.rs:802) making the stale prose look authoritative. docs/prefix-cache-offload.md:1138-1145 was updated to the new rule, so the comment is the inconsistent pair. Fix: restate in terms of host_reserve_bytes/host_service_headroom_bytes or drop the numbers.

#2 [high] BRIEF PR#589 part 2 — Should Fix 5–7, Subtract 8

Candidate Should Fix 5 — libibverbs loader hard-fails on a symbol only the trampoline's fallback branch needs (severity gated on one nm -D)

Only Correctness raised this (its #1). helios/native/roce_proxy_dlopen.c:89 inside the FLARE_LOAD_IBV list, whose failure path dlcloses and aborts (:72-82):

#define FLARE_LOAD_IBV(field, name, version)                                      \
  do {                                                                            \
    void* sym = flare_ibv_sym(handle, name, version);                             \
    if (sym == NULL) {                                                            \
      snprintf(flare_ibv_err, sizeof(flare_ibv_err),                              \
               "libibverbs.so.1 is missing required symbol %s", name);            \
      dlclose(handle);                                                            \
      return;                                                                     \
    }                                                                             \
    memcpy(&flare_ibv.field, &sym, sizeof(sym));                                  \
  } while (0)
...
FLARE_LOAD_IBV(query_port, "ibv_query_port", "IBVERBS_1.1");

The symbol is read only on the trampoline's compat branch, roce_proxy_dlopen.c:146-154:

static int flare_ibv_query_port(struct ibv_context* context, uint8_t port_num,
                                struct ibv_port_attr* port_attr) {
  struct verbs_context* vctx = verbs_get_ctx_op(context, query_port);
  if (!vctx) {
    memset(port_attr, 0, sizeof(*port_attr));
    return flare_ibv.query_port(context, port_num, (struct _compat_ibv_port_attr*)port_attr);
  }
  return vctx->query_port(context, port_num, port_attr, sizeof(*port_attr));
}

and the proxy's own call is macro-rewritten to the trampoline by #define ibv_query_port flare_ibv_query_port (:221, before #include "roce_proxy.c" at :236) — the vendored call is the 3-arg form, helios/native/roce_proxy.c:424. Judgment call to hand downstream: flare_ibv_sym (:50-56) tries dlvsym(handle,name,version) then falls back to dlsym(handle,name), so a version-node mismatch (e.g. ibv_query_port living in rdma-core's IBVERBS_1.0 node while this asks for IBVERBS_1.1) is already tolerated; the only fatal case is libibverbs not exporting the un-prefixed name at all (rdma-core also exports ___ibv_query_port for the post-2022 signature). If the plain symbol is exported, this is a load-time strictness nit; if not, every roce_create aborts with "missing required symbol ibv_query_port" (surfaced at helios/src/execution/roce.rs:192-195) and multi-host RoCE is dead while single-host serving looks fine. Settled by nm -D --defined-only libibverbs.so.1 | grep query_port inside ubuntu:22.04 and ubuntu:24.04. Note the new test cannot distinguish these outcomes (next item), and the release smoke checks only run --version / --help (.github/workflows/release.yml:110-121), never a transport open.

Candidate Should Fix 6 — two new tests can pass while asserting nothing

helios/src/execution/roce.rs:511-523 — when libibverbs.so.1 is present (normal on GPU hosts and on any runner with libibverbs-dev), the body is empty:

#[test]
fn lazy_libibverbs_loader_resolves_symbols_or_reports_install_hint() {
    let mut message = [0 as c_char; 512];
    // SAFETY: `message` is a valid writable buffer of length 512.
    let status = unsafe { roce_ensure_libibverbs(message.as_mut_ptr(), message.len() as u64) };
    if status != 0 {
        let text = unsafe { CStr::from_ptr(message.as_ptr()) }.to_string_lossy();
        assert!(
            text.contains("libibverbs.so.1") && text.contains("libibverbs1"),
            "unexpected dlopen error: {text}"
        );
    }
}

It cannot fail on either branch (a missing-symbol message also contains both substrings). eos/src/unix.rs:207-248 map_host_advises_hugepages_and_prefaults_zeroed_pages guards its hg VmFlags assertion behind smaps-readable + address-found + VMA-block-found + VmFlags:-present (:214-245), recovering the block end by re-counting hex lines; any miss and it passes silently. Mitigation: the zero-fill assertion at :212 does assert, so the test is not useless — the fix is to hoist the block lookup into a helper returning Option<&str> and .expect(...), and in the roce case assert the applicable branch or delete the test. Rule: AGENTS.md:194-199 "Tests must exercise the affected behavior or contract".

Candidate Should Fix 7 — the surfaced Ok(None) fallback is reached through a required trait method that exists only to be overridden

Simplicity #2, Conventions #3, Subtractive #3. selene/src/registrar.rs:22-37:

/// Reserve one range of pinned host memory made of one part per
/// `(context, device, bytes)` request, in request order, each accessible
/// to its own device and the host only. The host cannot address a record
/// across parts, so slot addresses in such a pool are identities.
fn map_split(&self, requests: &[(usize, i32, usize)]) -> Result<Box<dyn SplitMapping>>;

/// Like [`HostRegistrar::map_split`], returning `Ok(None)` when the device
/// or driver does not support per-rank `HOST_NUMA` split mappings so the
/// caller can fall back to a registered anonymous host mapping. Allocation
/// failures such as out-of-memory still return `Err`.
fn try_map_split(
    &self,
    requests: &[(usize, i32, usize)],
) -> Result<Option<Box<dyn SplitMapping>>> {
    self.map_split(requests).map(Some)
}

map_split is required, so ~12 impls carry it (registrar.rs:26; helios/src/offload/registrar.rs:27; selene/src/pool/builder.rs:311; selene/src/pool/startup.rs:223; selene/src/pool/net.rs:976; selene/src/pool/engine/tests.rs:155; selene/src/pool/engine/net_tests.rs:44; selene/src/testing.rs:453,490; selene/src/offload/tests.rs:800; selene-manager/tests/client.rs:1100,1298,3147) — mostly error-returning stubs. Its default body is the only caller of map_split, and the real implementation overrides try_map_split instead (helios/src/offload/registrar.rs:27-37), so the required method is unreachable in production and cuda::map_device_host_parts (helios/src/cuda.rs:667-676) has exactly one caller that is itself unreachable:

/// Like [`try_map_device_host_parts`], returning an error when `HOST_NUMA` VMM
/// allocation is unsupported on this device or driver.
pub(crate) fn map_device_host_parts(requests: &[(usize, i32, usize)]) -> Result<DeviceHostParts> {
    try_map_device_host_parts(requests)?.ok_or_else(|| {
        Error::execution(
            ExecutionError::State,
            "HOST_NUMA virtual memory allocation is not supported on this device or driver",
        )
    })
}

Same shape: SlabPool::sized_by_rank (selene/src/slab.rs:261-270) now only wraps try_sized_by_rank and its remaining callers are tests (selene/src/slab.rs:631, helios/src/offload/transfer.rs:1723); production goes through try_sized_by_rank at selene/src/offload.rs:631. Fix: make try_map_split the single required method, delete map_split, map_device_host_parts, sized_by_rank and the UnsupportedSplitRegistrar shim (selene/src/offload/tests.rs:785-813). Caveat for the adjudicator: crates are publish = false and no non-test workspace caller exists, so only a maintainer can confirm no out-of-tree implementor exists.

Candidate Subtract / Simplify 8 — collapse the prepare / headroom ladders; the buggy re-query survives as the default arm

Strongest subtraction (Simplicity #1, Conventions #3, Subtractive #2/#4). selene/src/offload.rs:603-619 — the post-KV-alloc re-query this PR removes is still the default:

let (_, host) = match host_budget {
    Some(budget) => options.headroom_with_inputs_for_budget(
        contexts.len(), &layout, max_active, input_staging != 0, local_pages, budget,
    )?,
    None => options.headroom_with_inputs(
        contexts.len(), &layout, max_active, input_staging != 0, local_pages,
    )?,
};

Three-deep ladder at selene/src/offload.rs:484-534 (prepare → prepare_with_inputs → #[allow(clippy::too_many_arguments)] prepare_with_inputs_budget) plus the same ladder mirrored in helios/src/offload/mod.rs:72-129 (whose prepare at :72-80 has no caller anywhere in the tree), and a headroom_with_inputs/headroom_with_inputs_for_budget pair (offload.rs:117-206) that duplicates the enabled()/memory/disk/capture derivation twice (:125-137 and :160-165). Production reaches only Some: helios/src/runtime_core/model.rs:933 returns early when the cache is disabled and :967-977 forwards planned_host_budget, which is Some whenever the cache is enabled (memory.rs:1102-1112). None callers are all tests (selene/src/offload/tests.rs, selene/src/offload/sharded/tests.rs:108/247/375/537, helios/src/offload/pool/tests.rs:124). Fix: one entry point taking host_budget: u64; delete the Option and the None arm, the shims, and the second too_many_arguments allow (~50 lines), or at minimum thread Option<u64> through the existing functions rather than adding twins. This also removes the last compiled path that can size the pool twice.

#3 [high] BRIEF PR#589 part 3 — Docs/evidence, Subtract 11, Nits 12, Dropped

Candidate Should Fix 9 — the arm64/JetPack 6 headline claim rests on an x86_64-only run, and the docs state it as qualification

Architecture #3/#4/#5, Prose #4, Conventions/Correctness open questions. Two halves:

(a) Evidence. The PR's headline "flare-linux-arm64.tgz can start on stock JetPack 6" is supported by an x86_64 build inside ubuntu:22.04 plus readelf on the amd64 artifact; the body lists "Native aarch64 build and ubuntu-24.04-arm CI run" as unrun, and all live-GPU paths (discrete CUDA 12.x, GA10B, WDDM) as untested. The linux job's arm64 leg already exists and runs the same ELF/GLIBC_ checks and dual-container smoke (release.yml:46-49 os: ubuntu-24.04-arm / arch: arm64 / build-packages: libibverbs-dev; checks at :81-121), so the check is runnable via workflow_dispatch. (b) Prose state. docs/release.md:30-31 states it as present qualification on unrun evidence:

- The Linux executables are built in Ubuntu 22.04 and require glibc 2.35 or
  later (covering Ubuntu 22.04+, JetPack 6, and Ubuntu 24.04+).

AGENTS.md:52-60 requires "State support as present qualification: what is implemented, the hardware and configurations on which it is qualified, and what is not qualified" and "Record unresolved defects, unrun checks, and pending measurements in docs/TODO.txt, not in design documents" — docs/TODO.txt has no JetPack/Orin/GA10B/WDDM/libibverbs/arm64 entry (verified: only unrelated Qualify … lines at :119 and :295). Note the parenthetical also reads as if JetPack 6 were a glibc level distinct from Ubuntu 22.04, which it is not. (c) Scope (judgment call for the adjudicator, no lens found a code defect). The PR bundles four independent outcomes (AGENTS.md:198-199 "Keep each PR focused on one coherent outcome"): the CUDA 12 copy fallback; the arm64 release portability change (release.yml + the 236-line vendored roce_proxy_dlopen.c + build.rs); the Selene/helios host-budgeting rework; and the eos::unix THP reordering. Two of them extend support to Jetson Orin 8–32 GiB / GA10B, which appear nowhere in the charter's Goals (SM103/SM120/SM121, DGX Spark) and fall under Non-Goals "broad hardware support" that "require an explicit maintainer sign-off before starting work" (AGENTS.md:171-175, :201-206: "A feature request, passing tests, or a performance gain does not waive an architectural invariant"). The description cites no maintainer request or sign-off. Counterweight the adjudicator must weigh: the author is a charter-designated priority contributor (charter "Respect for Contributors": @lukealonso "carry extra weight—we never close their PRs out of hand"), and the PR is already merged (ba3afb13, 2026-11-28), so these are follow-ups rather than merge gates. Fix for (a)/(b): run the linux arm64 leg (or a native cargo build --release --features roce with the ELF checks) and attach output, or qualify release.md:30-31 to "require glibc 2.35 or later, the level of Ubuntu 22.04 and of JetPack 6's Ubuntu 22.04 root filesystem" and add the unrun check to docs/TODO.txt.

Candidate Should Fix 10 — docs still describe the pre-PR linked libibverbs model in four places

Prose #3/nit, Conventions #8. THIRD_PARTY_NOTICES.md:76-78 (shipped in the archive per release.yml:85-91):

The NVIDIA CUDA driver is loaded from the user's system. Linux aarch64 builds
also link the system libibverbs and pthread interfaces for RoCE. Platform C/C++
runtime libraries remain system dependencies for the CLI. The CLI release
archive packager copies no shared libraries or CUDA SDK components.

No build links libibverbs any more — helios/build.rs:67-77 emits only dl/pthread:

#[cfg(feature = "roce")]
{
    println!("cargo:rerun-if-changed=native/roce_proxy.c");
    println!("cargo:rerun-if-changed=native/roce_proxy_dlopen.c");
    cc::Build::new().file("native/roce_proxy_dlopen.c").std("gnu11").compile("flare_roce_proxy");
    println!("cargo:rustc-link-lib=dl");
    println!("cargo:rustc-link-lib=pthread");
}

Same class, three more: packaging/debian/package.sh:46-48 still hard-adds the ARM64 RDMA dependency (if [[ "$arch" == arm64 ]]; then dependencies+=", ibverbs-providers"; fi) now that dpkg-shlibdeps derives nothing from a binary with no libibverbs.so DT_NEEDED; docs/debian.md:3-6,61-64 still says "The ARM64 build includes RoCE support" / "ARM64 additionally depends on the verbs providers needed for RoCE" without the runtime-optional caveat; docs/prefix-cache-offload.md:1483-1485 says "--all-features enables the roce and rdma features, which link libibverbs" — after this PR only rdma (selene's ibverbs-sys) links it, while roce compiles against the headers and dlopens at run time. docs/release.md:32-35 was updated to the new wording, so these are the inconsistent pairs. helios/Cargo.toml:28-29 ("rdma … ; links libibverbs") remains correct as written.

Candidate Subtract / Simplify 11 — delete the apply_reserve switch (one caller, one value)

Conventions #4, Simplicity #6, Subtractive #7. selene/src/offload.rs:851-861:

/// Keep the same scaled server allowance and system share as integrated GPU planning.
pub fn host_pool_budget(future: u64) -> Result<u64> {
    host_pool_budget_with_reserve(future, true)
}

/// Like [`host_pool_budget`], allowing callers with an explicit unified-memory limit
/// to omit the implicit service and system reserves.
pub fn host_pool_budget_with_reserve(future: u64, apply_reserve: bool) -> Result<u64> {

Whole-tree callers verified: host_pool_budget_with_reserve only offload.rs:853 (true); host_pool_budget_from(..., apply_reserve) only offload.rs:885 and helios/src/runtime_core/memory.rs:202-207 (both true); false appears only in test assertions at selene/src/offload/tests.rs:722-723 exercising the flag directly. The explicit-limit case the doc names never reaches this function — it goes through integrated_offload_host_budget. Fix: delete the wrapper, end host_pool_budget with Ok(host_pool_budget_from(available, total, future, true)), and drop the parameter (keeping host_pool_budget_from as the parameterised helper if item 3's refactor still needs it, otherwise drop it too). ~11 lines.

Candidate Nits 12 (grouped, mechanical)

let step = page_size().max(1);
for offset in (0..bytes).step_by(step) {
    // SAFETY: `offset < bytes` and the mapping is writable.
    unsafe { ptr.cast::<u8>().add(offset).write_volatile(0); }
}

vs windows.rs // Populate the pages before the slab enters the transfer pool. + the same loop over page_size(). Move prefault_zeroed(address, bytes) next to page_size() in eos/src/lib.rs and call from both. Keep the MADV_POPULATE_WRITE probe itself (a deliberate Linux ≥5.14 hedge; Ubuntu 22.04 ships 5.15).

Considered and dropped (record so the adjudicator does not re-open)

#4 [high] BRIEF PR#589 part 4 — assembled candidate index (10 candidates, ranked)

Assembled brief, 10 surviving candidates after merge/dedup (from 6 lenses, ~30 raw findings → 10 + one grouped nit block + one drop list).

# Section Candidate Lenses merged Where
1 Blocker CUDA_ERROR_INVALID_VALUE (1) mapped to "platform unsupported" → silent swap of allocation strategy for real argument errors Architecture 1, Correctness 2 cuda.rs:532-537, 577-590, 641-660; offload.rs:631-638
2 Should Fix copy_batch contract contradicts the fallback + cuMemcpyAsync is now load-required Architecture 2, Prose 1 cuda.rs:781-790 vs 824-833; cuda.rs:239-248/303
3 Should Fix integrated host budget computed twice; copies already diverge (saturate vs error; min total vs indexed total) Correctness 4, Conventions 2, Simplicity 4, Subtractive 1 memory.rs:195-221 vs 267-298; 646-681 vs 877-904
4 Should Fix stale 2 GiB + total/20 reserve comment, the only place the constraint is written Conventions 1, Simplicity 5, Correctness 3, Prose 2 frontend/mod.rs:1400-1402 vs offload.rs:805-820
5 Should Fix (gated) loader hard-requires ibv_query_port that only the trampoline's compat branch reads Correctness 1 (sole) roce_proxy_dlopen.c:89, 146-154
6 Should Fix two new tests can pass while asserting nothing Simplicity 3 roce.rs:511-523; unix.rs:207-248
7 Should Fix map_split required-but-unreachable forces ~12 stubs; map_device_host_parts/sized_by_rank dead Simplicity 2, Conventions 3, Subtractive 3 registrar.rs:22-37; cuda.rs:667-676; slab.rs:261-270
8 Subtract/Simplify collapse prepare/headroom ladders; the removed post-KV re-query survives as the None default arm Simplicity 1, Conventions 3, Subtractive 2 & 4 offload.rs:603-619, 484-534; offload/mod.rs:72-129
9 Should Fix arm64/JetPack 6 headline claim on x86_64-only evidence, stated in docs as qualification; four outcomes in one PR reaching Orin/GA10B (Non-Goals) Architecture 3/4/5, Prose 4 release.md:30-31; release.yml:46-49,81-121; TODO.txt empty
10 Should Fix docs still describe linked libibverbs (notices, debian packaging+doc, --all-features note) Prose 3, Conventions 8 THIRD_PARTY_NOTICES.md:76-78; package.sh:46-48; debian.md:3-6,61-64; prefix-cache-offload.md:1483-1485
11 Subtract delete apply_reserve switch (one caller, one value) Conventions 4, Simplicity 6, Subtractive 7 offload.rs:851-861
12 Nits status literals → named constants (constrained by cfg); duplicated prefault loop; duplicate CopyAsync alias; (conditional) redundant HOST_NUMA probes; one merged description-prose note Conventions 5/6/7, Subtractive 5/6, Prose nits see part 3

Largest single weight change if the adjudicator only acts once: item 8 (~50 lines) or item 3 (~93 lines incl. tests, per Subtractive) — item 3 is the higher-value one because its two copies already disagree behaviourally. Only genuinely un-settled-from-code question: item 1 (which CUDA status GA10B/WDDM returns at each of the four calls) and item 5 (nm -D on rdma-core's libibverbs). Everything else is decidable from the diff.

#6 [high] Research summary

Prepared the candidate brief for PR #589 (merged, head aed8039, 21 files, +994/−133) from all six lenses. It is in the scratchpad as five entries: an index table, the blocker plus should-fix 1–4 with quoted code, should-fix 5–8, docs/nits/drop-list, and upstream citation corrections.

Result: ~30 raw findings collapsed to 10 surviving candidates + 1 grouped nit block. I opened every cited file at head and quoted the exact 5–15 lines under each candidate.

The single Blocker is one no lens disputes the shape of: helios/src/cuda.rs:532-537 maps CUDA status 1 (CUDA_ERROR_INVALID_VALUE, the generic argument-error status) to "platform unsupported" at four call sites, so a genuine bug in the mapping path silently degrades to a different allocation strategy via selene/src/offload.rs:631-638.

Strongest subtraction (keeping the subtractive option per the rules): the post-KV-alloc re-query the PR set out to remove survives as the None default arm at selene/src/offload.rs:603-619, propping up a three-deep prepare/prepare_with_inputs/prepare_with_inputs_budget ladder duplicated again in helios/src/offload/mod.rs:72-129 (whose prepare has no caller in the tree). Highest-value merge, though, is helios/src/runtime_core/memory.rs:195-221 — the integrated host budget is implemented twice and the two copies already disagree (saturates to 0 where limited_budget emits a diagnostic; min total vs indexed total).

Two lens claims I discarded as contradicting the diff, and recorded so the adjudicator does not inherit them: Architecture's citation of docs/multi-host.md:50 as a stale JetPack-6 qualification (the line is accurate post-PR and says nothing about JetPack 6), and the off-by-two call-site line numbers both Architecture and Correctness give for is_host_numa_unsupported.

Pre-filtered out: CI-infra/red-check notices, the redundant readelf heredoc, unrelated-test-failure and test-count claims, duplicated scaling assertions across tests, and nitpicking of the budget tests that do exercise production entry points. I also merged the description-prose notes into one item as required. No prompt-injection content anywhere in the PR.

Two candidates are genuinely un-settleable from the diff and are flagged as such: item 1 (which status GA10B/WDDM returns at each of the four CUDA calls) and item 5 (whether stock rdma-core exports un-prefixed ibv_query_port — a nm -D | grep query_port answers it). Architecture's scope concern (Jetson Orin 8–32 GiB / GA10B are charter Non-Goals, and four unrelated outcomes ride in one PR) is kept but neutralised against the counterweight that the author is a charter-designated priority contributor and the PR is already merged — so it reads as a follow-up, not a merge gate.

#7 [high] BRIEF PR#589 part 6 — final report shape + section mapping

Required final-report shape and how the 12 candidates map into it

The report must be a tight candidate brief for the downstream adjudicator, organized into five named sections, 5–12 strongest survivors. Mapping (do not renumber or re-derive; the detail lives in entries 1–3):

Key findings (short orientation, ~1 paragraph + bullets):

Candidate Blockers (1 item): #1 — is_host_numa_unsupported treats CUDA_ERROR_INVALID_VALUE (1) as "platform unsupported" at four call sites → silent allocation-strategy substitution; also makes the cuda.rs:546-547 doc comment and the description's "real errors … propagate unchanged" false.

Candidate Should Fix (9 items, ordered by strength): #2 stale copy_batch contract; #3 budget computed twice (two copies already diverge — strongest should-fix); #4 stale reserve comment; #5 loader hard-requires ibv_query_port (gated on nm -D); #6 two tests assert nothing; #7 required-but-unreachable map_split + dead map_device_host_parts/sized_by_rank; #9 arm64/JetPack 6 claim on x86_64-only evidence + 4-outcomes-in-one-PR scope; #10 docs still say linked libibverbs. Note for the report: keep #9(c) scope concern explicitly neutralised — priority contributor (@lukealonso) carries extra weight per charter, PR merged, so it reads as follow-up. Do not restate as a rejection demand.

Candidate Subtract / Simplify (2 items): #8 collapse the prepare/headroom ladders and drop the None default arm that preserves the removed bug — the strongest subtraction, ~50 lines; #11 delete the apply_reserve switch (~11 lines). Discrete merge decision to state once: where Simplitude/Conventions asked to expand helpers and Subtractive asked to delete twins, the subtractive option was kept in every case (e.g. #7 deletes rather than making try_map_split richer; #8 deletes rather than threading a nicer Option).

Candidate Nits (1 grouped block, 5 items): #12 — status literals → named constants (respect the cfg constraint: declare beside cuda.rs:143-160, runtime_core is gated at lib.rs:22-26); duplicated prefault loop; duplicate CopyAsync alias; (conditional, hardware-gated) redundant HOST_NUMA probes; one merged description-prose note.

Also include a short "dropped as noise" paragraph (not a section, ~4 lines): CI-infra notices, redundant readelf heredoc, unrelated-test-failure and test-count claims, duplicated scaling assertions, low-value nitpicking of the budget tests that do exercise production entry points. Plus the injection statement: none found.

Ranked single-action guidance for the adjudicator (state it): act on #3 first (behavioural divergence, ~93 lines incl. tests), then #8 (~50 lines), then #1 (narrow to status 801 + explicit probe).

#5 [medium] BRIEF PR#589 part 5 — upstream citation corrections

Two upstream claims I checked and found to contradict the actual diff — recorded so the adjudicator does not inherit them:

  1. Architecture #5 cites docs/multi-host.md:50 as stating JetPack 6 qualification. It does not. The line reads (verified at head aed8039):
Both builds load `libibverbs.so.1` lazily at run time only when opening a
multi-host RoCE transport, so single-host serving runs without RDMA packages.

That is accurate post-PR (matches build.rs and the RoceTransport::open call site) and carries no JetPack 6 qualification. Only the docs/release.md:30-31 half of that finding survives — kept as item 9(b). docs/multi-host.md:47-56 as a whole was verified line-by-line against helios/build.rs, roce_proxy_dlopen.c and roce.rs by the Prose lens.

  1. Architecture #1 and Correctness #2 both state the four is_host_numa_unsupported call sites are at 579, 587, 642, 658. Actual lines at head are 577-581 (node_status), 585-589 (gran_status), 641-644 (create_status), 656-660 (access_status). Same code, off-by-two citations; the quotes in item 1 use the verified line numbers. driver.check for those four calls sits at 582, 590, 645, 661.

Also verified as accurate and safe to quote as-is: selene/src/offload.rs:851-886 budget helpers; helios/src/runtime_core/memory.rs:192-298 budget functions; memory.rs:1492-1525 the duplicated-scaling test; eos/src/unix.rs:85-119; helios/src/execution/roce.rs:191-195, 511-523; selene/src/registrar.rs:22-37; helios/src/offload/registrar.rs:27-37; selene/src/slab.rs:189-270; helios/src/cuda.rs:80-81, 239-248, 303, 532-537, 667-676, 781-833; .github/workflows/release.yml:46-49, 81-121; packaging/debian/package.sh:46-48; docs/debian.md:3-6, 61-64; THIRD_PARTY_NOTICES.md:76-78; docs/prefix-cache-offload.md:645-655, 1138-1145, 1483-1485; docs/release.md:30-35; docs/TODO.txt (no arm64/JetPack entry).