mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
main
50
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ffacfb75ef |
fix(bump): e2e-tools reads mise's 404 when mise prints in color
On CI mise prints its log in color, so unpublished's ^mise ERROR match missed the 404 and the run failed with "mise lock failed" instead of waiting for upstream. mise lock now runs with MISE_COLOR=0, and unpublished strips SGR escapes before it reads the errors and the Processing line. bump.txtar: a stub log with CI's colored lines, and the stub records the MISE_COLOR it was run with. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
bc185ec80e |
fix(release): every file release.sh writes is 0755 or 0644, whatever the umask
minisign writes its signatures with the process umask, so on a host whose umask is 0002, as Ubuntu's is, dist/SHA256SUMS.minisig came out 0664, and --ci-sign's SHA256SUMS.ci.minisig, --sign-legacy's signature, --formula-from's formulas and --ci's folder for the co-signer were group-writable too. release.sh now sets umask 022 once at its top, for the host and the container alike, in place of the two copies in build and modules. release_head.txtar's modes check builds under umask 0002, checks the signature is 0644, and labels the catch-all lines so a stray mode can't pass as an expected one; release_ci.txtar's --ci-sign runs under umask 0002 and checks its signature is 0644. Both failed before the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2cc9d8c862 |
fix(bump): e2e-tools waits for a release that isn't published everywhere yet
When a shared tool's newest version, newer than tests/e2e-mise.lock's, has no download for a platform yet (mise lock stopping on a 404, as for Node 24.23.0's linux-arm64-musl build, a lock entry without a checksummed download, or a dotnet SDK without its archive), e2e-tools names the tool, version and platform. --check reports it as waiting for upstream and goes on, so the weekly Pins workflow passes; applying prints mise's output, stops, to try again later, and writes no lock. After a 404 wait, --check holds that tool back in its copy of mise.toml (at the e2e lock's version, or left out when the lock has none) and runs mise lock again, so the other tools are still reported and their failures still stop the run. A tool is held back once at most: its 404 again fails the run, so the loop ends. The Pins workflow's issue lists the waiting lines in their own Waiting for upstream section and stays open while any is there, and maintaining.md says to look at a wait that lasts two weeks, and to bump the other pins by name meanwhile, since a plain run stops at e2e-tools. Real failures still stop the run: a 404 or missing download for a version the lock already has, a checksum mismatch, any other mise lock error, an unfetchable releases.json, and a dotnet entry its downloads can't go into. A 404 counts as unpublished only when it's mise's only ERROR line, apart from its Version: and Run with --verbose trailer, and never a WARN, so a checksum mismatch beside a 404 fails. dotnet's downloads go only after the specifiers line of dotnet's own entry, which ends at the next [ header, and only dotnet_downloads' own wait (dotnet_waited) skips dotnet's checksum check. It waits rather than stepping back as devvm does for users: a step back in bash would copy internal/tools' stepBack, and the next run retries. New in scripts/bump.sh: newer, not_yet, unpublished, hold_back, the waiting and dotnet_waited flags. bump.txtar covers the musl 404 with the rest still reported (the tool left out, and held at the lock's version), a held tool's 404 again, the lock-version 404, a checksum mismatch alone, beside a 404 ERROR and beside a WARN-level .sig 404, a WARN-level 404 alone, a 404 whose URL holds two tools' versions, mise's output on the apply path, dotnet waiting (reported once, for its own platform) and its control, an unfetchable releases.json against the older lock, a tool missing checksums reported once with the rest still reported, a dotnet entry missing a checksum while another tool waits, and a dotnet entry without specifiers before another tool's. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
c09875c55d |
fix(bump): e2e-tools downloads devvm's host mise as its pinned .tar.gz
devvm's host mise pin (internal/tools/mise.go's miseSHA256) has been the SHA-256 of mise's .tar.gz since mise was downloaded as its archive, and bump.sh mise writes it from SHASUMS256.txt's .tar.gz lines, but bump_e2e-tools still downloaded the raw binary (mise-v$v-$os-$a) and hashed it against that pin, so every e2e-tools run, the Pins workflow's --check included, stopped with "devvm's host mise ... doesn't match its pinned SHA-256". It now downloads mise-v$v-$os-$a.tar.gz, as miseURL does, checks it against the pin, and runs the mise/bin/mise it takes out. Its hashes, and e2e-from's and e2e-curl's digests, go through the script's sha256 helper rather than shasum, which Fedora lacks. bump.txtar's new case runs bump.sh mise and then e2e-tools on a release whose .tar.gz and raw binary have their own SHA-256s, as a real one does: the lock is resolved by the archive's mise, with dotnet's downloads and the mise.toml's SHA-256, and an archive that isn't the pinned one is refused before its mise runs. It failed on the old script with the Pins workflow's error. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
0c6ee50ff5 |
fix(bump): GitHub's API calls send the workflow's token
The Pins workflow's run on 30 November failed right after nix with "curl: (22) The requested URL returned error: 403". The next call was direnv's gh_latest, an unauthenticated curl to api.github.com: GitHub allows 60 of those an hour from one address, which a hosted runner shares with other jobs, and answers 403 once they're spent. The workflow already set GH_TOKEN and GITHUB_TOKEN for gh, but curl never sent them. gh_api now makes every GitHub API call (gh_latest, gh_head and Lima's release), with GH_TOKEN or else GITHUB_TOKEN when one is set, written to a header file in the run's temp folder (mode 600) and passed as -H @FILE, so it's on no command line and goes to api.github.com alone. A failed fetch now names its URL, which the failed run's log didn't. bump.txtar's curl stub records the header files it reads, and the test checks that GitHub's API gets GITHUB_TOKEN, and GH_TOKEN when both are set, that for each no other URL and no argument gets it, that no call has a header without one, and that a failed fetch names its URL. It fails on the old script. Contributing's Updating pinned versions and the Pins workflow's comment say so. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
19ae9a7071 |
feat(release): the switch: the maintainer signs and pushes the tag, and CI and the co-signer do the rest
scripts/publish.sh's default is now the maintainer's whole part of a release that CI builds and the co-signer publishes: the tag's checks, then main and the tag pushed to origin, which starts the Release workflow, and what comes next. It needs git alone. It refuses a tag whose commit has no release keys, which CI's workflow would refuse, and a version with no changelog entry, which the co-signer takes the notes from. - scripts/publish.sh --sign-legacy, the one command for the bridge: VERSION's draft release, which the co-signer made, has SHA256SUMS, SHA256SUMS.ci.minisig and SHA256SUMS.cosign.minisig downloaded, and scripts/release.sh --sign-legacy checks both signatures with this checkout's packaging/keys and devvm-release <version>, then signs SHA256SUMS with the old key, devvm <version>, and checks that with packaging/minisign.pub; after asking once, SHA256SUMS.minisig goes on the draft, which the co-signer waits for, then publishes. A draft that has it already, or a published release, or a draft without the co-signer's signature yet, is said so, and nothing is uploaded. A checkout without the release keys is refused before anything is signed, pointing at github-setup.md's step 1, as is the default mode's tag without them. - scripts/publish.sh --local, the old path, as it was: built, signed with the old key alone and published from this machine. It stays until the GitHub setup for CI and the co-signer is done, and goes when the bridge ends, as a release that only the old key signed is then one no devvm accepts. A flag, not the default, because the default is what's documented and what's safe to run at any time: it publishes nothing itself, so run before the setup it only pushes a tag whose workflow run fails; and a --local release after the co-signer starts is one it alerts on, as it didn't publish it. - scripts/release.sh --check-tag: --check's tag and keys checks alone, with no container runtime or signing key, which the default mode runs. - The shared parts are one function each: check_tag (the tag, main and origin), notes (the changelog entry), ask (the question), needs_gh. - release.sh's closing line names publish.sh --local, and --tag's build, CI's and the co-signer's, has none. Tests: testdata/script/publish_tag.txtar (the modes in --help, two modes refused, no tag, another signer, a dirty tree, no release keys, no changelog entry, a tag off main's HEAD, --dry-run, n, y and the pushes in order, again with nothing to push, origin's other tag; --sign-legacy: gh logged out, no draft, no co-signer signature yet, a co-signer signature by another key, CI's for another version, --dry-run, y and the upload, which verifies as devvm 1.2.3, again with nothing to do, a published release, a checkout without the release keys), failing before the code; publish.txtar runs the old path as --local, in a repo without release keys, as devvm is until they're made: SHA256SUMS signed with the old key alone, no role signatures, install.sh's key lines empty. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
5b2786c758 |
ci(release): CI's release workflow, which builds, signs and hands each tag over
.github/workflows/release.yml, CI's half of each release, for a pushed v* tag, in the release environment, which waits for the maintainer's approval and holds what the workflow trusts: RELEASE_TAG_SIGNERS, the SSH keys that sign release tags, and RELEASE_CI_KEY, CI's release key. The job's token has contents: read, and id-token and attestations write for the attestation alone, so it can't make or publish a release; the co-signer does. - scripts/release.sh --ci TAG DIR: the tag checked against DEVVM_RELEASE_SIGNERS, an allowed signers file, never the tagged commit's packaging/release-signer, as CI runs the tag's workflow and release.sh: annotated, a release's version, its tag object naming itself, signed by one of those keys, its commit on main (DEVVM_RELEASE_MAIN, refs/remotes/origin/main by default) and holding the three release keys. Then --tag's build, with the same signers as git's, and DIR with SHA256SUMS and exactly the files it lists, each checked against its SHA-256, and not the formulas, which the co-signer renders. - scripts/release.sh --ci-sign TAG DIR: SHA256SUMS signed with CI's key, read on standard input into the script's memory and handed to minisign through a pipe, never a file or an argument, with the trusted comment devvm-release <version>, checked with the tag's packaging/keys/release-ci.pub, which can't be marked PLACEHOLDER: a key on standard input that isn't CI's is refused, and its signature removed. The placeholders' check is placeholder(), one owner for --tag's check and this one. --ci and --ci-sign refuse a tag without the release keys, pointing at github-setup.md's step 1. - The workflow: a first step that stops a tag without the release keys before anything is installed, with the same pointer, then the tag fetched as GitHub has it, minisign alone through mise with no cache, the build under the runner's podman, the signature, an artifact attestation of every file SHA256SUMS lists (subject-checksums), and the artifact release, kept 90 days. Every action pinned by its commit; actionlint and zizmor (and zizmor's auditor persona) find nothing. - The base's workflow, base.yml, comes with the published base; the workflow's header says where it goes. - maintaining.md: CI's release workflow, its steps and its trust. Tests: testdata/script/release_ci.txtar (signers only from DEVVM_RELEASE_SIGNERS, an empty one, a tag signed by a key git trusts but the list doesn't hold, not a release's tag, a lightweight tag, a tag object of another tag, a commit off main, a folder that's there or relative, the folder's exact files and their checksums, no key on stdin, another role's key, the right key's signature and its trusted comment, a second signature, a release-ci.pub marked PLACEHOLDER, a commit with no release keys for --ci and --ci-sign), failing before the code. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f3052e5a8e |
feat(upgrade): releases checked by two of three release keys, bridged from the old key
devvm upgrade and install.sh accept a release's SHA256SUMS when any two
of three release keys signed it (CI's, the co-signer's and an offline
recovery key's), each in SHA256SUMS.<role>.minisig, checked only against
its own role's key, with the trusted comment devvm-release <version>
compared exactly; one signer counts once. While releases bridge from it,
the old release key's single SHA256SUMS.minisig (devvm <version>) still
passes alone, so 0.1 and 0.2 keep upgrading and --to/--version can
install them; install.sh now checks that key's trusted comment too.
The keys themselves aren't made yet, so packaging/keys holds none and
install.sh's three key lines are empty: a devvm built so checks each
release with the old release key alone, and a release that only the
release keys signed is refused. Releases go out as before, signed with
the old key, until the keys are made and added, all three at once.
- internal/minisign: the one owner of signature checks (moved from
internal/upgrade): ParsePublicKey, PublicKey.Check (comment always
compared), Role (CI, Cosign, Recovery), Kind (Release, Base),
Kind.Comment, SigName, KeyFile, Keys/NewKeys/Keys.Check (two of three,
distinct keys and key IDs). minisigntest/ signs for tests. Stdlib and
blake2b only (depguard), a leaf; FuzzCheck, FuzzKeysCheck,
FuzzParsePublicKey.
- The structure test's signatures rule: outside internal/minisign no
code calls ed25519/rsa/ecdsa's Verify functions or imports blake2b,
but signatureFree's files (ubuntu/pgp.go, proxy/nixcache.go).
- internal/upgrade: Source.Keys, checkSums (signatures.go); the bridge
in legacy.go (checkLegacy, legacyKey, Source.Key); FuzzSumOf.
- packaging/keys/release-{ci,cosign,recovery}.pub, none yet;
packaging.Key ("" without one). TestReleaseKeys (checkReleaseKeys:
none, or three distinct minisign keys, none the old key),
TestCheckReleaseKeys (fixture keys from minisigntest),
TestInstallScriptKeys (checkInstallScriptKeys: one line per role,
empty without keys), TestReleaseRefusesPlaceholders (no key in keys/
marked PLACEHOLDER).
- scripts/release.sh (a tag, --check, --tag; never a snapshot) needs
none or all three of packaging/keys' release keys. With none,
install.sh's release_<role>_key lines are empty or missing; with all
three, each is a minisign key, distinct, not the old release key, not
marked PLACEHOLDER (placeholder), and equal to its install.sh line.
- install.sh checks with minisign -VHQm: prehashed signatures only.
- The structure guard also flags dot imports of the verifier packages
and calls of x509's CheckSignature* method names.
- install.sh: release_<role>_key lines, download_signatures (a role's
signature only when the script has its key), check_signature,
signed_by_two, check_legacy; plainer warning without minisign, with
the commands to check by hand.
- Tests: signatures_test.go (TestFetchWithoutReleaseKeys among them),
upgrade.txtar (-legacy, -keys, and the keys built in, none),
install.txtar (stub minisign with -Q; NO_KEYS), install_minisign.txtar
(real minisign), release.txtar (none, nolines, nokeyline, old, marked
and the rest); DEVVM_RELEASE_KEYS override.
- Docs: internals/install.md, using/upgrading.md, maintaining.md's
Release keys, structure, tests, testing, SECURITY.md, CHANGELOG,
releases/0.2.0.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
d001f7be0f |
build(release): every release builds to the same bytes on any machine
The signing design's first phase. The same tag, built by two builders, now gives byte-identical archives, source tarball, install.sh, SHA256SUMS and formulas. - scripts/release.sh builds every file but the signature in one container, release_image (Debian's buildpack-deps:trixie-scm, pinned by its index's digest), under podman or Docker (DEVVM_RELEASE_RUNTIME), on this machine's processor. The image and the code that runs in the build's container (_build) are the built commit's copies, so a tag builds the same from any checkout; a commit whose release.sh pins no release_image is refused. Everything outside the build's container is the checkout's: the tag's checks, the downloads, the modules' container, the checks on what the build wrote, and the signature. - The build has no network (--network none). The Go modules come first, in a container of their own, the only one with the network, which runs only the checkout's code: its release_image, its release.sh _modules and the Go its mise.lock pins, given only the commit's go.mod and go.sum, read-only, and downloading from proxy.golang.org alone (GOVCS=*:off, GOWORK=off). The checkout's Go rather than the commit's, so a commit can't pick an old Go with a known flaw for the step with the network, and rather than refusing a commit whose Go is older than the checkout's, which would refuse every old tag once mise.lock moves on, though rebuilding old tags is what --tag is for; go.sum pins the module files, so the bytes don't depend on which Go downloaded them. A commit whose go.mod needs a newer Go than the checkout's is refused before anything runs. Every module path the commit's go.mod names is looked up on Google's proxy and checksum database, which the docs say. The build reads the modules read-only as a GOPROXY's files (file:///mod). - Every container runs with --cap-drop ALL, --security-opt no-new-privileges, --pids-limit 8192, --memory 8g and --entrypoint bash, so a setuid file in the commit's image gives no privileges under a rootful runtime, root in it can't chown, a fork bomb or a runaway allocation stops at the container's limits, and the image's entrypoint never runs; Go and GoReleaser are unpacked with tar --no-same-owner. Both runtimes take both limits; rootless podman applies them on cgroups v2 with the pids and memory controllers delegated, as systemd does, and CI's runner needs the same. A full build peaked at 330 processes and 1.8 GiB under Docker Desktop on 10 CPUs. Neither runtime can bound a bind mount's disk use, so the docs say that a running build can fill the temp folder's disk until the time limit. - Each container is named for its run (devvm-release-<the temp folder's suffix>-<n>), so no other run's container, even one left over, has the name, and it's removed (rm -f, then its client ended, then rm -f again): after two hours (DEVVM_RELEASE_TIMEOUT seconds) by a watchdog, and as soon as release.sh stops early. The client runs in the background, so Ctrl+C (INT), a closed terminal (HUP) and kill (TERM) run release.sh's traps at once, which exit through the EXIT trap that removes the container; in the foreground, bash would wait for the client, and the client for the container's PID 1, bash, which ignores them. After kill -9, the watchdog, which outlives release.sh and ignores INT and HUP, removes the container and the temp folder. - Go and GoReleaser are the built commit's mise.lock downloads for linux-arm64 or linux-x64, kept in ~/.cache/devvm-release by SHA-256 and checked before each use, as is the modules' Go from the checkout's mise.lock. A URL has to start with https://dl.google.com/go/ or GoReleaser's releases/download/, can't hold .. or %, which curl decodes (so %2e%2e can't be ..), and goes to curl as --url's value (a lock URL of -K<file> was curl options, run on the host); file:// only from the folder that DEVVM_RELEASE_TEST_FILE_URLS names, which only the tests set, and only when it exists and isn't /. curl: HTTPS redirects only, 30 s to connect, 15 minutes, 1 GiB. A lock with two entries for a tool, or two downloads for the platform, is refused. - The build's repository is new (git init --template=), holding only the commit and, for a tag, the tag, fetched into a pack: no other branches, tags or objects of the maintainer's, no hardlinked files the container could write, and origin set to devvm's GitHub URL, which GoReleaser needs and nothing fetches. Go stamps the binary from the tags it finds, so it finds only the release's. - The container runs as root under a rootless runtime and as you under a rootful one, from the runtime's info (podman's Host.Security.Rootless, Docker's security options), never its name; a runtime that doesn't answer stops the build. Inside: umask 022, TZ=UTC, LC_ALL=C.UTF-8, GOTOOLCHAIN=local, -mod=readonly, no git config but safe.directory, and Go's caches in a container-local folder (Docker Desktop's share lost files that parallel module downloads renamed). - The build writes its files to /out, a mount of its own that it can't swap for a link. Before anything is copied, signed or kept, the folder has to be the one release.sh made, not a link, and everything in it a file or a folder, never a link, yours, and neither setuid, setgid, sticky nor world-writable, and 2 GiB at most, counted as read (sparse files whole) and read no further. The files are then copied to dist/, never moved, as yours with mode 0755 or 0644. minisign signs outside, after the containers are gone. - release.sh --commit COMMIT builds any commit as --head does, with its VERSION; release.sh --tag TAG builds a tag as its release, with its checks, unsigned, to compare with a published SHA256SUMS. An unsigned build never replaces a dist/ that holds SHA256SUMS.minisig, and a build signed with a test key never replaces one whose SHA256SUMS verifies with the checkout's packaging/minisign.pub, the release key. - .goreleaser.yaml: builds_info and every file's info set owner and group root, mode 0755/0644 and the commit's time. - scripts/repro-check.sh [COMMIT | TAG] builds twice with the checkout's release.sh, so no commit's code runs on the host directly. Build 2 fetches from a repository with a stray tag, v0.0.0-stray, at the commit, and runs under Docker where build 1 runs under podman when both are installed (root against your user); every platform archive's files have to be root's with mode 0755 or 0644 (tar -tv). A build that leaves no release fails, whatever its exit status. CI's repro job runs it under the runner's podman and Docker, with a 45-minute limit. The docs say that building a commit runs its code, in a container only as isolated as the runtime keeps it, so an outside commit is built only with the maintainer's go-ahead, and that rebuilding an old tag needs proxy.golang.org to still serve its modules. - scripts/bump.sh release-image moves the container's digest, the SHA-256 of the index it fetched, after checking the index lists linux/amd64 and linux/arm64; TestBumpCoversPins finds the pin. - Tests: release_head.txtar, publish.txtar and the new repro_check.txtar run the scripts through podman and docker stubs and a mise.lock of file:// tarballs. New cases: -K, http://, another host, .. and a percent-encoded .. in a lock URL refused before curl runs, file:// refused without the switch, with it set to 1, to a folder that doesn't exist, to / and from another folder, curl's bounds, two go entries, the build's repository's tags, refs, objects, hardlinks and origin, a stray tag kept out, the image and build code taken from the commit, a commit with no release_image, each runtime's user (rootless and rootful podman and Docker, podman behind docker, no answer), both containers' run lines (security options, limits, entrypoint, --network none, mounts), each container's name its run's (the stub checks it against the run's temp folder), the modules' container getting only go.mod, go.sum, Go and the checkout's release.sh, in the checkout's image, with the checkout's Go, a go.mod newer than the checkout's Go refused before any container, and the build reading its modules; refused output: a link in it, the output folder swapped for a link, a mode 4755, 2755 or 0666 file, a mode 1755 or 0777 folder, a sparse file a byte over 2 GiB (a file of another user's needs root to test, which the test says); a mode 0600 file copied as 0644; a build past DEVVM_RELEASE_TIMEOUT removed by name; release.sh sent INT, HUP and TERM mid-build, ending within 10 s through its trap, and kill -9, each leaving no container, process or temp folder; an unsigned --head and --tag refused over a signed dist/, and a test-key build over a release-key one; --commit never running the commit's host code, --tag's unsigned build matching the signed SHA256SUMS, and repro-check catching a build that records its user, archives that aren't root's, and a release.sh that builds nothing; bump.txtar covers the platform check. Each fails with its fix taken out, which was checked for every fix of the third review: the name, the limits, the test-key refusal, %, the folder's existence and /, the size cap, setgid, sticky, the signal traps, the EXIT trap's removal, the watchdog's removal after kill -9, the client in the background (in the foreground, INT took 60 s), the checkout's Go and the Go version check. Proof, with a throwaway commit whose _build probes its container and leaves a mode 4755 copy of bash and a mode 0666 file in /out, built by this release.sh under Docker Desktop on an arm64 Mac, and under rootful Docker and rootless podman on x86_64 Fedora: every build ran with CapEff and CapBnd 0, NoNewPrivs 1 and no network, couldn't write /mod or rename /out, and was refused before anything was kept; rootful Docker refused its chown to root. The same image under the old run line, on Fedora's rootful Docker: CapBnd a80425fb, NoNewPrivs 0, and proxy.golang.org reachable. Real builds of this commit, stopped 20 s into the build's container: under Docker Desktop, INT, TERM and HUP ended release.sh within 3 s (exit 130, 143, 129) with no container left at once, and kill -9 left the container running for the watchdog, which had removed it and the temp folder 5 s later. The same on Fedora under rootless podman (INT, kill -9, TERM, HUP) and rootful Docker (INT, kill -9). Afterwards no devvm-release container or temp folder was left on either machine. repro-check on this commit, a prerelease (no devvm.rb), agreed on all eight files on the Mac (Docker Desktop, both builds) and on Fedora (rootless podman as root, then rootful Docker as cj), and the two machines' printouts were the same. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
3c7fbad7a3 |
feat(tools): mise downloaded as its .tar.gz, on the host and in base
mise's raw binary is 147 to 192 MB, its .tar.gz 51 to 63 MB. Both of a first run's mise downloads now take the archive: - the host's mise (internal/tools): the .tar.gz checked against its pinned SHA-256 by fetch.Download as before, into a folder of its own, then hashed again through the descriptor that mise/bin/mise is taken out of with archive/tar and compress/gzip, capped at miseCap. One devvm downloads it at a time (Dirs.MiseDownloadLock, cache/mise/download.lock, mise_waiting), and another takes what it kept. Under the lock, a .download-* folder a killed run left is taken away first (TestHostMise). A failure says its cause (mise_download_failed's Because) in the run log too. - base's mise (layers/base.sh): devvm-fetch's .tar.gz, unpacked with tar in a folder of mktemp's, which every base has (gzip is Essential on Debian and Ubuntu, BusyBox has it): .tar.xz would need xz, which --from images may lack. The pins are the archives' SHA-256s from the release's SHASUMS256.txt, and scripts/bump.sh reads the .tar.gz lines. TestMisePins still checks that base.sh's Linux pins are the host's. Docs: images.md's Versions and overview.md's locks; the release page's A faster first run; the CHANGELOG's Highlights, a first run that downloads less with the cloud image's two lines, now highlights too. Base's key changes (base.sh). Tool images' keys don't: they hash base's mise version, not its checksum. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
8e04b1c86d |
fix(scripts): bump.sh moves a Go tool's pseudo-version from the module proxy
mise latest prints nothing for go:go.uber.org/nilaway/cmd/nilaway, which has no releases and is pinned to a pseudo-version, and exits 0, so bump.sh --check reported "nilaway: X -> (change)" and the run listed it in its summary without moving it. dev-tools now reads a go: tool pinned to a pseudo-version from the Go module proxy's @latest, for the longest prefix of its package's path that the proxy has as a module (go.uber.org/nilaway). Only the proxy's 404 or 410 moves on to a shorter prefix; any other failure is an error, so a failed request never takes another module's version. An empty newest version, from the proxy or from mise latest, stops the run with an error, never a change, before anything is edited. A pseudo-version has no "newest within" for a hold to fall back on. proxy_url is the proxy's escaped path, which mod_versions now shares. bump.txtar's mise stub prints nothing for nilaway, as mise does, and its curl stub answers the proxy's @latest with -w's status; it checks the bump, the errors for an empty @latest, for no module at any prefix, for a 503 at a longer prefix and for an empty mise latest, each with mise.toml unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
a7cc12521e |
test(fuzz): fuzz targets with properties, fuzzed nightly
Twenty-three new fuzz targets, built-in Go fuzzing, each checking a property rather than only that nothing panics: parsers of what a VM or the network sends fail closed and keep to their caps, a secret goes only where it's bound, and no planted secret survives a redaction. - internal/proxy: FuzzCursorFrames (passes only what came; no message over frameMax or holding a JWT's start, decompressed and unescaped), FuzzInject (a binding's value only to a host it names, judged apart from the matcher in NormHost's form, for its path and methods, in its own header, which held the exact placeholder once; other headers untouched), FuzzParseBindings, FuzzLinkList, FuzzParseUpstream (errors hold no more of the URL than its scheme), FuzzNoProxy, FuzzParseNarinfo (only cache.nixos.org-1's signed narinfo is taken). - internal/agentlogin: FuzzParseTokenRequest, FuzzRedact (secrets planted eight ways in JSON and TOML settings), FuzzCapture (the VM's reply holds none of the endpoint's tokens). - internal/redact: FuzzSplit (a password written in parts through Split, as the run log writes it, never survives). - internal/jsonc: FuzzStrip, differential against encoding/json. - internal/upgrade: FuzzParsePublicKey, FuzzVerify, FuzzEntryName, FuzzUnpack. - internal/vmssh: FuzzParseHostKeys, FuzzParsePorts. - internal/vm: FuzzParseCloneState, FuzzParseInit, FuzzParseKept, FuzzParseLFSPointer. - internal/desktop: FuzzHandshakeVM. What they found, each fixed with a regression test: - NO_PROXY: an entry with port 0 (git.test:0) was read as the host on every port, and git.test:080 or :+80 as port 80, which Go's clients match against nothing; an entry whose port no request has, or that isn't plain decimal, now matches nothing (TestNoProxy, testdata/fuzz/FuzzNoProxy). FuzzHostSites' NO_PROXY site allows this difference from its frozen copy, and the design note lists it. - A JSON token request with more after its object was judged by its first object; it's refused now (TestCaptureRefuses). The Fuzz workflow runs nightly rather than two minutes weekly: five minutes a target, eight at a time, each target's corpus restored from and saved to a cache of its own (a failing input added to it, so it fails nightly until fixed), new inputs minimized in at most 1,000 runs, and one issue, "Fuzzing found failing inputs", opened, commented on when the failing targets change and closed on a clean night, by a separate job with issues: write that runs no repo code, on main alone. Target names must be unique across packages. bump.sh moves an action in a folder of its repo (actions/cache/restore, /save) with its repo's releases. Docs: Contributing's Fuzzing (running a target, the nightly run, every target's property), Maintaining's Fuzzing failures and its actions bump, the proxy README, the NO_PROXY and token request facts in How it works' network page and the design note. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
89f26c5771 |
docs(site): draw the diagrams at build time with pele, no Mermaid JS
The docs site's 18 mermaid blocks are now drawn as SVGs before Hugo
builds the site, by docs/render-diagrams.mjs with pele 1.13.0, and
inlined by a render hook, so no page loads Mermaid's 5.5 MB script.
- docs/render-diagrams.mjs: finds each mermaid block in docs/content,
draws it with pele in Departure Mono at 14px (a measurer from the
font's metrics), and writes <key>.svg and <key>.json (its size) to
the git-ignored docs/.build/diagrams. pele draws edge labels,
messages and notes at round(14 * 0.875) = 12px with no option, so the
measurer gives that text its 14px width and the script rewrites
font-size="12" to 14 on each small-text group (pele-edge-labels,
-notes, -boxes, -frames); a guard fails on any such group without
font-size="12", or small text outside them, and a self-check, run
whenever there's something to draw, renders an edge label, a message
and a note and fails unless pele measured them at 12 and wrote their
group with font-size="12". It also fails on a diagram without
accTitle and accDescr, or on an indented block. A newline after each
</text>, outside any text element, lets the search index see labels
as separate words; screenshots of all 18 are byte-identical with and
without it. (Newlines between a label's tspans would move centered
lines, so a label's own lines stay joined in the index.)
- Caching: a block's key is sha256(salt + "\n" + text)[:16], the salt
being sha256("pele <version>\n" + the script's text)[:16], written to
diagrams/salt. The script keeps every drawing already there, draws
only missing ones (written to .tmp and renamed), prunes files no key
names, and touches the folder. docs:diagrams has sources (the pages,
the script, package.json, the lock) and outputs (the folder), so mise
skips an unchanged run, and runs npm ci only when the lock's SHA-256
differs from docs/node_modules/.devvm-lock-sha256. An unchanged run:
0.45-0.75 s before, 0.02 s now (0.09 s forced); one diagram changed:
0.09 s. CI's check job caches ~/.npm keyed on the lock; the Docs
workflow, which publishes, keeps no cache.
- docs/package.json and package-lock.json pin pele 1.13.0
(sha512-Ie8UKY9x00MsuR3jO6AzUwzK2Z6MIV3Tf4EDdITiuk8Uaz8K7g0R082WqsqNaSU8DdgkrRvZThzhit83mi/uiw==).
- docs/layouts/_markup/render-codeblock-mermaid.html: in place of
Hextra's hook, reads the salt, computes the key from it and .Inner,
inlines the SVG from assets/diagrams (hugo.yaml mounts .build/diagrams
there), sets the wrapper's contain-intrinsic-block-size to the
diagram's height and --devvm-diagram-width to its width, and errorf's
when a drawing or the salt is missing. layouts/_partials/scripts/
mermaid.html and params.mermaid go.
- custom.css: .devvm-diagram with content-visibility: auto, and pele's
--pele-* variables from the palette (subgraphs, lifelines and notes in
the border color). A diagram wider than the text reaches into the
article's right padding (1.5rem, 3rem from 768px) as far as it needs,
then into the left padding for the rest, so it never covers the table
of contents; wider than both, it scrolls. From about 1010px no diagram
scrolls, the four wide ones included (proxy checks 751px, agent store,
VM states, SSH agent); at 900px five scroll. With the table of
contents shown, the proxy checks take 48px on the right and 31px on
the left.
- mise.toml: docs:diagrams, which docs and lint:docs depend on.
docs.yml: the next and release jobs install node and draw the
diagrams; the release job only when the tag has the script, so older
tags still build.
- scripts/bump.sh: bump_pele, named only, replaces bump_mermaid: npm
install --save-exact --ignore-scripts in docs, then mise run
docs:diagrams, whose self-check catches a pele that changed how it
draws small text. TestBumpCoversPins finds docs/package.json's
dependencies (npm:NAME); bump.txtar tests --check and the install.
The header and hextra's note say the mermaid render hook replaces
Hextra's mermaid hook, so check it still has that name.
- Every diagram gets an accTitle and accDescr, which pele makes the
SVG's title and desc (aria-labelledby, aria-describedby). Staying
safe's columns are written in reading order, as pele lays subgraphs
out from left to right. The proxy checks' description names every
branch, and a hand-placed <br> keeps "CA)" off a line of its own.
- AGENTS.md: the one Node script; no other build script is JavaScript,
and no other npm package is installed outside mise's tools.
Contributing's docs, tools and
maintaining pages describe the drawing, the caching, the margin, the
task and the bump.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
1ecd1faa73 |
build(nilaway): mise run nilaway against a triaged baseline, an advisory CI job, and two crashes it found
nilaway is pinned in mise.toml at its newest commit's pseudo-version (it has no releases); bump.sh's dev-tools moves it, and TestBumpCoversPins covers it through mise.toml:tool:*. mise run nilaway runs scripts/nilaway.sh: devvm's own packages, not the tests or their helpers (stubtest, backendtest), compared with testdata/nilaway-baseline.txt, the findings triaged as false positives, each with its group (checked, bounds, mapkey, nilsafe), keyed by file and trace without line numbers, one line for each finding, compared as multisets. It exits 3 on a new finding, a key found more often than the baseline has it included, and 1 when nilaway can't run, when a finding in its output can't be read, or when a baseline line is stale or malformed. TestNilawayBaseline checks each case with a stand-in nilaway. CI's nilaway job is continue-on-error: it warns on new findings and lists the new and stale ones, then every finding, in the run's summary, failing when the script exits 1. The first run reported 83 findings, 69 without the test helpers. Two were real: - agentlogin.Restore sliced above[1:] for a settings file that is one JSON string holding a placeholder, where above is empty, and devvm agent save panicked. - agentlogin's readJSON returned a nil map, with no error, for a file that is null, which the Codex and opencode captures then wrote to. It now refuses it as not a JSON object. The other 67 are the baseline. Both fixes get a CHANGELOG Fixed entry. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
940f1e2d88 |
chore(scripts): bump.sh moves every pin in the repo, and a guard for new ones
scripts/bump.sh now covers every pinned version, so release prep is one command, grouped as --check prints them: - shared-tools: cursor (only when named), Cursor's CLI pinned in assets/shared-tools/mise.toml, checksums computed from the downloads - e2e: e2e-curl, tests/e2e/transparent_test.go's curlImage by digest - go: go (newest patch: go.mod, docs/go.mod, mise.toml, mise lock), go-minor (only when named), go-mods (direct modules, go get and go mod tidy; a next major's path only reported), deadcode (mise.toml's task) - dev-tools: mise.toml's tools but go, through mise lock - ci: ci-mise (jdx/mise-action's version follows base's mise), actions (uses: by tag commit from gh api, then actionlint and zizmor) - docs: hextra (go get and hugo mod tidy in docs/), mermaid (only when named) --check prints each pin's group and whether a bump is a patch, minor or major. With no tools named, bump.sh applies patches and minors only: never a major, a held pin or a named-only tool; naming an images or e2e tool still applies its major, and e2e-tools always does. Holds come from .github/dependabot.yml's ignore list (pflag < 1.1.0) and bump.sh's own (node on its major). The header lists every pin as "# pin KEY TOOL", or "-" and a reason, and says why the pins outside the scanned files are left (install.sh's Lima, the Homebrew formula, testdata, vendored files). TestBumpCoversPins in internal/structure scans assets/, mise.toml, both go.mod files, the workflows, tests/e2e-mise.lock, tests/e2e's consts and docs/hugo.yaml offline, and fails on an uncovered pin or a stale line. The Pins workflow gets mise and a token for the new checks, and its issue lists outdated pins under their groups. testdata/script/bump.txtar covers the new groups with stubbed upstreams, and caught newest_of failing on an empty list. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
52bb0f467b |
feat(clone): a --clone VM gets the repo as it is here
A --clone VM's clone is now seeded with a snapshot, not git push, and gets everything a working copy has. devvm clone fetch brings it all back, and devvm rm and clone off check it before deleting. - Refs: every branch, tag and notes ref, and a detached HEAD. - Uncommitted changes: staged, unstaged and untracked files; files skip-worktree by hand get the index's version, named. - Operations in progress (merge, rebase, cherry-pick, revert, bisect) and the stash; a stash's untracked part goes as its own branch. - The repo's settings and hooks, sent as settings only where they live in the repo (husky); ORIG_HEAD never goes. - Partial clones, with their promisor remote, and messages per network tier when it can't be reached. - Initialised submodules, nested ones too, each with a clone of its own; a submodule's own folder is refused as a top-level --clone. vm.json gains an optional `submodules` field. - Git LFS both ways: objects hash-checked, written under os.Root with no link followed, a question past 2 GiB; the filter is set only in the clone's repos; git-lfs 3.8.1 in base, pinned by SHA-256. - rm and clone off keep the VM when anything the VM has didn't come back, and name it. - Every shell script embedded in Go is shellchecked. - clone.md is a guide that leads with commands; TestUserPageProse covers it and coding-agents.md. After you upgrade: base and every image on it build again once, for git-lfs. Fixes #40, reported by @Josuesp1620. Thanks to @dhruv1220 for #42, which found the cause (receive-pack refusing a shallow push); its receive.shallowUpdate setting stays in the VM's repos. Co-authored-by: Dhruv Arora <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
72b648df31 |
feat(release): prereleases on the Homebrew tap, as devvm-rc (#19)
Prereleases now reach the Homebrew tap through a second formula, `devvm-rc`. The stable `devvm` formula stays on the last final release. Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
8d8da01037 |
feat(tools): dotnet, the .NET SDK, as a shared toolchain (#7)
Adds `dotnet`, the .NET SDK, as a fifth shared toolchain next to node, python, rust and go. `--tools dotnet`, `devvm tools add dotnet` and the picker offer it, and a folder with `*.sln`, `*.slnx`, `*.csproj`, `*.fsproj` or `global.json` at its top level suggests it in the new VM's summary, the way `package.json` suggests node. Refs #2. Thanks to @jsskeen-utah for the detailed request. Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
63e41118c6 |
feat(release): release candidates and betas, as GitHub prereleases (#13)
devvm can ship prereleases, such as release candidates and betas, for people to try before a release is out. A prerelease's version is `x.y.z-<word>.N`, such as `0.2.0-rc.1` or `0.2.0-beta.2`. `VERSION` holds it, the tag is `v0.2.0-rc.1`, and it gets a `CHANGELOG.md` entry as usual. --------- Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
588ba6f9a1 |
build: bump docker 29.9.3, mise 2026.11.3, rustup 1.29.3, oh-my-bash, tealdeer 1.9.1 and the --from digests
docker 29.9.3, containerd 2.4.2, buildx 0.38.1, compose 5.7.0, model 1.2.9; mise 2026.11.3 (VMs and the host mise); rustup 1.29.3; oh-my-bash 94c2977; tealdeer 1.9.1; e2e's node:24 and alpine:3 digests. Every checksum is from upstream's published sums. bump.sh's value check now knows a Go constant's camelCase *Digest name, which it refused before. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
22387c5b78 |
fix(scripts): bump.sh --check never offers an older version as the latest
When upstream's latest is a version older than the pin (a release marker that lags, as codex's and opencode's have), report() says the pin is newer and neither counts it as outdated nor bumps it. Digests and dated releases are compared as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
b24da31e41 |
build: Lima 2.3 in CI, bump.sh e2e-lima, and Lima 2.2 as devvm's minimum
CI's e2e workflow installs Lima 2.3.0, its tarball's checksum taken from the release's SHA256SUMS, checked against the sha256 Lima's release notes publish. scripts/bump.sh e2e-lima moves that pin the same way. devvm's doctor, install.sh, the README and the Lima page ask for Lima 2.2 or newer, compared by major and minor. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f3e4753445 |
build(release): the Homebrew formula installs the release's signed binary
The formula has an archive per platform (macOS and Linux, arm64 and Intel), each URL and checksum filled in by release.sh from the SHA256SUMS it wrote, and installs only the binary; no Go dependency. release.sh --formula-from DIR writes the formula for a published release from its downloaded SHA256SUMS, checked against minisign.pub. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
e9bd270398 |
docs: brew trust before brew install, as Homebrew 7 asks
The --confirm flag's ssh-askpass hint names no tool: put one on PATH or set SSH_ASKPASS. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
a85cba7858 |
build(release): scripts/publish.sh, a release from a signed tag in one run
The maintainer tags main's HEAD (git tag -s vX.Y.Z) and runs mise exec -- scripts/publish.sh, entering the minisign password once. It checks the preconditions (release.sh --check for the tag and its signer, main's HEAD and origin, a clean tree, gh logged in, minisign, no other release, the tap's checkout clean on main), builds dist/ with release.sh, prints the version, commit, files with sizes and SHA-256s, the CHANGELOG entry and the tap's diff, asks once on the terminal, then pushes main and the tag, makes the GitHub release as a draft with every file and publishes it, and commits and pushes the tap's formula. Each step skips what's done, a draft left by a failed run gets its files again, and a failure says what was and wasn't published. --dry-run stops before the question; --help. release.sh gains --check (the tag's checks only, printing its commit), fills in the formula's @URL@ and @SHA256@ only outside its comments, and points at publish.sh in its last line. Tests: testdata/script/publish.txtar (a local bare origin and tap, a fake gh, SSH-signed tags, a passwordless minisign key): refusals (no tag, a tag release-signer doesn't pin, a dirty tree, an existing release without its files, gh logged out, no tap), --dry-run, n, y failing at gh release create then at publishing the draft, the reruns and the call order, and a run with everything done. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
586b45f9ad |
fix(release): install.sh's checksum in the signed SHA256SUMS
release.sh wrote install.sh after it signed SHA256SUMS, so nothing signed covered the script and checking it by hand with the release key wasn't possible. It now writes install.sh, adds its checksum to SHA256SUMS, then signs. install.sh and devvm upgrade look up their archive by name, so the extra line changes nothing for them. release_head.txtar checks the line. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
8d44175601 |
refactor: the Go module is github.com/devvmhq/devvm
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2545de19f3 |
test(e2e): the Go runner is the entry point, mise run e2e -- FLAGS, and tests/e2e.sh goes
TestE2E already set up the sandbox, slots, locks and flags itself, so the 898-line script only handed over. The run is now `mise run e2e -- FLAGS` (go test -tags e2e from tests/e2e, CGO_ENABLED=0) with the same flags: --only, --from, --clean, --every-feature, --slots, --slot, --newest-base, --golden, plus --reuse. - options: the flags named as the script's options; the hand-over flags (lock-holder, count, total, started, summary) and the ported/unported split are gone. - e2eUbuntuRelease, a const in sandbox_test.go, holds the Ubuntu pin; scripts/bump.sh e2e-ubuntu moves it (get_const), and TestE2EUbuntuPins, bump.txtar and the E2E workflow read it there. - From the script into Go: the OpenSSL-not-LibreSSL host check, and --newest-base's start line and its UPSTREAM DRIFT summary. - The script's leftover bash helpers (perl vm_state, no_leak, ca_*, lima_listens, the retry list, its heartbeat) are gone with it. - mise's e2e:go task merges into e2e; TestCommandLines drops its $D rule. - Docs (contributing, testing, maintaining, internals) and AGENTS.md name mise run e2e; testing.md's "Porting a section" becomes "Adding a section". Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
500f70d8b0 |
test(e2e): the link and from sections in Go
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
15e063c616 |
chore: the Homebrew tap is devvmhq/tap
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f4f2ec6a8f |
chore: the repo is devvmhq/devvm
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
09f7f3b568 |
test(e2e): the Go end-to-end runner, tests/e2e, and its gc section
tests/e2e (build tag e2e) is the end-to-end runner in Go that takes over
tests/e2e.sh's sections one at a time. TestE2E is the run, with
tests/e2e.sh's options as flags (-e2e.only, -e2e.from, -e2e.clean,
-e2e.every-feature, -e2e.slots, -e2e.slot, -e2e.newest-base, -e2e.golden)
and its own -e2e.reuse. It keeps the sandbox (each slot's paths, Lima
home, XDG folders, Keychain service, ports +100 per slot, the lock),
devvm built from the checkout, config.toml and the pinned tool lock, the
host-tool check, the output lines (PASS/FAIL/SKIP/RETRY [n/N], times,
ETA), the heartbeat, each check's time limit (process groups: TERM, then
KILL), the timings files and the check-count guard (keyed by a checksum
of tests/e2e's Go files), the retry of checks marked Flaky, the slots'
plan, seeding (clonefile, reflinks) and summing, and the cleanup of only
what the run made.
Files: main_test.go (TestMain, TestE2E), options_test.go (flags),
sandbox_test.go, runner_test.go, check_test.go (S, Check, Skip, Flaky,
Builds, Tail, Needs), cmd_test.go (Run, Devvm, DevvmNames, Msg, Limactl,
InVM, Status), state_test.go (Paths: State, VMOf, VMDir, KeysOf, Record;
NewProject, Launch, Reuse, Layer, Own, Until, Settle, Port, Defer),
shared_test.go (Golden, GoE2E), slots_test.go, clone_{darwin,linux}_test.go,
sections_test.go (the table), gc_test.go (the gc section, its five check
titles tests/e2e.sh's word for word) and harness_test.go (TestHarness*,
no VM, run by scripts/test.sh).
tests/e2e.sh no longer has the gc block: after its own sections it hands
the chosen sections that go_sections lists to TestE2E in its sandbox and
under its lock, passing its pid, check count, expected total and start,
and adds the Go run's summary.go to its results. mise run e2e:go runs the
Go runner on its own. golangci-lint builds with the e2e tag; tests/e2e may
print, exit from TestMain, signal its own process groups, and run and read
its sandbox's commands and files.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
0941219a76 |
feat(build): base's packages recorded per key, replayed from a host cache
base's apt packages are no longer pinned by a snapshot. A key's first build of base records them: assets/layers/apt.sh (a recipe step, as root, before base.sh and after the last feature) points the image's sources at an apt mirror+file: list of config.toml's ubuntu-mirror and then Ubuntu's own archive, so apt checks everything against the archive key whichever server answers, and keeps what it downloads. At the end it gives back each package with apt's entry for it. devvm checks what comes back (regular files only, each named by its own SHA-256, each entry matching a file's size and SHA-256, nothing left over, at most 20,000 entries and 16 GiB), keeps the files in ~/.local/share/devvm/packages/<sha256>.deb and the key's set in packages/sets/<key>.json, before the image's record. Every later build of that key replays the set from the cache, checked on the host first, with apt given only those files: no network for base's packages, and a key's packages never change. A --from base keeps its image's own sources, unpinned. base keeps no package lists, so each layer's recipe starts with apt.sh lists, which fetches them when there are none. - backend.ImageSpec.Packages (Send before the steps, Take after) and backend.PackagesDir; Lima runs both over limactl shell as root. - Fail fast: apt.sh turns apt's retries off and exits 75 when no source answers, which Lima reports as build_sources_unreachable. - packages_missing refuses a replay whose cached file is gone or changed; packages_refused what a build gives back that isn't packages. - config.toml's ubuntu-mirror (settings.UbuntuMirror), checked as an http(s) address without a user, query or spaces (ubuntu_mirror_invalid). - devvm gc deletes the sets of keys neither current nor built, then, under the cache's lock, the files no set names at that moment, and builds' leftover folders over a day old (gc_packages, deleted_packages); devvm space lists the cache. - The snapshot is gone from base.sh, guest/sync.sh and desktop.sh, and scripts/bump.sh's apt step with it. - Tests: recording then replaying, a missing or changed cached file, every refusal of what comes back, gc's view of the cache and its race with a new set, the set record, the mirror setting, Lima's exchange and exit 75, apt.sh's mirrored and record functions, apt.sh in the keys; the limactl stub keeps what's sent and gives back $STUB_DIR/packages-out.tar. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
e93f29333a |
feat(ubuntu): pin the newest signed cloud image at base's first build
devvm's files keep only Ubuntu's release (26.04) and its cloud image key. The first build of base on a machine pins the newest dated release whose SHA256SUMS carry a valid signature from that key and list an image for the host (state.UbuntuPin, images/ubuntu.json), and every later build uses the pin without looking anything up. devvm rebuild base pins the newest again. The pin is in base's recipe, so base's key hashes it. The signature is checked in Go (internal/ubuntu/pgp.go: OpenPGP v4 RSA signatures with SHA-256/384/512, the standard library's crypto), so no gpgv is needed and a host without one is no longer unchecked. - backend.Images gains PinOrigin (backend.Pin: PinFirst, PinNewest, PinOlder); internal/build pins before it keys a build, and says what it pinned (origin_pinned). - Lima: Origin and createFromUbuntu read the pin; PinOrigin finds the newest with ubuntu.Finder (Newest, Release) under images/locks/ubuntu; a --from conversion pins only when nothing is. - Messages: ubuntu_unreachable and no_ubuntu_release; ubuntu_unsigned and ubuntu_checksum_unpinned are gone. - e2e pins its own release (DEVVM_UBUNTU_RELEASE, a test override; scripts/bump.sh e2e-ubuntu moves it); bump.sh's apt moves the package snapshot alone. The gpgv stub is gone. - Tests: the verifier against Ubuntu's real signature and a test key (damaged keys and signatures, packet and subpacket lengths, armor), Newest/Release, PinOrigin, the pin record, and the key covering the pin. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
1516133e5a |
test(e2e): pin the --from images by digest, and the tool lock outside the tools section
Every section but tools uses tests/e2e-mise.lock, the shared tools' versions resolved for both architectures' glibc and musl VMs, so the tool images built for them stay cached between runs. The tools section resolves upstream's newest first (its resolve check moves there) and puts the pins back at its end. The lock's first line is the SHA-256 of the assets/shared-tools/mise.toml it was resolved from, and a run stops at once for another. The from section's images, and the link section's Alpine client, go by digest: node:24, alpine:3 and ubuntu:26.04 pinned at the top of tests/e2e.sh. The company proxy's alpine:3.21, converted each run anyway, keeps its tag, so devvm's registry lookup is still checked. scripts/bump.sh moves both pins: e2e-tools runs devvm's pinned host mise's mise lock for the four platforms and refuses a tool without a checksummed download on each; e2e-from takes each tag's index digest from Docker Hub, its pull token passed to curl in a header file, never in its arguments. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f4fd373439 |
refactor(backend): remove the smolvm backend
Lima is devvm's only backend. The backend architecture stays (Backend, Caps, Features, Review/Require, the registry, backendtest.Fake), so another backend is an addition. State from a smolvm VM reads as an unknown backend (backend_unknown_vm, gc_orphans_unknown); nothing migrates it. The image keys of layers/docker.sh, layers/nix.sh and features/desktop.sh change, so images rebuild once. Lima's port forwarder moves off smolvm's files first: newForwarderCmd and forwarderMain from internal/cli/smolvmports.go to limaports.go, and assets/container/ports.sh to assets/guest/ports.sh (sent by the forwarder at run time, so no image key changes). Removed: - internal/backend/smolvm (4,070 lines with tests), _smolvm-ports, its registry entry, registry.Experimental and backend_experimental. - The decider: backend.Decider/UsesDecider, Confinement.Decider and DeciderToken, internal/proxy/decider.go and its test, the proxy's -decider, -decider-to and -decider-token-file, netpolicy's KeyDeciderPort, KeyDeciderToken and deciderToken, the decider port in vm's forwarding and UsedPorts. - backend.AgentStarter/AgentUnchosen, vm's checkAgentStart and agent_unchosen_stop. - vmssh/key.go (EnsureKey, Public, HostKey, ServicesArgs, Capped). - paths.Smolvm/SmolvmImage and space's smolvm folders; paths.VM's Record, Key, KnownHosts and ProxyURL; project.Detect, which nothing called (a test helper now). - ubuntu.ContainerRepo/ContainerDigest/ContainerRef/ContainerOrigin and bump.sh's ubuntu_image, with its part of bump.txtar. - assets/smolvm/ and assets/container/; the no-init-system branches of layers/docker.sh, layers/nix.sh and guest/sync.sh, and the notes in features/desktop.sh and guest/ca.sh. - Messages: smolvm_* (14), vm_no_ssh, vm_no_sshd, ports_no_ssh, creating_from_image, packing_image, pack_failed, backend_experimental, agent_unchosen_stop; descriptions naming smolvm reworded. - Tests: smolvm.txtar, the smolvm stub, registry, decider, netpolicy and sshagent cases; gc_backend, gc_skipped, gc_orphans and space test a failing or hanging Lima listing instead (the limactl stub's list-fails and list-hangs); the --backend smolvm examples; e2e's --backend smolvm and its section (about 1,130 lines), the smol_* helpers and the link section's backend switch. - Coverage: internal/backend/smolvm's lines in both baselines. - Docs: backends/smolvm.md, internals/smolvm.md, design.md's smolvm notes (Ports on Lima now holds the forwarder's description), the backends table's smolvm column, every page naming smolvm, the README, the home page's backends art, and AGENTS.md's smolvm rows and gotchas (and the Docker bind-mount gotcha, which nothing refers to). Kept: the docker layer, on Lima; --from's local Docker; --backend, the BACKEND column and setup's backend choice, which the next commit removes. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
1917072228 |
refactor(backend): remove the Docker backend
devvm is about VMs, and Docker's containers aren't VMs: Lima is the default backend and smolvm stays experimental. The backend architecture (Backend, Caps, Require, the registry, backendtest.Fake) stays, so another backend is an addition. Removed: - internal/backend/docker, its registry entry and Names/Experimental's docker half; devvm _docker-connect and _docker-ports (internal/cli/dockerssh.go); assets/docker/unpack.sh. - Test-build overrides DEVVM_DOCKER_KIND, DEVVM_DOCKER_PROC_SYS, DEVVM_LINUX_BUILD_URL/_SHA256, the registry.linuxURL/linuxSHA256 ldflags vars and the CLI tests' Linux-build archive (linux_release). - Interfaces only Docker implemented, with their callers: backend.ProxySocket/ProxySocketOf (the proxy's -listen-unix), DiskUser (ls's and size's disk-over warning, size's disk_used and --json disk_used_gib), Reporter (doctor), LeftoverLister and Leftover (gc --orphans' volumes, networks, containers and images), DockerLayerVM and VMSpec.DockerLayer, SSHTarget.ProxyCommand and vmssh.SSH.Proxy, vmssh.SSH.SessionArgs, CacheEntry.Name. - The docker layer's runtime on a backend that makes VMs for it: vm/dockerlayer.go, KeyDockerLayer, chooseNet's refusal (chooseNet returns a bool now), the refusals at start and devvm network on, ls's "(sysbox)" and --json docker_layer, size_disk_default_unused. - The proxy's relay mode (relay.go, -relay, -relay-to, -listen-unix). - paths.Dirs.Docker and paths.VM.Lifeline. - assets/guest/tools.sh's linked-folder branch; services.sh's DEVVM_LOOP, DEVVM_DOCKERD and DEVVM_SSHD=inetd. - Messages: every docker_* the backend used, docker_layer_runtime, net_docker_layer, net_off_docker_layer, committing_image, pulling_image, unpacking_tools, disk_over, size_disk_default_unused, gc_orphan_volume/_network/_container/_image, docker_connect_failed; gc_orphan_elsewhere reworded. - Tests: docker.txtar, the docker stub's engine (its --from half stays), the ssh stub's login-shell branch; e2e's --backend docker, --engine, the docker host VM and Docker Desktop runs. - Release: one GoReleaser pass, no Linux-build pin in the macOS builds, no Linux devvm in the Homebrew formula's libexec. Linux builds stay. - Docs: backends/docker.md and internals/docker.md, design.md's Docker notes, the Docker column of the feature table, and every page's mentions of the Docker backend, Docker Desktop as one, and Sysbox. Kept: the docker layer in Lima VMs, devcontainer docker-in-docker, --from with images only a local Docker has, Docker Hub references. State written by a Docker VM before this reads as an unknown backend (backend_unknown_vm). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
ee8146a5e4 |
fix: scripts and tests work without shasum, and two CLI scripts start Lima outside devvm on bash 5.2's sh
Fedora 43 has sha256sum but no shasum (Perl's Digest::SHA), and its /bin/sh is bash 5.3, which runs the last command of an `a && b` -c string in sh's place. - install.sh's check_host stops with "needs sha256sum or shasum" before downloading; its sha256 already used either. install.txtar covers shasum alone, both, sha256sum alone and neither, with made-up sums. - scripts/release.sh and scripts/bump.sh get a sha256 helper (sha256sum, else shasum -a 256) in place of four shasum calls. - gc_orphans, release, release_head and tools scripts hash with sha256sum, else shasum. tools' old fallback never fell back (the pipeline's status was cut's). - ls and existing_agents restart a VM outside devvm with `sh -c '... && limactl start ...; exit $?'`: without the exit, bash's sh exec'd the stub, whose ha.pid then named the test runner (the pid devvm recorded), so the VM still looked confined. - The install page lists sha256sum or shasum among the script's needs. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
6f9259b514 |
test: give each CLI test script its own coverage folder
The CLI tests' devvm is built with -cover, and every script set one GOCOVERDIR. Go names a run's temporary meta-data file by the time (time.Now().UnixNano(), microseconds on macOS) with no process ID, so two devvm runs from parallel scripts that start together write the same temporary file; the first renames it and the second's rename fails, and devvm prints "coverage meta-data emit failed" on stderr, failing any script that checks stderr (seen in ls.txtar and version.txtar). - script_test.go: scriptCoverDir sets GOCOVERDIR to a folder of the script's own (os.MkdirTemp under CLI_GOCOVERDIR). - scripts/test.sh: covdata merge takes the unit folder and every non-empty script folder as one comma-separated -i list, so percent and the baselines read the same counters as before. - Contributing's Coverage section says each script writes to a folder of its own, and why. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
b5742dca2c |
build: a package's coverage may sit up to a point below its baseline
The same tests can cover a little less from run to run, with timing or the tools a machine has, so mise run test fails a package only when it is more than a point below its baseline (COVERAGE_TOLERANCE, 1 by default). A package within that point passes and keeps its line, so a baseline still never goes down. coverage.txtar covers within, beyond and a tolerance of 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
ddbc377f8f |
test: testscript commands for the scripts' setup, and a coverage baseline per package
script_test.go's sandbox sets DEVVM_MESSAGES=names and DATA, VMS, RUN and CFG by default, and adds stub_reset, catg (the one file a glob matches), vm_name VAR NAME (the folder's VM) and project NAME [git]; script_cmds.txtar checks each. Every script is rewritten onto them, its assertions kept; TestCommandLines leaves the scripts' own commands out. mise run test runs scripts/test.sh: the tests as before, with the CLI tests' devvm built with -cover for every package (CLI_GOCOVERDIR), merged with the Go tests' counters by go tool covdata, then scripts/coverage.sh holds each package to testdata/coverage/<os>.txt. mise run coverage raises the baselines; coverage.txtar checks the comparison. The macOS baseline is recorded from this tree. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
91a429108f |
feat(images): a built-in nix layer with Nix, direnv and nix-direnv, pinned
nix is a layer devvm ships, as docker is: devvm nix, devvm node+nix, devvm build nix, or added to an existing VM in place. A folder with flake.nix, shell.nix or devenv.nix at its top level, or a default.nix that makes a shell (mkShell), gets it after its toolchains, so package.json and flake.nix give node+nix. - assets/layers/nix.sh: Nix 2.35.4's release tarball (releases.nixos.org), its version and SHA-256 per arch at the top, checked against the tarball's .sha256 files and nixos.org/nix/install, fetched with devvm-fetch; 2.35.3 fixes GHSA-hf6w-2rg9-v84g (store ownership in the scripted installer) and CVE-2026-110450 (store corruption through the daemon's repair flag). The tarball's own install --daemon --yes --no-channel-add, with experimental-features = nix-command flakes, trusted-users = root, sandbox = true and sandbox-fallback = false. The installer runs without proxy variables (it writes any it finds into a systemd override for nix-daemon, which would put a build's proxy into the image) and with NIX_SSL_CERT_FILE at the system's bundle. The layer checks the store is root's, adds Nix's default profile to the end of sudo's secure_path (/etc/sudoers.d/devvm-nix, checked with visudo), and appends Nix's profiles to BASH_ENV's PATH. direnv 2.38.2 (per arch) and nix-direnv 3.2.0's direnvrc, pinned the same way; direnv's hook in ~/.bashrc.d/direnv.sh, which loads before mise.sh so direnv's prompt hook runs after mise's and a dev shell's PATH comes first; a direnv lib file puts each project's layout under ~/.cache/direnv/layouts, so nix-direnv writes no .direnv into the project folder. Without systemd the script refuses in one line. - assets/layers/nix.policy: cache.nixos.org, channels.nixos.org, releases.nixos.org (GitHub is in base.policy). - assets/guest/sync.sh: nix-daemon gets a systemd drop-in with the VM's proxy (http_proxy, https_proxy, no_proxy) under network policy, removed when it's off, the daemon restarted when it changed. - image.NixLayer in Builtins; project.Detect's nix marker (a default.nix is read only as a regular file, at most 64 KiB); backend.FeatureNixLayer (nix-layer), needed by a VM of an image with the layer and by building one: Lima native, smolvm and Docker none, so both refuse in one line (backend_lacks); dockerLayers.choice returns every layer feature of the image, so docker+nix on Docker needs nix-layer too. - scripts/bump.sh: nix (the version nixos.org's installer names, the sums Nix publishes; it fails when the installer names no tarball, as Nix's Rust installer will), direnv, nix-direnv. - Docs: using/images (built-in layers, detection), using/toolchains (Nix projects), safety/network (the layer's hosts; source builds' hosts blocked), internals/images (the nix layer), internals/network (the daemons' drop-ins), internals/backends (nix-layer), internals/design (the nix layer beside Instead of Nix), backends, customizing, coding-agents, contributing (the e2e section); the CLI reference; AGENTS.md's assets/ and e2e lines. - Tests: Detect (markers, default.nix with and without a shell, a linked one), layer and environment lists, layer new nix reserved, nix-layer in ImageSpec and ImageFeatures, caps tests, up_checks.txtar (node+nix detected under an agent), docker.txtar (nix refused for a VM and a build). e2e nix section: the layer built behind a company proxy leaves no proxy settings and no password on its image's disk; a node+nix flake VM with network policy: pins, a root-owned store, sandbox without fallback, trusted-users root and an untrusted substituter ignored, the daemon's drop-in, nix run nixpkgs#hello, sudo nix and nix over ssh, the flake's node ahead of the shared node prompt after prompt through direnv, no .direnv in the folder, a blocked fixed-output fetch named by devvm-why, and the drop-in gone after network off. Review (security-audit skill, guidance mode, against the review task's list): the tarball and direnv's files are pinned in devvm's source and checked before tar or install runs; nothing from the host goes into the image (no proxy override, e2e greps the disk); the drop-in holds only the VM's own proxy URL, devvm's value, and goes when policy is off; trusted-users stays root and an untrusted user's substituters are ignored (the VM's user has sudo, so that guards an honest VM and the allowlist is what holds); secure_path gains only the root-owned default profile, last; /nix is on the VM's own disk and nothing mounts a host's or another VM's store. Found and fixed in review: Nix's default sandbox-fallback would build unsandboxed without a word where the kernel can't sandbox, so it's off. No confirmed findings. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
857c0e8c53 |
docs(site): sections in the reader's order, attack vectors and a first-VM page
The docs move into a folder per sidebar section, in the order a new user needs them: getting-started (install, first-vm, commands), using (images, customizing, from, devcontainer, coding-agents, ssh, limits), safety (attack-vectors, network, clone, git-protection, security), backends (backends.md as the section's _index.md, lima, smolvm, docker), internals (design), cli, and contributing (contributing.md as its _index.md, testing, maintaining). Each section has an _index.md listing its pages, and the docs index is grouped the same way. Commands is now Everyday commands, SSH is SSH and editors. New pages: - safety/attack-vectors.md: Staying safe first (seven habits), then common attacks sorted into Blocked, Kept inside the VM, Narrowed, not closed, and Left to you. - getting-started/first-vm.md: making a VM, the first run, what's in it, coding agents, coming back to it. Links to Staying safe from the home page, README, security, install, coding agents and clone. Every relative link, the home page's, the README's, SECURITY.md's, CONTRIBUTING.md's, AGENTS.md's, the proxy and oci READMEs', release.sh's hints and the recording's URL use the new paths. internal/msg/docs.go names pages by path (using/images#...), and checkDoc takes a section's _index.md for its folder (backends#...). contributing/_index.md describes the sections and how links name them. Also carries the docs edits made alongside the forwarder work in the tree (backends, images, limits, security, design, commands and the generated devvm ports page), whose code isn't in this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
cf5a7db974 |
fix(images): pin Lima's Ubuntu cloud image with base's snapshot
Lima's base starts from a pinned dated Ubuntu cloud release (release-20261016) with each architecture's SHA-256, checked against Ubuntu's signed SHA256SUMS; another checksum is refused (ubuntu_checksum_unpinned). The pin is in base's image key (Lima's KeyFiles). scripts/bump.sh apt moves it with the snapshot and container digest: the newest release dated before the snapshot, its SHA256SUMS checked with gpgv against Ubuntu's cloud key. e2e: default tier 146/0, --only from 13/0. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
fcbea2c744 |
feat(docker): network policy, and build confinement on Docker Desktop
A Docker VM with network policy sits alone with a relay container on an internal network of its own (inhibit_ipv4). The relay, devvm's own Linux build in an empty imported image (read-only, every capability dropped), copies the VM's connections to a unix socket of devvm's proxy on the host, so tokens, the Keychain, the CA key and agents' logins never enter Docker. On and off is docker network connect/disconnect at the next start. Desktop builds run on a network and relay of their own, through a host proxy allowing any host on ports 80 and 443. - every Docker VM drops NET_RAW; it's in the config hash, so containers are made again from their commit - confined: the start's ID, the VM alone on its network with the relay by its recorded container ID, the network still internal; a foreign member is docker_network_shared, at start and on removal - proxy: -listen-unix, -relay/-relay-to; a lifeline pid file written after the proxy started whose process has gone ends it - macOS fetches the release's Linux build on first use, checked against a SHA-256 the two-pass release.sh bakes in; builds without the pin use devvm-linux-<arch> beside devvm or refuse - the build proxy is stopped through the process devvm started - reviewed: design notes and threat check in design.md; e2e on the Linux engine and Desktop: dropped capabilities, network members and options, no IPv6 beyond the bridge's link-local, no DNS query leaving (captured, with an unconfined control), direct connections refused Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2b413028e6 |
fix(images): pin Ubuntu's container image with base's package snapshot
smolvm's and Docker's base start from Ubuntu's container image by a digest pinned in internal/ubuntu (ContainerDigest), not the tag's digest looked up at build time. base's key hashes it (each backend's KeyFiles), and base's record names it. The image is never newer than assets/layers/base.sh's snapshot: an image with newer packages leaves apt unable to install what depends on their exact versions (the docker layer's docker-ce, through systemd's libsystemd0). - internal/ubuntu: ContainerRepo, ContainerDigest, ContainerRef, ContainerOrigin; the backends' Digest fields and UbuntuImage go. - base.sh: apt_snapshot 20261026T000000Z, with the image's digest sha256:19fcd1bf268f (built 2026-10-25). - scripts/bump.sh: apt moves the snapshot and the image's digest together (the index's digest hashed from what the registry sent), and refuses an image built after the snapshot; bump.txtar covers both. - tests/e2e.sh: timings per selection and Docker engines, so an --engine linux run isn't compared with one that included Desktop; the Linux engine's run pulls the pinned Ubuntu image before recording what Docker has without the sandbox's label; base's records are checked against the pin; smolvm's TSI check takes any of this machine's resolvers; the from section allows devvm's labelled VM listing. - docs: smolvm, Docker, images, maintaining, contributing; design.md's smolvm notes describe the reviewed emulations as they are. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
e6681035b2 |
feat(images): a built-in docker layer
Docker is a layer devvm ships, docker, chosen per VM like any layer (devvm node+docker, devvm build docker) and added to an existing VM in place. base installs no Docker. - Built-in layers: image.Builtins (docker) and IsBuiltin; a name is looked up in devvm's assets/layers first, so a user's docker.sh is never read; devvm layer new docker is refused (layer_name_reserved); an image's key hashes the shipped script (own file, must exist); Layers, Environments, completion and unknown_layer/no_image_for list it; Env.LayerData reads either kind's script. - assets/layers/docker.sh: Docker's apt repository (pinned key, pinned package versions; Alpine's own packages, rc-update, the docker group), the daemon started now too (OpenRC, or with no init system as services.sh does) for a VM it's added to in place. scripts/bump.sh's docker pins read it. - assets/layers/docker.policy: Docker's packages and the registries, applied to VMs with the layer (netpolicy.PolicyFiles); base.policy keeps OS packages (Alpine's too), mise and GitHub. - Adding layers in place sets the new image in the VM's state before their scripts run, so a network-policy VM's proxy allows their hosts; a failing script sets it back. - smolvm's sshd.sh keeps the snapshot's package lists, for layers' apt-get install. - Docs: images (base, built-in layers, keys), customizing, commands, network, smolvm, from, install, maintaining, design, coding-agents, contributing; the CLI reference; AGENTS.md's assets/ line. - Tests: key, layers, build, policy files, in-place add (devvm's script, image during the run, set back on failure), layer new docker; e2e: a base VM has no Docker (Lima, smolvm), the docker layer on Debian 12 and Alpine (from), and smolvm's network-policy VM is a docker VM whose Docker pulls through the proxy. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
9f24d2639e |
refactor: group devvm's files under assets/
assets/ holds the files devvm ships: base.yaml, layers/, features/, shared-tools/ (mise.toml, build.sh, the tools' policies), guest/ and oci/. devvm reads them from assets/ beside its binary (paths.Root, paths.RootOf); releases, the Homebrew formula, the CLI tests and e2e put them there. Image keys hash them by their names in assets/. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
37d2fa57e4 |
feat(install): install.sh for the per-platform release archives
install.sh picks this host's archive (devvm-<version>-<os>-<arch>.tar.gz: darwin or linux, arm64 or amd64; Apple silicon's under Rosetta, from sysctl hw.optional.arm64), checks SHA256SUMS's minisign signature (an empty key still skips it, with a warning; no minisign prints the command to check by hand), then the archive's checksum, and installs the binary with its data files in <prefix>/lib/devvm/<version>, linked from <prefix>/bin/devvm. Older versions go, except one a running process names in its arguments (a VM's proxy, QEMU's guestfwd on Linux): it's kept until a later install. Then it offers devvm doctor --fixes' fixes, asking first (Homebrew's Lima or Lima's checked release tarball, QEMU, the kvm group), and runs devvm doctor. Downloads are HTTPS only. Its text isn't messages: it runs before devvm is there. release.sh --head now needs install.sh too. Tests: testdata/script/install.txtar sources install.sh (host and archive names, Rosetta, version choice and validation, HTTPS-only fetch, run_fix as words, install and links, reinstall, an older version in use kept (and the real ps), signature good, bad, missing, no minisign, a bad checksum, no archive for this host, Lima's tarball for the host and arch and a bad checksum, the PATH hint, the fixes with --yes, the kvm re-login, no yes, Lima's release once allowed, nothing missing, main's options, and the tests' devvm binary installed and finding its files); release_head.txtar: a HEAD without install.sh is refused. docs: install.md (Homebrew and the install script, upgrading, uninstalling), maintaining.md (trying install.sh on a --head build), README. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f42d436350 |
build(release): release.sh around GoReleaser, bump.sh
scripts/release.sh checks the signed tag (git tag -v) and its signer against this checkout's packaging/release-signer, then runs goreleaser release --skip=publish (--snapshot with --head) in a clone of the commit, so only what's committed goes in. .goreleaser.yaml builds darwin/linux x arm64/amd64 archives with the binary and its data files, a source tarball and SHA256SUMS, with -X github.com/w3cj/devvm/internal/cli.version (VERSION's version, for HEAD too). release.sh checks the host's binary prints the version, signs SHA256SUMS with minisign and verifies it, fills in install.sh (release_version, minisign_key) and the Homebrew formula, which builds from the source tarball with Go (brew audit --strict clean). --head takes DEVVM_MINISIGN_PUB for a test key, and skips a missing install.sh; a tag without one is refused. scripts/bump.sh writes the host mise's pins in internal/tools/mise.go. VERSION and a fresh CHANGELOG.md. docs: maintaining.md (pins, releasing). Tests: testdata/script/release.txtar (unsigned tag, no pin, another signer, the checkout's pin, no install.sh), release_head.txtar (unsigned, signed and verified, install.sh and formula filled in, only committed files, wrong key, wrong version, bad install.sh, bad VERSION), bump.txtar (crane, mise in base.sh and mise.go, hostile and missing values, --check control characters, unknown tool). The sandbox sets DEVVM_REPO. Co-Authored-By: Claude Opus 5.5 <[email protected]> |