Skip to content

fix: preserve PyPI trusted publisher identity - #204

Merged
jan-kubica merged 2 commits into
mainfrom
fix/pypi-publisher-boundary
Aug 30, 2026
Merged

fix: preserve PyPI trusted publisher identity#204
jan-kubica merged 2 commits into
mainfrom
fix/pypi-publisher-boundary

Conversation

@jan-kubica

@jan-kubica jan-kubica commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • run the pinned PyPI publisher directly in the top-level release workflow
  • keep exact wheel preparation and registry byte verification in immutable shared actions
  • update the shared release policy and npm finalizer pins to 0f814e1a0c6c7401778e661209553b6e15f8d92a

Root cause

PyPI Trusted Publishing identifies the caller workflow. The old composite action nested the Docker-based publisher, which GitHub Actions cannot invoke correctly from that boundary. The top-level publisher preserves the configured stella/stdnum/.github/workflows/release.yml OIDC identity.

Remote CI is the validation source for this workflow-only change.

CC on behalf of jan-kubica

Summary by CodeRabbit

  • Improvements
    • Improved the release process for publishing Python packages, including clearer preparation, publication and verification steps.
    • Added stronger safeguards to ensure releases use the correct package details and publishing settings.
    • Updated release automation to use more reliable, controlled workflow configurations.
  • Testing
    • Expanded release checks to validate publishing configuration and prevent incorrect or incomplete package releases.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T19:30:54.293237Z bbac4e1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
See the Details below.

License Issues

.github/workflows/release.yml

PackageVersionLicenseIssue Type
stella/.github/.github/actions/pypi-publish-hardened0f814e1a0c6c7401778e661209553b6e15f8d92aNullUnknown License
stella/.github/.github/actions/pypi-publish-hardened/verify0f814e1a0c6c7401778e661209553b6e15f8d92aNullUnknown License
stella/.github/.github/workflows/npm-version-finalize.yml0f814e1a0c6c7401778e661209553b6e15f8d92aNullUnknown License
Allowed Licenses: MIT, Apache-2.0, Apache-2.0 WITH LLVM-exception, BSD-2-Clause, BSD-3-Clause, ISC, 0BSD, BlueOak-1.0.0, Unlicense, CC0-1.0, CC-BY-4.0, MIT-0, MPL-2.0, Python-2.0, Zlib, Unicode-3.0
Excluded from license check: pkg:cargo/libfuzzer-sys

OpenSSF Scorecard

PackageVersionScoreDetails
actions/pypa/gh-action-pypi-publish dc37677b2e1c63e2034f94d8a5b11f265b73ba33 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 4Found 9/19 approved changesets -- score normalized to 4
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 4security policy file detected
Maintained🟢 105 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
SAST🟢 8SAST tool is not run on all commits -- score normalized to 8
Packaging🟢 10packaging workflow detected
actions/stella/.github/.github/actions/pypi-publish-hardened 0f814e1a0c6c7401778e661209553b6e15f8d92a UnknownUnknown
actions/stella/.github/.github/actions/pypi-publish-hardened/verify 0f814e1a0c6c7401778e661209553b6e15f8d92a UnknownUnknown
actions/stella/.github/.github/workflows/npm-version-finalize.yml 0f814e1a0c6c7401778e661209553b6e15f8d92a UnknownUnknown

Scanned Files

  • .github/workflows/release.yml

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

Next included review available in 43 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a7bcb62-a1bb-4eca-9b9e-61877d313120

📥 Commits

Reviewing files that changed from the base of the PR and between 24c58b0 and bbac4e1.

📒 Files selected for processing (1)
  • scripts/pypi-wheel-set.test.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 94f2d5c5-2b78-4502-b15c-317f1913ac15

📥 Commits

Reviewing files that changed from the base of the PR and between 3e87960 and 24c58b0.

📒 Files selected for processing (4)
  • .github/workflows/release-policy.yml
  • .github/workflows/release.yml
  • scripts/pypi-wheel-set.test.ts
  • scripts/release-workflow.test.ts
💤 Files with no reviewable changes (1)
  • scripts/release-workflow.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (8)
Do not assign directly to `document.cookie`.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/pypi-wheel-set.test.ts
Keep Node.js, WASM, and Python bindings as thin adapters over the single Rust implementation; do not hand-write validator logic in bindings.

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Files:

  • scripts/pypi-wheel-set.test.ts
Preserve per-country module boundaries and public export paths; package exports are public API.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/pypi-wheel-set.test.ts
Binding layers should remain thin: business logic belongs in the Rust core, while TypeScript, Python, WASM, and NAPI layers translate types and call shared core logic.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/pypi-wheel-set.test.ts
Prefer TypeScript features that make invalid states structurally impossible, including branded types, discriminated unions, exhaustive checks, and named discriminators instead of growing boolean state flags.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/pypi-wheel-set.test.ts
Use property and mutation testing for checksum behavior and differential testing of specialized canonical validators against the full validator.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/pypi-wheel-set.test.ts
After adding or changing a validator, use `bun run codegen` to generate npm entrypoints, TypeScript and Python registry types, package exports, and README tables; do not manually maintain generated outputs.

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Files:

  • scripts/pypi-wheel-set.test.ts
Prefer explicit designs, fail fast at boundaries, return or throw early, and minimize brace nesting with early returns.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • scripts/pypi-wheel-set.test.ts
🔇 Additional comments (3)
.github/workflows/release.yml (1)

328-351: LGTM!

Also applies to: 352-357

.github/workflows/release-policy.yml (1)

21-21: LGTM!

scripts/pypi-wheel-set.test.ts (1)

30-51: LGTM!

Also applies to: 71-71


📝 Walkthrough

Walkthrough

The release workflows update pinned reusable actions, split PyPI wheel preparation, publication, and verification, remove changelog credentials, and retain release and npm publishing credentials. Tests now verify the revised workflow contract and exact action configuration.

Changes

Release workflows

Layer / File(s) Summary
Release publishing and workflow credentials
.github/workflows/release.yml, .github/workflows/release-policy.yml, scripts/pypi-wheel-set.test.ts, scripts/release-workflow.test.ts
The PyPI job prepares, publishes, and verifies versioned wheels. Reusable workflow references use new pinned revisions. Changelog inputs and credentials are removed. Tests assert the pinned actions, wheel settings, and release-only credentials.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🔵 Low · up to 24c58

This PR preserves the intended PyPI trusted-publisher identity while keeping artifact preparation, verification, and release finalization gated. If an upload is interrupted after only some wheels are accepted, the public release may be temporarily incomplete and retry behavior is not fully established, so it is mergeable with explicit owner awareness of recovery handling.

Sequence Diagram(s)

sequenceDiagram
  participant PyPIJob
  participant PypiPublishHardened
  participant PypaPublishAction
  participant PypiPublishVerify
  PyPIJob->>PypiPublishHardened: Prepare versioned wheels in dist
  PypiPublishHardened->>PypaPublishAction: Publish wheels with skip-existing
  PypaPublishAction->>PypiPublishVerify: Verify published files
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarises the main change: preserving the PyPI Trusted Publisher identity in the release workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pypi-publisher-boundary

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2a6226e6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/release.yml
@jan-kubica
jan-kubica force-pushed the fix/pypi-publisher-boundary branch from 24c58b0 to b8011d9 Compare August 30, 2026 19:13
@jan-kubica
jan-kubica force-pushed the fix/pypi-publisher-boundary branch from b8011d9 to bbac4e1 Compare August 30, 2026 19:28
@jan-kubica
jan-kubica merged commit d888c15 into main Aug 30, 2026
15 checks passed
@jan-kubica
jan-kubica deleted the fix/pypi-publisher-boundary branch August 30, 2026 19:35
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant