Skip to content

helios,ignition,ci: restore catalog validation, CPU Python tests, and script separation - #608

Merged
lukealonso merged 1 commit into
mainfrom
post-split-ci-blackout-lock-drift-an
Nov 29, 2026
Merged

lukealonso merged 1 commit into
mainfrom
post-split-ci-blackout-lock-drift-an

Conversation

@lukealonso

Copy link
Copy Markdown
Collaborator

Why

With the Native serving GitHub Actions workflow (native-serving.yml) disabled and no Python CPU test workflow running, several regressions accumulated across Helios catalog validation, direct-scheduler benchmarking, and post-split packaging:

  1. Incomplete Helios catalog/selection validation and batch-1 checkpoint assumption: Replacing hardcoded batch-capacity lists in helios/src/model/catalog.rs left only manifest-wide .any(...) checks, which accepted manifests missing per-batch lifecycle or speculative graphs and broke model::tests::packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape (packed_round_tests.rs:106). In helios/src/runtime_core/selection.rs:176, speculative eligible_widths still filtered by active.next_power_of_two() instead of the core's smallest covering batch >= active, disagreeing with the subsequent max_batch graph retention filter. In helios/src/scheduler/cost.rs:265, ActionCosts::fresh_duration hardcoded batch: 1, causing checkpoints.rs:411,727,788 to silently disable prefix checkpointing on cores whose smallest declared Snapshot batch is not 1.
  2. CLI entrypoint clobber on warm-cache uv sync (local-inference-lab/hyperflare-recipes#20): Both pyproject.toml and hyperflare-recipes/pyproject.toml declare [project.scripts] ignition. When uv sync installs both packages into one virtual environment with a warm cache, ignition can overwrite .venv/bin/ignition with the recipe-free entrypoint. Because core ignition must remain recipe-free without a plugin discovery framework (AGENTS.md), separating core's console script name eliminates the collision cleanly without adding discovery machinery.
  3. MappingProxyType deepcopy crash in benchmarking: Request._core_parameters (ignition/direct/scheduler.py:544) wraps resolved parameters in MappingProxyType, causing copy.deepcopy(scheduler, ...) in ignition/bench/runner.py:435 and tests/bench/test_runner.py:55 to crash with TypeError: cannot pickle 'mappingproxy' object.
  4. CI and post-split test drift: .github/workflows/native-serving.yml:31 omitted --recipe minimax_m3 when preparing templates required by frontend::jinja::tests::PREPARED_TEMPLATES; two capture tests (test_capture_roce_wait.py, test_transient_retention.py) lacked capture_allocation_sizes and all_gather_object stubs expected by capture.py; two assertions in test_core_protection.py lagged refactored Rust error strings; and two leftover CUDA component tests (test_draft_block_broadcast_cuda.py, test_vocabulary_commit_cuda.py) whose support modules moved to hyperflare-recipes broke pytest collection.

What exactly changed

  • helios/src/model/catalog.rs:
    • Before: Validated lifecycle (Init, Restore, Snapshot, Resume), Decode, and Speculative kinds only via manifest-wide .any(...) existence checks.
    • After: Collects the union of declared lifecycle and generation batch capacities and enforces per-batch parity across all lifecycle kinds, Decode (when non-speculative), width-one Speculative, and wider Speculative when batch * 2 <= speculative_token_capacity.
  • helios/src/runtime_core/selection.rs:
    • Before: Filtered eligible_widths using graph.batch_capacity <= active.next_power_of_two() as u64.
    • After: Computes speculative_max_batch from the smallest declared speculative batch >= active before filtering eligible_widths, matching the max_batch retention pass, and adds eligible_widths_follow_covering_max_batch_instead_of_next_power_of_two.
  • helios/src/scheduler/cost.rs:
    • Before: ActionCosts::fresh_duration looked up hardcoded batch: 1.
    • After: Looks up self.batches(kind).first().copied()? so checkpoint duration lookups work for any valid metadata-declared batch catalog, and adds fresh_duration_uses_smallest_declared_batch_when_batch_one_is_absent.
  • pyproject.toml and tests/preparation/test_packaging.py:
    • Before: Declared [project.scripts] ignition = "ignition.__main__:main".
    • After: Declares [project.scripts] ignition-core = "ignition.__main__:main", leaving .venv/bin/ignition exclusively owned by recipe packages (python -m ignition is unchanged).
  • ignition/direct/scheduler.py:
    • Before: Request relied on default deepcopy, failing on MappingProxyType.
    • After: Implements Request.__deepcopy__ preserving read-only MappingProxyType wrappers on _core_parameters.
  • .github/workflows/native-serving.yml and .github/workflows/python-cpu.yml:
    • Before: native-serving.yml fetched 6 recipe templates (missing minimax_m3), and no workflow ran Python CPU pytest.
    • After: Adds --recipe minimax_m3 to native-serving.yml and adds python-cpu.yml running uv sync --extra prepare --extra test and CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/ -q on ubuntu-24.04.
  • tests/preparation/{test_capture_roce_wait,test_transient_retention,test_core_protection}.py and tests/components/test_{draft_block_broadcast,vocabulary_commit}_cuda.py:
    • Updated capture test doubles (capture_allocation_sizes = (), retire_after_capture, all_gather_object), aligned test_core_protection.py error assertions with protection.rs:995 and archive.rs:134, and removed the two leftover split CUDA tests relocated to local-inference-lab/hyperflare-recipes.

Claimed benefit and result

  • Expected and verified on CPU: Restores passing Rust (helios lib + integration, flare, eos, selene, selene-manager, heliopause), TLA+ lifecycle conformance, and CPU Python test suites on main; prevents .venv/bin/ignition clobbering in hyperflare-recipes once its uv.lock advances past this commit; and adds automated CPU Python CI coverage.

Supporting evidence and limitations

  • Rebased on f7256584:
    • FLARE_TEST_TEMPLATE_DIR=... cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib: 1,713 passed, 0 failed, 43 ignored (includes packed_round_tests and both new selection.rs and cost.rs regression tests).
    • CUDA_VISIBLE_DEVICES="" pytest tests/bench/test_runner.py tests/preparation/test_capture_roce_wait.py tests/preparation/test_transient_retention.py tests/preparation/test_packaging.py tests/preparation/test_core_boundary.py tests/cli/ -q: 190 passed, 1 skipped, 0 failed.
  • Prior to the final docs/Selene rebase (identical code diff):
    • eos (2 passed), selene (test-support), selene-manager (test-support), flare (234 lib + 7 + 1 passed, 4 ignored), heliopause (211 passed, 6 ignored).
    • python3 verification/helios-lifecycle/check.py --tlc-jar /tmp/tla2tools.jar: all 8 TLA+ models and 95 observed Rust traces passed.
    • Full CPU pytest tests/: 2,317 passed, 454 skipped; test_core_protection.py passed 4/4 targeted checks; test_source_identity.py::test_heliopause_build_source_identity_matches_workspace_sources failed only because the pre-existing .venv contained an older compiled flare_heliopause binary rather than one rebuilt from this worktree.
  • Limitations and unrun checks:

Discord: no username provided

… script separation

Why:
With the Native serving workflow disabled and no Python CPU workflow in
place, several regressions accumulated across Helios graph validation,
direct-scheduler benchmarking, and post-split packaging:
1. Removing hardcoded batch-capacity lists from `helios/src/model/catalog.rs`
   replaced per-batch lifecycle and speculative checks with whole-manifest
   existence checks, allowing incomplete per-batch catalogs and breaking
   `packed_round_tests`. In `helios/src/runtime_core/selection.rs`, width
   eligibility still filtered against `active.next_power_of_two()` instead
   of the covering `max_batch` derived from core metadata, and
   `ActionCosts::fresh_duration` hardcoded `batch: 1`, silently disabling
   prefix checkpointing when a core's smallest declared `Snapshot` batch is
   not 1.
2. Both `pyproject.toml` and `local-inference-lab/hyperflare-recipes`
   declared `[project.scripts] ignition`, causing `uv sync` with a warm
   cache to clobber `.venv/bin/ignition` with the recipe-free entrypoint
   (`hyperflare-recipes#20`). Core `ignition` must remain recipe-free
   without a plugin discovery framework, so separating core's console script
   name eliminates the collision without adding discovery machinery.
3. `Request._core_parameters` wrapped resolved parameters in a
   `MappingProxyType`, causing `copy.deepcopy(scheduler, ...)` in
   `ignition/bench/runner.py` and `tests/bench/test_runner.py` to fail with
   `TypeError: cannot pickle 'mappingproxy' object`.
4. `.github/workflows/native-serving.yml` omitted `--recipe minimax_m3`
   when fetching template fixtures required by `frontend::jinja::tests`,
   two capture tests omitted `capture_allocation_sizes` and
   `all_gather_object`, two core-protection assertions lagged refactored
   Rust error messages, and two CUDA component tests whose support modules
   moved to `hyperflare-recipes` broke `pytest` collection.

What exactly changed:
- `helios/src/model/catalog.rs`: Replaced manifest-wide `.any(...)` checks
  with per-batch parity validation across the union of declared lifecycle
  (`Init`, `Restore`, `Snapshot`, `Resume`) and generation (`Decode` or
  `Speculative`) batches, including per-batch width-one and wider
  speculative verification checks when `batch * 2 <= speculative_token_capacity`.
- `helios/src/runtime_core/selection.rs`: Computed `speculative_max_batch`
  from the smallest declared speculative batch covering `active` before
  filtering `eligible_widths`, matching the subsequent `max_batch` graph
  retention filter, and added a unit test for intermediate bucket 6 vs 8.
- `helios/src/scheduler/cost.rs`: Changed `ActionCosts::fresh_duration` to
  query `self.batches(kind).first().copied()?` instead of hardcoded
  `batch: 1`, and added a unit test for a `Snapshot(batch=2)` catalog.
- `pyproject.toml` and `tests/preparation/test_packaging.py`: Renamed core
  Ignition's console script from `ignition` to `ignition-core` (`python -m
  ignition` is unchanged).
- `ignition/direct/scheduler.py`: Added `Request.__deepcopy__` preserving
  read-only `MappingProxyType` wrappers on `_core_parameters`.
- `.github/workflows/native-serving.yml` and
  `.github/workflows/python-cpu.yml`: Added `--recipe minimax_m3` to
  template fixture preparation and added an `ubuntu-24.04` CPU pytest
  workflow (`uv sync --extra prepare --extra test` and
  `CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/ -q`).
- `tests/preparation/{test_capture_roce_wait,test_transient_retention,test_core_protection}.py`
  and `tests/components/test_{draft_block_broadcast,vocabulary_commit}_cuda.py`:
  Updated capture test doubles to match `capture.py`'s allocation-ordering
  and retirement hooks, aligned two `test_core_protection.py` error-string
  assertions with `protection.rs:995` and `archive.rs:134`, and removed the
  two leftover split CUDA tests relocated to `hyperflare-recipes`.

Claimed benefit and result:
Restores green Rust (`helios`, `flare`, `eos`, `selene`, `selene-manager`,
`heliopause`), TLA+ lifecycle conformance, and CPU Python test suites on
`main`, prevents `.venv/bin/ignition` script clobbering when
`hyperflare-recipes` installs `ignition` as a dependency, and adds
automated CPU Python CI coverage.

Supporting evidence and limitations:
- Rebased on `f7256584`: `cargo test --locked --release --manifest-path
  helios/Cargo.toml --features runtime-core,server --lib` with prepared
  templates (including `minimax_m3`) passed 1,713 tests (0 failed, 43
  ignored), including `packed_round_tests` and both new `selection.rs` and
  `cost.rs` tests.
- Prior to the final docs/Selene rebase (identical code diff): `eos`,
  `selene` (`test-support`), `selene-manager` (`test-support`), `flare`
  (234 lib + 7 + 1), `heliopause` (211 passed, 6 ignored), and
  `python3 verification/helios-lifecycle/check.py --tlc-jar /tmp/tla2tools.jar`
  (all 8 TLA+ models and 95 observed Rust traces) passed.
- Rebased on `f7256584`: `CUDA_VISIBLE_DEVICES="" pytest` passed 190 tests
  (1 skipped) across `tests/bench/test_runner.py`,
  `tests/preparation/{test_capture_roce_wait,test_transient_retention,test_packaging,test_core_boundary}.py`,
  and `tests/cli/`. Full CPU `pytest tests/` prior to rebase passed 2,317
  tests (454 skipped); `test_core_protection.py` passed 4/4 targeted tests;
  `test_source_identity.py::test_heliopause_build_source_identity_matches_workspace_sources`
  failed only because the pre-existing `.venv` held an older compiled
  `flare_heliopause` binary rather than one rebuilt from this worktree.
- Limitations: `cargo kani` is not installed on this host and was not run
  locally (covered by `helios-lifecycle.yml`); no GPU export or live
  serving run was executed; `flare-cli`'s
  `distribution::tests::source_waits_for_receiver_file_verification` hit a
  host-local loopback probe (`BrokenPipe`, unrelated to this diff).

Signed-off-by: Luke Alonso <lalonso@gmail.com>
Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
@flare-autobot

Copy link
Copy Markdown
Collaborator

A case file has been opened for 608.
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 the triage:review Proposed change needs code review; this does not imply merge readiness. label Nov 29, 2026
@flare-autobot

Copy link
Copy Markdown
Collaborator

Autobot Review

Full Review · Value Proposition · Case File

Recommendation: Changes Requested

The four runtime/library fixes (catalog.rs, selection.rs, cost.rs, ignition/direct/scheduler.py) plus the native-serving.yml and Python test-double updates are sound, metadata-driven root-cause repairs with no correctness blockers. Two operational gaps need attention before this lands: an unpinned, heavyweight CI job with an unexplained failing check, and CLI/signing docs still pointing at the renamed ignition script.

  • Blockers: 0 · Should fix: 2 · Subtract/Simplify: 3 · Nits: 2
Walkthrough
  • helios/src/model/catalog.rs:130-238: Replaces manifest-wide .any(...) checks with per-batch parity across required_batches (lifecycle ∪ generation), enforcing Init/Restore/Snapshot/Resume (+Decode when non-speculative), width-1 Speculative, and wider Speculative when batch * 2 <= speculative_token_capacity — restoring packed_round_tests.rs:106.
  • helios/src/runtime_core/selection.rs:175-187, 1899-1943: Replaces active.next_power_of_two() with the smallest declared speculative batch >= active for eligible_widths, matching the retention pass at :283-289; adds regression test eligible_widths_follow_covering_max_batch_instead_of_next_power_of_two.
  • helios/src/scheduler/cost.rs:264-269, 417-447: ActionCosts::fresh_duration now uses self.batches(kind).first().copied()? instead of hardcoded batch: 1, so checkpoints.rs:411,727,788 work when batch 1 is absent (unit test added).
  • ignition/direct/scheduler.py:449-459: Adds Request.__deepcopy__ memoizing self and re-wrapping MappingProxyType attributes, fixing copy.deepcopy crashes in ignition/bench/runner.py:424,435 and tests/bench/test_runner.py:55,57.
  • pyproject.toml:15 & tests/preparation/test_packaging.py:25: Renames core's console script ignition → ignition-core to avoid warm-cache uv sync collisions with hyperflare-recipes.
  • .github/workflows/native-serving.yml:31 (not opened), .github/workflows/python-cpu.yml:1-33 (not opened), tests/: Adds --recipe minimax_m3 (matching all 7 recipes in helios/src/frontend/jinja/tests.rs:814-824), adds a CPU pytest workflow, updates capture test doubles and protection error assertions (protection.rs:995, archive.rs:134), and deletes two uncollectable post-split CUDA test files.
Merge Risk: Medium · up to 3343f13
  • Helios & Ignition runtime paths (Low): catalog.rs restores per-batch parity broken by feat(capacity): add intermediate batch capacities 6, 12, and 24 #555 while preserving power-of-two cores and single-batch manifests (helios/src/model/tests.rs:2127-2134); selection.rs aligns eligible_widths with the retention pass; cost.rs:265 is a no-op on every standard core (smallest declared Snapshot batch is 1) and fixes silent checkpointing disablement otherwise; scheduler.py:449-459 fixes copy.deepcopy while preserving read-only _core_parameters. No concurrency, locking, or hot-path overhead hazards.
  • CI reliability & dependency drift (Medium): .github/workflows/python-cpu.yml (not opened) runs on every push to main and every pull_request with no path filter, resolves floating flashinfer-python branch = "main" (pyproject.toml:47) without a lockfile, installs full CUDA 13.2 PyTorch + FlashInfer + builds flare-heliopause, then triggers two more Cargo builds (helios/target/debug, flare-cli/target/release) from tests/preparation/test_core_protection.py:30,367 — runner disk, build-time, and upstream-drift risk on unrelated PRs.
  • Core-only CLI documentation drift (Low–Medium): Renaming .venv/bin/ignition to .venv/bin/ignition-core in pyproject.toml:15 is the right fix for hyperflare-recipes#20 and leaves hyperflare-recipes owning .venv/bin/ignition (with python -m ignition working everywhere), but core-only setup and signing docs (docs/cli-design.md:57-62, docs/signing.md:45,80,103, AGENTS.md:253-261) still instruct .venv/bin/ignition.
Pre-merge checks: ✅ 2 passed · ⚠️ 2 warnings

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

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

@flare-autobot flare-autobot added area:scheduling Request scheduling, fairness, batching, and speculative-width selection. bug Something isn't working labels Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:scheduling Request scheduling, fairness, batching, and speculative-width selection. bug Something isn't working 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