test(BA-7835): add scenario tests for the prometheus query preset category adapter - #14514
Draft
jopemachine wants to merge 10 commits into
Draft
test(BA-7835): add scenario tests for the prometheus query preset category adapter#14514jopemachine wants to merge 10 commits into
jopemachine wants to merge 10 commits into
Conversation
…egory adapter Replace the TODO stub in the category adapter's KNOWLEDGE.md with the 19 rows the adapter guarantees (5 calls), transcribe 18 of them into tests/scenario/bai_scenario/manager/prometheus_query_preset_category/, and add the report.md split from the CI run of #14508, where every row passed. The category seed and the caller helper live here because the preset table, which lands on top of this, files presets under categories. The row purging a category that presets point at stays in the document only: `then` cannot read the presets back after the call. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
This was referenced Sep 11, 2026
…er tables do The scenario tables keep their rows in a module-level SCENARIOS list the parametrize reads; the category modules had them inline in the decorator. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
jopemachine
added a commit
that referenced
this pull request
Sep 11, 2026
The preset table laid its categories and its caller through the category table's seed and helper, which stacked this branch on #14514. It now carries a category seed and the caller helper of its own, so the two land independently; whichever merges second can drop its copy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
The preset table now carries its own; the two branches land independently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
The category has no soft delete, only a purge, so the module the domain and deployment tables call retiring is purging here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
… user Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5
…ng file Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013qjgCzggSejnvDrLt4tG3a
…arios 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 entity, 생성/조회/검색/삭제 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
…ten 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-7835
Summary
api/adapters/prometheus_query_preset_category/KNOWLEDGE.mdwith the scenarios the adapter guarantees — 5 calls / 19 rows — in the shapeapi/adapters/domain/KNOWLEDGE.mdandapi/adapters/deployment/KNOWLEDGE.md(test(BA-7806): add scenario tests for the deployment adapter's own calls #14501) set.tests/scenario/bai_scenario/manager/prometheus_query_preset_category/(5 modules) and add thereport.mdsplit from the CI run. Every public call of the adapter is called by at least one row.SeedCategoryand the caller helper (lay_someone). test(BA-7836): add scenario tests for the prometheus query preset adapter #14518 carries its own copies of both so the two PRs land independently; whichever merges second can drop its copy.What the rows pin, worth a reviewer's eye:
Not covered here:
thensees only the answer, and the category adapter cannot read presets; the seeder lays rows through creators only, so a preset table cannot lay a purged category eitherJudgment calls
Decisions a reviewer may want to overturn; none of them is settled by a rule I could find.
test_reading.py,test_searching.pyUserNotFound). No sibling table has such rows.test_creating.pyUniqueConstraintViolationError, because nothing maps it to a domain error.Creator.integrity_error_checksentry) and expect that.test_retiring.pycomponents/prometheus_query_preset_category.pylay_someone(a caller in a domain, with no entity of its own) lives in this component's module, duplicated in #14518.components/domain.py, which already ownsSomeoneOf, shared by both.batch_load_fields(inherited fromBaseAdapter, no field rows here) as the one call the run leaves alone, since the report lists it. The deployment document does not mention it.Split out of #14508. Independent of #14518 (prometheus_query_preset), which covers the sibling entity.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Sm7zNnhABQq1BSebraixh5