Skip to content

test(BA-7845): add scenario tests for the resource slot type calls - #14538

Draft
jopemachine wants to merge 4 commits into
mainfrom
test/BA-7845-resource-slot-scenarios
Draft

test(BA-7845): add scenario tests for the resource slot type calls#14538
jopemachine wants to merge 4 commits into
mainfrom
test/BA-7845-resource-slot-scenarios

Conversation

@jopemachine

@jopemachine jopemachine commented Sep 11, 2026

Copy link
Copy Markdown
Member

Resolves BA-7845

Summary

  • Fill api/adapters/resource_slot/KNOWLEDGE.md for the five slot-type calls and transcribe it into tests/scenario/bai_scenario/manager/resource_slot/ — 26 rows over five modules — with seeds/resource_slot/slot_type.py and components/resource_slot.py.
  • The seven agent-resource and allocation reads of the same adapter belong to the resource group concern and are listed under "아직 적지 않은 것"; the conftest leaves the agent and domain processors unwired.

What the rows pin:

  • Every call resolves the slot name before its gate, so an unknown name is refused as not-found even for a user without the role.
  • Create and update are behind the superadmin role but purge is behind the entity gate, so rbac.enforcement_enabled=false opens purge and not update.
  • The node's id is the slot name, so the rows compare the id and skip the uuid.

Not covered here:

Rows Why
purge refused while referenced (5 rows: agent resource, kernel allocation, model card requirement, deployment preset, deployment revision) need seeds for the referrers

tests/scenario/bai_scenario/components/system.py — the caller-only situation every system-concern table shares — travels in each of the eight sibling PRs byte for byte (#14535, #14536, #14538, #14542, #14543, #14544, #14545). Whichever merges first, the rest rebase clean.

Test plan

  • python3 scripts/knowledge/check.py passes
  • The rows passed in CI run 34558080395 of the unsplit branch (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

Fill adapters/resource_slot/KNOWLEDGE.md with the scenarios the slot-type calls
guarantee and transcribe it into tests/scenario/bai_scenario/manager/resource_slot/ — 26
rows over five modules. The five "still referenced" purge rows wait for seeds of the
referrers. components/system.py is the caller-only situation every system concern table
shares; the sibling PRs carry the same file byte for byte. 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 and others added 2 commits September 11, 2026 14:05
…ios for readability

The knowledge document, the component docstrings and every scenario sentence
used a terse, metaphorical style (문, 줄, 훑기, 심다, 실리다, 해석) that did not
read at a glance. Rewrite them in plain technical Korean: 생성/조회/검색/수정/삭제
for the operations, 권한 검사 for enforcement, 미리 만들어 둔 for seeded data,
Arabic numerals for the page sizes, and 역할 부족으로 거부 for the role
refusals. report.md follows from the CI run in the next commit.

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

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013qjgCzggSejnvDrLt4tG3a
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