Skip to content

fix(release): bind the Windows signing record to the published asset's digest - #8847

Merged
lidge-jun merged 2 commits into
devfrom
fix/release-signing-record-digest
Nov 16, 2026
Merged

lidge-jun merged 2 commits into
devfrom
fix/release-signing-record-digest

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes the stale signing claim CodeRabbit raised on the merged #8780 (review thread PRRT_kwDOS-0Gi863ysk-).

Problem. Each Windows release leg uploads a signing-outcome record with continue-on-error: true, and overwrite: true was the only thing that retired an older record. The record held only {schema, kind, signed}, and the publish job trusted whatever it downloaded. So if attempt 1 signed and uploaded signed: true, and a re-run rebuilt the files without signing but failed to upload its record, attempt 1's record survived. The release notes then said "signed" for an unsigned asset.

Change.

  • scripts/ci/windows-signing-outcome.sh takes the packaged file as a third argument. It writes schema ocx.windows-signing-outcome/2 with sha256 (that file's digest) and attempt (GITHUB_RUN_ATTEMPT). With no hashable file, the record has sha256: null and never records signed.
  • .github/workflows/release.yml: the record and upload steps now run after the file the leg publishes exists. That is after Archive standalone release for ocx-<version>-bun-windows-x64.zip and after Rename release assets for OpenCodex-<version>-windows-x64.msi. Each step passes that path in a PACKAGED_FILE env value. The publish job passes the verified release receipt it already downloads (verification/receipt.json, the per-asset digests attach-release holds the release to) as --release-receipt.
  • scripts/release-signing-footer.ts reports a file as signed or unsigned only when the record's sha256 equals the receipt's digest for that version's Windows asset. A mismatched, unbound, earlier-schema or other-version record reads as "signing outcome not recorded; treat it as not code-signed", and so does a missing receipt.
  • Action pins, permissions and secret use are unchanged. The steps were moved within their jobs and gained one env value each.

Before: a stale signed: true from attempt 1 plus a failed upload in attempt 2 gave "ocx.exe and the MSI installer … are Authenticode-signed". After: the digests differ, so the notes say "The Windows files in this release are not code-signed. The release run recorded no signing outcome for them." If only one file mismatches, the notes list that file as "signing outcome not recorded".

Security review required. This changes release automation (.github/workflows/release.yml, the release-notes signing statement). Under MAINTAINERS.md it needs an independent release-security review before merge.

Docs: structure/ops/windows-code-signing.md, and the English and Spanish reference/code-signing.md pages now say that a record counts only when its digest matches the published file. The Turkish page has no paragraph on the release-body statement, so nothing there contradicts this.

Verification

  • Regression on origin/dev (950b7d9): the extended tests/ci-workflows/release-windows-signing-outcome.test.ts fails to load because readPublishedWindowsDigests is missing. With only that export shimmed onto origin/dev's footer, script and workflow, it runs at 8 pass / 10 fail. The failures include a stale signed record from an earlier attempt never vouches for a re-run's assets (the old reader reports signed for the stale record) and a record whose digest differs from the published asset reads as not recorded for that file.
  • With the fix: bun test tests/ci-workflows/release-windows-signing-outcome.test.ts: 18 pass / 0 fail.
  • All 14 test files that parse release.yml (ci-scope-gaps, ci-workflows, install-scripts, keyring-smoke, release-desktop-scripts, release-helper, release-notes, release-outcome-report, release-pipeline-contract, release-preflight, release-resume-identity, release-version-sources, release-windows-signing-outcome, release-windows-signing): 486 pass / 0 fail.
  • build-release-changelog, docs-link-targets, docs-spanish-localization, file-size-ratchet, repo-hygiene: 101 pass / 0 fail.
  • bun run typecheck, bun run structure:check, bun run privacy:scan: pass. shellcheck scripts/ci/windows-signing-outcome.sh and actionlint .github/workflows/release.yml: clean.
  • All tests ran on macOS under /usr/bin/lockf -k /tmp/ocx-test.lock. The full suite was not run locally; this lane is limited to focused files, so the rest is left to ci:full.
  • Not exercised: a real Windows release run (Git Bash sha256sum -b on the runner, the artifact re-run path). That needs a release dispatch, which is out of scope here.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (No new permissions, secrets, or action refs. An independent release-security review is still required per MAINTAINERS.md.)

Summary by CodeRabbit

  • Bug Fixes
    • Windows release files are reported as signed only when their recorded SHA-256 digest matches the published file. Missing, invalid, outdated, or mismatched signing records are treated as unrecorded rather than verified, helping prevent stale results from a previous release attempt from affecting signing status.
  • Documentation
    • Updated release signing-status guidance to explain how files are classified, including when a release has no signing results.

…s digest

The signing-outcome upload continues on error and overwrite was its only
invalidation, so a re-run whose upload failed could leave an earlier
attempt's signed: true in the run, and the release notes then claimed
"signed" for an asset rebuilt unsigned.

The record (schema ocx.windows-signing-outcome/2) now carries the packaged
zip's or MSI's sha256 and GITHUB_RUN_ATTEMPT, written after packaging. The
footer reports "signed" only when that digest equals the verified release
receipt's digest for the version's Windows asset; otherwise "not recorded".

Review thread: PRRT_kwDOS-0Gi863ysk- (#8780).
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner November 16, 2026 16:09
@lidge-jun lidge-jun added the ci:full Run the four full Ubuntu test shards on this pull request label Nov 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T16:42:24.803577Z 17e617d Manual request
ℹ️ 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

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The release workflow records Windows signing outcomes with packaged-asset digests and run attempts. The changelog builder compares those records with asset digests in the verified release receipt. Tests and documentation cover the record format and signing-status rules.

Changes: Windows signing outcome verification

Layer / File(s) Summary
Record packaged asset signing outcomes
.github/workflows/release.yml, scripts/ci/windows-signing-outcome.sh, tests/ci-workflows/release-windows-signing-outcome.test.ts
The workflow passes the packaged ZIP or MSI path to the outcome script after packaging. The script records the file digest and run attempt in schema version 2. Tests cover these records and workflow steps.
Match signing records to published assets
scripts/release-signing-footer.ts, scripts/build-release-changelog.ts, .github/workflows/release.yml, tests/ci-workflows/release-windows-signing-outcome.test.ts, structure/ops/windows-code-signing.md, docs-site/src/content/docs/{,es/,tr/}reference/code-signing.md
The changelog builder reads Windows asset digests from the verified receipt. The footer accepts a record as signed only when its fields and digest match the receipt. Tests and documentation cover matching, missing, malformed, and stale records.

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

Change: Bug fix

Possibly related PRs

  • lidge-jun/opencodex#8780: Introduces the Windows signing-outcome records and release footer whose record format and digest validation this change updates.
Merge Risk: Minimal · up to 17e61

The change makes Windows signing status on release pages depend on a matching SHA-256 digest, so stale records no longer describe the wrong asset. No concrete merge-blocking risk was found; the author notes that a real release run and an independent release-security review are still pending.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the primary change: the Windows signing outcome record is now bound to the published asset's SHA-256 digest. The raw summary and objectives confirm that records now carry the packaged …
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: Title check

Explanation

The title names the primary change: the Windows signing outcome record is now bound to the published asset's SHA-256 digest. The raw summary and objectives confirm that records now carry the packaged file digest and attempt, and the footer checks them against the release receipt. The title is specific and matches the changeset, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f3990d0 and 17e617d.

Files selected for processing: 2

  • docs-site/src/content/docs/tr/reference/code-signing.md
  • tests/ci-workflows/release-windows-signing-outcome.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

…d cover swapped records

The Turkish code-signing reference still carried the #8780 wording; it now says a
Windows file reads as signed only when the recorded SHA-256 matches the published
file, and that a file without such a record is listed as not recorded.

The signing-outcome tests used one digest for both kinds, so a reader that matched
a record against any published digest, or the other kind's, still passed. A new
case publishes distinct zip and MSI digests with the records swapped and requires
both files to read as not recorded, with a paired control that reads as signed.
@lidge-jun

Copy link
Copy Markdown
Owner Author

@codex review

@lidge-jun

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 17e617d9fc

ℹ️ 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".

@lidge-jun
lidge-jun merged commit 692657b into dev Nov 16, 2026
39 checks passed
@lidge-jun
lidge-jun deleted the fix/release-signing-record-digest branch November 16, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:full Run the four full Ubuntu test shards on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant