Skip to content

refactor PushEvaluatedOutput, PushBuildOutput into PushOutput#541

Merged
mrshmllow merged 2 commits into
trunkfrom
marshmallow/p-mspxpoxrokun
Jul 9, 2026
Merged

refactor PushEvaluatedOutput, PushBuildOutput into PushOutput#541
mrshmllow merged 2 commits into
trunkfrom
marshmallow/p-mspxpoxrokun

Conversation

@mrshmllow

@mrshmllow mrshmllow commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Unified push result handling so evaluation and build outputs are presented through one consistent flow.
  • Bug Fixes

    • Improved consistency in push-related step display and status wording.
    • Updated the activation step label to show “Activation” instead of the longer command-style text.

@github-actions github-actions Bot added rust Pull requests that update rust code release PRs against main labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cb58ba9d-d675-436b-9e5d-410eba68286b

📥 Commits

Reviewing files that changed from the base of the PR and between a01abf1 and 2ca764a.

📒 Files selected for processing (4)
  • crates/core/src/hive/node.rs
  • crates/core/src/hive/plan.rs
  • crates/core/src/hive/steps/activate.rs
  • crates/core/src/hive/steps/push.rs

📝 Walkthrough

Walkthrough

This PR consolidates two separate push-output step types, PushEvaluatedOutput and PushBuildOutput, into a single PushOutput struct with a PushOutputHandle enum discriminating evaluation vs build sources. The Step enum, Display implementations, and planner emission logic are updated accordingly, along with test expectations. Separately, SwitchToConfiguration's display string changes to "Activation".

Changes

Unified push output step

Layer / File(s) Summary
PushOutput type and execution logic
crates/core/src/hive/steps/push.rs
Introduces PushOutputHandle enum and unified PushOutput struct, replacing PushEvaluatedOutput/PushBuildOutput; consolidates Display and ExecuteStep logic into single implementations that branch on the handle variant.
Step enum and Display wiring
crates/core/src/hive/node.rs
Updates imports and Step enum to use PushOutput variant instead of the two removed variants, and adjusts Display for Step accordingly.
Planner emission and test expectations
crates/core/src/hive/plan.rs
Updates apply_plan to emit Step::PushOutput with PushOutputHandle::Evaluation/Build; updates imports and multiple test cases (order_apply_build, order_push_only, order_remote_build, order_nokeys, order_remote_build_experimental_nix_client) plus a fixture path to match.
SwitchToConfiguration display string
crates/core/src/hive/steps/activate.rs
Changes displayed string from "Run switch-to-configuration" to "Activation".

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Planner as plan.rs (apply_plan)
    participant Step as Step::PushOutput
    participant Executor as PushOutput::execute
    participant Backend as Daemon/CLI Push

    Planner->>Step: Emit PushOutput{path: PushOutputHandle::Evaluation(...)}
    Planner->>Step: Emit PushOutput{path: PushOutputHandle::Build(...)}
    Step->>Executor: execute()
    Executor->>Executor: Resolve handle based on path variant
    alt experimental_nix_client enabled
        Executor->>Backend: push_with_daemon(Push node)
    else
        Executor->>Backend: commands::common::push(Push node)
    end
    Backend-->>Executor: push result
Loading

Possibly related PRs

  • forallsys/wire#537: Touches the same SwitchToConfiguration display logic in activate.rs and the same push-output types/Display in push.rs.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main refactor: consolidating two push output types into a single PushOutput.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch marshmallow/p-mspxpoxrokun

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mrshmllow
mrshmllow marked this pull request as ready for review July 9, 2026 01:24
@mrshmllow mrshmllow self-assigned this Jul 9, 2026
@mrshmllow
mrshmllow merged commit f9d7c2b into trunk Jul 9, 2026
25 of 26 checks passed
@mrshmllow
mrshmllow deleted the marshmallow/p-mspxpoxrokun branch July 9, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release PRs against main rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant