test: add TDD bug-capture test for #1078 — container-instance missing --mount flag #1129

Merged
brent.edwards merged 1 commit from tdd/m5-container-mount-flag into master 2026-03-27 20:33:16 +00:00
Member

Summary

This PR adds a TDD bug-capture test for #1078 (resource add container-instance missing --mount flag). The test proves the bug exists by attempting to use the --mount flag and observing that it is rejected with "No such option: --mount" (exit code 2).

Changes

  • features/tdd_container_mount_flag.feature — 3 Behave scenarios tagged @tdd_expected_fail @tdd_bug @tdd_bug_1078
  • features/steps/tdd_container_mount_flag_steps.py — Step definitions using typer.testing.CliRunner
  • CHANGELOG.md — Added entry under ## Unreleased documenting the TDD test addition

Scenarios

  1. Single --mount flag recognition (resource-reference format)
  2. Multiple --mount flags on a single command (repeatable)
  3. Host-path mount with mode suffix (/path:/container-path:ro)

Motivation

Per the Bug Fix Workflow in CONTRIBUTING.md, every bug fix begins with a TDD test. The @tdd_expected_fail tag inverts the test result so CI passes while the bug is unfixed. When #1078 is fixed, the tag will be removed and the test will run normally as a regression guard.

Bug Analysis

The resource_add function in cleveragents.cli.commands.resource defines --image for container-instance resources but does not implement --mount. The specification mandates a repeatable --mount RESOURCE_OR_PATH:CONTAINER_PATH flag.

Known Limitations

  • Scenario 2 (multiple --mount flags) only proves the CLI accepts two --mount flags without error. It does not verify that both mount values are actually captured and stored. A docstring note documents this limitation and defers stronger assertions to the bug-fix PR for #1078.

Quality Gates

  • lint: PASS
  • typecheck: PASS (0 errors)
  • unit_tests: PASS (462 features, 12233 scenarios, 0 failed)
  • integration_tests: PASS (1672 tests, 1670 passed, 2 flaky — diagnostics timing and plan-explain race condition, both pass on re-run)
  • coverage_report: PASS (98%, threshold 97%)

Robot integration test: N/A — purely CLI flag recognition level bug.

Closes #1099

## Summary This PR adds a TDD bug-capture test for #1078 (`resource add container-instance` missing `--mount` flag). The test proves the bug exists by attempting to use the `--mount` flag and observing that it is rejected with "No such option: --mount" (exit code 2). ### Changes - `features/tdd_container_mount_flag.feature` — 3 Behave scenarios tagged `@tdd_expected_fail @tdd_bug @tdd_bug_1078` - `features/steps/tdd_container_mount_flag_steps.py` — Step definitions using `typer.testing.CliRunner` - `CHANGELOG.md` — Added entry under `## Unreleased` documenting the TDD test addition ### Scenarios 1. Single `--mount` flag recognition (resource-reference format) 2. Multiple `--mount` flags on a single command (repeatable) 3. Host-path mount with mode suffix (`/path:/container-path:ro`) ### Motivation Per the Bug Fix Workflow in CONTRIBUTING.md, every bug fix begins with a TDD test. The `@tdd_expected_fail` tag inverts the test result so CI passes while the bug is unfixed. When #1078 is fixed, the tag will be removed and the test will run normally as a regression guard. ### Bug Analysis The `resource_add` function in `cleveragents.cli.commands.resource` defines `--image` for container-instance resources but does not implement `--mount`. The specification mandates a repeatable `--mount RESOURCE_OR_PATH:CONTAINER_PATH` flag. ### Known Limitations - Scenario 2 (multiple `--mount` flags) only proves the CLI accepts two `--mount` flags without error. It does not verify that both mount values are actually captured and stored. A docstring note documents this limitation and defers stronger assertions to the bug-fix PR for #1078. ### Quality Gates - lint: PASS - typecheck: PASS (0 errors) - unit_tests: PASS (462 features, 12233 scenarios, 0 failed) - integration_tests: PASS (1672 tests, 1670 passed, 2 flaky — diagnostics timing and plan-explain race condition, both pass on re-run) - coverage_report: PASS (98%, threshold 97%) Robot integration test: N/A — purely CLI flag recognition level bug. Closes #1099
brent.edwards added this to the v3.5.0 milestone 2026-03-23 11:53:09 +00:00
brent.edwards force-pushed tdd/m5-container-mount-flag from 16727a6211
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / lint (pull_request) Successful in 3m55s
CI / quality (pull_request) Successful in 4m20s
CI / typecheck (pull_request) Successful in 4m42s
CI / security (pull_request) Successful in 4m43s
CI / integration_tests (pull_request) Successful in 6m57s
CI / unit_tests (pull_request) Successful in 8m57s
CI / e2e_tests (pull_request) Successful in 8m58s
CI / docker (pull_request) Successful in 1m2s
CI / coverage (pull_request) Successful in 10m25s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 1h29m21s
to 11fd8a4ff6
Some checks failed
CI / build (pull_request) Successful in 15s
CI / lint (pull_request) Successful in 3m17s
CI / quality (pull_request) Successful in 3m41s
CI / typecheck (pull_request) Successful in 3m49s
CI / security (pull_request) Successful in 4m2s
CI / integration_tests (pull_request) Successful in 6m2s
CI / unit_tests (pull_request) Successful in 6m47s
CI / docker (pull_request) Successful in 1m9s
CI / e2e_tests (pull_request) Successful in 8m4s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (pull_request) Failing after 21m51s
CI / benchmark-regression (pull_request) Failing after 34m0s
CI / status-check (pull_request) Has been cancelled
2026-03-23 17:12:33 +00:00
Compare
Author
Member

Self-QA Review Complete — Would Approve

This PR has passed the automated self-QA review loop (2 cycles). If this were a review from an independent reviewer, it would be approved.

Summary

  • Cycle 1: Found 1 major issue (missing CHANGELOG.md entry) and 1 minor issue (undocumented assertion limitation). Both were fixed, commit amended, and force-pushed.
  • Cycle 2: Re-review found no blocking issues. All remaining minor/nit findings are acknowledged design decisions consistent with project conventions.

Quality Gates

All passing: lint | typecheck | unit tests (462 features, 12233 scenarios) | integration tests | coverage 98%

Note

Formal approval must come from a reviewer who did not author the code. This comment serves as a self-QA signal that the PR is ready for independent review and merge.

## Self-QA Review Complete — Would Approve ✅ This PR has passed the automated self-QA review loop (2 cycles). If this were a review from an independent reviewer, it **would be approved**. ### Summary - **Cycle 1:** Found 1 major issue (missing CHANGELOG.md entry) and 1 minor issue (undocumented assertion limitation). Both were fixed, commit amended, and force-pushed. - **Cycle 2:** Re-review found no blocking issues. All remaining minor/nit findings are acknowledged design decisions consistent with project conventions. ### Quality Gates All passing: lint ✅ | typecheck ✅ | unit tests ✅ (462 features, 12233 scenarios) | integration tests ✅ | coverage 98% ✅ ### Note Formal approval must come from a reviewer who did not author the code. This comment serves as a self-QA signal that the PR is ready for independent review and merge.
freemo approved these changes 2026-03-24 15:28:34 +00:00
Dismissed
freemo left a comment

Review: APPROVED

TDD tags correct (@tdd_bug @tdd_bug_1078 @tdd_expected_fail). Behave steps fully implemented. CHANGELOG entry present.

Note

Missing Robot Framework integration tests. For consistency with other TDD PRs, consider adding a .robot file + helper script in a follow-up.

## Review: APPROVED TDD tags correct (`@tdd_bug @tdd_bug_1078 @tdd_expected_fail`). Behave steps fully implemented. CHANGELOG entry present. ### Note Missing Robot Framework integration tests. For consistency with other TDD PRs, consider adding a `.robot` file + helper script in a follow-up.
brent.edwards dismissed freemo's review 2026-03-25 20:45:14 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

brent.edwards force-pushed tdd/m5-container-mount-flag from 5a5f6dbe94
Some checks failed
CI / build (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 3m21s
CI / quality (pull_request) Successful in 3m41s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m46s
CI / integration_tests (pull_request) Successful in 6m5s
CI / unit_tests (pull_request) Successful in 7m2s
CI / docker (pull_request) Successful in 1m12s
CI / e2e_tests (pull_request) Successful in 11m8s
CI / coverage (pull_request) Successful in 10m38s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 25m34s
to d63d754a81
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 50s
CI / lint (pull_request) Successful in 6m35s
CI / typecheck (pull_request) Successful in 7m24s
CI / quality (pull_request) Successful in 8m14s
CI / security (pull_request) Successful in 8m24s
CI / integration_tests (pull_request) Successful in 13m0s
CI / unit_tests (pull_request) Successful in 13m42s
CI / docker (pull_request) Successful in 1m8s
CI / e2e_tests (pull_request) Successful in 15m56s
CI / coverage (pull_request) Successful in 11m53s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 1h9m23s
2026-03-26 20:03:24 +00:00
Compare
freemo approved these changes 2026-03-27 17:12:38 +00:00
Dismissed
freemo left a comment

Review: test: add TDD bug-capture test for #1078 — container-instance missing --mount flag

Approved. Clean TDD bug-capture test with proper tags, good test structure, and complete BDD + Robot coverage.

## Review: test: add TDD bug-capture test for #1078 — container-instance missing --mount flag **Approved.** Clean TDD bug-capture test with proper tags, good test structure, and complete BDD + Robot coverage.
brent.edwards force-pushed tdd/m5-container-mount-flag from d63d754a81
All checks were successful
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 50s
CI / lint (pull_request) Successful in 6m35s
CI / typecheck (pull_request) Successful in 7m24s
CI / quality (pull_request) Successful in 8m14s
CI / security (pull_request) Successful in 8m24s
CI / integration_tests (pull_request) Successful in 13m0s
CI / unit_tests (pull_request) Successful in 13m42s
CI / docker (pull_request) Successful in 1m8s
CI / e2e_tests (pull_request) Successful in 15m56s
CI / coverage (pull_request) Successful in 11m53s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 1h9m23s
to f4c011c734
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m44s
CI / typecheck (pull_request) Successful in 4m20s
CI / security (pull_request) Successful in 4m30s
CI / quality (pull_request) Successful in 4m18s
CI / unit_tests (pull_request) Failing after 6m28s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 9m19s
CI / e2e_tests (pull_request) Successful in 12m4s
CI / coverage (pull_request) Successful in 11m40s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-regression (pull_request) Has been cancelled
2026-03-27 19:35:48 +00:00
Compare
brent.edwards dismissed freemo's review 2026-03-27 19:35:48 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

brent.edwards force-pushed tdd/m5-container-mount-flag from f4c011c734
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m44s
CI / typecheck (pull_request) Successful in 4m20s
CI / security (pull_request) Successful in 4m30s
CI / quality (pull_request) Successful in 4m18s
CI / unit_tests (pull_request) Failing after 6m28s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Successful in 9m19s
CI / e2e_tests (pull_request) Successful in 12m4s
CI / coverage (pull_request) Successful in 11m40s
CI / status-check (pull_request) Failing after 1s
CI / benchmark-regression (pull_request) Has been cancelled
to 3c6b6b54b2
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 3m17s
CI / typecheck (pull_request) Successful in 3m55s
CI / security (pull_request) Successful in 4m21s
CI / quality (pull_request) Successful in 4m18s
CI / integration_tests (pull_request) Successful in 9m20s
CI / unit_tests (pull_request) Successful in 9m34s
CI / docker (pull_request) Successful in 1m11s
CI / e2e_tests (pull_request) Successful in 12m3s
CI / coverage (pull_request) Successful in 12m16s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 20s
CI / lint (push) Successful in 3m16s
CI / quality (push) Successful in 3m44s
CI / typecheck (push) Successful in 4m11s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m25s
CI / integration_tests (push) Successful in 6m55s
CI / unit_tests (push) Successful in 7m23s
CI / docker (push) Successful in 1m9s
CI / e2e_tests (push) Successful in 11m37s
CI / coverage (push) Successful in 12m9s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Failing after 23m24s
CI / benchmark-regression (pull_request) Failing after 35m42s
2026-03-27 20:17:01 +00:00
Compare
brent.edwards scheduled this pull request to auto merge when all checks succeed 2026-03-27 20:32:45 +00:00
brent.edwards deleted branch tdd/m5-container-mount-flag 2026-03-27 20:33:16 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core!1129
No description provided.