Repository navigation
Conversation
push.yaml ran Test and Publish side by side on the release commit, so a release could reach PyPI while its tests were running or after they failed. In the 2026-10-06 13:11Z release run, Publish finished at 13:40:07 and Test at 13:44:04. Publish now has needs: Test. Both jobs share the same if condition, so Publish still runs on every release commit and waits for Test first. Adds a check in test_release_tagging.py that every PyPI-publishing job needs Test and runs under Test's condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the independent review of 9948a8d (approved, nit): adding always() to both jobs' shared condition kept them equal and passed the check, although it would let Publish run after a failed Test. The check now also requires Publish's condition to contain no status function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the second independent review (approved, nit): Always() and ALWAYS() passed the check. It now uses a case-insensitive regex; all five override variants are rejected and the current workflow passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Deploy the documentation site from its own release job The Test job lost its OS matrix in #282 (2024-09-26) but kept the deploy step's `if: matrix.os == 'ubuntu-latest'` guard, so the step has been skipped on every release since and gh-pages last moved on 2024-09-26. Move the docs build and deploy into a Docs job that needs Test, has `contents: write`, and uses the v4 action's documented inputs. Keeping it out of Test means a failed deploy cannot hold back a PyPI release once Publish needs Test (#591). Add sphinx.ext.githubpages so the build writes the .nojekyll that a branch-sourced Pages site needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Deploy docs only after the release reaches PyPI Review follow-ups on the Docs job: - Need Publish as well as Test, so the site never documents a version that failed to reach PyPI. Publish still does not depend on Docs. - Serialize deploys with a gh-pages-deploy concurrency group; a newer waiting deploy replaces an older one instead of racing it. - Loosen the structural tests to the properties that matter (branch, folder, contents: write, an unconditional deploy step), parse the Makefile recipe by its tab-indented lines, and skip jobs whose matrix is built by an expression. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Tighten docs deploy checks from the delta review - Say what the concurrency group guarantees: one deploy at a time, a newly queued deploy replacing one still waiting. GitHub does not promise release order. - Require a constant concurrency group (a per-run group would not serialize anything) and accept the string shorthand. - Match `jb build docs` as a whole recipe line, so a changed output path or a commented-out line no longer passes. - Treat `strategy: null` like no strategy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Picking this up for the US hub. I'll post a hand-off comment here when it's ready. Generated by Claude Code |
Keep master's push workflow (Lint, Test timeout, Docs job needing Test and Publish, Publish environment and permissions) and add only `needs: Test` to Publish. Reword the Test comment, which said Publish does not wait on it. Keep master's parsed Publish-step check and this branch's needs/if/status check; they test different things. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LwQq6KoHBBVJ3ZLqpicVpS
|
Ready for hub review Head: RESULT: FIXED Conflicts and how I resolved them
Tests (one file per process)
CI at headPull request run 41548423680: completed, success. All 19 jobs passed, including Lint workflows, the 8 Test jobs and the 8 country-package jobs. PR body
Judgment calls
Proposed follow-upRemove actionlint ignores that no longer match anything. Generated by Claude Code |
What this fixes
In
.github/workflows/push.yaml, the Publish job (PyPI upload and git tag) had noneeds:, so on each release commit it ran beside Test. A release could reach PyPI while its tests were still running, or after they failed. In the 2026-10-06 13:11Z release run (37468917800), Publish finished at 13:40:07 and Test at 13:44:04.Publish now has
needs: Test. Both jobs have the sameif:(the canonical repository and the "Update PolicyEngine Core" commit), so Publish still runs on every release commit; it now waits for Test to pass.Merged with master, which since added a Lint job, a Test timeout, and a
Docsjob withneeds: [Test, Publish](#594, #597, #604). The job graph is now Test → Publish → Docs, with no cycle; all three share the sameif:, so Docs still runs on release commits. The Test comment that said Publish does not wait on it now says Publish waits on Test and Docs on both.Gating won't hold up current releases: all 69 of the last 69 "Update PolicyEngine Core" push runs passed as of 2026-10-06, and the five most recent (2026-10-30 to 10-31) all passed too.
Tests
test_release_tagging.py::test_publish_workflow_publishes_only_after_tests_passchecks four things:pypa/gh-action-pypi-publishneeds Test;if:is Test's;if:contains no status function (always(),failure(),cancelled(),success()), which could let it run after a failed Test.Master's parsed check of the Publish steps (
test_publish_workflow_tags_only_after_pypi_succeedsand its mutation tests, from #597) covers permissions, fetch depth and step order, notneeds, so both are kept.test_docs_deployment.py::test_documentation_deploy_cannot_block_pypi_publishingchecks Docs is not upstream of Publish.After the merge with master:
Impact
Impact: CI only; no package code changes. Each release now publishes once Test finishes: in the last five "Update PolicyEngine Core" push runs, Test took between 5 min 31 s and 7 min 40 s, while Publish finished 36 to 47 s after it started. Docs already waited on Test, so documentation deploys no later than before.
Noticed in passing: the Test job's "Deploy documentation" step ran
if: matrix.os == 'ubuntu-latest', but the job had no matrix, so the step was skipped on every run. #594 resolved this by moving the deploy into its ownDocsjob.axiom: n/a: CI workflow change, no policy change
Other audit findings, handled elsewhere
The 2026-10-06 invariants audit of master
757147c7also confirmed defects that this PR leaves alone, because other work owns them:Branch staleness after
set_inputand raw-file restore are documented behaviour, not defects.Generated by Claude Code