Skip to content

feat(installer): install a staged version with --version - #1716

Merged
norrietaylor merged 2 commits into
mainfrom
feat/install-version-flag
Sep 25, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
feat/install-version-flag

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • install.sh accepts --version VER / --version=VER. It installs versions/VER/ directly and fetches no pointer, so testers can install a staged release that no channel points at. Versioned release runs stop moving unstable once #1712 lands.
  • The value gets the same guard as a fetched version: charset A-Za-z0-9._-, with . and .. rejected. The script exits with an error if the value is missing or is a flag, or if a target (positional or MINIMAL_INSTALL_TARGET_OVERRIDE) is passed too.
  • Spec 07 adds R2.5 and its proof tests.
curl -fsSL https://storage.googleapis.com/minimal-one/versions/X.Y.Z/install.sh | sh -s -- --version X.Y.Z

This only works for versions staged after this merges, because each staged version ships its own install.sh. The runbook's step 5 keeps the private-pointer route for now. I'll switch it in a follow-up after #1712, which rewrites the same paragraph.

Test plan

  • sh scripts/install_test.sh: 289 passed, 0 failed (macOS sh)
  • dash scripts/install_test.sh: 289 passed, 0 failed
  • shellcheck scripts/install.sh scripts/install_test.sh: clean
  • New cases: install with the pointer file removed, --version=VER combined with --force-stop, .., a bad charset, no value, a flag as the value, target plus --version, and an unstaged version.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Install a specific staged version directly with --version VER or --version=VER, without resolving a target pointer. This option can be combined with other flags.
  • Bug Fixes
    • Missing, empty, invalid, or flag-like version values are rejected, as are conflicts with a positional target or target override.
    • Direct version installs identify the selected version in output. Existing target-based installation behavior remains unchanged.

--version VER (or --version=VER) installs versions/VER/ directly and
skips the pointer fetch, so a staged release that no channel points at
can be tested without writing a private pointer. The value takes the
same charset and dot-segment guard as a fetched version, and cannot be
combined with a target.

Co-Authored-By: Claude <noreply@anthropic.com>
@norrietaylor
norrietaylor requested a review from a team as a code owner September 25, 2026 19:47
@github-actions

Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/07-spec-installer/07-spec-installer.md — 4 finding(s)

docs/specs/07-spec-installer/07-spec-installer.md:1: F004 frontmatter is missing `owner:`, `epic:`, `arch:`, `updated:`
docs/specs/07-spec-installer/07-spec-installer.md:1: S002 missing 6 required section(s): `## Users and stories`, `## Requirements`, `## Non-goals`, `## Design reasoning`, `## Security considerations`, `## Open questions`
docs/specs/07-spec-installer/07-spec-installer.md:37: S003 19 section(s) are not part of the spec format: `## Introduction/Overview`, `## Goals`, `## User Stories`, `## Demoable Units of Work`, `## Non-Goals`, `## Design Considerations`, `## Repository Standards`, `## Open Questions`, `## Technical Considerations`, `## Security Considerations`, `## Verification`, `## Introduction/Overview`, `## Goals`, `## User Stories`, `## Demoable Units of Work`, `## Non-Goals (uninstaller)`, `## Design Considerations (uninstaller)`, `## Security Considerations (uninstaller)`, `## Verification (uninstaller)`
docs/specs/07-spec-installer/07-spec-installer.md:796: S005 `## Context` appears twice; the first is on line 12

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@30c96c14, spec format: How Minimal Writes Specs.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 34c041f2-1066-4536-a86b-07c7f0895c98

📥 Commits

Reviewing files that changed from the base of the PR and between 2c8b08e and 0307084.

📒 Files selected for processing (3)
  • docs/specs/07-spec-installer/07-spec-installer.md
  • scripts/install.sh
  • scripts/install_test.sh

Included review availability: Your plan provides up to 5 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The installer adds --version VER and --version=VER to install a staged version without resolving a target pointer. It validates the version and rejects missing values or conflicts with a target selection. The specification and tests cover this behavior.

Changes

Direct Version Installation

Layer / File(s) Summary
Version option contract and parsing
docs/specs/07-spec-installer/07-spec-installer.md, scripts/install.sh
The specification and usage example describe --version. The installer parses both supported forms and rejects empty or flag-like values.
Version validation and manifest resolution
scripts/install.sh, scripts/install_test.sh
The installer rejects invalid or conflicting versions and uses the selected version without fetching a target pointer. Tests cover successful installation and rejected arguments.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Feature

Suggested reviewers: 0chroma, twitchyliquid64

Merge Risk: ⚪ Minimal · up to 03070

The new option installs a staged version without resolving a channel pointer, and the supplied tests cover invalid, missing, conflicting, and unstaged versions. No identified issue requires delaying merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding --version support to install a staged version. It follows the repository's Conventional Commit format.
Description check ✅ Passed The description provides a clear summary and detailed testing evidence, including commands, results, and new test cases. It does not use the exact "Testing" and "Checklist" headings, and it omits the …
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

A rabbit checks the version flag,
Then hops past pointers with its tag.
It guards against an empty name,
And keeps bad versions out of the game.
The staged manifest waits in sight,
The rabbit installs it right.

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

@minimal-foundry

minimal-foundry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Approved: no findings at 03070843c20f.

Nothing to do.

Clobber: none: git log on all three files shows only the PR's own two commits (2c8b08e5, 03070843); no recent fix is reverted.

@norrietaylor
norrietaylor enabled auto-merge (squash) September 25, 2026 19:53

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Comment thread scripts/install.sh Resolved
The `--version=VER` form skipped the `''|-*` guard the space form applies,
so `--version=` died with a misleading "invalid version" and
`--version=--force-stop` was taken as the version and failed only at the
manifest fetch. Both forms now die with "needs a value"; R2.5 tests and
spec text cover the `=` form.

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

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Sep 25, 2026
@norrietaylor
norrietaylor merged commit c5091f0 into main Sep 25, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the feat/install-version-flag branch September 25, 2026 20:50
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.

2 participants