Repository navigation
Tags
Tags
test(minimald): prove a task box exits after its client drops (#3085) A task run's client goes away mid-task. The task box ends by itself as exited with the task's code 3, keeps its exited event, and a new client reads its whole output over ReadLog. The daemon log names the box's end and its code. Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T12 — Attach to a box's terminal, with or without an address (#3018) * feat(minimald-rpc,minimald): carry pty_enabled on box listi 8000 ngs The listing and the read of a box now say whether its stored spec sets io.pty_enabled, so min box attach can tell a terminal box from one with none. A daemon that predates the field reads as no terminal. * feat(minimal): add min box attach with and without an address min box attach <box> hands the terminal to a box that has one. With no box named it picks the project's running terminal box, else its only retained one. Refusals exit 2, 4 or 7. An attach the host ends prints one line that names why and exits 254. * test(minimal): classify the read after min box attach ends * refactor(minimald): read the resume PTY check from record_has_pty The resume's PTY check and the listing's record_has_pty were two copies of one rule. The resume now calls record_has_pty. * fix(minimal): wait for the record before min box attach names a cause The daemon closes the attach's channel before it writes the stopped record, so one read after ssh exits could see the box still running. The read now polls under a bound until the box leaves running. A stopped box ends with 254 whatever exit code its entrypoint recorded. The host and exited lines now say what can happen in plain words. * fix(minimal): wait out a stop's grace before min box attach says takeover After a 254 the read now polls for STOP_GRACE plus HOST_PROBE_TIMEOUT, shared from minimald-rpc, so a stop that waits on a process ignoring SIGTERM still prints the stop line. An OOM record carries exit code 137, so its reason is matched before the exit code. * style(minimal): format the 254 settle bound * fix(minimal): say why min box attach waits after a takeover A 254 against a box that still runs waits the stop's grace period to read why. After one quiet second, the terminal now says the attach ended and how long the check can take. * fix(minimal): drop the wait line before a 254 attach notice The design allows one notice line before exit 254. This reverts 1385327 and restores the single DAEMON_END_SETTLE read. * fix(minimal): end min box attach with 0, 7 or 254 only Every ssh 255 is now a lost connection, exit 7. A 254 against a box that reads exited ends with 0 and keeps its line. A 254 with an unread record prints one line that names the host. * fix(minimald): list a box with an unreadable spec by its box type A spec read error listed the box with no terminal, so a bare min box attach could skip a real session. The listing now falls back to the Box Type, as for a box with no stored spec, and logs a warning. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
fix: admit a bundled bep.app proxy in keychain read-backs (#3023) * fix(bep): admit a bundled proxy in keychain read-backs security -T records a bundled proxy as its app bundle, and dump-keychain -a prints that bundle path rather than the inner binary the resolver hands to set and list. entry_admits compared the two literally, so every secret read back from a keychain refused its own proxy. Admit the dump path when it is the bundle that contains the resolved proxy binary: the proxy path, stripped of the dump path, must continue with /Contents/MacOS/. * fix(bep): admit only a bundle's main program in keychain read-backs security -T records a bundle's main program as the bundle, and any other program in it under its own path. An entry naming bep.app therefore says nothing about a helper beside it, so matching on the Contents/MacOS prefix was too wide. Match <name>.app/Contents/MacOS/<name> and nothing else. --------- Co-authored-by: gominimal-aw-bot[bot] <281738952+gominimal-aw-bot[bot]@users.noreply.github.com> Co-authored-by: Norrie Taylor <norrie@minimal.dev>
test(minimal): box addresses and -o json output, end to end (#3006) Address one box over a harness daemon by its id, its name and provider/host/name from min box show, stop and rm. An address that names no box ends with exit 4. An unqualified name while the selected host does not answer ends with exit 7. Each -o json box object carries min/v1/box, and a secret renders only as its reference. Each step logs one resolution in its own span, with the host it reached. Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
feat(minimald): interim answerer holds host.min.internal at loopback (#… …2985) The native interim answerer now answers host.min.internal at 127.0.0.1 ahead of the box registry, as the VM host daemon's answerer does, so a box named host cannot take the host's name. The interim start line lists the host row beside the registry's rows. Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T9 — End a box when its entrypoint returns, never for idleness or cli… …ent loss (#2850) * feat(minimald): end an until_complete box when its entrypoint returns The host loop now says whether a kill ended it. The actor watches each launch's loop and, when the entrypoint returned on its own and the spec sets lifetime = "until_complete", sets the record to exited with the exit code and records an exited event with reason "exit". The daemon does this whether or not a client is attached. Such a box raises no shell-exit prompt (BOX-038). A client that goes away never stops a box (BOX-015). * test(minimald): pin box ends on entrypoint return, not client loss Adds the actor tests for BOX-038 and BOX-015. The shell round trip now expects no prompt and an exited record. Tests about a box kept after its shell exits now create an until_stopped box. The rpc shutdown test no longer answers a prompt. * fix(minimald): retry the exited-record write when an entrypoint ends The host and the watch are gone by the time the write runs, so a single failed write left the box running with nothing in it. Retry it with a short backoff, and pin the retry with a test seam. * test(e2e): expect an exited box, not a prompt, when a shell exits The session-exit prompt is gone: exiting the shell ends the box, which stays listed as exited. The pty driver no longer answers a prompt. Each leg that exited a shell now checks the box is exited with code 0, and destroys it where it used to answer Delete. * docs(minimald): put the launch-record seam doc back on its module * test(e2e): resume the exited kept box before the exec into it An exec runs only in a running box. After the shell exits and the row is withdrawn, the leg now resumes the box with a pty 'min session attach', checks that it runs under the same id and that its row is back, and then runs the exec as before. * test(minimald): fail when the channel stays open after shell exit The wait loop ended on a timeout as well as on close, so the test passed even if the channel never closed. Panic on the timeout. * fix(minimald): end an exited box before a queued attach or exec A message queued beside a returned entrypoint ran first and launched a new host, so the entrypoint ran again and its exit was lost. Now only a stop or a destroy goes ahead of the exit, and ensure_host refuses a stopped or exited box. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
refactor(minimald): split exec dispatch into files by concern (#2838) exec.rs keeps the Exec and Process traits, request dispatch and trace adoption. The process implementations move to exec/process.rs, the channel bridge to exec/bridge.rs, the session run, build and check forms to exec/run.rs, and the git pack handlers to exec/git.rs. A pure move: items private to exec.rs become pub(super) in their new file, and nothing else changes. Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
T14 — Names follow the id, end to end (#2821) * test(minimald): prove a stopped and a new dev keep their ids on rename A stopped box named dev keeps its id and name, a new dev starts beside it, and a rename of either moves only that box's name. The name resolves to the running box at each step, and the daemon log names the id of each renamed box. * test(minimald): drop a needless clone of a Copy state * test(minimald): match the new_name field in the rename log check A bare substring of the new name also matched the old_name key. --------- Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
feat(release): ship a signed, notarized bep beside minvmd on macOS (#… …2792) The macOS release job builds `bep` with the GitHub App's client secret, renames it `bep-macos-arm64`, signs it with the Developer ID beside minvmd, notarizes it and uploads it. stage-release.sh stages it at bin/bep, beside bin/minvmd, where minvmd looks for the proxy. The job's timeout grows from 60 to 75 minutes for the extra build and notary submission. just test-installer bep_installs_beside_minvmd reads the release's component table and installs a darwin manifest with both rows. Refs #2770, #2498, #2436
feat(minimal): read each box's parent so box audit --parent merges (#… …2800) known_boxes reads each listed box's parent from its record, which the daemon stamps at creation. The interim refusal of --parent on a host without parents, and its LISTING_RECORDS_PARENTS gate, are removed. The tests drive run with the boxes known_box builds from a listing entry and a record. Co-authored-by: minimal-foundry[bot] <327719912+minimal-foundry[bot]@users.noreply.github.com>
PreviousNext