8000 fix(install): refuse 0.7 over 0.8 state that an install by commit hash wrote by agent-137 · Pull Request #3901 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(install): refuse 0.7 over 0.8 state that an install by commit hash wrote - #3901

Merged
mitodrummer merged 1 commit into
mainfrom
fix/install-refuse-downgrade-by-hash
Nov 30, 2026
Merged

mitodrummer merged 1 commit into
mainfrom
fix/install-refuse-downgrade-by-hash

Conversation

@agent-137
Copy link
Copy Markdown
Member

Fixes #3900, the must-have found by #3876 J2 on the VM provider.

Situation

On Karl's Mac, in a Linux VM with nested KVM and local-minvmd, install.sh --version 0.7.2 over 0.8 state from f0ccb306 installed every component and exited 0. R2.6 says it must refuse before downloading anything.

Cause

state_from_0_8 had two ways to find 0.8 state, and neither works here:

  • The install.toml key. A bucket install of a nightly or candidate writes the commit hash (f0ccb306) as the key, and ver_from_0_8 cannot place a hash.
  • The box index. With the VM provider, sessions/index.json is inside providers/local-minvmd0/data-vol.raw, so the host never has one.

Change

  • scripts/install.sh: when the key is not a version, state_from_0_8 asks the min on disk with min version, once per run. That min is the build the install put there, and a report of 0.8 or later counts as 0.8 state. The key itself stays the hash, because the update check compares it with the channel pointer.
    • client_version moves above state_from_0_8. The first refusal check runs before its old definition.
  • docs/specs/07-spec-installer: R2.6 states the rule and its verification case. vale is clean on the R2.6 paragraph, and one alert that was already in that paragraph is fixed too.
  • scripts/install_test.sh, case rd13:
    • An install by hash whose min reports 0.8.0-dev.748.gf0ccb306, with no box index on disk, is refused for --version 0.7.3. The refusal exits 1, downloads nothing and replaces nothing.
    • A hash install whose min reports 0.7.3 installs 0.7.3.

Verification

  • just test-installer: 1301 passed, 0 failed.
  • rd13 fails on main (4 checks: exit 0, a download, no refusal, min replaced) and passes with this change.

Not in scope: a VM-provider state with no install.toml, one that the installer did not make, is still not detected. #3900 records this.

🤖 Generated with Claude Code

https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA

…h wrote

An install of a nightly or candidate by its commit hash writes the hash as
the install.toml key, which ver_from_0_8 cannot place. With the VM
provider the box index is inside the VM's data volume, so the host has
none either. `--version 0.7.2` over such 0.8 state then installed every
component and exited 0. state_from_0_8 now asks the min on disk when the
key is not a version, once per run. Spec 07 R2.6 states the rule, and
install_test.sh case rd13 pins it.

Fixes #3900.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
@agent-137
agent-137 requested a review from a team as a code owner November 30, 2026 16:52
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@coderabbitai
coderabbitai Bot commented Nov 30, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 3 billable files and costs up to $0.75.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 3 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 2a436b4d-f4f4-49c9-bbea-1fa5cc3a94ee
Commits

Reviewing files that changed from the base of the PR and between f2c9971 and 4b50562.

Files selected for processing: 3

  • docs/specs/07-spec-installer/07-spec-installer.md
  • scripts/install.sh
  • scripts/install_test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@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:1019: 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@8acb0663, spec format: How Minimal Writes Specs.

@minimal-foundry
minimal-foundry Bot commented Nov 30, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 4b5056201dde.

Nothing to do.

Clobber: none seen.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

The design of record does not rule on the installer's 0.8 state check, so this is a PASS by absence. The rule is R2.6 of the installer spec, and the change updates R2.6 with the code. The PR body says Fixes #3900, but #3900 also records the residual: VM-provider state with no install.toml. Keep #3900 open or file a new issue for that residual before the merge closes it.

Ruled at 4b50562 against gominimal/arch@90e3c006ebf0 by claude-opus-5-5.

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

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 30, 2026
@mitodrummer mitodrummer 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.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit b93ee6b Nov 30, 2026
44 checks passed
@mitodrummer
mitodrummer deleted the fix/install-refuse-downgrade-by-hash branch November 30, 2026 19:42