Skip to content

Migrate ZIPs rendering to nix build, add merge-acceptance gates, and introduce repo formatting workflow#12

Draft
shielded-nate with Copilot wants to merge 13 commits into
mainfrom
copilot/add-flake-output
Draft

Migrate ZIPs rendering to nix build, add merge-acceptance gates, and introduce repo formatting workflow#12
shielded-nate with Copilot wants to merge 13 commits into
mainfrom
copilot/add-flake-output

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown

This PR aligns local/CI rendering on flake-based nix build outputs and reduces working-tree noise from Nix artifacts. It also introduces a markdown formatting workflow (dprint) and updates repository script layout to support consistent automation.

  • Flake outputs and Nix artifact hygiene

    • Added /result to .gitignore.
    • Added flake package outputs for all, all-zips, all-specs, with default as all.
    • Kept output shape compatible with existing render consumption (rendered/ + README.rst).
  • Production render path switched to nix build

    • Updated .github/actions/render/action.yml to build via flake and copy from ./result into workspace outputs.
    • Ensures production render step consumes the same build product expected by local Nix workflows.
  • Merge acceptance workflow

    • Added merge-acceptance workflow for PR/manual runs.
    • Runs full nix build render path.
    • Adds formatting gate with ./scripts/format.sh check.
    • Sets explicit minimal workflow token permissions (contents: read).
  • Developer shell and formatting tooling

    • Added dprint to nix develop shell.
    • Made markdown plugin available via flake input (flake = false) and local vendored WASM path.
    • Added dprint.json targeting repo markdown files.
  • Script layout and command surface

    • Moved top-level .sh/.py scripts into ./scripts/.
    • Updated references in Makefiles and script usage strings to new paths.
    • Added ./scripts/format.sh with help, check, rewrite, and commit-rewrite behaviors (including clean-tree enforcement for commit mode).
# .github/actions/render/action.yml
- name: Render with nix build
  shell: bash
  run: |
    nix build
    cp -a ./result/rendered/. ./rendered/
    cp -a ./result/README.rst ./README.rst

Copilot AI added 13 commits June 11, 2026 17:01
- Include `/result` in `.gitignore`, so that when developers run `nix build`, their `git` workspace will not be dirty.
- Add a flake output so that `nix build` has flake outputs for `all`, `all-zips`, and `all-specs` corresponding to the `Makefile` targets of the same name, and the flake `default` output is a synonym for `all`.
- Modify the run step in https://github.com/zcash/zips/blob/a2a71f2b2d05248102f87a079c048c1701d0ceb0/.github/actions/render/action.yml#L21-L22 of `.github/actions/render/action.yml` to replace `nix develop ...` with `nix build && cp <correct options> ./result/ <whatever is necessary>` such that this PR does not introduce any noticeable changes or regressions for the main production render result. Note: selecting the correct `cp` options and destination argument and defining the `all` flake output must be coordinated to achieve this goal, so this commit may also adjust the `all` flake output.
- Add a `merge acceptance` Github action, if it does not already exist, and ensure the `merge acceptance` action can successfully complete a full render with `nix build`. (Note: because this PR also replaces the production render pipeline with `nix build`, this acceptance criteria should match production rendering.)
- Add `dprint` to the `nix develop` shell, and ensure it has the plugin `https://plugins.dprint.dev/markdown-0.19.0.wasm` available. If that plugin is not already packaged into a pre-existing `dprint` package, then include it as a `flake = false` flake input.
- Move the top-level scripts which end with `.sh` or `.py` into a new `./scripts` directory and adjust all source, including github actions, other scripts, makefiles, Dockerfile, etc... as well as all documentation to rely on these new paths.
- Add a new script into this directory called "format.sh" which takes one cli argument for the "subcommand" which is either `check`, `rewrite`, `commit-rewrite`, or `help`/`--help`. In this initial version the only formatting implemented is using `dprint` to process all `.md` files in the repo.
- Add into the `merge acceptance` Github action a step which runs `./scripts/format.sh check` and blocks the merge if it fails.
Copilot AI changed the title Switch rendering pipeline to nix build and add formatting workflow support Migrate ZIPs rendering to nix build, add merge-acceptance gates, and introduce repo formatting workflow Jun 11, 2026
Copilot AI requested a review from shielded-nate June 11, 2026 17:14
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