Repository navigation
fix(explore): judge a baseline restatement against the stack it launches on - #1918
Conversation
Code metrics gate: PASSED with waived findings (
|
| Dimension | Limit | New | Worse | Baseline out of date | Baseline entries | vs base |
|---|---|---|---|---|---|---|
| Cyclomatic complexity | fails > 20 | 0 | 1 | 0 | 69 | +0 |
| Cognitive complexity | fails > 30 | 0 | 1 | 0 | 275 | +0 |
| Function length (lines) | fails > 80 | 0 | 1 | 0 | 414 | +0 |
| Nested block depth | fails > 5 | 0 | 0 | 0 | 26 | +0 |
| Parameter count | fails > 5 | 0 | 0 | 0 | 95 | +0 |
| Module length (lines) | warns > 800, fails > 1200 | 0 | 1 | 0 | 51 | +0 |
| Duplicated lines per file | fails > 0 | 0 | 0 | 0 | 97 | +0 |
| Dead code (vulture) | fails > 0 | 0 | 0 | 0 | 2 | +0 |
| Check | Findings | Effect |
|---|---|---|
| Comments | 0 | |
| English only | 0 | |
| Production code imports test code | 0 | |
| Repeated literals | 0 | |
| A1 Private name of another package | 0 | |
| A8 Flag argument | 0 | |
| A9 Tuple return | 0 | |
| A10 Raw vocabulary comparison | 0 | |
| A11 Hidden global write | 0 | |
| A12 Pure forwarder | 0 | |
| A12 Single-implementation abstraction | 0 |
Worse than the baseline (waived by the baseline-raise label): 4
| Unit | Dimension | Baseline | Now |
|---|---|---|---|
src/hyperloom/orchestrator/actions/executors/explore.py:807 ExploreExecutor.__call__ |
Cognitive complexity | 369 | 386 |
src/hyperloom/orchestrator/actions/executors/explore.py:807 ExploreExecutor.__call__ |
Cyclomatic complexity | 76 | 83 |
src/hyperloom/orchestrator/actions/executors/explore.py:807 ExploreExecutor.__call__ |
Function length (lines) | 1124 | 1164 |
src/hyperloom/orchestrator/actions/executors/explore.py:1 |
Module length (lines) | 1880 | 2060 |
How to fix
- New or worse: split the unit (extract a function, a class, a module) until it is back under the limit, or no worse than its recorded value. The baseline cannot absorb a new violation: CI refuses any baseline entry added or raised relative to the base branch.
- Baseline out of date: something improved. Run
python scripts/code_metrics.py --update-baselineand commitscripts/code_metrics_baseline.txt; the command only lowers or removes entries. - Override: the
baseline-raisePR label waives new, worse and baseline-growth findings and the failing design checks (they stay listed here). Use it only with the reason in the PR description; it waives nothing else. - Tools for a local run:
pip install ruff==0.16.2 complexipy==8.0.1 vulture==2.16andnpm install -g jscpd@5.4.1(or pointCODE_METRICS_JSCPDat another jscpd command, such asnpx --yes jscpd@<version>).
Already over at the base (backlog, not this change's): 1
| Unit | Dimension | Base | Now |
|---|---|---|---|
src/hyperloom/orchestrator/actions/executors/explore.py:585 filter_baseline_noop_variants |
Function length (lines) | 112 | 112 |
101 findings in files this change does not touch
Outside this change (informational): 101
| Unit | Dimension | Baseline | Now |
|---|---|---|---|
src/hyperloom/orchestrator/enablement/recipe/projections.py project_launch_evidence |
Cognitive complexity | absent | 36 |
src/hyperloom/orchestrator/state/shared_state.py resolve_graded_comparison |
Cognitive complexity | absent | 34 |
src/hyperloom_kb/collect/mapping.py _experience |
Cognitive complexity | absent | 31 |
src/hyperloom_kb/schema.py FieldDeclaration.__post_init__ |
Cognitive complexity | absent | 32 |
src/kernelforge/cli/forge_loop_command.py _prepare_measurement_driver |
Cognitive complexity | absent | 36 |
src/kernelforge/cli/forge_loop_command.py _read_kb_warm_start |
Cognitive complexity | absent | 40 |
src/kernelforge/loop/runner.py IterationLoop._collect_session_candidate |
Cognitive complexity | absent | 44 |
src/kernelforge/loop/runner.py IterationLoop._rule_on_attempt |
Cognitive complexity | absent | 38 |
src/hyperloom/inference_optimizer/cli/__init__.py _reexport_session_environment |
Function length (lines) | absent | 111 |
src/hyperloom/inference_optimizer/cli/__init__.py _resolve_agent_lineup |
Function length (lines) | absent | 89 |
src/hyperloom/inference_optimizer/cli/__init__.py _resolve_run_topology |
Function length (lines) | absent | 92 |
src/hyperloom/inference_optimizer/cli/__init__.py _resume_session |
Function length (lines) | absent | 170 |
src/hyperloom/inference_optimizer/cli/__init__.py _seed_fresh_session |
Function length (lines) | absent | 170 |
src/hyperloom/inference_optimizer/multi_node/cli.py _restart_multinode |
Function length (lines) | absent | 107 |
src/hyperloom/inference_optimizer/multi_node/scripts/launch_multinode.py _build_parser |
Function length (lines) | absent | 84 |
src/hyperloom/inference_optimizer/multi_node/scripts/launch_multinode.py _spawn_rank_actors |
Function length (lines) | absent | 84 |
src/hyperloom_kb/sync.py GlobalSync.pull |
Function length (lines) | absent | 84 |
src/kernelforge/cli/forge_loop_command.py _RunReporter.build_result |
Function length (lines) | absent | 91 |
src/kernelforge/cli/forge_loop_command.py _prepare_measurement_driver |
Function length (lines) | absent | 136 |
src/kernelforge/cli/forge_loop_command.py _read_kb_warm_start |
Function length (lines) | absent | 149 |
src/kernelforge/loop/runner.py IterationLoop._close_iteration |
Function length (lines) | absent | 117 |
src/kernelforge/loop/runner.py IterationLoop._collect_session_candidate |
Function length (lines) | absent | 184 |
src/kernelforge/loop/runner.py IterationLoop._implementer_history |
Function length (lines) | absent | 112 |
src/kernelforge/loop/runner.py IterationLoop._rule_on_attempt |
Function length (lines) | absent | 102 |
src/kernelforge/loop/runner.py IterationLoop._run_supervisor_review |
Function length (lines) | absent | 88 |
...and 76 more; the job log lists every row.
Verdict computed by the gate scripts in
/home/runner/work/_temp/code-metrics-gate, not by this tree's copy.
Thresholds and sources: [tool.hyperloom.code_metrics] in pyproject.toml. Tools: complexipy 8.0.1, jscpd 5.4.1, ruff 0.16.2, vulture 2.16.
|
@ZhengGong-amd could you review this one too? It fixes a gap left by #1903: a restatement of the starting stack is judged against the stack each variant launches on, so after an in-round KEEP it is no longer dropped as a no-op. It overlaps #1916 in explore.py; whichever lands second I will rebase. |
chaojhou
left a comment
There was a problem hiding this comment.
PR #1918 -- fix(explore): judge a baseline restatement against the stack it launches on
What it does: the baseline-noop filter from #1903 drops a variant that restates the observed launch before the round; this PR keeps that verdict only while the stack has not moved. A restatement with no variant ahead of it is still dropped up front, and any other restatement is decided at its turn by the new BaselineNoopPlan (_baseline_noop_plan.py): skipped as baseline_noop while the stack equals the opening one, otherwise run unless another variant of the round launches the same fingerprint.
Blocking issues: 1
- [free:any-keep-releases-restatement] A KEEP on an unrelated setting releases every later restatement, which then measures a launch identical to its stack [verified]
Problem:turnstreats the stack as moved when any ofextra_server_args,extra_envs,remove_args,unset_envs,args_modediffers from the opening stack (src/hyperloom/orchestrator/actions/executors/_baseline_noop_plan.py:86), and runs the restatement. Every KEEP rewritesstack_extra_args, so with an observed--kv-cache-dtype fp8and grid[--max-num-seqs 256 (KEEP), --kv-cache-dtype fp8]the fp8 variant runs after the max-num-seqs KEEP although the stack it launches on still uses fp8, so its launch resolves to the stack's own. Base dropped it asbaseline_noop. The tests cover only a KEEP on the restated setting itself (autothenfp8).
Impact: a full decision round is spent measuring the stack against itself whenever a restatement follows an unrelated KEEP; the description's "Restatements that cannot meet a moved stack are skipped exactly as before" and the log line "a KEEP has moved it" do not hold for that case.
Action: release a restatement only when a KEEP so far changed a setting, env, removal or unset that the restatement names (or re-judge it with the filter against the stack it launches on), and add a test with an unrelated KEEP ahead of a restatement.
Checked: _baseline_noop_plan.py (slot, drop_leading, turns); explore.py dedup, grid-shaping filters and the variant loop; filter_baseline_noop_variants; the new tests in test_explore_executor.py; scripts/code_metrics_baseline.txt | Ran: git show / git grep at head and base, gh api for checks and comments | Base: d49e019 | Head: 0c178b6
|
Follow-up to my change request, after triaging #1917 on main
|
0c178b6 to
7d9e2a8
Compare
|
Reworked (head 7d9e2a8), now on top of #1916's branch (the diff includes that commit until it merges; the description says so).
Tests: 8 executor/helper tests added (new ones fail on #1916's head or on the earlier version of this PR as noted in the description), 8 mutants of the new logic each killed; 44 test files around explore/delegate/prompt/router: 1897 passed (one unrelated failure: TraceLens is not installed in my environment); ruff and lint-imports clean. The code-metrics gate reports the explore.py / intent_router.py units as worse than the baseline (shared with #1916), so I added @chaojhou please take another look. |
|
Follow-up (head 439bdfc): a native KEEP that adds or clears a removal or unset can persist the stack's launched args and switch its args mode to The opening and the current stack are now compared with their args composed as launched (the recipe's inherited args, the removals and the args mode applied), so the mode switch alone moves nothing and only what the KEEP actually changed is released. New tests drive the real KEEP path: a removal KEEP that flips the stack to Known limit, unchanged: a restatement listed twice in one grid is deduplicated to its first occurrence before the round, so if the first copy is skipped at its turn the second is not retried after a later KEEP. |
7d9e2a8 to
439bdfc
Compare
chaojhou
left a comment
There was a problem hiding this comment.
PR #1918 -- fix(explore): judge a baseline restatement against the stack it launches on
What it does: stacked on #1916. A restatement of the opening launch ahead of every other variant is still dropped up front; every other variant is checked at its turn, just before #1916's already_measured check and from the same stack record, by filter_baseline_noop_variants against the current stack, with the observed launch trimmed by observed_launch_after so only what a KEEP actually changed (a --x / --no-x pair counts as one setting; args compared as launched, so a switch to replace mode alone moves nothing) is no longer trusted. My previous items are fixed: an unrelated KEEP no longer releases a restatement (pinned by the new test), BaselineNoopPlan is gone and the decision is made per turn against the current stack, and the PR is ordered after #1916.
Blocking issues: 1
- [D] A restatement skipped at its turn turns a round #1916 settles as succeeded into failed [verified]
Problem: #1916 marks a round answered (statussucceeded) when every runnable variant was skipped asALREADY_MEASURED(answered = bool(runnable) and ... == len(runnable)). Before this PR every restatement was dropped beforerunnablewas built; now only the leading ones are (explore.py:1041-1044). A restatement after any other variant stays inrunnable, is skipped asbaseline_noopat its turn (:1273-1275), and is not counted, soansweredis False, nothing was measured, and the status falls through tofailed. src/hyperloom/orchestrator/actions/executors/explore.py:2008
Impact: reproduced. Round 1 measures--max-running-requests 48; round 2 runs[mrr_48 (same launch), --kv-cache-dtype fp8]with fp8 observed on the stack. Head:status=failed,error_class=None, skippedmrr_48 already_measured, v_fp8 baseline_noop. #1916's head on the same input:succeeded. A failed explore is unpromotable, so the round goes throughhandle_unpromotable_result, records a failed attempt and alast_action_failuresentry, and itsexplore_search_updateis not promoted, for a round that had nothing left to measure.
Action: decideansweredover the variants that reached the measured check: count a turn-timebaseline_noopskip withALREADY_MEASURED, or keep one runnable-vs-skipped tally both checks feed. Take the up-front "leading" drop after the grid-shaping filters (multi-node, aiter, compatibility, skip list) rather than on the raw grid, so a restatement left leading by those filters is still dropped before the lease. Add an executor test for this grid.
Non-blocking:
- The disclosed limit: a restatement listed twice is recorded as
round_dupof a twin that never launched (grid[seqs, fp8_a, auto, fp8_b]: after theautoKEEP,fp8_bis a real change but never runs). In-round dedup that blocks only fingerprints launched this round would remove it. - The narrowed release frees only settings a KEEP named; a KEEP that changes how the engine resolves another setting (spec-decode or dp-attention moving
cuda_graph_max_bs/chunked_prefill_size) leaves that opening observed value trusted. - "an all-restatement grid is still
explore_grid_exhaustedand takes no serving lease" holds only when no other variant precedes the restatements in the raw grid; same root cause as item 1.
Checked: observed_launch_after and _launched_stack; the turn-time check's position and stack record relative to _already_measured; the up-front leading drop; answered and the status fall-through; writeback's handling of a failed explore; the previous blocker and both follow-up items | Ran: pytest on the restatement tests at head (34 pass; the one failure is the Windows-only overlay-path test this PR does not touch); executor probes for an unrelated KEEP, same-setting KEEP, --no- spelling, removal and unset KEEPs, env KEEP, replace-mode switch, a duplicated restatement, and the measured-plus-restatement round on head and #1916's head | Base: 4cebf50 (#1916 head) | Head: 439bdfc
…hes on The baseline-noop filter judged every variant once, before the round, against the launch observed when the round opened. Variants stack within a round, so after a KEEP changed a setting, a later variant restating that setting's observed value is a real change to the stack it launches on, and was dropped. A variant ahead of every other one can only launch on the opening stack and is still dropped before the round. Every other variant is judged at its turn against the stack as it stands then: the observed value of a setting, env, removal or unset that a KEEP changed no longer counts, and every other observed value still does, so a restatement behind an unrelated KEEP is still skipped as baseline_noop. Builds on the per-turn measured-variant check of the previous change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
439bdfc to
a8c4aac
Compare
|
Thanks for the re-review. Rebased onto main (#1916 is in it) and pushed a8c4aac; CI is green.
|
|
Description fixed: it no longer says an args-mode switch distrusts every observed value. It now states the current behaviour (a switch to replace mode releases nothing by itself; args are compared as the stack launches them, so only settings a KEEP changed stop being trusted), and the test list includes the two replace-mode tests ( On simplifying the up-front drop: it is kept only so a grid that does nothing but restate the stack (after the grid-shaping filters) is exhausted before it takes a serving lease; the turn-time check alone would decide the same variants correctly but after the lease is acquired. If you prefer the single turn-time path, I can fold it in a follow-up. |
chaojhou
left a comment
There was a problem hiding this comment.
PR #1918 -- fix(explore): judge a baseline restatement against the stack it launches on
What it does: the baseline-noop filter from #1903 ran once before the round against the opening observed launch, so a variant that restated the opening stack was dropped even after an in-round KEEP had changed the restated setting, and a second copy was deduplicated against a first copy that never launched. In ExploreExecutor.__call__, this PR now drops only the restatements that still lead the grid after the shaping filters, before the serving lease is taken. Every other variant is judged at its turn against the current stack (observed_launch_after trims from the observed launch what a KEEP changed). In-round dedup now runs at the turn against fingerprints this round actually launched. A round answered entirely by already-measured or restated variants is counted as succeeded.
Blocking issues: 0
The [X2] description blocker from the previous pass is resolved. The PR body now states that a switch to replace mode releases nothing by itself: args are compared as the stack launches them, so only the settings a KEEP changed stop being trusted. That matches observed_launch_after (_launch_restatement.py:65-93). The test list now includes test_a_restatement_stays_skipped_after_a_keep_that_switches_the_stack_to_replace_mode and test_a_restatement_runs_after_a_keep_in_replace_mode_that_removes_what_it_restates, and their listed behaviour matches the test bodies. Code is unchanged (head still a8c4aac).
On keeping the up-front drop: the reason given holds. A grid that only restates the stack has to be exhausted before the serving lease is taken, and the turn-time check runs after the lease. No change is needed here.
The three blockers from the review at 439bdfc remain resolved at this head:
- The answered tally now counts both turn-time skips (explore.py:2009), and the leading drop runs after the skip, aiter, compatibility and multi-node filters (explore.py:1079). Probe: round 2
[fp8, mrr_48, fp8, mrr_48]after mrr_48 was measured returnssucceededwith no launch. With a skip-listed leader, no lease is taken andexplore_grid_exhaustedis True. - In-round dedup is now keyed on
launched_fps(explore.py:1266, 1327). Grid[seqs, fp8, auto, fp8]launches[seqs, auto, fp8], so both cases in #1917 hold. - The branch is now one commit on main tip ef93838.
git merge-treeagainst current main 330d322 is still clean, and CI at a8c4aac shows 33 pass, 7 skipping, 0 failed.
Not blocking: on the scope reply to the implicitly moved settings (spec-decode / dp-attention resolving cuda_graph_max_bs or chunked_prefill_size), leaving it out of this PR is reasonable, but the stated cost is reversed. After such a KEEP, the engine no longer runs at the observed value, so a variant that restates it would change the launch. Skipping it as baseline_noop drops a real candidate unmeasured; it does not "re-measure a no-op". The skip is visible in skipped_dup, so it is not silent. Worth a follow-up issue rather than a change here.
SKIPPED: V4 -- openprs.txt is PARTIAL for #2004, #1907 and #1869 (only their first 100 files were compared), and only the newest 100 open PRs were compared. Overlap there is unchecked.
Checked: explore.py at a8c4aac (leading drop 1079-1100, _launched_stack/_restates_stack 1155-1197, the turn loop 1259-1327, answered 2009, explore_grid_exhausted 2045), observed_launch_after (_launch_restatement.py:65-93), filter_baseline_noop_variants, _already_measured, issue #1917, tree-wide git grep for skipped_dup / session_budget_untested / observed_launch_after | Ran: 39 restatement/stack tests from test_explore_executor.py on an exported head tree (38 pass; the 1 failure is the Windows-only overlay-path test, which also fails on base); the same tests on base ef93838 (7 new tests fail); 2 executor probes (measured + restated round -> succeeded; failed launch + restatement + twin -> failed with round_dup); ruff C901/PLR0913 at head and base (__call__ 79 -> 83, already over at base, baseline-raise with reason); git merge-tree --write-tree origin/main a8c4aacba; gh pr checks 1918 | Base: ef93838 | Head: a8c4aac
LGTM
…lore Carries #1918 and #1984 into the rewritten round by hand rather than by taking either side of the conflict. #1918 judges a baseline restatement against the stack it launches on, and the rewrite had restructured exactly that code. In the round's new shape: the grid keeps only the restatements ahead of every other variant (``_past_the_opening_restatements``), each later variant is judged at its turn against the stack a KEEP has moved (``_ExploreRound.restates_the_stack``, over ``observed_launch_after``), an in-round duplicate is one whose fingerprint this round actually launched (``launched_already`` / ``record_launch``), and a round whose variants were all answered without measuring succeeds. #1984 removes the accuracy-eval opt-out: ``_explore_eval_disabled``, the ``disable_run_eval`` task param, the ``SharedState.eval_disabled`` read and the forced ``RUN_EVAL=false`` warmup variant are gone; the decision round still skips eval when a warmup took the score. ``_variant_control_fields``, the fingerprint stamping and the baseline-noop skip record move to ``_variant_grid``, which owns the variant grid, keeping ``explore.py`` shorter than the base branch's. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description: what and why
The baseline-noop filter from fix(explore): skip a variant or warm replay that only restates the baseline launch #1903 judges every variant once, before the round, against the observed launch of the stack the round opens on. Variants stack within a round, so after a KEEP changes a setting, a later variant that restated that setting's observed value is a real change to the stack it launches on (observed
--kv-cache-dtype fp8; gridautothenfp8:fp8was dropped even afterautoKEEPed). This keeps the filter's verdict but applies it where the round already grades each variant, at the variant's turn against the stack as it stands then, next to fix(explore): do not re-measure a variant the session already judged on the same stack #1916's measured-variant check and using the same stack record (stack_of_measured(_measured_against())):explore_grid_exhaustedand takes no serving lease);filter_baseline_noop_variants, against the currentstack_*. The observed launch is trimmed byobserved_launch_after: the observed value of a setting, env, removal or unset that a KEEP has changed (added, changed or cleared; a boolean flag and its--no-spelling count as one setting) no longer counts, and every other observed value still does. A restatement is therefore released only by a KEEP that changed what it restates; behind an unrelated KEEP (--max-num-seqs 256) it is still skipped asbaseline_noop, and a switch of the stack to replace mode releases nothing by itself: args are compared as the stack actually launches them, so only the settings a KEEP changed stop being trusted;succeeded), notfailed: one tally counts both turn-time skips;Linked issue(s): Fixes Explore drops a variant that restates the opening stack even after a KEEP has moved the stack #1917
Tests: added/updated? commands run?
Added to
test_explore_executor.py(executor-level, real filter, observed launch stubbed to--kv-cache-dtype fp8):test_a_variant_that_was_the_stack_runs_once_a_keep_has_moved_the_stack--autothenfp8: both launch and both have ledger rows. Fails at fix(explore): do not re-measure a variant the session already judged on the same stack #1916's head.test_a_restatement_stays_skipped_after_a_keep_on_an_unrelated_setting-- the reviewer's case: a KEEP of--max-num-seqs 256ahead offp8while fp8 is observed;fp8is still skipped asbaseline_noop. (Passes at fix(explore): do not re-measure a variant the session already judged on the same stack #1916's head, where the up-front filter drops it; it fails on the earlier version of this PR, which released it.)test_a_variant_that_is_the_stack_is_skipped_while_the_stack_has_not_moved-- a leading restatement and one behind a REVERT are both skipped asbaseline_noop; only the real change launches.test_a_grid_that_only_restates_the_stack_is_exhausted_before_the_round-- nothing launches and the grid reports exhausted.test_a_restatement_dropped_up_front_does_not_claim_a_later_identical_variant--fp8,auto,fp8:autoand the lastfp8launch. Fails at fix(explore): do not re-measure a variant the session already judged on the same stack #1916's head.test_a_restatement_that_repeats_a_launch_of_this_round_is_a_round_dup-- after a KEEP,fp8runs once; a secondfp8is around_dup. Fails at fix(explore): do not re-measure a variant the session already judged on the same stack #1916's head.test_a_restatement_stays_skipped_after_a_keep_that_switches_the_stack_to_replace_mode-- a removal KEEP that moves the stack to replace mode, followed by an unrelatedfp8restatement while fp8 is observed:fp8is still skipped asbaseline_noop.test_a_restatement_runs_after_a_keep_in_replace_mode_that_removes_what_it_restates-- a replace-mode KEEP that removes--kv-cache-dtype: thefp8restatement is now a real change and launches.test_a_restatement_twin_that_was_only_skipped_has_not_claimed_the_launch--seqs,fp8,auto,fp8: the secondfp8runs afterautoKEEPs. Fails on the previous version.test_a_round_of_measured_and_restated_variants_is_answered_not_failed-- round 1 measures--max-running-requests 48; round 2 is[mrr_48, fp8]with fp8 observed: nothing measured,succeeded. Fails on the previous version.test_restatements_left_leading_by_a_filter_are_dropped_before_the_serving_lease-- a skip-listed variant ahead of two restatements: no serving lease,explore_grid_exhausted. Fails on the previous version.test_a_restatement_left_leading_by_the_skip_list_is_skipped_at_its_turn-- the operator skip list removesautoafter the up-front drop, sofp8meets the unmoved stack and is skipped at its turn.test_observed_launch_after_drops_only_what_the_stack_changed-- the helper: unrelated setting, changed setting, removed setting, env, unset, cleared removal/unset, a negated boolean spelling, args mode.Mutations, each killed by at least one test: observed launch never trimmed; observed launch always emptied; removals ignored; env changes ignored; no turn-time check; no up-front drop of leading restatements; every restatement dropped up front; the stack read at its opening instead of now.
pytest -n 8over the 44 test files that reference the explore executor, the delegate path,explore_search, the baseline-noop filter, the orchestration prompt or the intent router (1897 passed;test_kernel_request_handlers_and_tracelens_analysis_atom_paths_in_syncfails here only because TraceLens is not installed in my environment), plusruff check,ruff format --checkandlint-imports.Size/complexity triggers crossed: split, or why the shape is right:
ExploreExecutor.__call__gains a per-turn check (a closure like_measured_against, oneif ...: continue) and the leading-drop lines; it has to sit in the loop to see the stack as each KEEP advances it, the same reason as fix(explore): do not re-measure a variant the session already judged on the same stack #1916's check. Theobserved_launch_afterhelper is its own function. Labelledbaseline-raisefor the units that grow, which include fix(explore): do not re-measure a variant the session already judged on the same stack #1916's.If this simplifies or refactors: n/a
Observable effect: what an operator will now see, and what the old behaviour cost them (if none, why the change is unobservable):
A variant that restated the opening stack but sits behind a KEEP that changed what it restates now runs and gets a verdict. Before, that experiment was silently skipped as
baseline_noop, so the round never measured reverting a setting the KEEP had changed. A restatement behind a REVERT or behind a KEEP of an unrelated setting is skipped asbaseline_noop, now logged and listed inskipped_dupat its turn rather than before the round. A variant repeating a launch this round already made is around_dupat its turn. Theexplore gridlog line'sleading baseline_noopcount covers only the drops before the round;skipped_dupin the result records every skip.Breaking changes: no
PR addresses single concern: yes
Root cause is upstream (Magpie/TraceLens/GEAK/IntelliKit/AgentKernelArena), ticket filed: no, root cause is in Hyperloom (fix(explore): skip a variant or warm replay that only restates the baseline launch #1903).
@xiaofei-zheng could you review? This is a follow-up to #1903.
🤖 Generated with Claude Code