Repository navigation
feat(BA-8268): add the entity seed kinds - #15474
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 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
added this pull request to stack #15517
October 13, 2026 03:13
HyeockJinKim
removed this pull request from stack #15517
October 13, 2026 03:51
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>
Merged
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>
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
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.
Test plan
mainResolves 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