Skip to content

The creation plan promises work that is skipped, and lists one step in the wrong place #101

Description

@ALERTua

Both found in a live run on 2026-08-26, creating a Dev Drive in a .vhdx with deduplication declined.

AGENTS.md says the plan summary must say what will actually happen on this machine. In that run it did neither of the two things below.

The plan promises an optimization job that never runs

The run answered "Neither (maximum performance, less space saved)" at the deduplication question. The plan printed:

* Skip deduplication and compression setup
* Mark Dev Drive as trusted for Windows Defender performance
* Run initial optimization job to prepare the drive

and the run ended:

Skipping deduplication as requested.
All done. Dev Drive F: ready.

No optimization job, because an optimization job is a deduplication job — the work sits inside the block guarded by $RunInitialJob, which is inside the block guarded by $SkipDeduplication. But the line promising it is added in Format-CreationPlan outside the if ($Answers.SkipDeduplication) branch, so it is printed whatever the user chose.

The line is also unconditional in the other direction: nothing in the plan is keyed to $RunInitialJob itself.

The plan lists marking the drive trusted in the wrong place

Format-CreationPlan adds it after the deduplication block, so it reads as second-to-last:

* Enable BitLocker encryption for the Dev Drive
* Skip deduplication and compression setup
* Mark Dev Drive as trusted for Windows Defender performance
* Run initial optimization job to prepare the drive

The run does it immediately after formatting, before BitLocker is touched:

Formatting the newly created partition drive F: to a Dev Drive
Dev Drive created at F:, named DevDrive.
Marking Dev Drive F: as trusted for Defender performance
Dev Drive F: reports itself trusted, ...

BitLocker setup for F:

Two steps out of place. Somebody reading the plan to decide whether to proceed is told the trusted designation is applied at the end, when it is applied before the longest and most failure-prone step in the run.

What to do

Move the trusted-designation line to where the work happens - after formatting and naming, before BitLocker - and make the optimization line conditional on the same answer the work is. A test should pin the plan's order against the body's order rather than against a literal list, since that is the coupling that broke.

Scope

dev_drive.ps1: Format-CreationPlan only. dev_drive.Tests.ps1: order assertions. No change to what the run does - only to what it says it will do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions