Skip to content

ci: release tags push to nix.moq.dev instead of Cachix (backport) - #8062

Merged
kixelated merged 2 commits into
releasefrom
backport/cachix-retire
Nov 6, 2026
Merged

kixelated merged 2 commits into
releasefrom
backport/cachix-retire

Conversation

@kixelated

@kixelated kixelated commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Backports the Nix cache switch to release for the quest cachix-retire. Tags run release's copies of the workflows, so until this lands every tag (through moq-relay-v0.17.13 on 2026-11-05) pushes to Cachix and never reaches nix.moq.dev.

  • Adds main's release-nix.yml, with release's libmoq-v* tag and libmoq flake attribute in place of main's moq-c-v*/moq-c.
  • Adds the infra/nix Just module and mod nix in infra/justfile, so just infra nix push exists on release. Unlike main, release's aggregate just infra deploy leaves the worker out, so a release checkout never rolls nix.moq.dev back to an older worker. Its local actions (.github/actions/nix, .github/actions/just) already exist on release.
  • Deletes cachix.yml, and replaces cache.yml with main's, whose jobs run only on main. release's copy had a dispatch-only warm job that ran cachix push kixelated with CACHIX_AUTH_TOKEN.
  • flake.nix's nixConfig names nix.moq.dev (with main's key and fallback = true) instead of kixelated.cachix.org. Without it, nix run github:moq-dev/moq/<tag>#moq-relay --accept-flake-config would never ask nix.moq.dev. Tags cut before this keep naming Cachix, which stays read-only.
  • alert.yml watches Release Nix instead of Cachix; doc/setup/install.md names nix.moq.dev as the tag cache.

Choices made while backporting:

  • Took main's cache.yml verbatim, as the quest's Plan says, rather than deleting it. It is inert on release (if: github.ref == 'refs/heads/main'), and its just gh cache recipes exist only on main; keeping it identical keeps the m2 merge of main clean.
  • Left out main's infra/README.md Nix section and the read-side Cachix extra-substituters in release's other workflows. Reads from the read-only Cachix cache keep working after the token goes.

Public API: none. Wire: none.

Validation

  • just gh check passes (actionlint; alert.yml watches all 30 non-PR workflows; check-runs.ts).
  • zizmor on the three changed workflows: one error, the pre-existing dangerous-triggers on alert.yml's workflow_run (also on release); the rest are low self-repository hints shared with main.
  • just --list infra::nix lists the module; just -n infra nix push nix-moq-dev ./result renders the nix copy to the release bucket.
  • nix eval .#packages.x86_64-linux.{moq-relay,moq,moq-boy,libmoq,moq-gst}.name all evaluate with the new nixConfig.
  • infra/nix: bun test 23 pass; biome and remark clean.

Review

  • Reviewer: Codex, gpt-6.1-sol, medium effort, rounds 1-3 against origin/release (a005c7a).
  • Head: 65e1fcf. Round 3: no findings.
  • Round 1, refuted: cache.yml names recipes only main has. It runs from the triggering ref's copy, so main runs main's, and both jobs here skip off main (if: github.ref == 'refs/heads/main').
  • Round 1, refuted as out of scope: infra/nix worker tests are not in CI. main does not run them either, and the worker deploys from main; listed as a follow-up on the quest PR.
  • Posted reviews on 2521448: OpenAI found nothing. Pullfrog's two findings are fixed in 65e1fcf (worker left out of release's just infra deploy; the README pointer names main's copy). Its libmoq-v* note needs nothing: cache-write already admits libmoq-v*.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Backports main's Release Nix workflow, the infra/nix Just module, and
main's cache.yml to release, and deletes cachix.yml, so tags cut from
release push their packages to nix.moq.dev and nothing on release
writes to Cachix. The workflow matches release's libmoq-v* tag and
libmoq flake attribute, and release's flake now names nix.moq.dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed head: 252144833958f7589ed617c517997a6f68f319f8 against a005c7ad9a7fb018dca745cc27321ac9564d9c1b.

No actionable code findings identified.

Direction: this backport addresses the release branch's remaining Cachix writers without changing the package or wire APIs. I checked the tag-to-flake mapping, local Nix/just actions, module wiring, signing/upload helper, cache-reader configuration, and Worker behavior/tests. The libmoq-v* adaptation matches release's libmoq output. The imported cache workflow and Worker/helper files match main; both cache jobs skip refs other than main.

Rollout prerequisite already documented in the PR: confirm cache-write admits libmoq-v* before the next libmoq tag. I did not independently verify the live environment policy.

Limits: GitHub-only source and diff review. No local builds/tests, credential checks, deployment, or end-to-end cache publication were performed. CI was still running at review time, so this is not a clean-CI or deployment sign-off.

(Written by review (OpenAI))

@pullfrog pullfrog Bot 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.

ℹ️ Minor suggestions only.

Reviewed changes

  • Release Nix replaces Cachix: cachix.yml becomes a backport of main's release-nix.yml (git shows it as a rename, so the tag trigger list is unchanged), with libmoq-v*/libmoq in place of main's moq-c-v*/moq-c in both the trigger list and the derive-package regex. It runs in cache-write, uses .github/actions/{nix,just}, and pushes with just infra nix push nix-moq-dev ./result instead of cachix push/cachix pin.
  • infra/nix backported verbatim from main: the worker, its tests, wrangler.jsonc, lifecycle.json, and the deploy/create/lifecycle/push/keygen recipes, plus mod nix and just nix deploy in infra/justfile.
  • cache.yml replaced with main's copy: both jobs are guarded to refs/heads/main, so the file is inert on release, including its just gh cache/cache-runtime steps whose recipes exist only on main.
  • Cache endpoint and alerts: flake.nix's nixConfig names nix.moq.dev with main's key and fallback = true; alert.yml drops Cachix and watches Release Nix; install.md names the new tag cache.

I checked the backport against main: infra/nix/** and cache.yml are byte-identical, and release-nix.yml differs only by the libmoq substitutions. release's flake exposes packages.libmoq, and the release tags ruleset does cover refs/tags/libmoq-v*.

ℹ️ libmoq-v* tag runs are refused until the cache-write policy lands

The cache-write Environment admits moq-c-v* but not libmoq-v*, while the old publish Environment (which cachix.yml used) did admit it, so this PR turns currently-working libmoq tag runs into jobs that fail at environment admission. The body's follow-up and command are correct and scoped to this one tag; the only thing worth adding is the timing, since libmoq tags are cut roughly daily (0.6.22 and 0.6.23 both on 2026-11-05) and alert.yml now pages on Release Nix failures.

Technical details
# cache-write does not admit libmoq-v*

## Affected sites
- `.github/workflows/release-nix.yml:16` — triggers on `libmoq-v*`
- `.github/workflows/release-nix.yml:25` — `environment: cache-write`
- Environment policies (repo settings, not this repo's files):
  `main`, `gh-readonly-queue/main/*`, `moq-relay-v*`, `moq-cli-v*`,
  `moq-boy-v*`, `moq-c-v*`, `moq-gst-v*`. No `libmoq-v*`.

## Required outcome
The first `libmoq-v*` tag after this merges must be able to enter
`cache-write`, or the tag must not be listed here yet.

## Suggested approach
Land the policy change before (or with) the merge:
`gh api -X POST repos/moq-dev/moq/environments/cache-write/deployment-branch-policies -f name='libmoq-v*' -f type=tag`
The other four tag patterns already work; `moq-c-v*` is now unused.

## Open questions for the human
If the policy cannot land promptly, is dropping `libmoq-v*` from the trigger
and adding it back with the policy better than a stream of failed tag runs?

(Written by DeepSeek V4.1 Flash 1017)

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

Comment thread .github/workflows/release-nix.yml Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Fixed pullfrog's README-pointer and worker-deploy findings in 65e1fcf: release's just infra deploy leaves the nix.moq.dev worker out, and release-nix.yml points at main's infra/README.md. The libmoq-v* Environment policy is a maintainer step recorded in the body, to land before this merges rather than dropping libmoq from the trigger.

(Written by Claude Opus 5.5)

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Incremental review of 252144833958f7589ed617c517997a6f68f319f8 → 65e1fcf05a31eabdd6c68ded98d6b0272d7e1c65.

No new actionable findings. The two-file change removes the Nix Worker from release's aggregate just infra deploy while retaining mod nix for cache uploads, and directs the workflow's documentation pointer to main. This resolves the accidental Worker rollback path identified in the earlier discussion without changing release publication.

The PR now explicitly makes the libmoq-v* environment-policy update a prerequisite to merging; its live configuration remains unverified here.

Limits: GitHub-only review of the incremental diff and complete changed files. No local execution, deployment, or end-to-end publication test; not a CI sign-off.

(Written by review (OpenAI))

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • release-nix.yml header points at main's docs: the comment now says "see main's infra/README.md" instead of pointing at a section absent from release's copy.
  • release's aggregate deploy no longer touches the Nix worker: just nix deploy is removed from infra/justfile's deploy, with a comment explaining the worker deploys from main, so a release checkout cannot roll nix.moq.dev back. mod nix stays so just infra nix push still exists for Release Nix.

Both changes address the prior inline finding, and the thread is resolved. The only remaining item is the maintainer-only cache-write deployment policy for libmoq-v*, already documented in the PR body.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@kixelated
kixelated merged commit 888858e into release Nov 6, 2026
22 checks passed
@kixelated
kixelated deleted the backport/cachix-retire branch November 6, 2026 21:38
@kixelated

Copy link
Copy Markdown
Collaborator Author

Checked 2026-11-06: the cache-write Environment already admits libmoq-v* tags (alongside moq-c-v*, moq-cli-v*, moq-relay-v* and others), so no policy change is needed before merging this backport.

(Written by Claude Opus 5.5 with high)

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