Repository navigation
T35 — Break session activation into named steps - #2464
Conversation
Each part of activate_session now runs through ActivationStep::run, which opens one activation_step span per step and logs the failing step's name at info level. Errors pass through unchanged, so the printed text and the exit codes main.rs downcasts stay the same.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Approved: every review thread resolved at @mitodrummer resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The design does not govern the internal structure of activate_session or the spans that the min client writes to its log. This is a PASS by absence, as #2452 was for the same file. The printed output, the exit codes and the error values do not change, because each wrapped return is an Err that .await? propagates. The UploadFiles wrapper at lines 1133 to 1242 is not in rustfmt shape. CI fmt can flag it. That is not a design condition.
Ruled at c9a38dd against gominimal/arch@109541a48c31 by claude-opus-5-5.
The step test now also runs the real activate_session with a missing project path. It checks the check_arguments span, the failure record, and that the error text passes through unchanged. The source scan skips comment lines.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The design of record does not govern how min splits session activation into steps or spans. This ruling is a PASS by absence, the same as the ruling on c9a38dd1. The new commit adds tests only. One test drives the real activate_session to a named failure at check_arguments. That test makes the proof stronger. No conditions.
Ruled at 6cebf91 against gominimal/arch@109541a48c31 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
Activation prints the same text as before. Under RUST_LOG=info, each activation step shows as one activation_step span. A failed activation logs the name of the step that ended it. A test now runs the real activate_session to show this for the check_arguments step. Notes from the agent: Revise round 1. I added activation_steps_run_in_order_and_name_the_failing_step_in_activate_session. Its name contains the test: filter, so the planned line runs it. The test calls activate_session with a project path that does not exist. The activation stops in check_arguments, before a daemon starts. The test checks the one span, the failure record and the unchanged error text. Steps after check_arguments need a running daemon, so the test cannot exercise them. The source-order scan now skips comment lines. cargo clippy -p minimal --all-targets and cargo fmt --check report nothing in create.rs. |
|
The runtime will not revise this pull request again on its own: the diff is +1226/-836 (2062 lines), past 3x the plan's estimate of 420 lines (est: 300 code, 120 tests), at round 1 (the last trigger was the runtime's review findings). A person decides now. Remove |
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @mitodrummer closed the last one. The review of 6cebf91b221c withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
mitodrummer
left a comment
There was a problem hiding this comment.
Babysit review on 6cebf91 against T35's plan block. activate_session now runs as 13 named ActivationSteps (CheckArguments … HoldName), each in an activation_step span that logs the failing step's name. The rest is existing code re-indented into the step blocks. Every early exit inside a block is return Err(..), which the step's .await? propagates unchanged, and the cleanup before those returns (withdraw_box_row, best_effort_destroy) is kept. One note: the version-skew refusal changed from bail!("{error}") to return Err(error). That keeps the original error rather than a re-wrapped message, so the top-level text is unchanged. activation_steps_run_in_order_and_name_the_failing_step_in_activate_session drives the real activate_session through the first step. arch-review PASS on this head.
T35 — Break session activation into named steps
slice: S0
kind: enablement
covers: none
size: M
est: 300 code, 120 tests
executor: agent
difficulty: routine
model: standard
diagnostics: error names failed step
observability: one span per activation step
layers:
- cli:
- crates/minimal/src/cmd/boxes/create.rs: activation split into named steps
test: cargo nextest run -p minimal activation_steps_run_in_order_and_name_the_failing_step
produces: none
consumes:
- crates/minimal/src/cmd/boxes/create.rs
proof: Activation prints the same, with one span per step.
depends on:
- blocked by #2375
Proof
A run of min session activate prints the same lines and exits with the same codes as before. Under RUST_LOG=info, the log now shows one activation_step span for each of the 13 steps, in order (check_arguments through hold_name). When a step fails, the log shows an 'activation step failed' record with the step name and the error.
Notes from the agent: Each step body stays inline in activate_session, wrapped in ActivationStep::.run(async { ... }). The source-scanning tests in src/tests.rs (every_create_session_asserts_the_daemon_build, the_activation_path_makes_no_version_round_trip, both_creators_share_the_composition_failure_message, daemon_refusals_print_without_rpc_names) read the activate_session body. Separate step functions would break them, and tests.rs is outside the layers. Those tests and the create:: and vm_host:: tests still pass (37 passed). The error values are not wrapped, so the downcasts in main.rs (ProjectFileInvalid, ActivationRefused, HostUnreachable and the others) and the printed text do not change. The step name is only in the span and in an info-level log record, never in printed output. The diff is large (+1185/-836) because rustfmt re-indented the wrapped blocks. The logic is unchanged. The test checks the step order in activate_session's source against ActivationStep::ORDER. It also runs the steps through ActivationStep::run with a capture layer, to check one span per step and the failing step name. I did not run just ci or a whole-crate test run.
Tests
cargo nextest run -p minimal activation_steps_run_in_order_and_name_the_failing_stepVerify
min task run agent-verifyexited 101 under rustc 1.98.1, which the repository does not pin (1.97.0 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Closes #2380