-
Notifications
You must be signed in to change notification settings - Fork 1
Pipeline Plan inline
Seth Ford edited this page Mar 2, 2026
·
10 revisions
Plan saved to docs/plans/2026-03-02-ping-command.md.
4 files to touch, 13 atomic steps.
Chosen approach: Standalone script pattern (same as sw-hello.sh) — rejected inline-in-router because it breaks the modular convention used by all 100+ commands.
| Action | Path |
|---|---|
| Create | scripts/sw-ping.sh |
| Create | scripts/sw-ping-test.sh |
| Modify |
scripts/sw — insert ping) case after hello) block (before *)) |
| Modify |
package.json — insert sw-ping-test.sh between sw-patrol-meta-test.sh and sw-pipeline-composer-test.sh
|
- Task 1: Create
scripts/sw-ping-test.shwith 6 test cases (output, exit 0, --help, -h, --version, invalid option) - Task 2: Run test to confirm it fails (TDD red — script doesn't exist yet)
- Task 3: Create
scripts/sw-ping.shwithecho "pong"main path - Task 4:
chmod +x scripts/sw-ping.sh - Task 5: Run
bash scripts/sw-ping-test.sh— confirm 6/6 pass - Task 6: Commit
sw-ping.shandsw-ping-test.sh - Task 7: Add
ping)case toscripts/swrouter afterhello)block - Task 8: Verify
bash scripts/sw pingoutputspong - Task 9: Commit router change
- Task 10: Insert
sw-ping-test.shintopackage.jsontest chain - Task 11: Verify registration with node one-liner
- Task 12: Run
bash scripts/sw-ping-test.sh— confirm still 6/6 - Task 13: Commit
package.jsonchange
-
Router insertion position — must go BEFORE the
*)catch-all, AFTERhello). Plan specifies exact location (line 607). -
set -euo pipefail+ exit code capture in tests — use|| local exit_code=$?pattern (same as hello test), not bare$?. -
VERSION — copy
3.2.4fromsw-hello.shexactly.
-
bash scripts/sw-ping.sh→ printspong, exits 0 -
bash scripts/sw ping(via router) → printspong, exits 0 -
bash scripts/sw-ping-test.sh→PASS: 6 / FAIL: 0 -
sw-ping-test.shregistered inpackage.jsontest chain