Repository navigation
Conversation
A daemon on the laptop keeps a copy of the binary cache objects and the package repositories its clients fetch, plus what the registered projects, loadouts and an always list need, so `min init` and `min session activate` work with no connection once `min mirror prepare` reported ready. Every client reads the mirror over HTTPS and checks its certificate against one configured authority: the host CLI and native daemon at loopback, the in-VM daemon at host.min.internal through the switch's host alias, and a Box Host elsewhere at a shared mirror's name. The laptop's mirror generates its own authority; a shared one carries an operator's certificate. Pins follow sealed closures: init and update pin the newest commit within 64 first-parent commits that has a published closure, and the mirror's absence records let that walk run offline. The closure's sigstore bundle, the commit map and the Sigstore trusted root are kept for a later verifier. Draft: the epic and spec number are placeholders, and the Open questions list the decisions still to make. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
…work mirror Findings from the TLS-round review. Git chooses its certificate authority once, for the URL it starts with, and keeps it across a redirect, so a 302 from the mirror to an upstream fails the upstream's handshake under the mirror's authority. The client now asks the mirror for the repository's refs over its own pinned connection and runs git either against the mirror with no redirects or against the original URL with the system authorities (MIR-013). A `[mirror] upstream` setting names what the mirror copies, so a laptop's mirror can chain to an office mirror, and `MINIMAL_MIRROR_URL` now replaces the default read location only. A mirror on a network refuses misses once over budget and runs at most 8 upstream fetches at a time. The slug grammar admits any path depth, TLS 1.2 stays admitted for the host's git, `mip` prints a remedy that does not name `min`, the guest token is `MINIMALD_*`, and multi-clause requirements are folded to one SHALL each. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Rewrite MIR as one mirror per user on the laptop, read through a private Unix socket on the host and a vsock door in each VM, with no TLS on the client leg. Key cache paths by origin so the client keeps choosing its cache, cache every hop of each project's upstream chain and its sideloads, and read private repositories and buckets with the user's own credentials. Move the shared office mirror, tiers of mirrors and per-link cache declaration to Non-goals as follow-up specs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/arch-review |
There was a problem hiding this comment.
arch-review: CONDITIONS · 4 conditions · the full ruling
Most of MIR conforms to the design. One condition is about a security boundary. Through the vsock door, a guest can make the laptop fetch from any HTTPS host or clone any repository. Section 5.1 line 109 bounds node-plane reach to listed categories, never a general-purpose allow-list. C1 bounds door requests to that set. C2 changes --json to -o json. C3 sets the arch: frontmatter. C4 files the epic and the deferred issues. The escalation asks if the design admits a guest-initiated door at all.
Ruled at 1a3b9a4 against gominimal/arch@109541a48c31 by claude-opus-5-5.
| verify: cargo nextest run -p minmirrord control_verbs_refused_through_a_door | ||
| <!-- a guest reads; only the laptop decides what is registered, protected and credentialed (MIR-027) --> | ||
|
|
||
| - **MIR-081** THE SYSTEM SHALL open an outbound connection only for a key in the grammar, to the origin the path names, or for a repository copy, to that repository's host. The one exception is the Sigstore trusted-root host, for `/-/sigstore/trusted_root.json` alone. |
There was a problem hiding this comment.
C1 · Through a door, this requirement admits any host in the grammar. Section 5.1 line 109 bounds node-plane reach to listed categories. Add a door sub-requirement: contact only the default or a registered cache origin, or the trusted-root host. Answer 404 for any other origin.
| tier: T1 | ||
| verify: cargo nextest run -p minmirrord outbound_hosts_follow_the_grammar | ||
| property: for every request sequence from clients, every connection the mirror opens goes to the host a parsed request path or a repository copy names. The trusted root is the only fetch that goes elsewhere. | ||
| <!-- the guest reaches every such host itself through the VM's network today, so the mirror widens no reach; what it adds is the user's credentials, which MIR-082 bounds --> |
There was a problem hiding this comment.
C1 · This claim holds only for the baseline as it is enforced today. Under section 5.1 the guest does not reach every such host. Replace the claim with the door bound that C1 adds.
| tier: T0 | ||
| verify: cargo nextest run -p minmirrord copy_served_to_host_and_guest | ||
| <!-- git hashes every object it receives, from a local repository and from a bundle, and the checkout is by commit hash, so the copy cannot substitute content --> | ||
| - WHEN a client asks for a repository the mirror holds no copy of THE SYSTEM SHALL clone it before answering. |
There was a problem hiding this comment.
C1 · A door request for a repository that no registration named must not cause a clone from the host. Answer that the mirror holds no copy. The guest then fetches over the VM network, under the egress filter.
| - WHERE the `--all` flag is present THE SYSTEM SHALL also fetch every artifact named by the sealed closure of each pinned commit and of the default upstream's newest sealed `main` commit, within the budget. | ||
| tier: T0 | ||
| verify: cargo nextest run -p minimal prepare_all_fetches_whole_closures | ||
| - WHERE the `--json` flag is present THE SYSTEM SHALL print the report as one JSON document under the schema `min/v1/mirror-prepare` with the same exit codes. |
There was a problem hiding this comment.
C2 · The design's machine-output flag is -o json (principle 4, line 330, and global flags, line 342). Write WHERE -o json is given.
| tier: T0 | ||
| verify: cargo nextest run -p minimal status_report_fields_and_exit_code | ||
| <!-- the one surface that stays and that every warning in this document points at; the first slice prints the `mirror:`, `origins:`, `disk:` and `repositories:` lines --> | ||
| - WHERE the `--json` flag is present THE SYSTEM SHALL print the same facts as one JSON document under the schema `min/v1/mirror-status`. |
There was a problem hiding this comment.
C2 · Write WHERE -o json is given. Do not add a --json flag.
| title: Mirror — one copy per laptop of the package cache and the package repositories, which every client and every VM on the laptop reads, so boxes come up offline | ||
| owner: msample | ||
| epic: gominimal/inbox#TBD | ||
| arch: none |
There was a problem hiding this comment.
C3 · This spec changes node-plane reach, which networking design sections 5.1 and 7.1 govern. Set arch: to that design and arch_sha: to 109541a48c3186c74136ace7c8584486586861df.
| ## Open questions | ||
|
|
||
| - [NEEDS CLARIFICATION (HIGH): the spec number and the epic. `30` is the next free number in this tree. The epic issue does not exist yet, and the header holds a placeholder. Non-goals names the follow-up issues to file with it: the shared mirror and tiers, credentials through the Box Egress Proxy, the client-side verifier, source tarballs, and a login unit.] | ||
| - [NEEDS CLARIFICATION (HIGH): the node-plane baseline. NET's built-in baseline names the switch's host alias as the `cache` endpoint for the guest daemon's own traffic, and its enforcement waits on a cache answering there. Through the door, the guest's cache traffic leaves the network path entirely, and only a repository the mirror cannot copy reaches its origin over the network (MIR-025). NET's owner decides whether the `cache` entry goes, and whether a direct repository fetch stays admitted once the baseline is enforced.] |
There was a problem hiding this comment.
C3 · Design section 5.1 line 109 and section 7.1 line 244 own this question, not the NET spec. Name them here, and link the arch issue that the escalation opens.
|
|
||
| ## Open questions | ||
|
|
||
| - [NEEDS CLARIFICATION (HIGH): the spec number and the epic. `30` is the next free number in this tree. The epic issue does not exist yet, and the header holds a placeholder. Non-goals names the follow-up issues to file with it: the shared mirror and tiers, credentials through the Box Egress Proxy, the client-side verifier, source tarballs, and a login unit.] |
There was a problem hiding this comment.
C4 · File the epic and the follow-up issues that Non-goals names, and link each one. The client-side verifier is a design requirement (Glossary line 87). Without an issue, nobody owns it.
| verify: cargo nextest run -p minvmd vm_host_daemon_reads_mirror_table_from_client_config | ||
| <!-- today `mip` reads no user configuration file and the VM host daemon reads only its own provider file, so both gain a reader of this one table --> | ||
|
|
||
| - **MIR-023** WHERE the VM host daemon boots a guest and the client configuration enables the mirror THE SYSTEM SHALL start the mirror daemon if it is not running, connect each connection the guest opens on vsock door 7354 to the host socket, and put the token `MINIMALD_MIRROR_DOOR=7354` on the guest's command line. |
There was a problem hiding this comment.
MIR-023 · This door is a guest-initiated channel to a host-side service. Section 7.6 line 296 says the vsock control channel is host→guest only. The escalation asks the design owner to admit or refuse this door. C1 limits the door until that decision.
|
Heads-up on the spec number: 31 is free on main and on the open spec branches. Could you renumber |
|
gominimal/arch#158 proposes a registry and cache HTTP protocol that changes several of MIR's foundations. Checked against this PR's head,
It may be worth holding MIR's repository-copy, bundle and sealed-pin sections until that issue settles. The cache-object half of MIR maps onto the v1 layout almost directly. 🤖 Generated with Claude Code |
Note, 2026-11-15: the registry proposal in gominimal/arch#183My comment of 2026-11-02 here compares this draft with gominimal/arch#158. The proposal in gominimal/arch#183 ( What stays: one daemon for each user, outside the VM, on a host socket and one door for each VM, with no TCP listener (MIR-008). What changes:
🤖 Generated with Claude Code |
What
The spec for MIR, the mirror: a daemon that keeps a copy of the binary cache objects and the package repositories its clients fetch, plus what the registered projects, loadouts and an always list need, so a new project and a new box come up with no connection.
docs/specs/30-spec-mirror/30-spec-mirror.md.Shape
https://127.0.0.1:7657/, the in-VM daemon readshttps://host.min.internal:7657/through the switch's host alias, thecacheendpoint NET-130 already names, and a Box Host elsewhere reads a shared mirror's URL with[mirror] urlandca.min initandmin updatepin the newest commit within 64 first-parent commits that has a published closure, and the mirror's absence records let that walk run offline. This changes whatmin updatemeans..closure.shisha.sigstore.json,.map.json) and the Sigstore trusted root are kept for a later client-side verifier.min mirror status | prepare | clean | forget | stop.Status
Draft. The epic issue and spec number are placeholders. The Open questions section lists the decisions still open: the authority on the laptop (generated, fingerprint on the command line, or the Box Egress Proxy's key store), the shared mirror's trust model, the
min updatesemantics change, the default budget, and the cache reader's TLS backend.Four adversarial review rounds shaped the draft. The last one, on the TLS and shared-mirror sections, landed as the second commit: the client reads the mirror's redirect itself because git keeps one certificate authority across a redirect, a
[mirror] upstreamsetting lets a laptop's mirror chain to an office mirror, and a mirror on a network refuses misses once over budget.🤖 Generated with Claude Code