Skip to content

Reorganize the README and add tests for its examples and PowerShell 7 claims - #81

Merged
HalRiveria merged 3 commits into
mainfrom
docs/readme-revision
Nov 23, 2026
Merged

HalRiveria merged 3 commits into
mainfrom
docs/readme-revision

Conversation

@HalRiveria-Bot

@HalRiveria-Bot HalRiveria-Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

The README had grown hard to scan, and a few things in it were wrong or out of date. This reorganizes it and adds tests for what it claims.

What was wrong

  • The worker example that returns its own error object didn't catch a missing file on Windows PowerShell 5.1: there, Get-FileHash is a script-module function and doesn't see a worker's $ErrorActionPreference. It now passes -ErrorAction Stop, and the text explains why.
  • -JobAbortCleanup was described as applying to the batch. Only the group dispatcher has it; the batch marks results Aborted.
  • The PowerShell 7 notes said the kit "runs there too" without saying what it adds over ForEach-Object -Parallel.

What changed in the README

  • Long sections are collapsible: each heading keeps a sentence or two and its main example visible, with the detail in labeled <details> blocks. Quick start, Which function and Setup stay open.
  • New sections: "Process-tree cleanup limitations" (the AddedToJob, NoJob and taskkill cases), "Which function" (every public function by purpose), and "How it fits together" (a Mermaid diagram), plus a lifecycle diagram under Process results.
  • Process results are a table, with the easily confused cases (stream timeout vs. time limit vs. abort) spelled out.
  • "Who it's for" says what the kit adds on PowerShell 7, each point checked against PowerShell 7.6.2 without the kit.
  • The FAQ was checked for accuracy and the duplicate "What none of them do for you" list removed.

New tests (run by hand, outside the harness)

  • Testing/readme-examples/run.ps1 reads the README's code examples straight from it and runs each one in a fresh PowerShell, with and without StrictMode, followed by checks on what it did. The group example also runs with both kinds of Ctrl+C. It needs cjxl.exe on PATH.
  • Testing/ps7-native/run.ps1 shows, with no kit loaded, what PowerShell 7 does: a killed script leaves its programs running, ForEach-Object -Parallel -TimeoutSeconds doesn't stop a running program, and Ctrl+C stops running programs at once.

The harness changes by a comment only: each of the three copies of the Ctrl+C sender (the harness, Testing/stop-in-call, Testing/ps7-native) now names the other two.

Testing

  • Harness: all 601 assertions pass on Windows PowerShell 5.1 and PowerShell 7.6.2 (about four and a half to five minutes each; the Testing section now says about four and a half).
  • Testing/readme-examples: passes on 5.1 and 7 against this README. Pointed at a copy with the old error-object example, it fails on 5.1 where it should.
  • Testing/ps7-native and Testing/stop-in-call: pass.
  • Every in-page link resolves to a heading.

🤖 Generated with Claude Code

HalRiveria and others added 3 commits November 23, 2026 17:44
Collapsible sections, Mermaid diagrams, a section on where process-tree cleanup
can fall short, what the kit adds on PowerShell 7, and corrected examples.
Testing/readme-examples runs the README's code examples; Testing/ps7-native
checks the PowerShell 7 behavior the README describes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Limits: one Invoke-PkRun at a time per process, said plainly.
- Lifecycle diagram: starting inside the Job Object depends on StartMode.
- Testing: the harness is the only test GitHub runs.
- readme-examples: the kill-abort check no longer fails when a job finishes
  before the abort.
- ps7-native: only this run's ping processes are stopped.
- Each copy of the Ctrl+C sender names the other two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria
HalRiveria merged commit 7a063c6 into main Nov 23, 2026
2 checks passed
@HalRiveria
HalRiveria deleted the docs/readme-revision branch November 23, 2026 23:59
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.

2 participants