Skip to content

fix(release): pass the repository root when loading the release closure profile - #1408

Merged
Brad-Edwards merged 1 commit into
devfrom
fix-release-evidence-closure-profile
Oct 2, 2026
Merged

Brad-Edwards merged 1 commit into
devfrom
fix-release-evidence-closure-profile

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Summary

The v6.0.0 release run (36819410412) failed in build-release at the "Generate output-bound release evidence (#1226)" step, before anything reached PyPI:

File "tools/release_evidence.py", line 162, in generate
    profile = load_python_closure_profile(profile_id)
TypeError: load_python_closure_profile() missing 1 required positional argument: 'profile_id'

load_python_closure_profile takes (repo_root, profile_id). #1295 added the generate call site without the repository root, and no test ever ran generate(), so the first release after #1295 is also the first execution of that line. This PR passes repo_root and adds a regression test that runs generate() through the real closure-profile load.

Requirement UIDs

  • None. This is a release-tooling bug fix with no requirement scope.

Related Issues

No issue: remediates the failed v6.0.0 release run's build-release job.

ADR Impact

  • None.

Changes

  • tools/release_evidence.py: generate() calls load_python_closure_profile(repo_root, profile_id), using the admitted repository root it already holds.
  • tests/test_issue_1226_release_evidence_cli.py: new test_generate_loads_the_closure_profile_from_the_admitted_repository. It runs generate() against the real repository profile and stops at target-environment selection, then asserts that the loaded profile's Python version and platform are the ones selected. It fails with the original TypeError without the fix.

Test Plan

  • Unit tests pass
  • Integration tests pass if applicable
  • Full completion suite required in CI before merge
  • No coverage regression

I reproduced build-release locally under CPython 3.12. The steps were tools.python_closure build, materialize, wheel and sdist smoke with --offline, then tools.release_evidence generate. Generation now completes and writes build-inventory.json, release-evidence-index.json, wheel.cdx.json and sdist.cdx.json.

The release-evidence, release-publication, workflow-policy and tooling-policy modules pass with integration included (327). nox -s verify-fast-feedback --base-rev origin/dev passes.

Ground Control Checks

  • Regression test fails on the pre-fix code and passes after

Traceability

Checklist

  • No release gate weakened
  • The release workflow builds from the tag commit, so v6.0.0 cannot pick up this fix; it ships in the next release

@Brad-Edwards
Brad-Edwards merged commit c4a17de into dev Oct 2, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant