test: add TDD bug-capture test for #1076 — use_action automation_profile propagation #1116

Merged
brent.edwards merged 5 commits from tdd/m4-use-action-automation-profile into master 2026-03-26 02:56:46 +00:00

5 Commits

Author SHA1 Message Date
brent.edwards 43133f62f1 Merge remote-tracking branch 'origin/master' into merge-master-tmp
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 40s
CI / lint (pull_request) Successful in 4m41s
CI / quality (pull_request) Successful in 5m16s
CI / typecheck (pull_request) Successful in 5m30s
CI / security (pull_request) Successful in 5m35s
CI / integration_tests (pull_request) Successful in 10m2s
CI / unit_tests (pull_request) Successful in 10m34s
CI / docker (pull_request) Successful in 1m13s
CI / e2e_tests (pull_request) Successful in 13m7s
CI / coverage (pull_request) Successful in 11m22s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 59m33s
# Conflicts:
#	CHANGELOG.md
2026-03-26 02:09:51 +00:00
brent.edwards 9796ca2879 Merge remote-tracking branch 'origin/master' into merge-master-tmp
CI / build (pull_request) Successful in 37s
CI / lint (pull_request) Successful in 4m55s
CI / typecheck (pull_request) Successful in 5m50s
CI / security (pull_request) Successful in 6m0s
CI / quality (pull_request) Successful in 5m54s
CI / integration_tests (pull_request) Successful in 8m32s
CI / unit_tests (pull_request) Successful in 8m47s
CI / docker (pull_request) Successful in 1m10s
CI / benchmark-publish (pull_request) Has been skipped
CI / e2e_tests (pull_request) Successful in 11m33s
CI / coverage (pull_request) Successful in 12m34s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Has been cancelled
# Conflicts:
#	CHANGELOG.md
2026-03-26 01:06:54 +00:00
brent.edwards 5c6c6869a3 Merge branch 'master' into tdd/m4-use-action-automation-profile
CI / build (pull_request) Successful in 33s
CI / security (pull_request) Successful in 4m15s
CI / lint (pull_request) Successful in 4m27s
CI / typecheck (pull_request) Successful in 4m35s
CI / quality (pull_request) Successful in 4m22s
CI / benchmark-regression (pull_request) Waiting to run
CI / integration_tests (pull_request) Successful in 7m17s
CI / e2e_tests (pull_request) Successful in 8m27s
CI / unit_tests (pull_request) Successful in 8m29s
CI / docker (pull_request) Successful in 53s
CI / coverage (pull_request) Successful in 10m14s
CI / status-check (pull_request) Successful in 0s
CI / benchmark-publish (pull_request) Has been skipped
2026-03-26 00:12:34 +00:00
brent.edwards b70bffcf9a Merge remote-tracking branch 'origin/master' into tdd/m4-use-action-automation-profile
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / lint (pull_request) Successful in 3m30s
CI / quality (pull_request) Successful in 3m53s
CI / security (pull_request) Successful in 4m16s
CI / typecheck (pull_request) Successful in 4m19s
CI / unit_tests (pull_request) Successful in 6m15s
CI / integration_tests (pull_request) Successful in 6m52s
CI / docker (pull_request) Successful in 1m21s
CI / e2e_tests (pull_request) Successful in 11m29s
CI / coverage (pull_request) Successful in 11m40s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 55m11s
# Conflicts:
#	CHANGELOG.md
2026-03-25 20:45:05 +00:00
brent.edwards 7df52b43dc test: add TDD bug-capture test for #1076 — use_action automation_profile propagation
CI / build (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 3m19s
CI / typecheck (pull_request) Successful in 3m48s
CI / quality (pull_request) Successful in 4m3s
CI / security (pull_request) Successful in 4m25s
CI / integration_tests (pull_request) Failing after 13m59s
CI / unit_tests (pull_request) Failing after 13m59s
CI / coverage (pull_request) Successful in 11m42s
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 1s
CI / e2e_tests (pull_request) Failing after 18m58s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 1h3m33s
Add Behave BDD scenarios that capture the bug described in #1076 where
PlanLifecycleService.use_action() does not resolve or propagate the
automation_profile from the Action (or any other source in the spec
precedence chain) to the created Plan.

Three scenarios prove the bug exists:

1. Action with automation_profile="full-auto" — Plan.automation_profile
   is None instead of AutomationProfileRef(profile_name="full-auto",
   provenance=ACTION).

2. Action without automation_profile but with project-scoped config
   "trusted" — Plan.automation_profile is None instead of
   AutomationProfileRef(profile_name="trusted", provenance=PROJECT).

3. Action without automation_profile — Plan.automation_profile is None
   instead of resolving to the global default "supervised" with
   provenance=GLOBAL.

All scenarios are tagged @tdd_expected_fail @tdd_bug @tdd_bug_1076.
The @tdd_expected_fail tag inverts the result so CI passes while the
bug is unfixed. Once the fix in #1076 is merged, the @tdd_expected_fail
tag will be removed and the tests will run normally as regression guards.

Robot integration tests are N/A — the bug is purely in the service
layer with no CLI, I/O, or external dependencies involved.

Duplicate When step bodies extracted into a shared _use_action_on_project
helper. Guard assertion added after create_action to verify the Action
itself stored the automation_profile. CHANGELOG.md entry added per
CONTRIBUTING.md requirement.

ISSUES CLOSED: #1098
2026-03-23 09:00:44 +00:00