test: add TDD bug-capture test for #1038 — validation add --required flag #1133

Merged
brent.edwards merged 2 commits from tdd/m5-validation-required-flag into master 2026-03-28 18:09:28 +00:00

2 Commits

Author SHA1 Message Date
brent.edwards 1507425240 test(tdd): align #1038 expected-fail tags with schema
CI / lint (pull_request) Successful in 3m18s
CI / typecheck (pull_request) Successful in 4m6s
CI / security (pull_request) Successful in 4m15s
CI / quality (pull_request) Successful in 3m41s
CI / unit_tests (pull_request) Successful in 9m9s
CI / build (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 8m55s
CI / helm (pull_request) Successful in 22s
CI / e2e_tests (pull_request) Successful in 12m45s
CI / benchmark-publish (pull_request) Has been skipped
CI / docker (pull_request) Successful in 1m32s
CI / coverage (pull_request) Successful in 12m46s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 1h16m51s
2026-03-28 05:55:05 +00:00
brent.edwards 52ee04055e test: add TDD bug-capture test for #1038 — validation add --required flag
Write 4 Behave scenarios that prove bug #1038 exists: the `agents
validation add` CLI command does not accept `--required` or
`--informational` flags, despite the specification (§22334) requiring
them.  Passing either flag triggers a Typer NoSuchOption error.

Scenarios tagged @tdd_bug @tdd_bug_1038 @tdd_expected_fail so CI passes
via result inversion.  Once the fix for #1038 is implemented and removes
the @tdd_expected_fail tag, the tests will run normally.

Test scenarios:
1. --required flag is accepted by validation add
2. --informational flag is accepted by validation add
3. --required flag overrides YAML config mode (informational -> required)
4. --informational flag overrides YAML config mode (required -> informational)

YAML configs use flat `mode:` keys matching `Validation.from_config()`
implementation (not the nested `validation.mode` schema from the spec),
with a comment documenting the discrepancy.  Mock uses side_effect to
return the actual Validation object passed by the CLI, preventing false
positives from hard-coded mock return values.

Robot integration test: N/A — purely unit-level CLI argument parsing
issue, no integration behavior to exercise.

ISSUES CLOSED: #1102
2026-03-28 05:55:05 +00:00