Repository navigation
helios,ignition,ci: restore catalog validation, CPU Python tests, and script separation - #608
Conversation
… 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
|
A case file has been opened for 608. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedThe four runtime/library fixes (
Walkthrough
Merge Risk: Medium · up to
|
Why
With the
Native servingGitHub 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:helios/src/model/catalog.rsleft only manifest-wide.any(...)checks, which accepted manifests missing per-batch lifecycle or speculative graphs and brokemodel::tests::packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape(packed_round_tests.rs:106). Inhelios/src/runtime_core/selection.rs:176, speculativeeligible_widthsstill filtered byactive.next_power_of_two()instead of the core's smallest covering batch>= active, disagreeing with the subsequentmax_batchgraph retention filter. Inhelios/src/scheduler/cost.rs:265,ActionCosts::fresh_durationhardcodedbatch: 1, causingcheckpoints.rs:411,727,788to silently disable prefix checkpointing on cores whose smallest declaredSnapshotbatch is not1.uv sync(local-inference-lab/hyperflare-recipes#20): Bothpyproject.tomlandhyperflare-recipes/pyproject.tomldeclare[project.scripts] ignition. Whenuv syncinstalls both packages into one virtual environment with a warm cache,ignitioncan overwrite.venv/bin/ignitionwith the recipe-free entrypoint. Because coreignitionmust remain recipe-free without a plugin discovery framework (AGENTS.md), separating core's console script name eliminates the collision cleanly without adding discovery machinery.MappingProxyTypedeepcopycrash in benchmarking:Request._core_parameters(ignition/direct/scheduler.py:544) wraps resolved parameters inMappingProxyType, causingcopy.deepcopy(scheduler, ...)inignition/bench/runner.py:435andtests/bench/test_runner.py:55to crash withTypeError: cannot pickle 'mappingproxy' object..github/workflows/native-serving.yml:31omitted--recipe minimax_m3when preparing templates required byfrontend::jinja::tests::PREPARED_TEMPLATES; two capture tests (test_capture_roce_wait.py,test_transient_retention.py) lackedcapture_allocation_sizesandall_gather_objectstubs expected bycapture.py; two assertions intest_core_protection.pylagged 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 tohyperflare-recipesbrokepytestcollection.What exactly changed
helios/src/model/catalog.rs:Init,Restore,Snapshot,Resume),Decode, andSpeculativekinds only via manifest-wide.any(...)existence checks.Decode(when non-speculative), width-oneSpeculative, and widerSpeculativewhenbatch * 2 <= speculative_token_capacity.helios/src/runtime_core/selection.rs:eligible_widthsusinggraph.batch_capacity <= active.next_power_of_two() as u64.speculative_max_batchfrom the smallest declared speculative batch>= activebefore filteringeligible_widths, matching themax_batchretention pass, and addseligible_widths_follow_covering_max_batch_instead_of_next_power_of_two.helios/src/scheduler/cost.rs:ActionCosts::fresh_durationlooked up hardcodedbatch: 1.self.batches(kind).first().copied()?so checkpoint duration lookups work for any valid metadata-declared batch catalog, and addsfresh_duration_uses_smallest_declared_batch_when_batch_one_is_absent.pyproject.tomlandtests/preparation/test_packaging.py:[project.scripts] ignition = "ignition.__main__:main".[project.scripts] ignition-core = "ignition.__main__:main", leaving.venv/bin/ignitionexclusively owned by recipe packages (python -m ignitionis unchanged).ignition/direct/scheduler.py:Requestrelied on defaultdeepcopy, failing onMappingProxyType.Request.__deepcopy__preserving read-onlyMappingProxyTypewrappers on_core_parameters..github/workflows/native-serving.ymland.github/workflows/python-cpu.yml:native-serving.ymlfetched 6 recipe templates (missingminimax_m3), and no workflow ran Python CPUpytest.--recipe minimax_m3tonative-serving.ymland addspython-cpu.ymlrunninguv sync --extra prepare --extra testandCUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/ -qonubuntu-24.04.tests/preparation/{test_capture_roce_wait,test_transient_retention,test_core_protection}.pyandtests/components/test_{draft_block_broadcast,vocabulary_commit}_cuda.py:capture_allocation_sizes = (),retire_after_capture,all_gather_object), alignedtest_core_protection.pyerror assertions withprotection.rs:995andarchive.rs:134, and removed the two leftover split CUDA tests relocated tolocal-inference-lab/hyperflare-recipes.Claimed benefit and result
helioslib + integration,flare,eos,selene,selene-manager,heliopause), TLA+ lifecycle conformance, and CPU Python test suites onmain; prevents.venv/bin/ignitionclobbering inhyperflare-recipesonce itsuv.lockadvances past this commit; and adds automated CPU Python CI coverage.Supporting evidence and limitations
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 (includespacked_round_testsand both newselection.rsandcost.rsregression 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.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.pytest tests/: 2,317 passed, 454 skipped;test_core_protection.pypassed 4/4 targeted checks;test_source_identity.py::test_heliopause_build_source_identity_matches_workspace_sourcesfailed only because the pre-existing.venvcontained an older compiledflare_heliopausebinary rather than one rebuilt from this worktree.cargo kaniis not installed on this host and was not run locally (covered by.github/workflows/helios-lifecycle.yml).flare-cli'sdistribution::tests::source_waits_for_receiver_file_verificationhit a host-local loopback probe (BrokenPipe, unrelated to this diff; see flare-cli: keep a channel that closed unnamed from aborting a launch #490).Native servingworkflow (ID 390820901) and merging Strip unguarded attributes from hyperflare_recipes objects in AOT guard serialization #574 are separate repository actions after review.Discord: no username provided