Skip to content

fix(case-init): reject unknown presets before writing - #118

Open
Yu-0312 wants to merge 1 commit into
zhaoxuya520:mainfrom
Yu-0312:fix/strict-case-preset-validation
Open

fix(case-init): reject unknown presets before writing#118
Yu-0312 wants to merge 1 commit into
zhaoxuya520:mainfrom
Yu-0312:fix/strict-case-preset-validation

Conversation

@Yu-0312

@Yu-0312 Yu-0312 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reject unknown --preset values in the Bash and PowerShell case initializers before any case artifacts are written.
  • Add Bash and Windows PowerShell regression coverage for fail-fast behavior and partial-case prevention.
  • Document the behavior change in CHANGELOG.md.

Problem

A typo in a non-empty preset previously emitted a warning but exited successfully. The initializer then continued with pending/offline defaults and created a case directory, making it easy to mistake a requested preset for an applied preset.

Solution

Unknown presets now return a non-zero exit before the case directory is created. Existing aliases remain unchanged: offline-sample, own-sample, local-sample, ctf-public, ctf, own-system, and lab-only.

Tests

  • bash skills/scripts/test-routing.sh — 173/173 passed
  • bash skills/scripts/test-bootstrap-manifest.sh — passed
  • bash skills/scripts/test-bash-workflow.sh — passed
  • python3 skills/case-review/tests/test_review_case.py — 8/8 passed
  • JSON validation and git diff --check — passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant