AMENDMENTS to the PR #540 report (previous amendment: run 1400) — new event: force-reduce to 982a9ce3
These are amendments only; the rest of the earlier report stands except where withdrawn below. Head is 982a9ce3186dbe63d7659f050ef7b5de418ba3e3, base 353551e9.
Key findings
- The PR was rewritten in place and is now a completely different change. Title is "Retain bounded timing-refresh credit across idle and exclude readiness wait" (was "...SAM copy drafts and cost refresh"); scale is +647 / −47 in 10 files (
pr_files: docs/scheduling-runtime-design.md +29/−17, docs/scheduling-theory.md +16/−7, helios/src/scheduler.rs +5/−1, helios/src/scheduler/cost.rs +89/−0, helios/src/scheduler/policy_tests.rs +394/−7, helios/src/scheduler/refresh.rs +12/−10, scripts/scheduling_sim/learning.py +7/−4, scripts/scheduling_sim/learning_policy.py +5/−1, tests/test_scheduling_learning_experiments.py +47, tests/test_scheduling_learning_policy.py +43), not +4306/−310 in 33. - The whole feature I reviewed before is gone from the diff:
sam.rs(not opened),decoded_history.rs(not opened),speculation.rs(not opened),rounds.rs(not opened),policy.rs,service.rs(not opened),runtime_core/selection.rs(not opened),heliopause/src/export/binding.rs(not opened),ignition/preparation/*,docs/mtp-design.md(not opened),docs/cli-design.md(not opened),docs/api.md,helios/manifest.md(not opened),helios/src/execution/*. The branch name still sayspr/core-helios-sam-copy-drafts-and-cost-refresh. - Nothing in the remaining diff looks like a correctness blocker. What is left is essentially the "funded-refresh recovery" commit both Autobot reviews said could merge on its own.
- Three narrow findings remain, all in the new or untouched material: a stale
helios/README.md:437, a doc comment atcost.rs:31-45that overstates what the new helper mirrors, and a simulator flag that is broader than the rule it models. - Process is unchanged and still thin: no CI run, no labels, no maintainer approval; the author's 2026-11-28 04:36 comment (
pr_comments) is the only statement of evidence and every number in it is author-reported.
A. Findings from the earlier report that are now moot — withdraw, do not re-assert
These were real at 14019718/e5a69669; they are simply no longer in the PR.
- The export blocker (
heliopause/src/export/binding.rs(not opened) overwritingdraft_source = "MTP"), the sole blocker in both Autobot reviews (2026-11-26 17:56 and 20:27) and the first item of my original report. The file is no longer changed; the recommendation "fix the export before merge" is withdrawn. cost::Key/has_mtpsource authority and the merged packed-duration lookups atrounds.rs:588(not opened) /policy.rs:785.cost.rsnow adds only duration helpers plus tests.- Mask-agnostic whole-list pruning (
policy.rs:234-264vs:137-141).policy.rsis untouched. - Wide copy-verify gated off on copy-sourced cores (
rounds.rs:882(not opened)) and the untested W=16/24 GPU run. No copy-verify code and noCOPY_DRAFTgraphs remain. - Synchronous SAM build at admission (13.05 ms / 4.52 MiB), the
expect()panic atrounds.rs:570-579(not opened), the0.88/4.0/2.0/+3/6derivations, and the duplicated helpers — all removed withsam.rs(not opened)/speculation.rs(not opened)/rounds.rs(not opened). - Doc staleness for
--history-drafts, SAM-first anddraft_source— the docs I faulted are no longer in the change set. - Luke Alonso's scheduler items 1–6 as a block. Item 1 (starvation) is fixed as claimed:
ActionCosts::refresh_orderis back toobserved_at_ns.max(last_attempt_ns)(cost.rs:303-305), matching main, with no tiering. Items 2–6 concern removed code. Of his six verification gaps, items 2–3 (simulator, formal) are now claimed run; 1, 4, 5 and 6 shrink to "crate tests / GPU / HTTP / benchmarks for a ~90-line-addition refresh change". - #542 stacking note — nothing to stack; #542 is closed (
related_items). - Ownership framing. With
docs/scheduling-theory.md:729-738now explicitly saying Helios carries credit across idle and additionally excludes readiness wait, read this as a documented divergence from the simulator default, not a reversal of an owner-authored contract.
Keep only as history: both Autobot reviews named the export blocker and both suggested splitting the funded-refresh commit out as independently mergeable — the author has now effectively done that, so that advice is satisfied rather than outstanding.
B. Findings that survive or are new at 982a9ce3
helios/README.md:437is stale and contradicts the PR (verified at head): "Idle discards positive credit and preserves debt." The PR updateddocs/scheduling-runtime-design.md:443-444("Idle retains bounded earned credit (<= 5 ms) and negative debt; abort discards positive credit and preserves debt") anddocs/scheduling-theory.md:577-583,729-738, but not the README, which is outside the 10-file set. The same paragraph athelios/README.md:432still says credit is0.002 / 0.998of "measured duration" rather than compute duration excluding readiness wait. A one-line fix, but it is the same class of defect earlier reviews blocked on.- The new helper's doc comment overstates what it mirrors.
helios/src/scheduler/cost.rs:31-45saysobserved_compute_duration_ns"MirrorsActionCosts::observe", butActionCosts::observe(cost.rs:330-337) subtractswait_nsfrom the max device interval only (raw_sample.saturating_sub(wait)), while the helper creditsmax(gpu_ns, wall_ns) − wait_nsfor isolated (non-queued) executions (cost.rs:37-45). So timing credit can be earned against wall time the recorded cost estimate never contained: the two ledgers are not the same sample. Each side is tested separately (cost.rs:444-503;policy_tests.rs:6064-6136); nothing tests that they agree. The author's comment says the exclusion exists precisely so the ledgers agree, so this is a substantive gap, not only prose. --retain-idle-creditis not scoped toretained-refresh.scripts/scheduling_sim/learning_policy.py:47putsretain_idle_creditonPolicyConfig, and:671-677applies it inidle()for every policy (if not self.config.retain_idle_credit: self.credit_ms = min(0.0, self.credit_ms)). Onlyretained-refreshis separately constrained (:85-88). Nothing rejects--policies greedy --retain-idle-credit, whiledocs/scheduling-theory.md:577-583frames the flag as the retained-refresh/Helios rule. The targeted policy'sharm_credit_msstill clears on idle regardless (:676-677). Validation plumbing elsewhere is correct: the flag may not be passed with--preset validate(learning.py:477-484) and its value is encoded in the configuration id.- The readiness-exclusion fallback itself is correct and tested (verified):
cost.rs:40-42returnsNonewhengpu_ns <= wait_ns, andtiming_refresh_duration_ns(cost.rs:53-57) falls back toobserved_duration_nsthenwall_ns, so a probe is never charged zero;validate_completion(refresh.rs:63-69) rejects a probe with no isolated measured interval. Tests coverwait_ns == gpu_ns,wall_ns == 0andwall_ns > 0(cost.rs:466-502;policy_tests.rs:6141-6182shows the stale entry stays stale and credit drops below the cap, so no zero-charge refresh loop). - Idle retention is implemented as claimed.
RefreshState::idleis deleted;abort(refresh.rs:95-99) still zeroes positive credit in both ledgers and preserves debt;RequestScheduler::idle(scheduler.rs:1158-1168) only validates no in-flight submission and documents retained credit; production intake path unchanged. Ordinary income still usesINCOME_RATE * durationcapped atCREDIT_CAP_NS(refresh.rs:71-80). - Evidence is still entirely author-reported (author comment 2026-11-28 04:36): 804 Python passes across 10 suites; helios 1,705 passed + 1 pre-existing upstream failure in untouched
helios/src/model/packed_round_tests.rs:68(packed_combined_budget_keeps_width_one_batches_without_a_useful_packed_shape), eos 1, selene 503, heliopause 208, flare 236, flare-cli 221, selene-manager 414 (+1 flake); 16-seed screening plus 64-seed/62-scenario validation acceptingretain_idle_credit=True(35/35 vsttl, exact 1.000000 parity vs main, 64/64 recovery, 0 idle spurious probes);verification/helios-lifecycle/check.py(not opened) 9 TLA+ models / 10 TLC runs, 590,327 Rust transitions. Declared unrun: GPU/HTTPtests/server/test_scheduler.py(not opened), live power-cap and disk-readiness stalls,pytest tests/cli(missingcryptography/rich),cargo kani,cargo-mutants. Nothing is reproducible from the PR page. - The simulator has no readiness concept, so the documented divergence at
docs/scheduling-theory.md:734-737("Helios additionally excludes…") is unmodelled: the 64-seed acceptance figure validates the idle-credit half only. The author's scope statement says this, but the number can be misread as covering the readiness change.
C. Verdict, amended
Changed from "the export and cost-source blockers are cleared; six things remain before merge" to: no correctness blocker remains in the diff. The change is small, self-contained, and matches the design docs it updates. What I would still ask for before merge:
- fix
helios/README.md:437(and:432) — the same sentence-pair the PR corrected everywhere else; - either make
observed_compute_duration_nscompute whatActionCosts::observecomputes, or restate the doc comment atcost.rs:31-45so the differing sample is deliberate and visible; - scope
retain_idle_credittoretained-refreshinPolicyConfig.__post_init__, or state that it is general; - one visible CI run (the branch has never had one) and a maintainer review.
Also worth flagging in the verdict: the PR has been rewritten repeatedly in about 36 hours (25-file feature → 33-file feature → 10-file refresh fix), so earlier reviewer comments and both Autobot Changes Requested reviews no longer describe the artefact under review. That is a reviewability cost even though the final scope is smaller. Nothing in the reviewed material attempted to direct the agent's behaviour.
Open questions and what could not be found
- Whether the wall-time-inclusive credit in
observed_compute_duration_nsis intentional (credit "earned" on time the cost estimate never contained) or an oversight in the mirror claim; no test compares the two ledgers. - Whether
--retain-idle-creditapplying to every policy is deliberate (a general simulator knob) or intended to model only the Helios/retained-refresh rule. - No CI check results, no labels and no maintainer approval exist at the head; all test, simulator and formal numbers are author-reported and could not be reproduced here. The helios crate cannot show a green suite because of the pre-existing
model/packed_round_tests.rs:68failure on main. - Where the earlier feature went: the SAM copy-drafting, wide copy-verify and padding-pruning work is not in any open PR that I could find, so it appears to have been dropped rather than split off (the branch name is the only trace).
- Whether
helios/README.mdwill be fixed in this PR or a follow-up; it is outside the current 10-file change set.