Skip to content

Documentation accuracy: clarify guarantees and semantics the code actually provides #9

Description

@ekalb81

Problem

Several README/preview statements are broader than what the code does. None require behavior changes; they need accurate wording (plus one optional preview line).

  1. "Verified tool directories" means existence only. Get-VerifiedDirectoryCandidates (~line 188) checks that the directory exists, not that the expected executable is present. Narrow README (~line 80) wording to "existing well-known tool directories", or state what "verified" means.
  2. Empty PATH segments are silently dropped. Split-PathEntries (~line 48) removes empty/whitespace segments (;; runs), and this rewrite never appears in the preview diff. Document it in the safety section, and optionally add a preview line ("Empty segments removed: N").
  3. Rollback is best-effort, not transactional. Machine and User writes are separate operations; interruption (process kill, power loss) between them can leave partial state that only the backup recovers. README (~lines 11, 53) wording is close to accurate already — add one clause noting that interruption between writes is recovered via the backup, not automatic rollback.
  4. Duplicate removal is per-scope by design. Machine and User are deduplicated independently; the effective combined PATH may still contain cross-scope duplicates. This is intentional (removing a User entry because Machine currently has it would change behavior if Machine later changes). Say "within each scope" in the README. A cross-scope informational preview note could be a follow-up opt-in.
  5. Existence checks can stall on unreachable network paths. Test-PathEntryExists (~line 63) calls Test-Path per entry; dead UNC paths or offline drives block for the SMB timeout even during a read-only preview. A per-call timeout isn't practical in pure PowerShell without runspace machinery, so document the behavior and that previews may be slow (and touch the network) when PATH contains network entries.

Acceptance criteria

  • README updated for all five points; optional preview line for (2) if cheap.
  • No behavior changes to the apply path.

Priority: P3 (docs), with (1) and (2) the most user-visible.

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