test(resource): add failing tests for built-in git-checkout type bootstrap (#524) #568

Merged
brent.edwards merged 12 commits from feature/m3-test-resource-bootstrap-git into master 2026-03-07 02:52:51 +00:00

12 Commits

Author SHA1 Message Date
brent.edwards 775d72dcf4 Merge remote-tracking branch 'https-origin/master' into HEAD
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 17s
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 36s
CI / unit_tests (pull_request) Successful in 4m8s
CI / docker (pull_request) Successful in 40s
CI / integration_tests (pull_request) Successful in 4m53s
CI / coverage (pull_request) Successful in 5m23s
CI / benchmark-regression (pull_request) Successful in 29m34s
# Conflicts:
#	CHANGELOG.md
#	behave.ini
2026-03-07 02:46:14 +00:00
brent.edwards 50228dfe4e fix(test): use in-memory SQLite for Robot git-checkout resource add test
The "Resource Add Git Checkout Should Not Fail With Type Not Found"
Robot test was calling the CLI process directly, which hits the real
database file that does not exist in CI — causing
sqlite3.OperationalError.  Rewrite the test to use an in-memory
SQLite database with register_resource(), matching the pattern used
by the fs-directory Robot tests.

Also fix common.resource path to use ${CURDIR}/common.resource.

Refs: #524
2026-03-07 02:43:49 +00:00
brent.edwards f4a6660bad fix(test): fix _capture_output to treat SystemExit(0) as success (TEST-4)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 19s
CI / build (pull_request) Successful in 22s
CI / security (pull_request) Successful in 39s
CI / typecheck (pull_request) Successful in 46s
CI / unit_tests (pull_request) Successful in 2m37s
CI / docker (pull_request) Successful in 9s
CI / integration_tests (pull_request) Failing after 4m2s
CI / coverage (pull_request) Successful in 4m23s
CI / benchmark-regression (pull_request) Successful in 28m24s
SystemExit(0) and SystemExit(None) are normal termination, not
failures. Only set failed=True when exit code is non-zero.
2026-03-05 22:02:32 +00:00
brent.edwards 5733ab4045 fix(test): add tags = ~@wip to behave.ini to exclude @wip scenarios
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 17s
CI / integration_tests (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / security (pull_request) Has been cancelled
CI / quality (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
Addresses BUG-4 from hamza.khyari Round 2 review: @wip scenarios
broke `nox -s unit_tests` because behave.ini had no wip exclusion.
2026-03-05 22:02:05 +00:00
brent.edwards 0dfcdc641f Merge branch 'master' into feature/m3-test-resource-bootstrap-git
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / quality (pull_request) Successful in 17s
CI / build (pull_request) Successful in 17s
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 36s
CI / unit_tests (pull_request) Failing after 2m6s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 3m4s
CI / coverage (pull_request) Successful in 5m6s
CI / benchmark-regression (pull_request) Has been cancelled
2026-03-05 21:54:22 +00:00
brent.edwards 7b3743f9bf Merge branch 'master-latest' into feature/m3-test-resource-bootstrap-git
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 25s
CI / typecheck (pull_request) Successful in 40s
CI / security (pull_request) Successful in 48s
CI / build (pull_request) Successful in 33s
CI / unit_tests (pull_request) Failing after 3m0s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 5m35s
CI / coverage (pull_request) Successful in 6m48s
CI / benchmark-regression (pull_request) Successful in 30m1s
# Conflicts:
#	CHANGELOG.md
2026-03-05 20:46:01 +00:00
brent.edwards 63764d68eb fix(test): address hamza.khyari review #1986 findings on git-checkout bootstrap tests
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 19s
CI / build (pull_request) Successful in 30s
CI / security (pull_request) Successful in 48s
CI / typecheck (pull_request) Successful in 1m5s
CI / unit_tests (pull_request) Failing after 2m8s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 3m9s
CI / coverage (pull_request) Successful in 4m22s
CI / benchmark-regression (pull_request) Has been cancelled
- SPEC-1: Added genuine TDD failing Scenario 1 (@wip) that creates registry
  WITHOUT bootstrap and asserts git-checkout exists — reproduces bug #524.
  Existing scenarios retained as regression tests (no @wip since they pass).
  Added NOTE FOR FIX AUTHOR comment documenting fix-path expectations.
- BUG-1: Removed colliding @when('I run "agents resource add..."') step.
  Replaced with uniquely-prefixed bootstrap-git step pattern that invokes
  resource_add() directly with mocked DI, avoiding AmbiguousStep collision
  with wildcard @when('I run "{command}"') in cli_plan_context_commands_steps.
- BUG-2: Removed duplicate @then('the CLI exit code should be {code:d}').
  Replaced with prefixed bootstrap-git assertion steps.
- BUG-3: Removed duplicate @then('the CLI output should not contain...").
  Replaced with prefixed bootstrap-git assertion steps.
- TEST-1: Replaced bare MagicMock() with direct service patching via
  _PATCH_SERVICE, consistent with PR #567 pattern.
- TEST-2: Updated Robot docs from 'expected to FAIL' to 'regression tests'
  since both Robot tests call bootstrap explicitly and pass.
- CODE-1: Simplified hasattr guards on enum fields — removed redundant
  hasattr checks, using .value directly since ResourceKind and
  SandboxStrategy are always enums.
- TEST-3: Added assertion on bootstrap_builtin_types() return value via
  new Then step 'the bootstrap-git registered types should include'.
- Updated CHANGELOG from 'Two scenarios' to 'Three scenarios'.

Refs: #553
2026-03-05 20:36:05 +00:00
brent.edwards 6b59c2f58c Merge branch 'master' into feature/m3-test-resource-bootstrap-git
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 35s
CI / security (pull_request) Successful in 37s
CI / quality (pull_request) Successful in 26s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / coverage (pull_request) Failing after 51s
CI / unit_tests (pull_request) Failing after 2m22s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 4m13s
CI / benchmark-regression (pull_request) Successful in 26m45s
2026-03-04 23:52:38 +00:00
brent.edwards 7b86008cfc Merge branch 'master' into feature/m3-test-resource-bootstrap-git
CI / lint (pull_request) Successful in 15s
CI / security (pull_request) Successful in 30s
CI / typecheck (pull_request) Successful in 33s
CI / quality (pull_request) Successful in 15s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 14s
CI / unit_tests (pull_request) Failing after 1m8s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 3m9s
CI / coverage (pull_request) Failing after 3m7s
CI / benchmark-regression (pull_request) Successful in 29m44s
2026-03-04 22:48:56 +00:00
brent.edwards 5a9995716b fix(test): address self-review findings on git-checkout bootstrap tests
CI / lint (pull_request) Successful in 13s
CI / typecheck (pull_request) Successful in 31s
CI / security (pull_request) Successful in 29s
CI / quality (pull_request) Successful in 15s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 17s
CI / unit_tests (pull_request) Failing after 1m9s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
- Add @tdd @bug524 tags to both feature scenarios for selective execution
- Move module-level CliRunner singleton to per-step instantiation for
  consistency with PR #566 pattern

Refs: #553
2026-03-04 22:40:09 +00:00
brent.edwards 26ee1d632d docs(changelog): add entry for git-checkout bootstrap test scaffolding
CI / lint (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 33s
CI / security (pull_request) Successful in 35s
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 15s
CI / unit_tests (pull_request) Failing after 1m4s
CI / docker (pull_request) Has been skipped
CI / integration_tests (pull_request) Failing after 3m41s
CI / coverage (pull_request) Failing after 48s
CI / benchmark-regression (pull_request) Successful in 28m36s
ISSUES CLOSED: #553
2026-03-04 20:19:27 +00:00
brent.edwards 34a65ee9d0 test(resource): add failing tests for built-in git-checkout type bootstrap
CI / lint (pull_request) Waiting to run
CI / typecheck (pull_request) Waiting to run
CI / security (pull_request) Waiting to run
CI / quality (pull_request) Waiting to run
CI / unit_tests (pull_request) Waiting to run
CI / integration_tests (pull_request) Waiting to run
CI / coverage (pull_request) Blocked by required conditions
CI / benchmark-regression (pull_request) Blocked by required conditions
CI / benchmark-publish (pull_request) Waiting to run
CI / build (pull_request) Waiting to run
CI / docker (pull_request) Blocked by required conditions
Add TDD-style failing tests that verify the built-in git-checkout resource
type is available after initialization. Tests assert the correct expected
behavior: after agents init, the git-checkout type should exist in the
registry and 'agents resource add git-checkout' should succeed.

Tests are expected to fail until bug #524 is fixed, because
bootstrap_builtin_types() is never called during initialization. The fix
branch should be based on this branch so the fix commit inherits these tests.

Files added:
- features/resource_type_bootstrap_git.feature (2 Behave scenarios)
- features/steps/resource_type_bootstrap_git_steps.py (step definitions)
- robot/resource_type_bootstrap_git.robot (Robot Framework smoke test)

ISSUES CLOSED: #553
2026-03-04 20:13:36 +00:00