Repository navigation
Workspace Smoke runs nightly when a main moved, and accepts pinned SHAs (M3.7d) - #355
Merged
Merged
Conversation
… (M3.7d) workspace-smoke.yml runs nightly at 03:00 UTC. A gate job (.github/scripts/smoke_sha_gate.py) resolves the commit of every library and workspace the sweep covers and compares it with the SHA record of the last successful run on main; when none moved and the last full sweep is under 7 days old it skips the sweep (success, "no main moved since run <id>"). Every run uploads the workspace-smoke-shas artifact and a summary table of the SHAs tested. A workflow_dispatch commit_shas input pins repos, never skips, and workspace-validation.yml now checks out smoke-mode repos at the resolved SHAs. Heart's test_run reads a skipped night as a re-attestation of the full sweep it names: counts come from that sweep, the label says so, and the skip run's timestamp keeps the evidence fresh. Refs #354 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt (review round 1)
- workspace-smoke-pinned.yml: dispatch-only bisect entry with a required
commit_shas input; workspace-smoke.yml loses the input and only tests main,
so a pinned pass on an old SHA never becomes the smoke verdict or the
gate's baseline.
- The gate sweeps when the latest completed run on main did not conclude
success ("last run <id> concluded <conclusion>"), so a skip cannot mask a
newer red run behind an older green sweep.
- workspace-smoke.yml gains a `force` dispatch input ("forced by dispatch");
a plain dispatch still skips when nothing moved.
- test_run reads only runs on main (--branch main), so a feature-branch
dispatch is not read as the smoke verdict.
Refs #354
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (tenant firewall) smoke_sha_gate.py no longer names any repo or owner: load_covered() reads the libraries (the body's `for lib in` loops) and workspaces (find_scripts' `declare -A WS` map) from workspace-validation.yml, the one source of truth for what the sweep checks out, and the owner comes from github.repository_owner. Both entries' gate checkouts widen the sparse checkout to .github. Tests use placeholder repos; the agreement test checks every checkout in the body names a covered repo without literal names. Refs #354 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #354 (M3.7d, epic autonomous-orchestrators).
Summary
Nightly schedule. The
workspace-smoke.ymlcron is now0 3 * * *. The old Monday 03:00 run is one of these. This entry only ever testsmain.Gate job. A new first job runs
.github/scripts/smoke_sha_gate.py. It resolves the commit of every library and workspace the sweep checks out (git ls-remote). The script names no repo and no owner. It reads the covered repos fromworkspace-validation.ymlitself, the one source of truth for what the sweep checks out: the libraries come from the body'sfor lib inclone loops, and the workspaces fromfind_scripts'declare -A WSmap. A reshaped body fails the gate loudly. The owner comes fromgithub.repository_owner. This keeps Heart's Python clear of instance facts, as the organ tenant firewall requires. It then reads two things from runs onmain:workspace-smoke-shasartifact of the last successful run;It skips the sweep only when all of these hold:
forceis not set;A skipped run concludes success. Its summary starts "Workspace sweep skipped: no main moved since run ", where
<id>is the last full sweep.Why each extra rule exists.
mainmoving, such as PyPI dependency updates.forcedispatch input (boolean, default false). It sweeps even when nothing moved, with the reason "forced by dispatch". A plain dispatch still skips when nothing moved; the shift-end dispatch relies on that.Fallback. No previous run, an expired artifact, or a run from before this change means "run the sweep". An
ls-remotefailure or an unresolvable pin fails the gate, so the run goes red rather than skipping silently.Pinned bisect runs have their own entry:
workspace-smoke-pinned.yml.commit_shasinput: JSON{repo: full-sha | branch | tag}. Unknown repo names are rejected; unlisted repos usemain; an empty map is refused.workspace-validation.ymlin smoke mode.gh workflow run workspace-smoke-pinned.yml -f commit_shas='{"PyAutoGalaxy":"<sha>"}'.The sweep tests exactly what was recorded. Both entries pass the full resolved map as
commit_shastoworkspace-validation.yml. In smoke mode, every workspace checkout (find_scripts,generate_notebooks,run_scripts,run_notebooks) and both library clone loops now check out those SHAs, so amainthat moves mid-run cannot split the run across commits. (Before this PR, smoke mode ignoredcommit_shasand always clonedmain.) Release mode is unchanged:refs={}there, and itscommit_shasstill only labels the release report.SHA record on every run. Every run, swept or skipped, uploads
workspace-smoke-shas/shas.json:run_id,event,swept,reason,full_sweep_run_id,full_sweep_created_at,previous_run_id,pinnedandcommit_shas. The summary shows the same table. Read it withgh run download <id> --repo PyAutoLabs/PyAutoHeart -n workspace-smoke-shas.Heart
test_runleg (design and age rule)readiness.pymarks the leg STALE when the latest run'screatedAtis more thanTEST_STALE_DAYS = 10days old._cloud_verdictnow lists runs with--branch main, so a dispatch from a feature branch is no longer read as the smoke verdict. Run 43034177136 was one such dispatch. This was a one-line change, with a test.createdAt, so a quiet week cannot age the evidence into STALE. This is correct because the code onmainis exactly the code that the last full sweep passed, the latest run was green, and the gate forces a full sweep at least every 7 days.test_run.run()takes a new injectedcloud_sha_fetcher.main()passes it, and the result is cached per run id like the report artifact. When the record saysswept: false, the leg:sweep_skipped,full_sweep_run_idandfull_sweep_ts;cloud#<full> (re-attested by #<skip>: no main moved).commit_shasis added to the sidecar. A missing record (older runs, expired artifact, nogh) behaves exactly as before.Run 43034177136 (2026-11-11): real failure, not a flake
It was dispatched on Heart's
feature/jax-floor-0-12branch, which installs jax/jaxlib 0.12.0.1. Two scripts failed with a deterministicAssertionError:autogalaxy_workspace_testscripts/misc/latent/zero_contour_compat_jax.pyautolens_workspace_testscripts/misc/jax_assertions/critical_curves_zero_contour_jit_grad.pyThis is the zero-contour gradient regression under jax 0.12. The jax-floor PRs dealt with it the next day: autogalaxy_workspace_test 7ea166ba (NEEDS_FIX) and autolens_workspace_test 1585db2f (taken off the smoke allowlist). After that, 43218299026 passed. Before this PR,
test_runread that branch run as the smoke verdict; with--branch mainit no longer would.Witness
The witness 3 command is now
gh workflow run workspace-smoke-pinned.yml -f commit_shas='{"PyAutoGalaxy":"<sha>"}', and the record lands in that run'sworkspace-smoke-shasartifact. The architect amends the Mind prompt's witness to match.schedule:; pins go to the body through the pinned entrygh --jq"latest completed run" expression was run read-only against the real historyworkspace-smoke-pinned.ymldispatch runs against that SHA and records itref:expressions wiring-testedtest_runreads the latest completed run on main; a skip does not make it STALEtests/test_test_run.py)API Changes
None to the published libraries. Heart-internal changes:
heart.checks.test_run.run()gains an optionalcloud_sha_fetcherkeyword.SHA_ARTIFACTand new helper_cloud_sha_record._cloud_verdictnow filters with--branch main.sha_record,sha_record_run_id,commit_shas,pinned,sweep_skipped,full_sweep_run_id,full_sweep_ts.workspace-smoke-pinned.yml.workspace-smoke.ymldispatch inputs:forceonly.Test Plan
python3 PyAutoMind/scripts/repos_sync.py --check --only "tenant firewall (organ code)" --root <root>, run locally with the CI layout (PyAutoMind and PyAutoHeart side by side), reportscheck tenant firewall (organ code): OK. Against c3bd55f it reproduced CI's 3 mismatches.ls-remote: with no record it sweeps 15 repos, and with that record as the previous one it skips ("no main moved since run 1").python -m pytest -q -n 4: 1519 passed, run from the task worktree. This includestests/test_smoke_sha_gate.pyandtests/test_test_run.py(new tests for force, the red-latest-run rule, the--branch mainfilter, and the shape of the pinned entry), plustests/test_workflow_wiring.py.yaml.safe_loadandactionlint(without shellcheck) onworkspace-smoke.yml,workspace-smoke-pinned.yml,workspace-validation.ymlandrelease-integrate.yml: clean. Untouched workflows have their own actionlint findings, which this PR leaves alone.workspace-smoke-pinned.ymldispatch confirms witness 3.No workflow was dispatched for this PR.
Review: architect session, round 1 FINDINGS (1 high, 1 medium, 2 low), fixed.
🤖 Generated with Claude Code