Repository navigation
Tags
Tags
test(mfile): T27 — Pin golden vectors for the example and the built-i… …n types (#3439) * test(mfile): pin golden vectors for the example and the built-in types The session and task entries of the example minimal.toml, and the implicit default entry of a file with only [defaults.session], expand to spec bytes and projection digests pinned in vectors.json. The six built-in types render their defaults and constraints equal to theirs. A failing vector names itself and the first byte that differs (BOX-145). * test(mfile): pin golden vectors to the design's example Replace the reconstructed example.toml with a byte copy of example-minimal.toml from gominimal/arch at 15b603e6, require the dev and render-diagrams vectors, check that reviewer, nightly and docs-preview do not expand, and bless vectors.json again. * test(mfile): read built-in roots through BoxTypes::root The root vector called box_types::builtin, which echoes its argument, and hid a missing type behind an empty string. A default BoxTypes resolves the root the way a file with no [box_types] does. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
fix(minimal): T52 — A terminal exec's mode is `tty` everywhere (#3434) fix(minimal): name a terminal exec's mode tty in min box show The Live execs row and the min/v1/exec object said terminal, while the exec_started event and min box exec --tty say tty. Use tty everywhere, and pin it with exec_mode_is_one_word_in_show_and_events. Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
feat(minimald): T44 — Detach from an exec attach with the detach keys (… …#3341) * feat(minimald): end an exec attach on the detach keys serve_exec_attach now runs the leader and detach state machine of the box's own terminal, with the keys the channel negotiated. A detach ends the channel with status 0 and leaves the exec running (BCLI-068). * style(minimald): format the exec attach detach test * feat(minimal): send the session keys on an exec attach min box attach <box> --exec <id> now sends the session keys from the config, as the box attach does, so the daemon detaches on them (BCLI-068). * test(minimald): spawn the detach test's attaches through traced * fix(minimald): bound the exec attach's detach notice and bell writes A client that does not read held the detach on the notice write. The writes now wait at most EXIT_NOTICE_BOUND, and the detach goes on. * fix(minimal): send the session keys on min box exec -t's attach The first terminal attach of min box exec -t sent no keys, so a remapped leader or detach key did not apply. It now builds its ssh command through exec_attach_ssh, as min box attach --exec does. * test(minimal): pin the session keys on min box exec -t's attach The ssh that min box exec -t's first attach runs now comes from exec_terminal_ssh. A test checks that, with detach = "q" configured, it carries the leader and detach env vars and their SendEnv options. * fix(minimal): resolve exec -t's session keys before the exec starts A session-key config that is not valid now ends min box exec -t with no exec started, not with a running exec that has no attach. * docs(minimal): say the wire attach path sends no session keys * fix(minimald): ring the exec leader bell without a wait An awaited bell parked the exec attach relay for up to 5 s per leader press behind a client that does not read. The bell now goes only when the client has room for it. The detach notice waits at most the 2 s host probe bound, as the box terminal's detach does. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T23 — Check type constraints last, and let a derived type only narrow (… …#3292) * feat(mfile): check Box Type constraints last, and only narrow A type's constraints are a check, never a layer. check_constraints reads a finished expansion, after the override layer, and fails with exit 3 naming the type, the key and the layer that set the value (BOX-061). It never changes the spec, so a constraint never adds a package, a port or an egress entry (BOX-062). Type resolution fails with exit 3 naming the type, the key and the parent when a derived type's constraint admits a value its parent's excludes (BOX-156). * fix(mfile): name the type that holds the broken constraint check_constraints named the entry's own type for every failure, even when the failing constraint came from a parent type. Check the entry's type first and name the type whose constraints table failed. * fix(mfile): seed built-in constraints and check section keys Each built-in Box Type now ships its constraints, so a project type cannot loosen them and an entry of the type is checked against them. A constrained setting is checked at its flat key and under its section, with the section map taken from spec.rs. * docs(mfile): note that no create path calls check_constraints yet #3295 adds the call after each expand on the create path. * fix(mfile): keep both forms of a constrained key when narrowing A type that set a key flat and under its section was checked against itself, and only its last form reached the types that extend it. Check each type only against the types before it, and keep every form. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T21 — One minimal.toml for every box, end to end (#3244) * feat(boxes): compose the project from the expanded entry The contribution carries the expanded minimal.toml entry, and the daemon composer applies each list it carries. A list the entry leaves out keeps the daemon's own project items of that kind (BOX-068). * feat(minimal): send the expanded entry when a box starts Session and task starts expand their minimal.toml entry over [defaults] and [defaults.<type>], with a legacy [session] table read as [defaults.session], and send it on the contribution. The daemon composes the project's part of each box from it (BOX-068). * fix(minimald): compose an entry box without reading [session] When the client sends an expanded entry, build_composables no longer reads the project's [session] table, so a task box gets none of it. Entry packages join the closure walk, so their env_state_wiring and fs mappings compose. The wire docs state that the entry carries only the five composed lists, and name #3257 for the full expanded spec. * style(minimald): format the entry wiring test * fix(minimal): refuse a start whose session entry is undecided session_box_entry now returns the SessionEntryUndecided refusal in place of sending no entry, so the start never falls back to [session]. The end-to-end test also starts a task entry in a legacy [session] project and checks that the task gets no vars, and checks the refusal. * docs(minimal): say a task entry's vars and patches do not reach the box The box_entry doc comment claimed that min task run applies a task entry's vars and patches. It reads only the [tasks.<name>] table, so the [defaults] layers are dropped. Name issue #3266 for that gap. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T67 — Restart an until_stopped box from its stored spec, under the sa… …me id and name (#3228) * feat(minimald): restart an until_stopped box from its stored spec Add the RestartBox RPC with a typed RestartRefusal reply. The box's actor checks the lifetime, the name, the stored spec and the volumes before it stops anything, stops a running box as a stop does, and starts it again from its stored spec with no client attached, under the same id and name. A start that fails leaves the box stopped. The restart records the stop's exited event and a started event, and runs only the hooks a resume runs (BOX-176, BOX-177, BOX-178). * test(minimald): pin restart refusals, start failure, hooks and events Cover BOX-176, BOX-177 and BOX-178: a restart from the stored spec under the same id and name, its refusals before any stop, a failed start that leaves the box stopped, the hooks it runs, and the events it records. * fix(minimald): fail a restart whose entrypoint sits behind a hook shell An argv box that holds a host-side row and keeps its hook-launched shell never starts its entrypoint. The restart now fails as ensure_host does, so the box stays stopped and no started event is written. * docs(minimald): name the restart hook-shell gap and its flip condition The refusal in restart_launch fails closed for an argv box that holds a host-side row. Name the tracking issue (#3231) and the condition that lifts it (#3042) at the refusal itself. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
feat(minvmd): look for the guest images under the system data directo… …ries too (#2975) * feat(minvmd): look for the guest images under the system data directories too After the user's own data directory, minvmd looks for the kernel, root filesystem and initramfs under each system data directory: $XDG_DATA_DIRS, else /usr/local/share:/usr/share, as the XDG base directory specification says, relative entries ignored. A machine-wide install (the macOS package, a Linux package) puts the images there; a user's own copy still wins. A daemon with no data directory of its own (no HOME: a service account, a scrubbed environment) uses the machine's copy. The MissingImage error names every directory looked in. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(minvmd): take every guest image of a boot from one data directory Each image used to fall back on its own, so a user directory missing one file (an interrupted or older install) booted its kernel and rootfs with the machine's initramfs. The lookup now picks the first data directory, the user's then the system ones, that holds every image whose override is unset, as regular files: a directory named like an image no longer counts. MissingImage replaces MissingEnv for the no-HOME case. It names each directory looked in with the files it lacked, says when there was none, and ends with what to do: reinstall, or set the overrides. The missing-image test now points XDG_DATA_DIRS at an empty directory, so a machine-wide install cannot satisfy it. New tests cover the mixed install, an override, a directory named like an image, a relative XDG_DATA_DIRS entry and the no-data-directory path. The resolver docs describe the new lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(minvmd): select a boot's image directory once for all three images resolve_boot_images and the VMM child called the three resolvers one after another, and each chose the image directory again. An install finishing the user's copy between two calls could still boot the system kernel with the user's initramfs. resolve_boot_images now reads the overrides once, chooses the directory once (select_image_dir) and joins each unset image's file to it; an image with its override set is used verbatim, as before, and a boot with all three overrides needs no data directory. The VMM child and `minvmd boot` use it; the single-image resolvers keep their behaviour. VmError::MissingEnv had no constructor left, so it is removed. The XDG_DATA_DIRS test uses the set_env/unset_env helpers. New tests: one selection per boot (a probe whose user initramfs appears after the first look), every override set with no data directory, and an override beside defaulted images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
T23 — Show the disk a stopped box holds (#3141) * feat(minimal): report the disk a stopped box holds in show and prune min box show prints a Disk line for a stopped or exited box. min box prune --dry-run lists each box it would remove with the disk it holds, prints the total, and removes nothing (BCLI-006). * fix(minimal): leave out the Disk row when show has no figure min box show printed "Disk: -" for a stopped box the daemon did not measure. The row told the person nothing, and it broke the pinned show output in box_list_and_show_render_retained_records. * fix(minimal): keep the dry run from claiming no match on a failed host min box prune --dry-run printed that nothing matched even when a host was not checked. It now prints that line only when every host answered. min box show again prints a Disk row for every stopped or exited box, with - when the daemon gave no figure, and the list.rs pin includes it. * fix(minimal): pick the disk unit from the rounded value format_disk printed 1048575 bytes as 1024.0 KiB. It now moves up a unit while the value rounded to one decimal is 1024.0 or more. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
feat(diag): send a suspected vulnerability with --security (#3102) * feat(diag): send a suspected vulnerability with --security The diag portal is gaining a security mark on its create request: only portal owners can read the report, its description is never public, and it is never filed to public GitHub. Add --security to the arguments `min bug --upload` and `min diag upload` share, and send it on the create body as a JSON boolean. The ordinary receipt calls the URL a report a person can start a diagnosis from, which is wrong for a report the uploader cannot read. A security upload prints that it was received privately and that the page only confirms receipt. The ordinary lines are unchanged. `min bug --security` without --upload is refused before collecting. Nothing would be sent, and a reporter must not read that as a report made. SECURITY.md keeps email as the route and adds this one for reports that come with a bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(diag): send a security bundle only when the portal confirms the mark The receipt said "received privately" from the local flag alone, so a portal that ignored the mark would leave a report public under that promise. The create answer now has to echo security: true, or the bundle is not sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(diag): delete an unconfirmed security record and say what reached the portal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(diag): keep a security note until the portal confirms the mark Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(diag): keep the delete doc comment on delete Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
PreviousNext