test(BA-7852): add scenario tests for the keypair resource policy - #14549
Draft
jopemachine wants to merge 4 commits into
Draft
test(BA-7852): add scenario tests for the keypair resource policy#14549jopemachine wants to merge 4 commits into
jopemachine wants to merge 4 commits into
Conversation
Write the intro every policy shares and the keypair policy chapter of api/adapters/resource_policy/KNOWLEDGE.md, and transcribe the chapter into tests/scenario/bai_scenario/manager/resource_policy: 34 rows over six modules, every one of its six adapter calls reached. Beside the rows every policy has, this one owns the optional values left out, the unlimited slot, the priority cap the session range bounds, the search filtered by the user whose keypair holds the policy, and reading one's own policy through the default-marked key. The report.md is what the CI run produced. The component holds the frame the three policies share and this policy's family; the project and user policies land the same frame in PRs of their own. Seed added: a keypair laid under an existing user, never marked default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019vFCmtPMD6GLPBJxJoFroD
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019vFCmtPMD6GLPBJxJoFroD
This was referenced Sep 11, 2026
…rios 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 a policy a keypair holds, and particles no longer attached to English identifiers. 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
…en wording Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013qjgCzggSejnvDrLt4tG3a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves BA-7852
Summary
api/adapters/resource_policy/KNOWLEDGE.mdwith the intro every policy shares and the keypair policy's chapter, and transcribe that chapter intotests/scenario/bai_scenario/manager/resource_policy: 34 rows over 6 modules, every one of its 6 adapter calls reached. Beside the rows every policy has, this one owns the optional values left out, the unlimited slot, the priority cap the session range bounds on create and update, the search filtered by the user whose keypair holds the policy, and reading one's own policy.components/resource_policy.pyholds the frame the three policies share and the keypair family;OwnFamilyextends the frame for a policy the caller can read as their own and whose nullable limits can be cleared. The project (BA-7851) and user (BA-7853) PRs carry the same frame so each runs on its own; whichever merges first keeps it. Nothing underrunner/,seeder.py,components/answers.pyor an existing seed changes.Behaviours the rows pin, worth a reviewer's eye:
Test plan
python3 scripts/knowledge/check.pypassestest-scenarioon CI: 34 scenarios, 0 failingreport.mdgenerated from the CI run'sscenarios.jsonlwithscripts/scenario-report.py --split; the project and user calls are listed as not exercised until their PRs land🤖 Generated with Claude Code
https://claude.ai/code/session_019vFCmtPMD6GLPBJxJoFroD