Repository navigation
Description
Overview
workspace-validation.yml mode=release currently conflates correctness and perf-flakiness into a single RED. After the 2026-07-13 tail burn-down (PyAutoHeart#72) fixed every real bug, the integrate stage still can't reach a clean verdict because a population of genuinely-slow real-search scripts (real Nautilus fits + finite-difference JAX gradients) flakes around the per-script timeout cap — the failing set shifts every run (shared_preloads literally flip-flopped between re-val #3 and #4). Raising the cap and adding no_run SLOW-skips one script at a time never converges and erodes coverage.
This introduces an advisory tier: a timeout on a declared-slow script is downgraded to YELLOW (loud, tracked), while a timeout on any undeclared script stays RED. This is the path that lets mode=release reach its normal shippable GREEN/YELLOW once the real bugs are fixed, instead of being held hostage by the perf tail.
Plan
- Add a companion
config/build/advisory.yamlper workspace — same flat-list + inline-comment format asno_run.yaml, but the listed scripts still run and report; only their timeouts are advisory. Growing this list never erodes coverage, so it converges where SLOW-skips whack-a-mole. Absent file → today's behaviour exactly. - Build (runner mechanism): a new
TIMEOUT_ADVISORYresult status; the runner tags a timeout as advisory when the script matchesadvisory.yaml;has_failures/ aggregatereadyexclude advisory timeouts; a non-advisory timeout still fails the run. - Heart (policy): the stage report and
validation_reportcarry anadvisory_timeoutscount; readiness mapsadvisory_timeouts > 0to a YELLOW reason (not RED), keeping the release GREEN→YELLOW rather than RED-blocked. - Keep it loud: advisory timeouts surface in the aggregate report, the CI step summary, and Heart's YELLOW reasons — a tracked backlog, with durable speedups owned by the Profiling Agent.
- Ship the mechanism in PyAutoHeart + PyAutoBuild first (self-contained, unit-tested, graceful fallback); seed
advisory.yamlin the*_testworkspaces from the re-val PyAutoPulse v1.3 — stop --all (recover orphan daemon) #3/PyAutoPulse v1.4 — classify generated json/png as dirty-noise #4 flip-flop population as aship_workspacefollow-up.
Detailed implementation plan
Affected Repositories
- PyAutoHeart (primary) — policy:
heart/validate.py,heart/readiness.py,.github/workflows/workspace-validation.yml,docs/release_validation.md - PyAutoBuild — runner mechanism:
autobuild/result_collector.py,autobuild/run_python.py,autobuild/build_util.py,autobuild/aggregate_results.py
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoHeart | main | clean |
| ./PyAutoBuild | main | clean |
No worktree conflict (active claims are all on the science libraries). Suggested branch: feature/release-advisory-tier-slow-scripts
The failure path being severed
build_util timeout → Status.TIMEOUT → RunReport.has_failures → aggregate_results.ready=false → workflow "Fail if not ready" + emit_release_report status=fail → validate.py stage integrate=fail → release_ready=false → readiness.py hit("validation_failed") → RED.
Implementation Steps
PyAutoBuild (runner mechanism):
autobuild/result_collector.py— addStatus.TIMEOUT_ADVISORY = "timeout_advisory";RunReport.has_failuresexcludes it;summary/to_dictcarry it.autobuild/run_python.py— loadconfig/build/advisory.yaml(workspace override → empty default, mirroring theno_run.yamlresolution), parse its reasons, threadadvisory_list/advisory_reasonsintoexecute_scripts_in_folder.autobuild/build_util.py— inexecute_script(andexecute_notebookfor symmetry), onsubprocess.TimeoutExpired, if the file matchesadvisory_list(reuseshould_skippath semantics) recordTIMEOUT_ADVISORYwith the advisory reason instead ofTIMEOUT.autobuild/aggregate_results.py—timeout_advisoryis not in the failure set (soreadyis unaffected); add anadvisory_timeoutslist + a loud "## Advisory-Tier Timeouts (slow real-search; not release-blocking)" markdown section. A non-advisory timeout still flipsready=false.
PyAutoHeart (policy):
5. heart/validate.py — to_stage_report carries advisory_timeouts (count + entries) from the aggregate into the stage report (NOT folded into failures); _Accumulator + report schema sum it into the top-level validation_report; status still derives from aggregate.ready. Bump the schema docstring.
6. heart/readiness.py — in the release-validation gate, when the report has advisory_timeouts > 0, append a YELLOW reason ("N advisory-tier script timeout(s) in release validation (slow real-search; not release-blocking)") + hit("validation_advisory_timeout") with a _SCORES entry. This turns a correctness-clean run GREEN→YELLOW instead of RED.
7. .github/workflows/workspace-validation.yml — comment the tier; echo the advisory-timeout count into $GITHUB_STEP_SUMMARY. No gate-logic change (already keys off ready).
8. docs/release_validation.md — document the advisory tier and the # ADVISORY <date> - reason marker convention.
Tests
PyAutoBuild/tests/test_result_collector.py(+ new aggregate test): advisory-matched timeout →TIMEOUT_ADVISORY,has_failuresfalse,readytrue,advisory_timeoutspopulated; non-advisory timeout →readyfalse.PyAutoHeart/tests/test_validate.py:to_stage_reportcarries the advisory count and stage status stayspass; readiness mapsadvisory_timeouts > 0→ YELLOW (not RED).
Key Files
PyAutoBuild/autobuild/result_collector.py—Status,RunReport.has_failuresPyAutoBuild/autobuild/build_util.py—execute_script/execute_notebooktimeout branch,should_skipPyAutoBuild/autobuild/run_python.py— advisory.yaml load + thread-throughPyAutoBuild/autobuild/aggregate_results.py—aggregate()failure set + report sectionPyAutoHeart/heart/validate.py—to_stage_report,_Accumulator, schemaPyAutoHeart/heart/readiness.py— release-validation gate YELLOW reasonPyAutoHeart/.github/workflows/workspace-validation.yml— step summaryconfig/build/advisory.yaml(new, per*_testworkspace) — the declared-slow registry
Design notes
- advisory.yaml vs a duration threshold: an explicit list is reviewable and stable; a duration threshold would re-capture exactly the borderline near-cap scripts that flip-flop. Chosen: explicit list.
- Advisory downgrades timeouts only — a genuine
FAILED(exception) on an advisory script stays RED, preserving the correctness signal. - Cross-ref: PyAutoHeart#72 (release tail epic),
draft/feature/profiling/profiling_agent_jax_compile_time_scope.md(durable speedups).
Original Prompt
Click to expand starting prompt
mode=release should tier slow real-search scripts as advisory, not RED-block on the perf tail
Type: feature
Target: PyAutoHeart
Repos:
- PyAutoHeart
- PyAutoBuild
Difficulty: medium
Autonomy: supervised
Priority: high
Status: formalised
The 2026-07-13 release-validation burn-down (PyAutoHeart#72) fixed every real
correctness bug in the tail (A–H + the jax_grad config gap). But the
workspace-validation.yml mode=release integrate stage still cannot reach a clean
verdict, because it runs the FULL script set — including a population of genuinely
slow real-search scripts (PYAUTO_TEST_MODE=0/1 real Nautilus fits +
finite-difference JAX gradients) that flake around the per-script timeout cap. The
failure set shifts run to run:
- re-val PyAutoPulse v1.3 — stop --all (recover orphan daemon) #3 → shapelets, jax_grad×2, multi/delaunay_mge
- re-val PyAutoPulse v1.4 — classify generated json/png as dirty-noise #4 (after fixing those) → cpu_fast_modeling, interferometer datacube/delaunay,
interferometer mge/slam, multi/shared_preloads — all of which passed in PyAutoPulse v1.3 — stop --all (recover orphan daemon) #3
(shared_preloadsliterally flip-flopped).
Raising BUILD_SCRIPT_TIMEOUT (300→1800) and adding no_run SLOW-skips one script at
a time does not converge — each run surfaces a different handful of borderline
scripts, and de-gating them individually is whack-a-mole that also erodes coverage.
The structural problem: mode=release gates a RELEASE on the full-set run, but a
big fraction of that set is genuinely-slow real work whose pass/fail near a per-script
cap is nondeterministic (CI runner load). Correctness and perf-flakiness are conflated
into one RED. (This is the "mode=release full-tail RED policy" question first raised on
#72 comment-4966797130.)
Proposal — tier the run so integrate gates on CORRECTNESS, not the perf tail:
- Introduce a slow/advisory tier for known-slow real-search scripts (a
slow: truemarker inconfig/build/no_run.yamlor a companionslow.yaml, or a
duration threshold): these still RUN and are reported, but a timeout on an
advisory-tier script is advisory (yellow), not an integrate-RED. - Alternatively/additionally, run the slow tier as a separate off-critical-path job
with a large budget (e.g. 3600s+), so a slow-tier flake never blocks the release
verdict while still surfacing regressions. - A timeout on a non-advisory script is still RED (a script that should be fast
timing out IS a signal). Only the declared-slow population is de-gated. - Keep it loud: advisory failures surface in the report + Heart's YELLOW reasons
(same spirit as the existing SLOW/NEEDS_FIX banners), so they're a tracked backlog,
not silently hidden — the durable speedups are the Profiling Agent's job
(draft/feature/profiling/profiling_agent_jax_compile_time_scope.md).
Outcome: after the real bugs are fixed, mode=release reaches GREEN/YELLOW on
correctness and the release-decision gate stops being held hostage by real-search
perf-flakes. Design in PyAutoHeart (workspace-validation.yml + heart/validate.py
tiering) with the runner support in PyAutoBuild (run_python.py/build_util.py).
Cross-ref project_release_2026_07_13_blocked_3bugs and PyAutoHeart#72.
Activity
Jammy2211 commentedon Jul 14, 2026
Library PRs open (mechanism) — corrective-red, PR-open only
The advisory-tier mechanism is implemented, verified, and shipped to pending-release PRs:
advisory_timeoutscarried throughvalidate.py;readiness.pyraisesvalidation_advisory_timeout(YELLOW, not RED);workspace-validation.yml+docs/release_validation.mdupdated.Status.TIMEOUT_ADVISORY,config/build/advisory.yamlload,aggregate_resultskeeps advisory timeouts out ofready+ surfaces them.Gate
test_pre_build_skill, anadmin_jammy/PyAutoBrainmanifest drift that fails on cleanmain).run_python.pyon a temp workspace): an undeclared slow-script timeout → run exits 1 (still RED); an advisory-declared timeout → exits 0 (de-gated,timeout_advisory); aggregateready: Truewith the "Advisory-Tier Timeouts" section surfaced.release validation FAILED (stage integrate)(the structural RED this change fixes). The other live RED reason (PyAutoArrayon a feature branch) is unrelated sibling work. No merge, no release — merge stays a human act.Next
advisory.yamlseeds — the re-val PyAutoPulse v1.3 — stop --all (recover orphan daemon) #3/PyAutoPulse v1.4 — classify generated json/png as dirty-noise #4 flip-flop population (shapelets, jax_grad×2, multi/delaunay_mge, interferometer datacube/delaunay/mge/slam, multi/shared_preloads, cpu_fast_modeling) — in progress this session as theship_workspacefollow-up. The mechanism is a graceful no-op until Build#153 merges and the workspaces are seeded.mode=releaseintegration onmain, obtain a new Heart verdict — the advisory tier should let a correctness-clean run reach GREEN/YELLOW.Jammy2211 commentedon Jul 14, 2026
Workspace advisory.yaml seeds open — full set at PR-open
The workspace half is now seeded (behind the library-first gate — inert until PyAutoBuild#153's
run_python.pyloader merges):All 19 patterns are
.py-anchored and verified to match exactly one real script (no typos, nodelaunay↔delaunay_mgeover-match). Scripts alreadyno_run-skipped (imaging jax_grad/delaunay_mge/mge_group, multi/delaunay_mge, database slam_*, agw#131 shapelets) are not repeated —no_runskips them before they can flake.Note: autolens_workspace_test / autolens_workspace carried worktree claims from in-flight sibling tasks (aggregator PR#275 already merged; the tail-burndown epic closing out); the human waived the conflict, so those seeds proceeded.
Full PR set (all
pending-release, PR-open — merge stays human)Merge order (library-first)
mode=releaseonmainfor a new Heart verdict.Follow-ups
no_run'd real-search entries →advisory.yamlto restore coverage (a deliberate decision tied to the Profiling Agent's durable speedups).PyAutoBuild/tests/test_pre_build_skill.pymanifest drift (admin_jammyvsPyAutoBrain) — fails on cleanmain; separate hygiene fix.Jammy2211 commentedon Jul 14, 2026
Reverted the advisory tier → going with
no_run+ hygieneOn reflection (maintainer call), the advisory-tier mechanism was more machinery than warranted. Its core premise — that
no_runSLOW-skips erode coverage forever and never converge — is substantially handled by the periodic hygiene sweep ofno_run; and for scripts that reliably exceed the cap, a skip and an advisory-timeout are equivalent (a timed-out script asserts nothing).Fully reverted: all 5 advisory PRs (Heart#75, Build#153, alwt#168, agwt#72, alw#276) closed, their branches deleted, the mechanism removed. Nothing of the advisory tier remains.
Replacement — the leaner
no_runapproach (2 PRs):SLOW.SLOW.All entries
.py-anchored and verified 1:1 against real scripts. Excluded deliberately:cpu_fast_modeling(its release-tail failure is a singular FAIL being fixed in PyAutoArray#388, not a timeout) and autolensgroup/shapelets(uncertain; autogalaxy shapelets already handled by agw#131).Accepted trade-off: the flaky set shifts run to run, so a future
mode=releasemay surface a different handful — those get added via the same hygiene pass rather than an automated tier.no_runPRs arepending-release, PR-open only (merge stays human). Heart stays RED until the unrelatedPyAutoArraybranch reason also clears.Closing this issue's advisory-tier framing; the
no_runPRs carry the actual unblock.Jammy2211 commentedon Jul 14, 2026
Resolved via
no_run— mergedBoth
no_runPRs are squash-merged tomain:The flaky real-search scripts that were RED-blocking
mode=releaseon the perf tail are nowSLOW-skipped, and are owned by the hygiene sweep going forward. The advisory-tier mechanism this issue originally proposed was built, reviewed, and deliberately reverted in favour of this leaner approach.Closing. Remaining is operational, not code: rerun
mode=releasefor a fresh Heart verdict (the flaky set may shift → next handful added via hygiene), and note Heart stays RED until the unrelatedPyAutoArrayfeature-branch reason clears.cpu_fast_modelingwas intentionally left out (singular-FAIL fix tracked in PyAutoArray#388, not a timeout).