Skip to content

chore: add hk pre-push config and pin the Test runner (RIG-9272) - #10

Merged
mattwilkinsonn merged 9 commits into
rigel-releasefrom
dependencies/rig-9272-publish-solid-virtual-tarball-to-github
Nov 11, 2026
Merged

mattwilkinsonn merged 9 commits into
rigel-releasefrom
dependencies/rig-9272-publish-solid-virtual-tarball-to-github

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

🎯 Changes

Three CI changes for the fork.

1. Hk pre-push config (hk.pkl). The pre-push hook runs the fork release contract tests before push. default_branch is now origin/rigel-release. The local rigel-release branch does not exist in a worktree, so the old value fell back to an empty-tree base.

2. Hook git isolation (.github/scripts/*.test.mjs). A pre-push hook in a linked worktree exports GIT_DIR. The test scripts passed process.env to every child git, so scratch-repo writes reached the real repo. Both files now build one child env with GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, and GIT_COMMON_DIR removed. A regression test points GIT_DIR at a sentinel repo and asserts its refs are unchanged. It fails without the scrub.

3. Test runner pin, RIG-9206 (.github/workflows/pr.yml). The Test job runs on ubuntu-24.04. ubuntu-latest now resolves to an image Playwright does not support for chromium, so playwright install chromium failed on every PR.

Why only Test is pinned. Test is the only PR-gate job that installs chromium. preview, provenance, version-preview, and CI do not run Playwright. release.yml and publish-rigelbuild.yml also install chromium on ubuntu-latest. This PR does not change them, so they keep the same exposure.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr. Both test scripts pass on a VM with the fixed tree; CI is the verification for the Test job.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Spec-impact: none

Refs RIG-9272

Co-authored-by: Matt Wilkinson matt@rigel.build

rigel-mintaka and others added 2 commits November 10, 2026 23:48
The tag publisher now packs @rigelbuild/solid-virtual once, uploads the
tarball and a SHA256SUMS file as a workflow artifact, and attaches both to a
GitHub Release for the same vX.Y.Z-rigel.N tag.

The release job runs only after the npm publish succeeds, so an asset never
exists for an unpublished version. The packed tarball is the one npm received,
with workspace:* already rewritten to the real virtual-core version.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
Add a minimal hk pre-push step that parses the tag publisher workflow with yq.
It mirrors the devenv release-workflow check so a malformed publisher is caught before push.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Nov 11, 2026

Copy link
Copy Markdown

RIG-9272

@github-actions

Copy link
Copy Markdown

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

rigel-mintaka and others added 2 commits November 11, 2026 00:50
The tarball is packed before npm publish, uploaded as an artifact, and that exact file is published. The GitHub Release asset is then the npm tarball byte for byte, and a failure after npm accepts the version leaves the asset to attach.

The contract test now asserts pack, upload, then publish order, a single contents: write held by the release job, and --verify-tag. The hook runs the node contract tests over the workflow and script globs. The header comment names the release job.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
The contract test stores the pack, upload, and publish indexes and asserts each is found before comparing order, so a deleted or renamed step fails the test. The contents: write count is null-safe.

The upload comment now states only what the ordering guarantees: the asset is the file npm receives, and no step runs after publish.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka

Copy link
Copy Markdown
Collaborator Author

Review: round 1 at 1e553b2 found 1 medium and 3 lows, all fixed in 74e0c9f. Round 2 (interdiff) found 2 lows, fixed in 4ff2dbb. All-clear at 4ff2dbb.

Wrap the verify-tag assertion as prettier 3.7 formats it, so the autofix job stops rewriting .github/.

Co-authored-by: Matt Wilkinson <matt@rigel.build>
Matt ruled on RIG-9386: @rigelbuild/solid-virtual stays an npm dependency, with no flake pin and no release asset. This restores the publisher and its contract test to rigel-release, so this PR carries only hk.pkl.

Refs RIG-9386

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka rigel-mintaka changed the title feat(ci): publish solid-virtual tarball to GitHub Releases (RIG-9272) chore: add hk pre-push config (RIG-9272) Nov 11, 2026
rigel-mintaka and others added 2 commits November 11, 2026 02:35
Co-authored-by: Matt Wilkinson <matt@rigel.build>
The ubuntu-latest image moved to 26.04, which Playwright does not support for chromium. The Test job fails at browser install on every PR. Pinning the runner keeps the Test job on a supported image until Playwright catches up.

Stacked on virtual#10 (RIG-9272 chain) so the hk pre-push gate sees hk.pkl.

Refs RIG-9206

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka rigel-mintaka changed the title chore: add hk pre-push config (RIG-9272) chore: add hk pre-push config and pin the Test runner (RIG-9272) Nov 11, 2026
…RIG-9272)

A pre-push hook in a linked worktree exports GIT_DIR. Both fork release test scripts spread process.env into every child git call, so their scratch-repo writes landed in the real repo. Build one child env with GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, and GIT_COMMON_DIR removed, and pass it to every spawn. Add a sentinel regression test that fails without the scrub.

Set hk default_branch to origin/rigel-release. The local rigel-release branch does not exist in a worktree, so hk fell back to an empty-tree base.

Refs RIG-9272

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka

Copy link
Copy Markdown
Collaborator Author

Review: 7b41922 round found 1 high (hook GIT_DIR leaking into test git calls), fixed in b8b7377 with a sentinel regression test; default_branch low fixed; the runner-pin low is answered in the body (only Test installs chromium). Review all-clear at b8b7377; checks green.

@rigel-mintaka
rigel-mintaka marked this pull request as ready for review November 11, 2026 08:21
@mattwilkinsonn
mattwilkinsonn merged commit 038dd20 into rigel-release Nov 11, 2026
9 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.

2 participants