Skip to content

T92 — Ship min-answerer in every release that ships min, link-clean and signed - #1971

Merged
norrietaylor merged 10 commits into
mainfrom
agent/1948-ship-min-answerer-in-every-release-that-ships-mi
Oct 5, 2026
Merged

norrietaylor merged 10 commits into
mainfrom
agent/1948-ship-min-answerer-in-every-release-that-ships-mi

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

T92 — Ship min-answerer in every release that ships min, link-clean and signed

slice: S9
kind: task
covers: NET-122
size: M
est: 140 code, 160 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the release staging log names the min-answerer artifact per platform beside min and minvmd; dist-build prints the link check's verdict on what it built; the advisory names the reason when it refuses an unsigned or link-unclean source
observability: one line per staged min-answerer artifact; the advisory's refusal line when the copy source fails its signature or link check
layers:
- release:
- scripts/dist-build.sh: builds the min-answerer bin for the target only in its own separate invocation (-p min-answerer, never through --workspace or beside -p minvmd, which would unify minvmd's libkrun feature back in), from the crate T71 created (no libkrun, no KVM backend), lists it in the built-binaries line, and runs scripts/check-answerer-links.sh on what it built
- scripts/stage-release.sh: stages min-answerer per platform (linux amd64, linux arm64, darwin arm64) as bin/min-answerer, beside min, where the advisory's answerer_source looks, required like the other binaries, with no lib/ component on any platform; the staged binary is the source the advisory copies into a root-owned path, and no service unit or plist references it
- scripts/package-nfpm.sh: carries min-answerer in the deb and rpm beside min, root-owned in /usr/bin; neither package installs or enables the answerer service, so the advisory stays the one privileged step
- scripts/install.sh: installs min-answerer beside min on every platform it installs min, and replaces it on upgrade like the other binaries; the installed copy is only the advisory's copy source, and no unit or plist the installer writes names the user-prefix path
test: bash scripts/stage-release_test.sh
test: bash scripts/install_test.sh
- cli:
- crates/minimal/src/resolver.rs: before copying, the advisory verifies the min-answerer source with codesign --verify --strict on macOS and the link rule on both OSes, run unprivileged before the privileged step (glibc ldd can execute the target's interpreter, so ldd never runs as root), and after the copy re-checks the root-owned copy with the static readelf/otool checks only; it refuses with the reason when any check fails, skipped only for debug and test builds under the same gate as T71's channel-path override; an upgrade that changes the answerer protocol re-surfaces the advisory through T71's protocol comparison, so an old root copy never runs silently against a new channel
test: cargo nextest run -p minimal advisory_refuses_an_unsigned_or_link_unclean_source
test: cargo nextest run -p minimal advisory_resurfaces_when_service_binary_is_older
- handoff:
- docs/internal/release-pipeline.md: records the min-answerer release steps, and because .github/workflows/release.yml is frozen the PR body carries a patch to it for the code owner that, mirroring minvmd's steps, renames, signs (Developer ID Application, --options runtime, an empty entitlements set: no hypervisor, no disable-library-validation, no allow-dyld-environment-variables, no JIT), notarizes and uploads min-answerer-macos-arm64, uploads the Linux min-answerer artifacts, adds each to the checksums and the manifest like the other binaries, and runs scripts/check-answerer-links.sh again on every signed and renamed artifact before upload, so the shipped bytes are the checked bytes; the PR body names the patch as the needs-human item that blocks the first release carrying T71, and names the privileged macOS e2e runner for answerer_survives_session_stop as the residual it does not close
produces: none
consumes:
- crates/minvmd/src/bin/min-answerer.rs
- crates/minimal/src/resolver.rs
- scripts/check-answerer-links.sh
proof: A dist build of every shipped platform produces a link-clean min-answerer beside min, staged and packaged where the advisory finds it, installed and upgraded by the shell installer and the packages, and never referenced by a unit or plist at its user-writable path; the advisory refuses an unsigned or link-unclean source with the reason; an upgrade that changes the answerer protocol re-surfaces the advisory and never runs an old root copy silently against a new channel; the release workflow change that signs, notarizes, checks again and uploads it is handed to the code owner as a patch.
depends on:
- blocked by #1803
- blocked by #1947

Proof

A dist build of every shipped platform produces a link-clean min-answerer beside min, staged and packaged where the advisory finds it, installed and upgraded by the shell installer and the packages, and never referenced by a unit or plist at its user-writable path; the advisory refuses an unsigned or link-unclean source with the reason; an upgrade that changes the answerer protocol re-surfaces the advisory and never runs an old root copy silently against a new channel; the release workflow change that signs, notarizes, checks again and uploads it is handed to the code owner as a patch.

Amended scope

This PR follows the architecture ruling on the answerer's identity model (design §7.1, post-install custody). The source sits beside min in a prefix its user can write, so every user-side check is only a pre-check. The checks that count run in the rendered root step, on the root-owned copy.

The block's line "the link rule on both OSes" (and its "re-checks the root-owned copy with the static readelf/otool checks") is amended:

  • Link-cleanliness is proven at release, by scripts/check-answerer-links.sh (T91, T91 — Check that min-answerer links only system libraries #1954), in scripts/dist-build.sh and again on every signed and renamed artifact in the release.yml patch below. The user-side otool/readelf/ldd checks, the post-copy re-checks, and their parsers are removed.
  • The user side verifies identity. On macOS it runs codesign --verify --strict -R '=<requirement>' against the Developer ID designated requirement anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU] = "<TEAMID>" and identifier "<identifier>". TEAMID and identifier are compile-time consts (option_env!("MINIMAL_ANSWERER_TEAMID"), option_env!("MINIMAL_ANSWERER_IDENTIFIER")). A macOS release build without them offers no step and says "this build carries no signing identity"; there is no fallback to --strict alone. Debug and test builds skip the check under T71's debug_path_override gate (any(test, debug_assertions)). On both OSes the advisory pins the SHA-256 of the bytes it verified.
  • The root step re-verifies the root-owned copy: it walks the destination dir and every ancestor up to /, refusing at (and naming) the first component that is not root-owned, is group- or other-writable, or is sticky; then it runs install -m 0755 -o root -g <wheel|root> to an exclusive mktemp name in that dir, hashes the temp copy (shasum -a 256 / sha256sum), removes it and exits non-zero naming both hashes on a mismatch, re-runs codesign --verify --strict -R on macOS, renames it into place atomically, and only then writes and loads the unit or plist. Nothing before the rename touches the running service.
  • Notarization is out of this PR. The block's "notarizes" (in the handoff layer and the proof) is amended: the release.yml patch signs but does not notarize, and notarizing every shipped macOS binary is follow-up gominimal/inbox#900.
  • Optional until release.yml ships it (temporary, gominimal/inbox#899): stage-release.sh and package-nfpm.sh warn and omit a missing min-answerer. A release without it shows the named state "this release ships no min-answerer; the answerer service step is unavailable", never a silently dropped step. package-nfpm.sh is included because a required min-answerer there would break the next versioned release before the workflow patch lands.

Needs a code owner

The only needs-human item is the .github/workflows/release.yml patch below (the workflow is frozen). It blocks the first release that offers the answerer service step. It:

  • renames, re-runs scripts/check-answerer-links.sh on, and uploads min-answerer-linux-{amd64,arm64} (dist-build already builds and link-gates it in its own -p min-answerer invocation);
  • on macOS, builds min-answerer in its own -p min-answerer invocation and link-gates it, renames it, signs it with the Developer ID (--options runtime, --timestamp, empty entitlements, --identifier dev.minimal.min-answerer), verifies it against the exact designated requirement min checks, re-runs the link gate on the signed and renamed bytes, and uploads it;
  • passes MINIMAL_ANSWERER_TEAMID=3G47C5HY64 and MINIMAL_ANSWERER_IDENTIFIER=dev.minimal.min-answerer as job env to the macOS build, so the min it builds carries the signing identity.

Checksums and the manifest need no workflow change: the release and stage-installer jobs gather artifacts by their platform-suffixed names, and stage-release.sh's COMPONENTS table hashes min-answerer-* into the components manifest.

The patch does not notarize: notarizing every shipped macOS binary is follow-up gominimal/inbox#900. After the patch lands, empty OPTIONAL_COMPONENTS / OPTIONAL_ARTIFACTS (gominimal/inbox#899).

release.yml patch (applies with git apply on this branch)
--- a/.github/workflows/release.yml	2026-10-04 19:07:40
+++ b/.github/workflows/release.yml	2026-10-04 19:29:53
@@ -258,6 +258,18 @@
                   mv min minimal-linux-amd64
                   mv minimald minimald-linux-amd64
                   mv minvmd minvmd-linux-amd64
+                  mv min-answerer min-answerer-linux-amd64
+            - name: Re-check min-answerer links on the renamed artifact
+              # dist-build.sh gated the binary it built; re-run the same gate
+              # on the exact file that uploads, so the shipped bytes are the
+              # checked bytes.
+              run: scripts/check-answerer-links.sh target/x86_64-unknown-linux-musl/release/min-answerer-linux-amd64
+            - name: Upload binary (min-answerer)
+              uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
+              with:
+                  name: min-answerer-linux-amd64
+                  path: target/x86_64-unknown-linux-musl/release/min-answerer-linux-amd64
+                  retention-days: 7
             - name: Upload binary (mip)
               uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
               with:
@@ -378,6 +390,16 @@
                   mv mip mip-linux-arm64
                   mv minimald minimald-linux-arm64
                   mv minvmd minvmd-linux-arm64
+                  mv min-answerer min-answerer-linux-arm64
+            - name: Re-check min-answerer links on the renamed artifact
+              # See the amd64 job: the gate runs again on the file that uploads.
+              run: scripts/check-answerer-links.sh target/aarch64-unknown-linux-musl/release/min-answerer-linux-arm64
+            - name: Upload binary (min-answerer)
+              uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
+              with:
+                  name: min-answerer-linux-arm64
+                  path: target/aarch64-unknown-linux-musl/release/min-answerer-linux-arm64
+                  retention-days: 7
             - name: Upload binary (minimal)
               uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
               with:
@@ -433,6 +455,13 @@
         if: vars.RUN_MACOS_CI != 'false'
         env:
             MINIMAL_RELEASE_VERSION: ${{ needs.assert-version.outputs.release_version }}
+            # The signing identity min-answerer is signed under below, compiled
+            # into `min` (option_env! in crates/minimal/src/resolver.rs): the
+            # session advisory verifies the copy source against the Developer
+            # ID requirement for this team and identifier, and a `min` built
+            # without them offers no answerer step on macOS.
+            MINIMAL_ANSWERER_TEAMID: 3G47C5HY64
+            MINIMAL_ANSWERER_IDENTIFIER: dev.minimal.min-answerer
         steps:
             - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
               with:
@@ -475,12 +504,21 @@
                     printf '%s\n' "$bad" >&2
                     exit 1
                   fi
+            - name: Build release min-answerer binary
+              # Its OWN invocation, like minimal above and for the same reason:
+              # beside `-p minvmd` the libkrun feature would unify into the
+              # answerer a root host service must never carry. Link-gated as
+              # built; the gate runs again on the signed artifact below.
+              run: |
+                  cargo build --release --locked -p min-answerer --bin min-answerer
+                  scripts/check-answerer-links.sh target/release/min-answerer
             - name: Rename binaries with platform suffix
               # download-artifact merge-multiple flattens on basename, so the uploaded
               # file must already carry the platform-suffixed name the release job expects.
               run: |
                   mv target/release/minvmd target/release/minvmd-macos-arm64
                   mv target/release/min target/release/minimal-macos-arm64
+                  mv target/release/min-answerer target/release/min-answerer-macos-arm64
             - name: Codesign binaries with Developer ID
               # Sign the two shipped Mach-O binaries with the Developer ID
               # Application identity held in the runner's signing keychain. This
@@ -505,9 +543,24 @@
                   codesign --force --timestamp --options runtime \
                     --sign "$IDENTITY" \
                     target/release/minimal-macos-arm64
+                  # min-answerer: no entitlements at all (no hypervisor, no
+                  # disable-library-validation, no dyld environment, no JIT),
+                  # and an explicit identifier, the one `min` checks it by.
+                  codesign --force --timestamp --options runtime \
+                    --identifier "$MINIMAL_ANSWERER_IDENTIFIER" \
+                    --sign "$IDENTITY" \
+                    target/release/min-answerer-macos-arm64
 
                   codesign --verify --strict --verbose=2 target/release/minvmd-macos-arm64
                   codesign --verify --strict --verbose=2 target/release/minimal-macos-arm64
+                  # The exact designated requirement the session advisory and
+                  # the privileged step verify the answerer against.
+                  codesign --verify --strict --verbose=2 \
+                    -R "=anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU] = \"$MINIMAL_ANSWERER_TEAMID\" and identifier \"$MINIMAL_ANSWERER_IDENTIFIER\"" \
+                    target/release/min-answerer-macos-arm64
+            - name: Re-check min-answerer links on the signed artifact
+              # The last check before upload, on the signed and renamed bytes.
+              run: scripts/check-answerer-links.sh target/release/min-answerer-macos-arm64
             - name: Upload binary (minvmd)
               uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
               with:
@@ -519,6 +572,12 @@
               with:
                   name: minimal-macos-arm64
                   path: target/release/minimal-macos-arm64
+                  retention-days: 7
+            - name: Upload binary (min-answerer)
+              uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
+              with:
+                  name: min-answerer-macos-arm64
+                  path: target/release/min-answerer-macos-arm64
                   retention-days: 7
 
     build-libkrun-macos-arm64:

Residuals

  • A shell-installer (user-prefix) install on Linux has no signature: the root copy is trusted up to the hash pin, inside design §7.1's single-operator premise.
  • deb/rpm installs copy from the root-owned /usr/bin, which closes that residual on packaged hosts.
  • stage-release's (and package-nfpm's) optional min-answerer is temporary (gominimal/inbox#899).
  • The privileged macOS e2e runner for answerer_survives_session_stop remains open.
  • Notarization of all shipped macOS binaries, min-answerer included: gominimal/inbox#900.
  • A host whose /usr/local or /usr/local/lib was handed to a user (a Homebrew-style chown) is refused by the ancestor walk, naming the directory; both destinations' chains pass on stock macOS and Linux.

Verification

  • just fix, just clippy: clean (macOS scope). just test (macOS scope): 970 tests run: 970 passed (1 leaky), 11 skipped.
  • cross clippy -p minimal --lib --tests --target aarch64-unknown-linux-musl --locked -- -D warnings: clean.
  • cross test -p minimal --lib --target aarch64-unknown-linux-musl --locked -- resolver::: test result: FAILED. 51 passed; 3 failed, the three being the known sh_parses baseline (the container's /bin/sh -n runs the command: sudo: not found). With sh_parses pointed at /bin/bash for a local run (not committed): test result: ok. 54 passed; 0 failed.
  • New and changed tests in that run: advisory_refuses_an_unsigned_or_link_unclean_source (real answerer_step_with_source wiring, injected identity checker: refused with reason on fail; rendered command carries the pinned SHA-256 on pass), advisory_names_an_unavailable_answerer_step, privileged_copy_refuses_a_source_swapped_after_render, privileged_copy_refuses_a_user_writable_ancestor (0777, 0775, 0757 and sticky 01755 on an ancestor: refused naming it, nothing copied), privileged_copy_refuses_a_user_owned_destination (real find over a user-owned temp tree, install stubbed), and advisory_resurfaces_when_service_binary_is_older.
  • The rendered macOS fragment, pasted through zsh on macOS with install stubbed and find delegating to /usr/bin/find: the checked bytes install; a swapped source is refused naming both hashes; a writable or sticky ancestor and a user-owned destination are refused naming the directory. The unstubbed walk passes on /Library/PrivilegedHelperTools on this Mac, and on /usr/local/lib/minimal in a stock ubuntu:24.04 container.
  • cargo check --release -p minimal on macOS, with and without the two env vars: no warnings from this change (three pre-existing dead-code warnings on main remain: ZONE_LINK, ZONE_LINK_ADDR, service_exec_start).
  • bash scripts/stage-release_test.sh: 65 passed, 0 failed. bash scripts/install_test.sh: 508 passed, 0 failed. just lint-shell: 50 scripts pass.
  • just lint-prose docs/internal/release-pipeline.md: 0 errors, 0 warnings.
  • The patch: git apply --check passes on this branch, it parses as YAML, and actionlint reports only the pre-existing ubuntu-26.04-arm runner-label note.

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

Out of scope

These files are outside the task's layers::

  • packaging/nfpm.yaml: it carries the /usr/bin/min-answerer entry, inside markers that scripts/package-nfpm.sh strips while the artifact is optional.

Closes #1948

dist-build.sh builds the answerer in its own cargo invocation — never
beside -p minvmd or through --workspace, which would unify the libkrun
feature into the answerer a root host service must not carry — and runs
the link gate on what it built, so a link-unclean answerer never leaves
the build machine.

stage-release.sh carries bin/min-answerer beside min on linux amd64,
linux arm64 and darwin arm64, required like the other binaries; the
staged copy is only the copy source NET-122's advisory finds and copies
to a root-owned path, and no unit or plist references the user prefix.

package-nfpm.sh and packaging/nfpm.yaml ship /usr/bin/min-answerer,
root-owned like the other binaries; neither installs or enables the
service — the advisory's one privileged step stays the only one.

install.sh's component loop places the row by its generic rules; its
header now names the contract, and install_test.sh asserts it: installed
beside min on every platform, replaced on upgrade, recorded, no unit or
plist at the user-writable path. stage-release_test.sh asserts the row
and the missing-artifact refusal.
NET-122's privileged step copies this machine's min-answerer into a
root-owned service path, so the advisory now verifies the source before
it ever offers the step: codesign --verify --strict on macOS, where the
shipped source is Developer ID signed, and the link rule the release's
gate ships by on both OSes — every library resolving from a system
directory, no embedded search path, the interpreter a system loader.
The check runs unprivileged, in the CLI's own process, and a source that
fails it is refused with the reason (AnswererStep::SourceRefused, which
wraps the service state the detection read, so the fact naming what the
host is missing survives). glibc ldd can execute the target's
interpreter, so ldd runs there and nowhere else.

The privileged step itself re-checks the copy it makes — with the
static readelf/otool checks alone, never ldd — and a copy that fails is
removed and named, so an unchecked program never sits in the root-owned
path.

Skipped for debug and test builds under the same gate as T71's
channel-path override: a dev tree links user-writable libraries on
purpose, and the advisory keeps offering its step there. The parses are
pure over the tools' outputs, so the rule is unit-tested on every
platform the suite runs on; an upgrade to an older service copy
re-surfaces the advisory the way a newer one does, and its command
re-copies the program.

Refs: NET-122
Record what shipping min-answerer in every release that ships min
takes: the build's own cargo invocation and its link gate, the stage
row beside min, the package contents, and the installer row — all done
by the scripts this repository owns.

The workflow half stays with the code owner, because
.github/workflows/ is frozen and CODEOWNER-gated: record the exact
steps the release.yml patch must add (rename, sign with an empty
entitlements set, verify, link-check the signed artifact, upload), and
that no release can stage until it lands, since the stage now refuses
without the artifact the manifest requires. That patch is the
needs-human item blocking the first release that carries T71, and the
privileged macOS e2e runner that answerer_survives_session_stop needs
is the residual these steps do not close.

Refs: NET-122
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 51a44df5-e3c0-4f17-8829-51d052654867

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

The advisory no longer re-runs the release's link checks on the
user-side copy source. On macOS it checks the Developer ID designated
requirement, built from a compile-time TEAMID and identifier; a release
build without them names the step unavailable. On both OSes it pins the
SHA-256 of the bytes it verified.

The privileged step refuses a destination directory root does not own
or others can write, installs into an exclusive mktemp name, refuses a
copy whose hash differs from the pin, re-runs codesign -R on macOS, and
renames into place before writing any unit. A release with no
min-answerer shows a named unavailable state instead of dropping the
step. The identity checker is injected so the tests drive the real
wiring.
The frozen release workflow does not build or upload min-answerer yet,
so stage-release.sh and package-nfpm.sh warn and omit it instead of
failing the stage. Both lists are temporary (gominimal/inbox#899).
The privileged copy now walks the destination directory up to / and
refuses at the first component that is not root-owned, is group- or
other-writable, or is sticky, naming it. A user could otherwise rename a
directory on the path between the check and the rename. Both current
destinations pass on stock hosts, so they stay where they are.
… the walk

A stock host has no destination dir until the first install. The root step
now creates it with install -d -m 0755 -o root before the ancestor walk,
which checks the new dir with the rest, instead of relying on mkdir -p and
root's umask.
@norrietaylor
norrietaylor marked this pull request as ready for review October 5, 2026 02:38
@norrietaylor
norrietaylor requested a review from a team as a code owner October 5, 2026 02:38
@minimal-foundry

minimal-foundry Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 9e9ca8e69039.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none: git log on resolver.rs, stage-release.sh, and package-nfpm.sh shows only this PR's own commits (building on T71); no recent fix is reverted. The .github/workflows/ tree is untouched, as the frozen-file rule requires.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 5, 2026

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

T92 is reworked per the design ruling: Developer ID requirement, a hash-pinned root copy, an ancestor custody walk that creates a missing destination root-owned, and the artifact optional until release.yml ships it (inbox#899). ARCH passed it, CI is green on every lane, and minimal-review found nothing. The release.yml patch in the body is the code-owner item, and it blocks only the first release that offers the service step.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 5, 2026
@norrietaylor
norrietaylor removed this pull request from the merge queue due to a manual request Oct 5, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit 66bdb90 Oct 5, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/1948-ship-min-answerer-in-every-release-that-ships-mi branch October 5, 2026 04:00
yermakoffivan pushed a commit to yermakoffivan/minimal that referenced this pull request Oct 7, 2026
…very platform (gominimal#2002)

* ci(release): ship min-answerer signed for every platform

The build, staging, packaging and install scripts already handle
min-answerer (gominimal#1971), but the release workflow never built, signed or
uploaded it, so stage-release.sh and package-nfpm.sh skipped it with a
warning.

Linux: rename the min-answerer artifacts dist-build.sh already builds,
re-run scripts/check-answerer-links.sh on the renamed files and upload
them as min-answerer-linux-{amd64,arm64}.

macOS: build min-answerer in its own -p min-answerer invocation,
link-gate it, rename it, Developer-ID sign it (hardened runtime,
timestamp, no entitlements, identifier dev.minimal.min-answerer),
verify it against the designated requirement min checks, re-run the
link gate on the signed bytes and upload it as min-answerer-macos-arm64.

Pass MINIMAL_ANSWERER_TEAMID and MINIMAL_ANSWERER_IDENTIFIER as job
env to the macOS build so the min it builds carries that identity.

* docs(release): describe min-answerer as built, signed and uploaded by the workflow

The release workflow now builds, link-gates, signs and uploads min-answerer,
so the pipeline doc no longer calls it a pending code-owner patch or a gap.

* refactor: rename min-answerer to minzoned

The host box-zone service binary becomes minzoned, matching minimald
and minvmd. It holds the box zone: the box names and the addresses
behind them, so a dns name would be too narrow once address
arbitration lands. The name stays narrow on purpose: a privileged,
config-less service should not invite more functions.

- crate, package and binary: crates/minzoned, minzoned
- launchd label dev.gominimal.zone, systemd units minzoned.socket and
  minzoned.service
- root-owned copies /Library/PrivilegedHelperTools/minzoned and
  /usr/local/lib/minimal/minzoned
- codesign identifier dev.minimal.minzoned; compile-time env
  MINIMAL_ZONED_TEAMID and MINIMAL_ZONED_IDENTIFIER
- release artifacts minzoned-{linux-amd64,linux-arm64,macos-arm64}
- scripts/check-zoned-links.sh (and its test), just zoned-build and
  zoned-link-check
- advisory lead-in: install the Minimal box-name service (DNS and
  addresses for boxes)

* ci(release): build, sign and ship the box-name service as minzoned

Follows the rename of min-answerer to minzoned: the artifact names, the link
check script, the cargo package and binary, the signing identifier
dev.minimal.minzoned and the MINIMAL_ZONED_* build env that min compiles in.

* test(e2e): match the renamed box-name service in the session e2e

The advisory command now installs minzoned, so the e2e's answerer-step
matches look for minzoned instead of the old zone-answerer label. The
install test's root-owned-path guard names the new program and plist
paths. Daemon log greps keep the zone-answerer component name.

* ci(release): notarize the shipped macOS binaries (gominimal#2003)

After signing, build-release-macos-arm64 now submits min, minvmd and
min-answerer to the Apple notary service with
`xcrun notarytool submit --wait`, each in a ditto zip used only for the
submission. The release fails unless every result is Accepted, and the
step prints the notary log of a rejected submission.

The release ships bare Mach-O files, which stapler cannot staple, so
Gatekeeper looks the ticket up online.

Credentials come from a notarytool keychain profile in the signing
keychain, named by the MACOS_NOTARY_PROFILE repository variable. The
job timeout rises from 45 to 60 minutes to cover the notary waits.
Document the step and its runner prerequisites in release-pipeline.md.

* test(minzoned): prove the macOS service install on a hosted runner (gominimal#2011)

* test(minzoned): prove the macOS service install on a hosted runner

The self-hosted Mac fleet runs PR code without sudo, so the minzoned
LaunchDaemon path had no CI proof. A new zoned job on macos-latest runs
the privileged install command min prints, then checks custody, the
system resolver, the channel (a script stands in for the node), the uid
gate, a restart, a re-run and a clean teardown.

A hidden debug-only verb, min debug-answerer-command, prints the command
without a session.

* test(minzoned): wait for the range job to apply every alias

* fix(scripts): spell the zoned restart check as an if so shellcheck passes

* docs(scripts): say release.yml now ships minzoned in the optional-artifact notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T92 — Ship min-answerer in every release that ships min, link-clean and signed

1 participant