Explore scratchpad · NVIDIA/hyperflare-inference #708

Raw Markdown for agents: https://autobot.eidonix.com/p/0d792707-ba7e-4630-9008-9d84cfdfc751.md

#1 [high] Change: what PR #708 actually does (7 files, +736/−56)

PR #708 (open, head 4fee325, base main, +736/−56, 7 files) by lukealonso.

Production changes (3 files):

  1. ignition/components/vision_state.py (1–62): VisionState.__init__ now image_token=None default (line 26). validate_prefill (38–49) rewritten from token-keyed to index-keyed: visual = index >= 0; valid = (index == -1) | (visual & index < count[slot] & index < arena.shape[1]); when image_token is not None, valid &= ~visual | (tokens == image_token); generation / feature_slot checks gated on ~visual. inject (51–61) now replaces embeddings where visual = (index>=0)&(index<arena.shape[1])&(feature_slot>=0)&(feature_slot<arena.shape[0]), no longer on metadata.token_ids == image_token; also uses metadata no longer.
  2. helios/src/model.rs: validate_prompt_data (404-406) becomes a wrapper delegating to new validate_continuation_prompt_data(config, tokens, data, initial_prompt_tokens) (408+, ~51/-13). New rejections: initial_prompt_tokens == 0 && !tokens.is_empty(), initial_prompt_tokens > tokens.len(); vision index check now per-position and requires nonnegative index only below initial_prompt_tokens; span end must be <= initial_prompt_tokens; new rule tokens[initial_prompt_tokens..] must all be < config.contract.vocabulary; feature-token bijection only in 0..initial_prompt_tokens, continuation positions require index == -1; scoped span-token check restricted to tokens[..initial_prompt_tokens].
  3. helios/src/model/admission.rs: Admission::validate → new validate_continuation(config, initial_prompt_tokens) (73-110); Admission::from_prompt → new from_continuation(config, handle, prompt, initial_prompt_tokens, ignore_eos, grammar_constrained) (125+). Both old names preserved as delegating wrappers.
  4. helios/src/server/runtime.rs (+71/−33): Worker::admit computes initial_prompt_tokens = parked.carried.prompt_tokens.unwrap_or(incoming.prompt.tokens.len()) (~1629), calls Admission::from_continuation, and converts all three former ? failure sites (Admission::from_continuation, TokenStops::new, TextStops::new) into self.scheduler.cancel(handle)? + incoming.fail(error) + progress = true + continue. self.admissions[slot] = Some(request_admission) is only written after all three succeed (moved below the parked match).

Tests: helios/src/model/tests.rs +123 (one new test continuation_prompt_validation_permits_decoded_in_vocab_image_and_span_tokens_only_after_initial_prompt, plus ~13 mechanical preserve_message_anchor: false additions); helios/src/server/runtime/phase_tests.rs +374 (new vlm_feature_token_survives_preemption_and_thinking_budget_readmission, vlm_feature_and_span_tokens_survive_grammar_transition_readmission, worker_admit_isolates…, plus mechanical field additions); tests/components/test_vision_state.py +67 (2 new tests).

NOTE: the pr_diff tool output includes ~10 extra unrelated files (AGENTS.md, docs/, flare-cli/) that are NOT in the PR's 7-file list — the local base is stale/diff artifact. Verified preserve_message_anchor exists on main (e.g. helios/src/server/request.rs:427-429 on main) so that field is from merged #697, not this PR. Treat pr_files as authoritative on scope.

#2 [high] Why: crash on readmission of decoded in-vocab feature tokens — the reported bug

PR #708 problem statement (from description, result 32):

The strict checks being relaxed are at helios/src/model.rs — the pre-change validate_prompt_data bijection and the span-membership check. See scratchpad entry on the code change for line numbers.

Claimed user-visible impact: a single VLM request that samples the feature token kills the whole model worker (and thus all requests on it), rather than failing one request.

#3 [high] Change mechanics: how continuation tokens get -1 and how the worker died

VERIFIED code facts (read at PR head):

#4 [high] Change: what the description does not say, and what cannot be verified in-repo

Finding 1 — "9 VLM recipes share VisionState" is NOT verifiable in this repo. search_code for VisionState / vision_state at PR head finds exactly two sites: ignition/components/vision_state.py:25 (the class) and tests/components/test_vision_state.py (imports at :10, :17, :39, :55, :81, :132). No recipe, no call site passing image_token=... exists in-tree. Per AGENTS.md:382-396 official recipes live in the external local-inference-lab/hyperflare-recipes repo (hyperflare_recipes/recipes/), and ignition/components/ is restricted to the 12 Helios-ABI modules (vision_state named at AGENTS.md:391, enforced by tests/preparation/test_core_boundary.py). So the blast radius of the image_token default change and the inject semantics change cannot be checked from the PR; it depends on an unlanded/external repo. Finding 2 — the diff-viewer shows ~10 unrelated files (AGENTS.md, docs/{TODO.txt,api.md,cli-design.md,core-design.md,model-preparation.md,scheduling-runtime-design.md}, flare-cli/src/{cli.rs,orbit/agent.rs,orbit/controller.rs,orbit/mod.rs}) that are NOT in the PR's 7-file pr_files list. Verified cause: the local base is stale — e.g. preserve_message_anchor on Prompt (helios/src/server/runtime.rs:50-52) and its computation (helios/src/server/request.rs:427-429) already exist on main from merged #697, and the diff re-shows them as added. Treat pr_files (7 files, +736/−56) as authoritative; the extra files are base drift, not hidden scope. Finding 3 — behaviour the description understates: VisionState.__init__ image_token default is None, which silently disables the tokens == image_token cross-check for any caller that omits it (vision_state.py:45-46). That is a validation-weakening default ("no magic defaults" / "reject weakened constraints", docs/design-review.md:135-146) permitted by the change; the description presents it only as "backward-compatible". Finding 4 — validate_prefill now accepts index == -1 for a token that is the image token, i.e. a genuinely indexed image whose feature index was lost is now treated as text rather than rejected. Not stated in the description. Finding 5 — nothing in the change masks feature_token at decode; the root cause (a VLM can sample its own image token) is mitigated, not removed, and the description says so explicitly.

#5 [high] Related work: no prior issue; #483 overlaps helios/src/model.rs, #626 created the failing park path

Search of open+recently-closed items for "vision_token_indices image token preemption readmission VLM", "feature token decode mask image token crash worker", "VisionState validate_prefill image_token injection", "validate_prompt_data image admission strict", "worker health unhealthy fail all requests model thread": the ONLY hit is #708 itself. So there is no filed issue and no competing/duplicate PR for this bug — the problem statement is entirely self-authored in the PR description. No linked issue numbers appear in the description. Nearest same-code work:

#6 [high] People: author is the project owner and built this machinery; no reviewers yet

Author: lukealonso, GitHub association COLLABORATOR. Charter (read_charter) names @lukealonso as one of three priority contributors ("carry extra weight—we never close their PRs out of hand"), and docs/design-review.md:22-26 names project owner Luke Alonso lalonso@gmail.com — i.e. the author is the owner/maintainer for the captured-graph operation-contract approval rule. Last 180 days: 41 merged, 0 closed, 4 open. Merged work in the areas this PR touches: helios/src (28 merged PRs), docs (23), ignition/preparation (14), flare-cli/src (10), tests/preparation (10). Directly relevant prior merges by the same author in the exact files/paths here: #626 (helios/src/model/admission.rs and runtime.rs — speculative reasoning/grammar-constrained; created park_grammar_transition), #619 (speculation/pipelining), #620 (legacy core loadability), #579 (VLM teardown + PatchMerge validation), #607 (pool staging/offload lifecycle), #670/#683 (ignition components hardening). So this PR is maintenance of machinery he built; items_touching helios/src/model/admission.rs lists only #708, #626 (lukealonso) and #505 (jcartu). Who else works here: helios/src/server/runtime.rs has the widest contributor set — jcartu (#705, #691, #692, #621, #505), yatesdr (#694, #674, #663, #628, #504), FujitsuPolycom (#697, #540, #497), WynnD (#548, #549, #560), rickybrent (#483), plus fordbmorris, ebfio, ateska, javieratomic, shadownetX. ignition/components/vision_state.py has no other recent toucher (items_touching returns only #708). Engagement so far: zero — pr_comments returned "No comments"; no reviews, no labels, no reactions. Note the repo convention from other PRs: flare-autobot normally posts a case-file link and an Autobot Review within ~90 minutes of opening (see #697, #483 discussions). #708 was opened 2026-12-03 17:09 and had no autobot comment at the time this case file was assembled.

#7 [high] Claims and evidence: what is backed, what is disclosed-unrun, what is unverifiable

Process: DRAFT vs READY — the orientation packet says "State: open, ready for review"; description carries full Why/What/Claimed result/Evidence (the four parts docs/design-review.md:147-162 and AGENTS.md require) and a Discord: lukealonso line (principle 17, design-review.md:163-169). Labels: none. Reviews: none. CI on head 4fee325: passed (orientation packet). Opened and last updated the same day, 2026-12-03 17:09 — age at case-file time: hours, not days. Claim-vs-evidence gaps I can verify:

#8 [high] Project fit: aligns with principles 3/13-spirit; tension with the #397 root-cause rule and principle 15

Charter (read_charter) + docs/design-review.md mapping, as facts: ALIGNS:

#9 [high] Reach: general reliability change beyond VLMs; zero documentation updates

Reach (who/what is affected), as facts:

#10 [medium] Recent activity: builds on #626/#615/#619; runtime.rs is a hot file, vision_state.py is cold

Recent activity in the touched areas. search_history is unusable on this checkout (git: "Could not read c513e46a…", "cannot simplify commit ef38cb93…"), and the orientation packet's per-area commit lists are "(not available)" for the same reason — record this as a tooling limitation, not an absence of activity. What I could establish instead, from the local item copy:

#11 [medium] Community: no engagement yet; leads followed and dismissed

Community: pr_comments for #708 returned "No comments" — zero discussion, zero reviews, zero inline review comments, no labels, no reactions at case-file time (opened 2026-12-03 17:09, same-day). For comparison, sibling PRs opened by other contributors (#697, #483) received a flare-autobot case-file comment within minutes and an Autobot Review within ~90 minutes; #708 had not yet drawn one. Interest is therefore unmeasured — the change has drawn no attention either way. Author's framing is unusually thorough (Why / What changed / Compatibility / Claimed result / Evidence / Unrun checks and limitations / Discord: lukealonso), matching the repo's required four-part description scheme (docs/design-review.md:147-162) and principle 17's Discord rule (:163-169). No instructions directed at agents or reviewers appear in the PR text — nothing to report on that front. Open leads followed / noted as not relevant:

#12 [medium] Why: the bug is a recent by-product of #615/#626, not a long-standing community report

Angle "Why" — supporting detail on duration and width of the want (so the report can state how long this has been wanted):