Skip to content

Release: publish from a verified self-dispatch (Trusted Publishing rejects workflow_run) - #24

Merged
proggeramlug merged 1 commit into
mainfrom
fix/release-dispatch-publish
Sep 15, 2026
Merged

proggeramlug merged 1 commit into
mainfrom
fix/release-dispatch-publish

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

The alpha.3 publish failed at the OIDC token exchange (run 34931485896):

Trusted Publishing does not support the workflow_run event trigger due to security concerns. Please use a different trigger such as push, release, or workflow_dispatch.

Change

  • release.yml keeps its workflow_run stage (verify, release-pr).
  • New dispatch-publish job: when the verified commit is a merged release-plz-* PR, it runs gh workflow run release.yml --ref main -f sha=… -f ci_run_id=… with actions: write.
  • Dispatched run: verify checks both inputs through the API again, running main's own check-ci.py (checkout github.sha) rather than the input commit's scripts. publish runs only on workflow_dispatch with release == 'true', still behind the crates-io environment approval, and checks out inputs.sha.
  • release.py publish now requires GITHUB_EVENT_NAME == workflow_dispatch.
  • Trusted Publisher config (release.yml + crates-io) is unchanged, so no crates.io settings change.
  • RELEASING.md documents the flow and the manual dispatch fallback.

Verified

scripts/ci/lint-workflows.py passes: actionlint, zizmor (no findings) and shellcheck.

After merge

The alpha.3 commit 0ef71c9 still carries the old release.py, so the next merged release-plz PR publishes the still-unpublished 0.1.0-alpha.3 through the new path.

…jects workflow_run)

The alpha.3 publish job (run 34931485896) failed at the OIDC exchange:
'Trusted Publishing does not support the workflow_run event trigger due to
security concerns. Please use a different trigger such as push, release, or
workflow_dispatch.'

release.yml keeps its workflow_run stage (verify + release-pr). When the
verified commit is a merged release-plz PR, a new dispatch-publish job
dispatches release.yml itself on main with the SHA and CI run ID. The
dispatched run verifies both inputs again with main's own verifier script
(checkout github.sha, never the input commit's scripts) before its publish job
- still behind the crates-io environment approval - checks out the release
commit. The Trusted Publisher config (release.yml + crates-io) is unchanged.
release.py publish now requires workflow_dispatch. actionlint, zizmor and
shellcheck pass.
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 51 minutes.

Check out review usage here.

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: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 8dc63c4f-0782-43d9-840a-0fe1e4e1765c

📥 Commits

Reviewing files that changed from the base of the PR and between f6fc128 and e419250.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • RELEASING.md
  • scripts/ci/release.py

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.

@proggeramlug
proggeramlug merged commit 79a3406 into main Sep 15, 2026
75 of 77 checks passed
proggeramlug added a commit that referenced this pull request Sep 15, 2026
loop_drop_terminates_live_children_and_releases_their_handles sampled
GetProcessHandleCount once per cycle and compared it to an exact baseline. It
failed on windows-2025 in PR #24's run 34941544032 with 83 against 82, on a PR
that only changed release scripts (issue #26).

The outstanding handle is a WaitCompletionPacket, and it is not leaked. The
backend learns a child exited through RegisterWaitForSingleObject, which the
thread pool backs with such a packet. UnregisterWaitEx(INVALID_HANDLE_VALUE) is
the strongest join Windows documents and it joins the callback; the pool closes
its own packet afterwards, on its own threads. An instrumented 192-cycle sweep
on windows-2025 (run 34954538795) saw the table oscillate 130 -> 131 -> 130,
gaining and releasing exactly one WaitCompletionPacket, on 117 to 138 of the 192
rounds with eight busy threads, and move zero times on the same idle runner.

So the comparison stays exact and gains a bounded deadline instead of a single
sample: settled() requires the count to be exactly the baseline again within
five seconds. A leaked handle never comes back and still fails, and now names
itself -- handle_table walks this process's handle table with
GetHandleInformation and NtQueryObject(ObjectTypeInformation), and the failure
reports what the table gained and released. The two other whole-process handle
comparisons in this file get the same treatment for the same reason.
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