test(BA-7853): add scenario tests for the user resource policy - #14550
Draft
jopemachine wants to merge 3 commits into
Draft
test(BA-7853): add scenario tests for the user resource policy#14550jopemachine wants to merge 3 commits into
jopemachine wants to merge 3 commits into
Conversation
jopemachine
added a commit
that referenced
this pull request
Sep 11, 2026
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
Write the intro every policy shares and the user policy chapter of api/adapters/resource_policy/KNOWLEDGE.md, and transcribe the chapter into tests/scenario/bai_scenario/manager/resource_policy: 27 rows over six modules, every one of its six adapter calls reached. Reading one's own user policy goes straight off the user's row, so it has no not-found row. 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 keypair policies land the same frame in PRs of their own. The row that clears the concurrent-login cap needs the user policy seed to carry one, so SeedUserPolicy takes a max_concurrent_logins here; None stays the default and every row laid so far reads the same. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019vFCmtPMD6GLPBJxJoFroD
jopemachine
force-pushed
the
test/BA-7853-user-policy-scenarios
branch
from
September 11, 2026 04:16
bada249 to
294e7cd
Compare
…s 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, 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
…io 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-7853
Summary
api/adapters/resource_policy/KNOWLEDGE.mdwith the intro every policy shares and the user policy's chapter, and transcribe that chapter intotests/scenario/bai_scenario/manager/resource_policy: 27 rows over 6 modules, every one of its 6 adapter calls reached. Reading one's own user policy goes straight off the user's row, so it has no not-found row.components/resource_policy.pyholds the frame the three policies share and the user family (anOwnFamily, like the keypair one). The project (test(BA-7851): add scenario tests for the project resource policy #14548) and keypair (test(BA-7852): add scenario tests for the keypair resource policy #14549) PRs carry the same frame so each runs on its own; whichever merges first keeps it. Nothing underrunner/,seeder.pyorcomponents/answers.pychanges.SeedUserPolicytakes amax_concurrent_logins, for the row that clears it.Nonestays the default, so every row laid so far — and every existingreport.md— reads the same.Behaviours the rows pin, worth a reviewer's eye:
Test plan
python3 scripts/knowledge/check.pypassestest-scenarioon CI: 27 scenarios, 0 failingreport.mdgenerated from the CI run'sscenarios.jsonlwithscripts/scenario-report.py --split; the project and keypair calls are listed as not exercised until their PRs land🤖 Generated with Claude Code
https://claude.ai/code/session_019vFCmtPMD6GLPBJxJoFroD