Skip to content

feat: capability-based dependency resolution in wizard#39

Open
BimaPangestu28 wants to merge 2 commits into
mainfrom
feat/capability-dependency-resolver
Open

feat: capability-based dependency resolution in wizard#39
BimaPangestu28 wants to merge 2 commits into
mainfrom
feat/capability-dependency-resolver

Conversation

@BimaPangestu28
Copy link
Copy Markdown
Member

Summary

  • New capability_resolver module that maps required_capabilities to catalog entries that provide them
  • Wizard auto-resolves dependencies after adding a provider: single-provider auto-add, multi-provider prompts user, no-provider warns
  • Build-time and doctor validation checks that all pack dependencies are satisfied
  • providers.json updated: messaging providers declare required_capabilities, state packs declare provided_capabilities

Test plan

  • cargo test --lib — 37 tests pass including 6 new capability resolver tests
  • cargo check clean
  • Run wizard with messaging provider and verify state-store dependency auto-resolves
  • Run gtc bundle doctor on bundle missing state pack and verify warning

BimaPangestu28 and others added 2 commits April 7, 2026 08:07
Add capability resolver that maps required_capabilities to catalog
entries providing them. When user adds a provider in the wizard,
auto-resolve dependencies (single provider) or prompt for choice
(multiple providers). Also adds build-time and doctor dependency
validation.

- New capability_resolver module with full test coverage
- CatalogEntry gains provided_capabilities and required_capabilities
- providers.json: messaging providers declare required state-store cap
- providers.json: state-memory/state-redis declare provided cap
- build_workspace and doctor now validate dependency satisfaction

Bump version to 0.4.29.
Copy link
Copy Markdown

@levindmytro1 levindmytro1 left a comment

Choose a reason for hiding this comment

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

Semver Fix Report

Context

  • Crate: greentic-bundle
  • Compared versions: 0.4.28 -> 0.4.29
  • Reported failing lint: constructible_struct_adds_field

Violations Analyzed

  1. CatalogEntry.provided_capabilities added at src/catalog/registry.rs:25
  2. CatalogEntry.required_capabilities added at src/catalog/registry.rs:28

Fix Applied

Rationale:

  • This is the preferred minimal semver-safe fix for constructible_struct_adds_field.
  • It preserves runtime behavior and serialization/deserialization behavior.
  • It prevents downstream exhaustive struct literal construction from becoming a hard breaking change when fields are added.

Additional Notes

  • No logic changes were made.
  • No tests were modified.
  • No version bump was applied because a non-breaking attribute fix was sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants