8000 fix: T62 — A restart ends an attach with the restart line on every host by minimal-foundry[bot] · Pull Request #3661 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix: T62 — A restart ends an attach with the restart line on every host - #3661

Merged
mitodrummer merged 8 commits into
mainfrom
agent/3635-a-restart-ends-an-attach-with-the-restart-line-o
Nov 20, 2026
Merged

mitodrummer merged 8 commits into
mainfrom
agent/3635-a-restart-ends-an-attach-with-the-restart-line-o

Conversation

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

T62 — A restart ends an attach with the restart line on every host

slice: S3
kind: task
covers: BCLI-068
size: M
est: 150 code, 250 tests
executor: agent
difficulty: involved
model: strongest
diagnostics: none new
observability: none new
layers:
- daemon:
- crates/minimald/src/box_runtime/binding.rs: BoxEnd::Restart
- crates/minimald/src/box_actor/host.rs: restart_named announces BoxEnd::Restart, and its stop half records the ending reason restart
- crates/minimald/src/box_runtime/tests.rs: restart_records_restart_reason_before_start
test: cargo nextest run -p minimald restart_records_restart_reason_before_start
- client:
- crates/minimal/src/cmd/boxes/attach.rs: the restart line is chosen for a box that reads stopped with the ending reason restart
- crates/minimal/src/tests.rs: the restart-decision unit test covers the stopped-with-restart read
- scripts/session-e2e.sh: the restart-while-attached step, with no retry
test: cargo nextest run -p minimal attach_ended_by_restart_names_restart_exit254
produces: none
consumes: none
proof: On a VM host, attached to a box whose entry sets lifetime = "until_stopped", min box restart <box> from another terminal ends the attach with exit 254 and the restart line, on the first try, in just e2e.
depends on:
- blocked by #3525

Proof

just e2e at head 70297bfc, passed on all three lanes. The restart step passed on its first try on both VM lanes, logging restart while attached: exit 254, one line that names the restart:

On a VM host, a person attaches to a box whose entry sets lifetime = "until_stopped" and runs min box restart <box> from another terminal. The attach ends with exit 254 and one line, 'Detached: was restarted. Run min box attach to attach again.' The line is right on the first try, also when the attach reads the box between the restart's stop and its start. The new restart step in just e2e (attach_ends_on_stop) checks this once, with no retry. I could not run that e2e step on this box (no /dev/kvm). The in-process harness test attach_ended_by_restart_names_restart_exit254_through_the_host shows the same line for a box that reads stopped after the restart's stop.

Notes from the agent: Out of layers: crates/minimald/src/box_actor.rs, one line. restart_named is in box_actor.rs, not in host.rs as the layer says. Its stop call now calls the new stop_box_for_restart in host.rs. host.rs carries the rest: stop_box_as(end, ...) announces BoxEnd::Restart to the binding and writes the reason on the exited event.

The ending reason is a new exited event data key, stopped_by = "restart". The event's reason key and the record's reason stay stopped. The plan said 'records the ending reason restart'. I did not put restart in the record reason, for three reasons. BOX-011 permits only stopped for a stopped record. RecordState::from_stored refuses any other value, so the record becomes unreadable. That change also needs the boxes crate, which is outside the layers. Also, the existing test restart_start_failure_leaves_box_stopped_with_its_stop_recorded pins reason = "stopped" on a restart's exited event. If BOX wants a named key or a value in its table, a spec amendment must define it.

Client: when a 254 attach reads the box stopped and the box ran before the attach, the client waits up to 2 s for the new exited event. The stop writes that event just after the stopped record. If the last exited event carries stopped_by = restart, t…[truncated]

Tests

line exit tail
cargo nextest run -p minimald restart_records_restart_reason_before_start 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal attach_ended_by_restart_names_restart_exit254 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling paths v0.0.1 (/workbe

Verify

min task run agent-verify exited 100, so this PR is a draft.

box_destroyed_between_enumeration_and_grant_is_released_once
        PASS [   2.315s] (1244/2761) minimald box_actor::tests::a_box_destroyed_inside_the_landing_window_is_not_resurrected
        PASS [   2.326s] (1245/2761) minimald box_actor::tests::a_box_holding_a_host_row_refuses_remint_after_its_host_loop_ends
        PASS [   2.298s] (1246/2761) minimald box_actor::tests::a_box_re_registered_inside_the_landing_window_keeps_its_grant
        PASS [   2.342s] (1247/2761) minimald box_actor::tests::a_box_nobody_handed_an_address_publishes_at_the_answerers_grant
        PASS [   2.285s] (1248/2761) minimald box_actor::tests::a_contended_walk_never_replaces_a_present_verdict
        PASS [   2.332s] (1249/2761) minimald box_actor::tests::a_declared_port_whose_bind_at_the_hand_fails_keeps_its_interim_forward
        PASS [   2.379s] (1250/2761) minimald box_actor::tests::a_destroy_under_a_pending_verdict_does_not_wait_and_publishes_the_interim
        PASS [   2.674s] (1251/2761) minimald box_actor::tests::a_destroy_queued_behind_a_waiting_finalize_runs_after_the_promotion
        PASS [   2.351s] (1252/2761) minimald box_actor::tests::a_detach_hook_host_of_a_registered_box_is_refused_to_the_next_attach
        PASS [   4.608s] (1253/2761) minimald box_actor::tests::a_destroyed_holders_shared_port_is_bound_for_the_running_box_that_takes_it
        PASS [   0.302s] (1254/2761) minimald box_actor::tests::a_failed_workspace_upload_does_not_leave_attaches_refused
        PASS [   2.315s] (1255/2761) minimald box_actor::tests::a_failed_activate_hook_s_publish_is_withdrawn_by_the_destroy
        PASS [   4.847s] (1256/2761) minimald box_actor::tests::a_destroyed_holders_shared_port_is_not_bound_for_a_box_that_is_not_running
        PASS [   0.272s] (1257/2761) minimald box_actor::tests::a_failing_activate_hook_blocks_the_session
        PASS [   0.296s] (1258/2761) minimald box_actor::tests::a_failing_destroy_hook_still_destroys_the_session
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.10s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   2.362s] (1260/2761) minimald box_actor::tests::a_handed_box_pending_at_finalize_publishes_the_interim_when_the_verdict_lands_absent
        PASS [   4.588s] (1261/2761) minimald box_actor::tests::a_hand_over_bind_the_switch_refuses_leaves_the_election_standing
        PASS [   6.903s] (1262/2761) minimald box_actor::tests::a_handed_reserved_address_waits_for_the_verdict_before_it_publishes
────────────
warning: 1499/2761 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

Residuals

  • The exited event's new stopped_by = "restart" key is not yet named by a spec. BOX amends BOX-178 to name it: gominimal/inbox#1297 (arch C1).

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimald/src/box_actor.rs

Closes #3635

The stop half of min box restart announces BoxEnd::Restart to an attached
binding and writes stopped_by = "restart" on its exited event, before the
start runs. A client that reads the box stopped between the stop and the
start can then name the restart (BCLI-068).
An attach that a restart ends can read the box between the restart's
stop and its start. The box reads stopped then. The client now waits
briefly for that end's exited event, and when it carries the restart
ending reason, prints the restart line with exit 254 (BCLI-068).
The attach-end proof starts a box whose entry sets
lifetime = "until_stopped", attaches to it, runs min box restart from
another terminal, and checks exit 254 and one restart line, with no retry.
@coderabbitai
coderabbitai Bot commented Nov 19, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

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: Advanced
  • Run ID: cf673034-7b35-4274-8070-73d127c2bb04

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@agent-137
Copy link
Copy Markdown
Member

Undrafted. agent-verify's one failure is exec_run_attach_and_task_run_share_the_commands_trace (otel_cli.rs:803), the known flake #3483, outside this diff. The edit outside the task's layers is one line in crates/minimald/src/box_actor.rs: restart_named lives there, not in host.rs as the plan said, and its stop call now goes to the new stop_box_for_restart. The new stopped_by = "restart" key on the exited event is for arch to judge against BOX-011.

@agent-137
agent-137 requested a review from a team as a code owner November 19, 2026 21:35
@agent-137
Copy link
Copy Markdown
Member

/arch-review

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

Reviewed: no findings; approval withheld, 5 threads unresolved at 70297bfcee74.

APPROVE withheld: 5 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/attach.rs, minimal-arch[bot] crates/minimald/src/box_actor/host.rs:2419, minimal-arch[bot] scripts/session-e2e.sh:2350, minimal-arch[bot] crates/minimald/src/box_actor/host.rs:2433, minimal-arch[bot] scripts/session-e2e.sh:2343. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

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.

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

Comment thread crates/minimal/src/cmd/boxes/attach.rs Outdated
Comment on lines +1633 to +1642
pub(crate) struct EndsAfter {
/// How many times the box ended: the count of its `exited` events.
pub(crate) count: u64,
/// Whether the last `exited` event is the stop half of a restart.
pub(crate) last_by_restart: bool,
}

/// The key of an `exited` event's `data` that names the stop half of a
/// restart, and its value. The daemon writes them (`minimald`'s
/// `STOPPED_BY` and `STOPPED_BY_RESTART`).
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LOW · correctness · confidence 0.55 · in ends_of

The client copies the stopped_by key and the restart value from minimald as separate literals (daemon: STOPPED_BY in box_actor/host.rs). No test ties the two together. If one side changes, a restart that is read as stopped prints the stop line again, and only the e2e step catches it. Put the key and value in a crate that both sides use, for example boxes::events. ends_of also repeats the Exited count in box_ends in cmd/boxes/wait.rs.

What the reviewer checked

attach.rs:36 const STOPPED_BY: &str = "stopped_by"; host.rs:2425 pub(crate) const STOPPED_BY: &str = "stopped_by";

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/cmd/boxes/attach.rs
Lines:      1633-1642
Category:   correctness
Severity:   low (reviewer confidence 0.55)

Finding:
The client copies the `stopped_by` key and the `restart` value from `minimald` as separate literals (daemon: `STOPPED_BY` in `box_actor/host.rs`). No test ties the two together. If one side changes, a restart that is read as `stopped` prints the stop line again, and only the e2e step catches it. Put the key and value in a crate that both sides use, for example `boxes::events`. `ends_of` also repeats the `Exited` count in `box_ends` in `cmd/boxes/wait.rs`.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 70297bfcee74: restart_records_restart_reason_before_start now asserts the literal ("stopped_by", "restart") that the min test also pins, so a rename on either side fails a unit test. I did not move the constants to boxes::events or merge the count with box_ends in wait.rs, because both files are outside this task's layers.

@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_WITH_CONDITIONS · 2 conditions · the full ruling

The change conforms to the design. A restart is a stop and then a start (L471), so a 254 with the restart line is correct (L376). The exited event keeps reason = "stopped" (L382, L500). The new stopped_by = "restart" key is a new field on the min/v1/event stream, and no spec names it. C1 amends BOX-178 to name it. The e2e restart step was not run, and C2 asks for that run at this head.

Ruled at e2e3305 against gominimal/arch@8b824707cde6 by claude-opus-5-5.

/// gives it for every stopped record, and a plain stop writes no such key.
/// A client that reads the box `stopped` after its attach ended reads this
/// key, so it names the restart before the restart's start runs.
pub(crate) const STOPPED_BY: &str = "stopped_by";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This key is a new field on the min/v1/event stream. The design lists what exited carries (architecture.md L382), and BOX-178 points to BOX-013's event. Amend BOX-178 to name stopped_by = "restart", or file that spec amendment and link it from the PR body.

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.

Filed as gominimal/inbox#1297 for BOX, which owns spec 29, to amend BOX-178. Linked from the PR body.

Comment thread scripts/session-e2e.sh
kill "$AE_PID" 2>/dev/null || true
ae_fail
}
attach_end_wait restart "$aer_name"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C2 · This step is the task's proof leg, and it was not run (no /dev/kvm). Run just e2e at this head on a KVM host or the ci-linux-kvm lane. Record the result in the PR body. Do not add a retry.

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.

Ran in CI at 70297bfc, with no retry. On the test-kvm lane (job) and the macOS e2e lane (job), the step logged restart while attached: exit 254, one line that names the restart and passed on its first try. The result is in the PR body's Proof section.

The daemon test read its own constants, so a rename passed unseen.
It now checks the literal text that the min client test also pins.
…ends-an-attach-with-the-restart-line-o

# Conflicts:
#	crates/minimald/src/box_runtime/tests.rs
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 70297bfcee74.

Resolved conflicts in: crates/minimald/src/box_runtime/tests.rs

line exit tail
cargo nextest run -p minimald restart_records_restart_reason_before_start 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbe
cargo nextest run -p minimal attach_ended_by_restart_names_restart_exit254 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in box runtime-implement-test-1-1... Compiling paths v0.0.1 (/workbe

Verify min task run agent-verify timed out after 1800s.

workbench/crates/orchestrator)
    Checking bit-vec v0.10.1
    Checking rusty-fork v0.3.1
    Checking bit-set v0.11.1
    Checking rand_xorshift v0.5.0
    Checking core_detect v1.0.0
    Checking unarray v0.1.4
    Checking castaway v0.2.4
    Checking proptest v1.12.0
    Checking strum v0.28.0
    Checking compact_str v0.9.1
    Checking signal-hook v0.3.18
    Checking unicode-truncate v2.0.1
    Checking kasuari v0.4.12
    Checking lru v0.18.2
    Checking signal-hook-mio v0.2.5
    Checking mctx v0.0.1 (/workbench/crates/mctx)
    Checking derive_more v2.1.1
    Checking ratatui-core v0.1.2
    Checking line-clipping v0.3.8
    Checking crossterm v0.29.0
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
    Checking ratatui-widgets v0.3.2
    Checking fuzzy-matcher v0.3.7
    Checking ratatui-crossterm v0.1.2
    Checking inquire v0.9.4
    Checking ratatui-macros v0.7.2
    Checking ratatui v0.30.2
    Checking minimal-client v0.8.0 (/workbench/crates/minimal-client)
    Checking similar v2.7.0
    Checking insta v1.49.0
    Checking minimald v0.8.0 (/workbench/crates/minimald)
   Compiling serial_test_derive v4.0.1
    Checking serial_test v4.0.1
    Checking minimal v0.8.0 (/workbench/crates/minimal)
    Finished `dev` profile [unoptimized] target(s) in 1m 57s
   Compiling opentelemetry v0.33.1
   Compiling version v0.8.0 (/workbench/crates/version)
   Compiling stdlib v0.0.22 (/workbench/crates/stdlib)
   Compiling serial_test v4.0.1
   Compiling opentelemetry_sdk v0.33.1
   Compiling tracing-opentelemetry v0.34.0
   Compiling opentelemetry-http v0.33.1
   Compiling opentelemetry-appender-tracing v0.33.1
   Compiling google-cloud-gax-internal v0.7.20
   Compiling opentelemetry-proto v0.33.0
   Compiling opentelemetry-otlp v0.33.0
   Compiling google-cloud-longrunning v1.14.0
   Compiling google-cloud-iam-v1 v1.13.0
   Compiling mlog v0.0.1 (/workbench/crates/mlog)
   Compiling google-cloud-lro v1.11.0
   Compiling google-cloud-storage v1.20.0
   Compiling common v0.0.1 (/workbench/crates/common)
   Compiling boxes v0.0.1 (/workbench/crates/boxes)
   Compiling sandbox v0.0.1 (/workbench/crates/sandbox)
   Compiling mfile v0.0.1 (/workbench/crates/mfile)
   Compiling minimald-rpc v0.0.1 (/workbench/crates/minimald-rpc)
   Compiling minimal-client v0.8.0 (/workbench/crates/minimal-client)
   Compiling minvmd v0.8.0 (/workbench/crates/minvmd)
   Compiling decode v0.0.1 (/workbench/crates/decode)
   Compiling checkouts v0.0.1 (/workbench/crates/checkouts)
   Compiling graph v0.0.1 (/workbench/crates/graph)
   Compiling lcache v0.0.1 (/workbench/crates/lcache)
   Compiling rcache v0.0.1 (/workbench/crates/rcache)
   Compiling op v0.0.1 (/workbench/crates/op)
   Compiling check v0.0.1 (/workbench/crates/check)
   Compiling orchestrator v0.0.1 (/workbench/crates/orchestrator)
   Compiling mctx v0.0.1 (/workbench/crates/mctx)
   Compiling minimald v0.8.0 (/workbench/crates/minimald)
   Compiling minimal v0.8.0 (/workbench/crates/minimal)

Outside the task's layers::

  • crates/minimald/src/box_actor.rs

Converted to a draft: verify timed out after 1800s.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/attach.rs:1642: restart_records_restart_reason_before_start now asserts the literal ("stopped_by", "restart") that the min test also pins, so a rename on either side fails a unit test. I did not move the constants to boxes::events or merge the count with box_ends in wait.rs, because both files are outside this task

On a VM host, a person attached to a box with lifetime = "until_stopped" runs min box restart from another terminal. The attach ends with exit 254 and the restart line on the first try, and the just e2e restart-while-attached step checks this with no retry. This round adds a unit-test tie between the daemon and the client on the restart reason text.

Notes from the agent: Revise round 1. The daemon test now asserts the literal wire text ("stopped_by", "restart"), and the min client test already builds its events from that same text. A rename on either side now fails a unit test, not only the e2e step. I did not move the constants into the boxes crate, because crates/boxes is outside this task's layers. The repeated Exited count in box_ends in crates/minimal/src/cmd/boxes/wait.rs is also outside the layers and is unchanged. I ran the minimald test before a rustfmt-only commit and did not run it again after that commit. I did not run just e2e on this box.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 19, 2026 22:29
@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_WITH_CONDITIONS · 2 conditions · the full ruling

The compare changes only test pins and a comment, so BCLI-068 still conforms as it did at e2e33053. Two conditions are still open. C1: the BOX-178 amendment now has a filed issue, but the task header still says observability: none new. Change that line to name the new stopped_by = "restart" key on the exited event. C2: the just e2e restart step did not run. Run it on a KVM host, and add its first-try result to the Tests table.

Ruled at 70297bf against gominimal/arch@8b824707cde6 by claude-opus-5-5.

) -> boxes::events::EventData {
let mut data = stopped_event_data(ending);
if end == box_runtime::BoxEnd::Restart {
data.insert(STOPPED_BY.to_string(), STOPPED_BY_RESTART.into());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This line adds the stopped_by = "restart" key to the exited event on the min/v1/event stream. The task header says observability: none new, and that is not correct. Change the header line to name this key. Keep the link to gominimal/inbox#1297 for the BOX-178 amendment.

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.

Fixed in the task header (#3635): observability: now names the exited event's stopped_by = "restart" key, and keeps the link to gominimal/inbox#1297 for the BOX-178 amendment.

Comment thread scripts/session-e2e.sh
ae_fail
}
aer_sid="$(printf '%s\n' "$out" | tail -n1 | tr -d '\r')"
attach_end_start restart "$aer_name"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C2 · This restart step did not run at this head (no /dev/kvm). Run just e2e on a KVM host or the ci-linux-kvm lane. Add the result to the Tests table. The step must pass on its first try with exit 254 and one restart line. Do not add a retry.

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.

Ran in CI at 70297bfc, with no retry. On the test-kvm lane (job) and the macOS e2e lane (job), the step logged restart while attached: exit 254, one line that names the restart and passed on its first try. The result is in the PR body's Proof section.

@agent-137
agent-137 marked this pull request as ready for review November 19, 2026 22:51
@agent-137
Copy link
Copy Markdown
Member

Undrafted again. agent-verify's failure is still only the known flake #3483, and the merge of main resolved its conflict. Arch C1: the task header now names the new key. Arch C2: I add the KVM just e2e result for this head to the body when the lane finishes.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 5 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/attach.rs, minimal-arch[bot] crates/minimald/src/box_actor/host.rs:2419, minimal-arch[bot] scripts/session-e2e.sh:2350, minimal-arch[bot] crates/minimald/src/box_actor/host.rs:2433, minimal-arch[bot] scripts/session-e2e.sh:2343. No findings.

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

@agent-137
Copy link
Copy Markdown
Member

/arch-review

@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_WITH_CONDITIONS · 1 condition · the full ruling

The restart path conforms to the design. A restart is a stop and then a start (architecture.md line 471). So exit 254 with a line that names the restart is in lines 376 and 492. The record keeps reason = "stopped" (line 500). The new exited key stopped_by = "restart" is not a field that line 382 or BOX-178 names. C1 makes BOX name the key, through gominimal/inbox#1297. The change can merge with C1 open.

Ruled at 70297bf against gominimal/arch@8b824707cde6 by claude-opus-5-5.

/// gives it for every stopped record, and a plain stop writes no such key.
/// A client that reads the box `stopped` after its attach ended reads this
/// key, so it names the restart before the restart's start runs.
pub(crate) const STOPPED_BY: &str = "stopped_by";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This key is new on the exited event. Line 382 of the design lists reason with exit_code or signal, and BOX-178 does not name this key. Make BOX name stopped_by = "restart" (gominimal/inbox#1297). Then define it once in boxes::events.

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.

Deferred as the ruling allows, to gominimal/inbox#1297. After BOX amends BOX-178 to name the key, the key becomes one constant in boxes::events next to exec_data, and both copies (here and on the other side of the wire) go.

/// them, so the tests on both sides pin the same wire text:
/// `restart_records_restart_reason_before_start` in `minimald` and
/// `attach_ended_by_restart_names_restart_exit254` here.
const STOPPED_BY: &str = "stopped_by";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This is a second copy of the daemon's wire key. When BOX names the key (C1), use the one constant in boxes::events, next to exec_data, and remove this copy.

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.

Deferred as the ruling allows, to gominimal/inbox#1297. After BOX amends BOX-178 to name the key, the key becomes one constant in boxes::events next to exec_data, and both copies (here and on the other side of the wire) go.

@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 20, 2026
Merged via the queue into main with commit bbd8c31 Nov 20, 2026
40 checks passed
@mitodrummer
mitodrummer deleted the agent/3635-a-restart-ends-an-attach-with-the-restart-line-o branch November 20, 2026 03:23
agent-137 pushed a commit that referenced this pull request Nov 20, 2026
Conflict in crates/minimald/src/box_actor/host.rs: main (#3661) made
stop_box_inner announce the box's end, a stop or a restart, through
`announce_end(end)`. Kept that and this branch's stop of the task
containers after it, so a restart stops them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T62 — A restart ends an attach with the restart line on every host

2 participants

0