Skip to content

test(BA-7802): add scenario tests for the runtime variant preset adapter - #14522

Closed
jopemachine wants to merge 5 commits into
test/BA-7843-runtime-variant-scenariosfrom
test/BA-7802-runtime-variant-preset-scenarios
Closed

test(BA-7802): add scenario tests for the runtime variant preset adapter#14522
jopemachine wants to merge 5 commits into
test/BA-7843-runtime-variant-scenariosfrom
test/BA-7802-runtime-variant-preset-scenarios

Conversation

@jopemachine

@jopemachine jopemachine commented Sep 11, 2026

Copy link
Copy Markdown
Member

📚 Stacked PRs

Part of the system concern scenario stack (BA-7802). Merge in order (bottom-up):

  1. test(BA-7802): add the shared components the system concern scenarios use #14510test(BA-7802): shared components the system concern scenarios use
  2. test(BA-7802): add scenario tests for the runtime variant adapter #14521test(BA-7802): runtime variant
  3. 👉 test(BA-7802): add scenario tests for the runtime variant preset adapter #14522test(BA-7802): runtime variant preset ← you are here
  4. test(BA-7802): add scenario tests for the resource slot type calls #14523test(BA-7802): resource slot type
  5. test(BA-7802): add scenario tests for the retention policy adapter #14524test(BA-7802): retention policy
  6. test(BA-7802): add scenario tests for the login client type adapter #14525test(BA-7802): login client type
  7. test(BA-7802): add scenario tests for the client IP masking adapter #14526test(BA-7802): client IP masking
  8. test(BA-7802): add scenario tests for the secret adapter #14527test(BA-7802): secret

Fork at #14510: #14521#14522 is ordered; #14523#14527 each sit on #14510 alone and may merge in any order after it.

Part of BA-7802

Summary

  • Fill api/adapters/runtime_variant_preset/KNOWLEDGE.md and transcribe it into tests/scenario/bai_scenario/manager/runtime_variant_preset/ — 34 rows over five modules — with seeds/runtime_variant/preset.py and components/runtime_variant_preset.py. Sits on test(BA-7802): add scenario tests for the runtime variant adapter #14521 because a preset is laid under a variant.
  • All six calls are exercised; the five value types each get a create row, and the version filter is laid with all four bound combinations.

What the rows pin:

  • The rank is filled in by the insert: the first preset of a variant is 100 and the next is 100 higher.
  • The value-type rules are checked by the request type on create and by the service against the stored row on update, so the update rows refuse with InvalidAPIParameters where the create rows are not rows at all.
  • batch_load_by_ids is a search narrowed to the ids, so an unknown id is an empty slot rather than a refusal.

Deferred, stated in the document: a preset for an unknown variant (the ORM/migration foreign-key split above), and changing only the value type — the service re-checks the default only when a default is sent, so this leaves a mismatched default in place.

Test plan

  • python3 scripts/knowledge/check.py passes
  • The rows passed in CI run 34558080395 of the unsplit branch (181 rows over the seven adapters, 0 failing); report.md is generated from that run's artifacts with scripts/scenario-report.py --split
  • test-scenario and verify-scenario-report pass on this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_01Snp9H2jEVbB2s1C6ixUHGn

jopemachine and others added 2 commits September 11, 2026 12:31
… use

A system entity is created in no scope, so its tables lay no place — only a caller of a
given role and the rows the call reads. This is that caller, the enforcement switch the
entity gate reads, and the marker an edit uses for a place it must leave as laid.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Snp9H2jEVbB2s1C6ixUHGn
Fill adapters/runtime_variant/KNOWLEDGE.md with the scenarios the adapter guarantees and
transcribe it into tests/scenario/bai_scenario/manager/runtime_variant/ — 29 rows over
five modules. The report is generated from CI run 34558080395.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Snp9H2jEVbB2s1C6ixUHGn
jopemachine and others added 3 commits September 11, 2026 12:36
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Snp9H2jEVbB2s1C6ixUHGn
Fill adapters/runtime_variant_preset/KNOWLEDGE.md with the scenarios the adapter
guarantees and transcribe it into tests/scenario/bai_scenario/manager/runtime_variant_preset/
— 34 rows over five modules. The report is generated from CI run 34558080395.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Snp9H2jEVbB2s1C6ixUHGn
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Snp9H2jEVbB2s1C6ixUHGn
@jopemachine

Copy link
Copy Markdown
Member Author

Superseded: the stack was dissolved into independent PRs, one issue each — #14535 (BA-7843 runtime variant), #14536 (BA-7844 preset), #14538 (BA-7845 resource slot type), #14542 (BA-7846 retention policy), #14543 (BA-7847 login client type), #14544 (BA-7848 client IP masking), #14545 (BA-7849 secret), #14546 (BA-7850 service catalog).

@jopemachine
jopemachine deleted the test/BA-7802-runtime-variant-preset-scenarios branch September 11, 2026 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant