Skip to content
Back to skills

177 Fn 13 Pxj5 C5176a57

ASecurity

Add CI tests for all new async control commands.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
testingpythonbashgit

Security analysis

A93/100
  • highPerforms destructive filesystem operations

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 177-fn-13-pxj5_c5176a57 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 177 Fn 13 Pxj5 C5176a57?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 177 Fn 13 Pxj5 C5176a57
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-177-fn-13-pxj5-c5176a57/badge)](https://www.skillsdirectory.com/skills/tools-only-177-fn-13-pxj5-c5176a57)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# fn-13-pxj.5 Add CI tests for async control commands

## Description
Add CI tests for all new async control commands.

**IMPORTANT**: Tests must be jq-free. Use Python for JSON parsing to maintain Windows Git Bash compatibility.

### Implementation

**In `plugins/flow-next/scripts/ci_test.sh`:**

1. `test_status_command`:
   ```bash
   test_status_command() {
     $FLOWCTL status
     [[ $? -eq 0 ]] && pass "status command" || fail "status command"
   }
   ```

2. `test_status_json`:
   ```bash
   test_status_json() {
     output=$($FLOWCTL status --json)
     # Use Python to validate JSON (not jq)
     echo "$output" | python3 -c 'import json,sys; json.load(sys.stdin)' 2>/dev/null
     [[ $? -eq 0 ]] && pass "status --json" || fail "status --json invalid JSON"
   }
   ```

3. `test_ralph_pause_resume_commands`:
   ```bash
   test_ralph_pause_resume_commands() {
     # Create mock run directory
     mkdir -p scripts/ralph/runs/test-run
     echo "iteration: 1" > scripts/ralph/runs/test-run/progress.txt
     
     # Test pause
     $FLOWCTL ralph pause --run test-run
     [[ -f scripts/ralph/runs/test-run/PAUSE ]] && pass "ralph pause" || fail "ralph pause"
     
     # Test resume
     $FLOWCTL ralph resume --run test-run
     [[ ! -f scripts/ralph/runs/test-run/PAUSE ]] && pass "ralph resume" || fail "ralph resume"
     
     # Test stop
     $FLOWCTL ralph stop --run test-run
     [[ -f scripts/ralph/runs/test-run/STOP ]] && pass "ralph stop" || fail "ralph stop"
     
     # Cleanup
     rm -rf scripts/ralph/runs/test-run
   }
   ```

4. `test_task_reset`:
   ```bash
   test_task_reset() {
     # Create epic and task
     epic=$($FLOWCTL epic create --title "Reset test" --json | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
     task=$($FLOWCTL task create --epic $epic --title "Test task" --json | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
     
     # Complete task
     $FLOWCTL start $task
     $FLOWCTL done $task
     
     # Reset
     $FLOWCTL task reset $task
     status=$($FLOWCTL show $task --json | python3 -c 'import json,sys; print(json.load(sys.stdin)["status"])')
     [[ "$status" == "todo" ]] && pass "task reset" || fail "task reset: status=$status"
     
     # Cleanup: close epic to avoid polluting state
   }
   ```

5. `test_task_reset_cascade`:
   ```bash
   test_task_reset_cascade() {
     # Create epic with dependent tasks (A <- B)
     # Complete both
     # Reset A with --cascade
     # Verify both reset to todo
   }
   ```

6. `test_task_reset_in_progress_error`:
   ```bash
   test_task_reset_in_progress_error() {
     # Create and start task (in_progress)
     # Attempt reset, expect failure (exit code != 0)
   }
   ```

### Key Patterns
- Use `python3 -c 'import json,sys; ...'` instead of `jq` for JSON parsing
- Use `python3 -c 'import json,sys; print(json.load(sys.stdin)["field"])'` to extract fields
- Follow existing pass()/fail() patterns

### Key Files
- `plugins/flow-next/scripts/ci_test.sh`
## Acceptance
- [ ] `test_status_command` passes
- [ ] `test_status_json` validates JSON output (using Python, not jq)
- [ ] `test_ralph_pause_resume_commands` tests pause/resume/stop
- [ ] `test_task_reset` tests basic reset flow
- [ ] `test_task_reset_cascade` tests cascade behavior
- [ ] `test_task_reset_in_progress_error` tests error on in_progress
- [ ] All tests registered in test runner
- [ ] `./ci_test.sh` passes with all new tests
- [ ] No jq dependency anywhere in tests
## Done summary
- Added 9 new CI tests for async control commands
- Tests: status, ralph pause/resume/stop, task reset (basic + in_progress error), epic add-dep/rm-dep
- All jq-free (Python JSON parsing for Windows Git Bash compatibility)

Why: Verify new async control commands work correctly

Verification: CI 40/40 (was 31/31, +9 new tests)
## Evidence
- Commits: e297f762e8c921c4c7bb228b564ca32ffa2e3aa0
- Tests: plugins/flow-next/scripts/ci_test.sh
- PRs:

Files in this skill

  • README.md890 B
  • skill.md3.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.