Skip to content

feat(BA-8268): add the entity seed kinds - #15474

Merged
HyeockJinKim merged 3 commits into
mainfrom
BA-8382-seed-resource-slot
Oct 13, 2026
Merged

HyeockJinKim merged 3 commits into
mainfrom
BA-8382-seed-resource-slot

Conversation

@HyeockJinKim

@HyeockJinKim HyeockJinKim commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the entity seed kinds of Epic BA-8268. Each kind writes the entity row, its own field rows and the graph rows its runtime creator writes; relations between entities are left to BA-8418. The 28 stacked pull requests below were squashed into this branch in order and each was reviewed on its own.

# PR Kind
1 #15474 BA-8382 resource slot type
2 #15477 BA-8383 login client type
3 #15478 BA-8389 retention policy
4 #15479 BA-8390 client IP masking policy
5 #15480 BA-8413 storage backend type
6 #15481 BA-8387 Prometheus query preset category
7 #15482 BA-8392 notification channel
8 #15483 BA-8391 idle checker
9 #15484 BA-8404 container registry
10 #15485 BA-8405 object storage
11 #15486 BA-8407 VFS storage
12 #15487 BA-8395 app config allow list
13 #15488 BA-8388 Prometheus query preset
14 #15489 BA-8393 notification rule
15 #15490 BA-8408 storage namespace
16 #15471 BA-8398 domain
17 #15473 BA-8397 user, project and keypair resource policies
18 #15470 BA-8384 runtime variant
19 #15491 BA-8385 runtime variant preset
20 #15492 BA-8386 deployment preset
21 #15493 BA-8401 project
22 #15494 BA-8399 resource group
23 #15495 BA-8396 app config fragment
24 #15496 BA-8400 resource preset
25 #15497 BA-8402 user with keypairs
26 #15498 BA-8409 session template
27 #15503 BA-8403 role
28 #15504 BA-8415 default app config definitions and allow list (alembic + seed)
29 #15505 BA-8410 per-kind check

Test plan

  • Each stacked PR passed lint, typecheck and its seed tests
  • CI on this PR against main

Resolves BA-8382, BA-8383, BA-8389, BA-8390, BA-8413, BA-8387, BA-8392, BA-8391, BA-8404, BA-8405, BA-8407, BA-8395, BA-8388, BA-8393, BA-8408, BA-8398, BA-8397, BA-8384, BA-8385, BA-8386, BA-8401, BA-8399, BA-8396, BA-8400, BA-8402, BA-8409, BA-8403, BA-8415, BA-8410

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@HyeockJinKim
HyeockJinKim requested a review from a team as a code owner October 12, 2026 16:00
Copilot AI balanced review requested due to automatic review settings October 12, 2026 16:00
@HyeockJinKim HyeockJinKim added the comp:manager Related to Manager component label Oct 12, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Overwrite can mutate immutable slot semantics, and nested number-format typos are silently accepted.

2 open findings
What changed in this PR

Adds resource_slot_type support to the manager seed framework.

Changes:

  • Adds seed validation, registry wiring, and database upsert behavior.
  • Creates global/public memberships for seeded slot types.
  • Adds real-database, validation, collision, and idempotence tests.
File Description
changes/​15474.feature.md Adds the feature changelog entry.
src/​ai/​backend/​manager/​models/​resource_slot/​upserters.py Adds the slot-type upserter.
src/​ai/​backend/​manager/​seed/​factory.py Registers the new seed kind.
src/​ai/​backend/​manager/​seed/​resource_slot_type/​__init__.py Defines the seed package.
src/​ai/​backend/​manager/​seed/​resource_slot_type/​seed.py Defines the seed item schema and write mapping.
tests/​unit/​manager/​seed/​conftest.py Adds seed fixtures and database tables.
tests/​unit/​manager/​seed/​resource_slot_type/​BUILD Configures the new test target.
tests/​unit/​manager/​seed/​resource_slot_type/​test_apply.py Tests database application and conflicts.
tests/​unit/​manager/​seed/​resource_slot_type/​test_kind.py Tests validation, planning, and CLI checks.
tests/​unit/​manager/​seed/​test_seed_idempotence.py Adds idempotence coverage.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +110 to +130
def build_insert_values(self) -> dict[str, Any]:
return {"uuid": self.uuid, "slot_name": self.slot_name, **self._values()}

@override
def build_update_values(self) -> dict[str, Any]:
"""``updated_at`` is set here: ``ON CONFLICT DO UPDATE`` bypasses the ORM's
``onupdate``."""
return {**self._values(), "updated_at": sa.func.now()}

def _values(self) -> dict[str, Any]:
return {
"slot_type": self.slot_type.value,
"required": self.required,
"enabled": self.enabled,
"display_name": self.display_name,
"description": self.description,
"display_unit": self.display_unit,
"display_icon": self.display_icon,
"number_format": self.number_format,
"rank": self.rank,
}
description: str = Field(default="", max_length=256)
display_unit: str = Field(default="", max_length=32)
display_icon: str = Field(default="", max_length=64)
number_format: NumberFormat = NumberFormat()
@HyeockJinKim
HyeockJinKim added this pull request to stack #15517 October 13, 2026 03:13
@HyeockJinKim
HyeockJinKim removed this pull request from stack #15517 October 13, 2026 03:51
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added size:M 30~100 LoC require:db-migration Automatically set when alembic migrations are added or updated and removed size:L 100~500 LoC labels Oct 13, 2026
@HyeockJinKim HyeockJinKim changed the title feat(BA-8382): add the resource_slot_type seed kind feat(BA-8268): add the entity seed kinds Oct 13, 2026
@HyeockJinKim
HyeockJinKim merged commit de8f89a into main Oct 13, 2026
49 of 51 checks passed
@HyeockJinKim
HyeockJinKim deleted the BA-8382-seed-resource-slot branch October 13, 2026 04:04
wngh4628 added a commit that referenced this pull request Oct 13, 2026
AssignedUserData became a FieldData in #15474, so the node identifier catalog test
expects its response node to carry field_id. It takes the assignment row id, the way
PermissionNode does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wngh4628 added a commit that referenced this pull request Oct 16, 2026
AssignedUserData became a FieldData in #15474, so the node identifier catalog test
expects its response node to carry field_id. It takes the assignment row id, the way
PermissionNode does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:manager Related to Manager component require:db-migration Automatically set when alembic migrations are added or updated size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants