Skip to content

feat(BA-8384): add the runtime_variant seed kind - #15470

Merged
HyeockJinKim merged 3 commits into
BA-8397-seed-resource-policyfrom
BA-8384-seed-runtime-variant
Oct 13, 2026
Merged

HyeockJinKim merged 3 commits into
BA-8397-seed-resource-policyfrom
BA-8384-seed-runtime-variant

Conversation

@HyeockJinKim

@HyeockJinKim HyeockJinKim commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on BA-8397-seed-resource-policy

Summary

  • RuntimeVariantUpserter writes a runtime variant under its stated id, created in global and public.
  • RuntimeVariantSeed (version 1) is the runtime_variant kind's item. name is checked against the column length; the optional fields default to the column defaults.
  • A name another row holds is refused by the unique constraint, which skips only that item.

Test plan

  • tests/unit/manager/seed/runtime_variant/: model validation, planning, mgr seed check, apply, skip on an existing row, overwrite, name collision.
  • tests/unit/manager/seed/test_seed_idempotence.py: applying again changes no row.

Resolves BA-8384

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 12, 2026 15:08
@HyeockJinKim
HyeockJinKim requested a review from a team as a code owner October 12, 2026 15:08
@github-actions github-actions Bot added size:L 100~500 LoC comp:manager Related to Manager component labels Oct 12, 2026

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.

🟢 Approval recommended

The implementation follows existing seed and entity-upserter patterns with comprehensive coverage of the stated behavior.

0 open findings

What changed in this PR

Adds runtime_variant support to the manager seed framework, including validation, persistence, RBAC membership, and idempotence coverage.

Changes:

  • Registers version 1 runtime-variant seeds.
  • Adds an ID-keyed runtime variant upserter.
  • Tests validation, conflicts, overwrite behavior, scopes, and idempotence.
File Description
src/​ai/​backend/​manager/​models/​runtime_variant/​upserters.py Implements runtime variant upserts.
src/​ai/​backend/​manager/​seed/​runtime_variant/​seed.py Defines the seed item schema and write mapping.
src/​ai/​backend/​manager/​seed/​runtime_variant/​__init__.py Adds the seed package.
src/​ai/​backend/​manager/​seed/​factory.py Registers the new seed kind.
tests/​unit/​manager/​seed/​conftest.py Adds runtime variant fixtures and tables.
tests/​unit/​manager/​seed/​runtime_variant/​BUILD Configures the new test target.
tests/​unit/​manager/​seed/​runtime_variant/​test_seed.py Tests validation, planning, and checking.
tests/​unit/​manager/​seed/​runtime_variant/​test_apply.py Tests database writes and conflicts.
tests/​unit/​manager/​seed/​test_seed_idempotence.py Adds runtime variant 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.

@HyeockJinKim
HyeockJinKim force-pushed the BA-8384-seed-runtime-variant branch from 85df8e6 to 9d2da78 Compare October 12, 2026 17:47
@HyeockJinKim
HyeockJinKim changed the base branch from main to BA-8397-seed-resource-policy October 12, 2026 17:47
HyeockJinKim and others added 2 commits October 13, 2026 12:06
- RuntimeVariantUpserter writes a runtime variant under its stated id, created in global and public
- RuntimeVariantSeed (version 1) validates the name against the column length and writes through the upserter
- A name another row holds is refused by the unique constraint and skips only that item

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@HyeockJinKim
HyeockJinKim force-pushed the BA-8397-seed-resource-policy branch from 84db658 to 2a06e3e Compare October 13, 2026 03:12
@HyeockJinKim
HyeockJinKim force-pushed the BA-8384-seed-runtime-variant branch from 9d2da78 to 1b92ebb Compare October 13, 2026 03:12
@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>
@HyeockJinKim
HyeockJinKim merged commit 6ff0dcc into BA-8397-seed-resource-policy Oct 13, 2026
8 of 11 checks passed
@HyeockJinKim
HyeockJinKim deleted the BA-8384-seed-runtime-variant branch October 13, 2026 03:54
@github-actions github-actions Bot added size:XL 500~ LoC require:db-migration Automatically set when alembic migrations are added or updated and removed size:L 100~500 LoC labels Oct 13, 2026
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:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants