Skip to content

Validate the trunk merge for #28 (do not merge) - #394

Closed
mokagio wants to merge 6 commits into
trunkfrom
mokagio/windows-signing-trunk-merge-check
Closed

Validate the trunk merge for #28 (do not merge)#394
mokagio wants to merge 6 commits into
trunkfrom
mokagio/windows-signing-trunk-merge-check

Conversation

@mokagio

@mokagio mokagio commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Validation only — do not merge. Throwaway PR to prove #28 still works on current trunk. Close it once CI has answered; the merge commit it carries is what I intend to push to #28's own branch.

Why

#28 was opened on 2026-07-06 and trunk has moved a long way since — 164 commits, including the move of test/ to tests/unit/, dist:win gaining its own renderer build (#122), and the whole GitHub Actions suite (#68, #362). Merging trunk into it produced three conflicts. This PR exists so CI answers whether my resolutions are right, rather than me asserting it.

What changes

Nothing of its own. The head is hardening/windows-buildkite-signing-verification with origin/trunk merged in, so the diff against trunk is what #28 actually still contributes after the merge — three files, down from five.

The two that vanished did so because #27 already landed them: scripts/azure-sign.cjs and its suite are now identical to trunk, which is the clearest evidence the conflict resolutions went the right way.

The three conflicts, all resolved toward trunk:

  • .buildkite/pipeline.yml — the branch ran npm run build:once as its own step before npm run dist:win. trunk's dist:win now chains build:once itself, so the step is redundant. The hardening the branch adds — Invoke-NativeCommand around the native calls, and the extracted verify_windows_signature.ps1 — is kept.
  • scripts/azure-sign.cjstrunk landed the same /debug passthrough with an explanatory comment. Kept the comment.
  • test/azure-sign.test.cjstrunk moved the suite to tests/unit/, so the require gains a path segment.

How to test this

Platforms: any — the question is whether CI is green, and the interesting jobs are the ones that run on macOS and Windows themselves.

Starting state: this branch, with node_modules installed per AGENTS.md § Bootstrap.

  1. Watch unit (macos-latest), unit (windows-latest), eslint, and the four E2E jobs on this PR. All must pass.
  2. Locally, npm test — 1046 passing on macOS at the time of writing — and npm run lint, clean.
  3. Read the .buildkite/pipeline.yml diff against trunk and confirm the Windows step still fails closed: $ErrorActionPreference, Invoke-NativeCommand on both native calls, and verification delegated to the script.

What must not have happened: a conflict resolved by quietly dropping one side. The renderer bundle is the one to check — if build:once no longer runs before packaging, dist:win produces an artifact with a stale or missing bundle and nothing in the unit suite notices. The packaged smoke job in e2e.yml is what would catch it.

Risks and limitations

The Buildkite side is not validated at all, and not for the reason I expected. No Buildkite build reported against this PR — nor against #28, nor #392: all three have zero commit statuses and no Buildkite check runs. So the Windows signing path #28 hardens has never been exercised by CI on any pull request, and this PR cannot change that. Worth confirming separately whether the pipeline is meant to build pull requests.

Relatedly, #28 currently shows no checks whatsoever — its head predates every workflow, and GitHub does not retroactively run a workflow on an open PR when it lands on the base branch. Pushing this merge to #28's branch will trigger Actions on it for the first time.

A second commit drops the :node: Tests Buildkite step. It was right when written — npm test ran in no CI at all on 2026-07-06 — but #68 landed three weeks later and now runs the unit suite on macOS and Windows across two Node runtimes. The suite needs no secrets, which is the whole basis of #65's split: everything secretless on Actions, Buildkite only for signed artifacts. The green Actions run on this PR is the evidence for that condition.

Related

Validates the trunk merge for #28. Shaped after #392.

ashfame and others added 5 commits July 6, 2026 20:59
Three conflicts, all resolved in trunk's favour:

- `.buildkite/pipeline.yml`: this branch ran `npm run build:once` as its own
  Buildkite step before `npm run dist:win`.
  Trunk's `dist:win` now chains `build:once` itself (#122), so the explicit step
  is redundant.
  The hardening this branch adds — `Invoke-NativeCommand` around the native
  calls, and the extracted `verify_windows_signature.ps1` — is kept.
- `scripts/azure-sign.cjs`: trunk landed the same `/debug` passthrough with an
  explanatory comment; kept the comment.
- `test/azure-sign.test.cjs`: trunk moved the suite to `tests/unit/`, so the
  `require` of `scripts/azure-sign.cjs` gains a path segment.

`npm test` (1046 passing) and `npm run lint` are green on the merge result.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mokagio mokagio self-assigned this Aug 21, 2026
@mokagio
mokagio marked this pull request as ready for review August 21, 2026 02:28
Copilot AI balanced review requested due to automatic review settings August 21, 2026 02:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Validation-only PR carrying #28’s Windows signing hardening after merging current trunk.

Changes:

  • Makes Windows native build commands fail closed.
  • Validates signing tools and packaged artifact identity.
  • Adds a Buildkite unit-test step.

Review findings: 1 [fix here] · 0 [follow-up].

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.buildkite/pipeline.yml Hardens Windows execution and delegates signature verification.
.buildkite/commands/verify_windows_signature.ps1 Verifies artifacts and signer identity.
.buildkite/commands/setup_windows_code_signing.ps1 Adds integrity checks for signing tools.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Write-Host "$Description Authenticode signature is valid: $subject"
}

Assert-SigningToolIntegrity `
Added here on 2026-07-06, when `npm test` ran in no CI at all.
#68 landed three weeks later and now runs the unit suite in GitHub Actions on
macOS and Windows, on both the system Node and the one Electron bundles — so
this step is a strict subset of that, on a self-hosted agent that holds the
signing credentials.

The suite needs no secrets, which is what makes Actions the right place for it:
#65 sets the split as everything secretless on Actions, Buildkite only for the
signed artifacts, and lists "Buildkite stays untouched and keeps producing the
signed artifacts" as a constraint.

---

Generated with the help of Claude Code, https://claude.com/claude-code

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mokagio mokagio closed this Aug 21, 2026
@mokagio
mokagio deleted the mokagio/windows-signing-trunk-merge-check branch August 21, 2026 02:49
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.

3 participants