test(BA-7806): add scenario tests for the deployment adapter's own calls - #14501
Open
fregataa wants to merge 4 commits into
Open
test(BA-7806): add scenario tests for the deployment adapter's own calls#14501fregataa wants to merge 4 commits into
fregataa wants to merge 4 commits into
Conversation
fregataa
added a commit
that referenced
this pull request
Sep 10, 2026
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc
fregataa
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_015d4RfANyMk9v2RgtWUozpc
fregataa
force-pushed
the
test/BA-7806-deployment-scenarios
branch
from
September 11, 2026 01:00
372e154 to
273e08d
Compare
fregataa
added a commit
that referenced
this pull request
Sep 11, 2026
Split from the CI run of #14501, where all 32 deployment rows passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc
fregataa
marked this pull request as ready for review
September 11, 2026 01:51
| | 읽기 권한을 받은 사용자가 읽는다 | deployment 하나, 읽기 권한 있음 | id로 조회 | 그 deployment 전체 | | ||
| | 읽기 권한이 없는 사용자가 읽는다 | 같은 deployment, 읽기 권한 없음 | id로 조회 | 권한 부족으로 거부 | | ||
| | 아무것도 갖지 않은 id로 읽는다 | 읽기 권한 있음 | 없는 id로 조회 | 권한 부족으로 거부 | | ||
| | 슈퍼관리자가 아무것도 갖지 않은 id로 읽는다 | 슈퍼관리자 | 없는 id로 조회 | 대상 없음으로 거부 | |
Collaborator
There was a problem hiding this comment.
I don't see a scenario in which "superadmin" could successfully read a value that does not belong to them.
jopemachine
added a commit
that referenced
this pull request
Sep 11, 2026
Follow the conventions #14501 settled, which the first draft missed: - Drop the rows a request type already refuses (a blank URL, a blank registry name). The adapter does not guarantee those. - Add the enforcement-switch row to each gate, so the two answer differently: the registry's own calls stay refused because a role guards them, while the allowed-project link goes through because the graph does. - Name the permission the caller holds in every 상황 cell, rather than "권한 없음". - Keep 아직 적지 않은 것 for adapter calls only; every call is covered, so it says so, and the wirings that never reach an adapter moved to the header. Also correct two things the first draft got wrong: - The registry search does not refuse a mixed pagination mode. The request type carries cursor fields but the adapter reads only limit and offset, so a cursor is dropped in silence; that is now written as a question to settle. - Replace 물리기/물린다 for the soft delete with 잊기, the adapter's own word (`admin_forget`), and say in the section that the row survives. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYyokzEfpr9AF2NnHtyXB
This was referenced Sep 11, 2026
Cover create, get, update, replace_options, sync_replicas, delete, admin_search, project_search and my_search with 32 scenario rows, and write the deployment KNOWLEDGE.md they are transcribed from. - Seed a deployment through DeploymentCreator, without a revision - Fake the schedule client and the coordinator's handler registry - Pin that an unknown id is refused as permission for a plain user and as not-found only for a superadmin Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc
Split from the CI run of #14501, where all 32 deployment rows passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc
fregataa
force-pushed
the
test/BA-7806-deployment-scenarios
branch
from
September 11, 2026 03:01
7db485a to
c784c10
Compare
…hout a grant One row each for reading, renaming and retiring a deployment the caller did not make and holds no permission on. The role passes the permission graph; the earlier superadmin rows only touched the superadmin's own row. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc
fregataa
force-pushed
the
test/BA-7806-deployment-scenarios
branch
from
September 11, 2026 03:06
c784c10 to
6a6d53b
Compare
This was referenced Sep 11, 2026
seedspirit
reviewed
Sep 11, 2026
| | 수정 권한을 받은 사용자가 이름을 바꾼다 | deployment 하나, 수정 권한 있음 | 이름 수정 | 이름은 새 값, 나머지는 그대로 | | ||
| | 태그를 지운다 | 태그가 붙은 deployment, 수정 권한 있음 | 태그를 비우는 수정 | 태그가 없어진다 | | ||
| | 복제 수를 올린다 | 복제 수가 하나인 deployment, 수정 권한 있음 | 복제 수 수정 | 원하는 복제 수가 새 값이 된다 | | ||
| | 공개 여부를 바꾼다 | 공개가 아닌 deployment, 수정 권한 있음 | 공개 여부 수정 | 공개로 바뀐 상태를 실은 답 | |
Contributor
There was a problem hiding this comment.
Shouldn't it be impossible to change the deployment to "public" right now?
Member
Author
There was a problem hiding this comment.
It is possible on API but it is not synced with app proxy
Comment on lines
+132
to
+134
| | 슈퍼관리자가 전체를 새로 고친다 | 살아 있는 deployment 둘, 전역 역할 있음 | 전체 새로 고침 | 둘 다 새 리비전을 얻고 그것이 현재가 된다 | | ||
| | 하나가 실패해도 나머지가 돈다 | 현재 리비전이 없는 것이 섞여 있음, 전역 역할 있음 | 전체 새로 고침 | 실패한 것과 성공한 것을 함께 답한다 | | ||
| | 슈퍼관리자가 아닌 사용자가 전체를 새로 고친다 | 전역 역할 없음, 모든 deployment에 수정 권한 있음 | 전체 새로 고침 | 역할로 거부 | |
Contributor
There was a problem hiding this comment.
I understand that the "refresh" operation is a one-time action for migration—is it subject to validation?
Member
Author
There was a problem hiding this comment.
it is for migration but I don't want to skip testing
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.
Summary
adapters/deployment/KNOWLEDGE.mdfor the deployment's own calls (create, read, search, update, options, sync, delete) and transcribe it intotests/scenario/bai_scenario/manager/deployment/— 32 rows over 7 modules.SeedDeployment(lays a deployment throughDeploymentCreator, no revision), fakes for the schedule client and the coordinator's handler registry, and deployment components.NotEnoughPermissionfor a plain user; only a superadmin seesEndpointNotFoundmy_searchis guarded by READ at the caller's own scope, not just narrowed to itreplace_optionsreplaces the options whole — an empty handler list drops the inherited entriesNot covered here:
run_scenariodoes not hand fakes tothen(BA-7830)Test plan
pants test tests/scenario/bai_scenario/manager/deployment::report.mdwithscripts/scenario-report.py --splitand commit itResolves BA-7806
🤖 Generated with Claude Code
https://claude.ai/code/session_015d4RfANyMk9v2RgtWUozpc