diff --git a/docs/PACKAGE_REGISTRY_RELEASES.md b/docs/PACKAGE_REGISTRY_RELEASES.md index ef05b94..3e2f069 100644 --- a/docs/PACKAGE_REGISTRY_RELEASES.md +++ b/docs/PACKAGE_REGISTRY_RELEASES.md @@ -59,6 +59,11 @@ Core next, and the meta tag last. This is a dependency guarantee for a single-capacity Actions runner: the developer package cannot run before its exact Core and module versions have entered the queue. +The same release entry point records the reviewed current Alembic heads under +the target release version and reruns the strict migration audit before it +changes package versions, commits, or tags. A failed baseline check therefore +cannot produce a protected package release. + It builds one wheel and, where applicable, one npm tarball. The workflow records the source tag, source commit, filename, size, and SHA-256 in `package-artifacts.json` before publishing. Gitea rejects a second upload of the diff --git a/tests/test_release_entrypoint_gates.py b/tests/test_release_entrypoint_gates.py index b0976f0..0448f53 100644 --- a/tests/test_release_entrypoint_gates.py +++ b/tests/test_release_entrypoint_gates.py @@ -29,11 +29,13 @@ class ReleaseEntrypointGateTests(unittest.TestCase): workflow = script[confirm:] source_gate = workflow.index("run_version_alignment_gate source") + baseline = workflow.index("record_migration_release_baseline") first_commit = workflow.index('run git -C "$repo" commit') lock_generation = workflow.index("generate_release_lock") full_gate = workflow.index("run_version_alignment_gate", source_gate + 1) first_push = workflow.index('run git -C "$repo" push') + self.assertLess(baseline, source_gate) self.assertLess(source_gate, first_commit) self.assertLess(first_commit, lock_generation) self.assertLess(lock_generation, full_gate) diff --git a/tools/release/push-release-tag.sh b/tools/release/push-release-tag.sh index 50c7b71..df911f2 100644 --- a/tools/release/push-release-tag.sh +++ b/tools/release/push-release-tag.sh @@ -546,6 +546,18 @@ run_migration_release_audit() { run "${command[@]}" } +record_migration_release_baseline() { + local audit_script="$META_ROOT/tools/release/release-migration-audit.py" + + [[ -f "$audit_script" ]] || fail "missing migration audit helper: $audit_script" + run "$PYTHON" "$audit_script" \ + --track release \ + --record-release "$TARGET_VERSION" + if [[ "$DRY_RUN" -eq 0 ]]; then + "$PYTHON" "$audit_script" --track release --strict + fi +} + print_command() { printf '+' printf ' %q' "$@" @@ -872,6 +884,8 @@ run_manifest_shape_gate confirm_release +record_migration_release_baseline + for repo in "${PACKAGE_REPOS[@]}"; do if [[ "$DRY_RUN" -eq 1 ]]; then echo "Would update version files in $repo to $TARGET_VERSION"