feat: agent catalog foundations and migration - #14316
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughChangesCatalog policy rule
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Alembic
participant catalog_policy_rule
participant Savepoints
Alembic->>catalog_policy_rule: Create or reflect schema
Alembic->>catalog_policy_rule: Verify constraints and indexes
Alembic->>Savepoints: Run behavior probes
Savepoints->>catalog_policy_rule: Insert representative policy rows
catalog_policy_rule-->>Savepoints: Apply defaults and integrity rules
Savepoints-->>Alembic: Roll back probe data
🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Migration Validation Passed All migrations follow the Expand-Contract pattern correctly. |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/backend/base/langflow/alembic/versions/d4a7c9e1b2f6_add_catalog_policy_rule.py`:
- Around line 78-88: Update _matches_column_type so the "uuid" branch recognizes
PostgreSQL’s reflected UUID type in addition to sa.Uuid and the existing SQLite
CHAR(32) representation. Use a dialect-aware or PostgreSQL UUID type check
without changing the string, datetime, or fallback behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 37ed2850-7b33-4257-8608-505010ced986
📒 Files selected for processing (7)
src/backend/base/langflow/alembic/versions/d4a7c9e1b2f6_add_catalog_policy_rule.pysrc/backend/base/langflow/services/database/models/__init__.pysrc/backend/base/langflow/services/database/models/catalog_policy/__init__.pysrc/backend/base/langflow/services/database/models/catalog_policy/model.pysrc/backend/tests/unit/alembic/test_catalog_policy_rule_migration.pysrc/backend/tests/unit/services/database/models/catalog_policy/__init__.pysrc/backend/tests/unit/services/database/models/catalog_policy/test_model.py
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-1.12.0 #14316 +/- ##
==================================================
+ Coverage 62.18% 62.23% +0.04%
==================================================
Files 2343 2373 +30
Lines 236524 240951 +4427
Branches 35151 33715 -1436
==================================================
+ Hits 147088 149959 +2871
- Misses 87616 89138 +1522
- Partials 1820 1854 +34
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
* feat(catalog): add policy service and admin API * feat(catalog): expose governance config flag (#14319) * feat(catalog): expose governance config flag * feat(catalog): filter component palette by policy (#14320) * feat(catalog): filter component palette by policy * feat(catalog): filter starter templates by policy (#14321) * feat(catalog): filter starter templates by policy * feat(catalog): enforce component policy at runtime (#14322)
f9d6b9a to
5eeb48c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Build successful! ✅ |
Summary
Establishes the persistence foundation for the approved Component / Agent Catalog epic and serves as the base of the backend PR stack.
catalog_policy_rulemodel for component and template catalog rulesValidation
SQLModel.metadata.create_all→ Alembic head, zero-row, schema-drift, and downgrade/roll-forward coverage includedgit diff --check, migration validator, and pre-commit hooks — passedStack
Subsequent backend-ticket PRs will be stacked on this branch, beginning with the policy service, in-process snapshot cache, and superuser CRUD API.
Summary by CodeRabbit
New Features
Tests