Repository navigation
tests: rendered launch argv under production defaults - #900
Merged
Merged
Conversation
tests/conftest.py relaxes production defaults for every test (the --inner-lr default reads as explicit; YETO_PREFLIGHT_MODEL, YETO_IMAGE_MANIFEST_CHECK and YETO_SKY_SERVER_CHECK are off; YETO_RL_COMPAT_GROUP is set), so an argv yeto renders for another process passes the suite even when that process refuses it. tests/prod_defaults.py puts the production defaults back for one test, with stub Hub, Modal volume, store, registry and sky server probes that answer "present", and runs a rendered argv through the real yeto.cli launch --dry-run. tests/test_prod_defaults_argv.py uses it on every render-and-hand-off path on main: run up of the own-cluster templates and the K3.1 bare-metal config, the K3.1 customer trainer launches, the Modal and ssh: island entry commands parsed with only the island's own environment, the NC pool dry run and the node spec it renders, a fleet's compiled trainer argv, each per-island launch, and a sky island's entry. Two negative tests show the check bites: a run config without --inner-lr and a launch whose model the Hub lacks pass under the conftest defaults and are refused under production's. conftest: opt-in production_defaults fixture, and a RISK note at each global override pointing at the new tests. The overrides stay global: about 70 % of tests/test_rl_launcher.py builds RL argv without --inner-lr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pool dry run checks with shutil.which that nc-manage and nc-query are on this host; the test took them from the developer's PATH, so it passed locally and failed on the CI runner, which has neither. The test now points NC_MANAGE / NC_QUERY at executable stubs in its tmp dir (recording any call, which the dry run must not make) and clears NC_TOOL_DIR / NC_NODE_BIN. The refusal summary also lists the pool's "problem:" lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaellchung
force-pushed
the
test/prod-defaults-argv
branch
from
November 26, 2026 16:01
d3f1764 to
999257a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
tests/conftest.pychanges production defaults for every test. With them, an argv that yeto renders for another process passes the suite even when that process refuses it. The image smoke (#894) hit this: its trainer argv lacked--inner-lrand--preflight-model off, the tests were green, and a real run refused it.Global changes in tests/conftest.py (audit)
The repository has one conftest.py.
yeto.cli.DEFAULT_INNER_LR = 3e-4(module level, #346)--inner-lrdefault is a plain float, sorefuse_unset_inner_lrnever fires--inner-lr--inner-lr(run up, fleet island, image smoke)_no_real_model_preflight:YETO_PREFLIGHT_MODEL=off(autouse, #348)--preflight-model off, and a model that does not exist_no_real_image_manifest_check:YETO_IMAGE_MANIFEST_CHECK=off(autouse, #833)_no_sky_server_version_check:YETO_SKY_SERVER_CHECK=off(autouse, #744)YETO_RL_COMPAT_GROUP=nvidia-h100(module level, setdefault, decoupling 7.7a)YETO_SYNCER_ALLOW_UNAUTHENTICATED=1(module level)_island_hmac_key_does_not_leak(autouse)YETO_ISLAND_HMAC_KEYaround each test_no_teardown_diagnostics:YETO_TEARDOWN_DIAG=0_no_real_nebius_sg_cleanupcli._nebius_sg_cleanupis a no-op_no_remote_model_configfragment_preflight.remote_hf_configfetches nothing_no_ssh_connection_reuse:YETO_SSH_MUX=off_no_real_ssh_confignode_pool.SSH_CONFIGgoes to tmp_fixed_thread_reading_no_release_download_spreadDOWNLOAD_SPREAD_S = 0_block_unmarked_ray_init,_reap_syncer_groups,_StoreEnvGuard, home guard, shard selection, syncer toolchain envThe first five can hide a missing flag in a rendered argv. They stay global: with the
--inner-lroverride removed, 70 of 100 tests intests/test_rl_launcher.pyalone fail. So this PR adds an opt-in fixture and a RISK note at each override instead.What this adds
tests/prod_defaults.py:apply(monkeypatch)undoes the five overrides for one test. It restores the marked--inner-lrdefault and deletes the four variables. The probes those checks call are stubbed, so nothing touches the network: Hub listing and moving-revision resolve, Modal volume listing, store and bucket LIST, registry manifest HEAD, and sky server version. The stubs report "present" and record what they were asked, so a test can assert that the check actually ran.launch_dry_run(argv)runsyeto.cli main(["launch", *argv, "--dry-run"]).production_defaultsfixture in conftest, plus RISK comments that point to the new tests.tests/test_prod_defaults_argv.py(18 tests). Each one undoes the conftest changes, renders the argv the way the product does, and hands it to the real parser of the process that receives it:run up --dry-runof the four own-cluster templates. These cover a trainer on own nodes with sky or Modal samplers, an own sampler pool, and a fleet of an own island and a cloud island. Each run up executes itsyeto launch --dry-runandnc pool --dry-runcalls in-process.run up --dry-runof the K3.1 bare-metal config. The production defaults are restored after that harness setsYETO_PREFLIGHT_MODEL=off.yeto launch --dry-run, with the model preflight in check mode.island_entrycommand is parsed by the island's parser with only the island config's env, and the compat group is resolved from that env alone.ssh:island of the bare-metal run and of the kit:node_env/start_script, then the island entry is parsed with only the node env.--dry-runof the customer pool, then the node spec it renders, read back the wayengine_samplerreads it.trainer.argv(two fleet examples), each per-island launch (island_launches.launch_argv, whichtrainer_workerruns aspython -m yeto.cli launch), and each island's entry command.--inner-lr, and a launch whose model the Hub does not have. Both pass under the conftest defaults and are refused under production defaults.Findings
--inner-lr: 2 new tests fail. The existingtests/test_fleet_island_launches.py(11 tests) stays green, which is exactly the blind spot.--inner-lr: 5 new tests fail.YETO_RL_COMPAT_GROUPfrom its env: 5 new tests fail.prod_defaults.launch_dry_runonce it lands.yeto shape --applywith an RL island shape renderslaunch ... --training-mode rlwith no RL recipe flags. That argv is refused for reasons that have nothing to do with these overrides (sync preset, reward function), so the overrides are not what hides it. It is left as is.Tests
tests/test_rl_inner_lr_guard.pyalso passes.tests/test_rl_cut_distopt_pp_ep.py::test_host_background_writes_the_inline_shard_from_one_host_copy(KeyError: 'coord'incut_plugin.py).tests/test_k31_customer_plan_golden.pyandtests/golden/breakers): 52 passed.examples/k31dry-runs (run up ofrun.agentic-262kandrun.baremetal-b300-262kwith their preflight logs, and the NC poolpool.nc-mi355x-agentic-262k), normalized: identical line by line to main d9fb379.tests/golden,tests/fixtures/k31_customer_kitorexamples/k31.🤖 Generated with Claude Code