Rework addon system with composable core module and AST-based addon application#92
Merged
renardeinside merged 11 commits intomainfrom Feb 19, 2026
Merged
Rework addon system with composable core module and AST-based addon application#92renardeinside merged 11 commits intomainfrom
renardeinside merged 11 commits intomainfrom
Conversation
…based addon application (#77)
…uter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ve stale addons - Simplify _base.py: drop Generic[T], abstract get_instance, as_depends - Fix _defaults.py: use @staticmethod, fix ConfigDependency Depends() target - Fix SQL addon: remove double-wrapping, update addon.toml to match exports - Extract apply_python_edits from apply_backend_addon for reuse in init - Fix init to apply Python AST edits (imports + Dependencies aliases) from addon manifests - Remove genie, lakebase, serving-endpoint addons (use old Dependency API) - Add tests verifying Dependencies class gets Sql member after addon apply Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndency base class
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
Implements #77 — a comprehensive rework of the addon/template system:
core/package: Split monolithiccore.pyintocore/withconfig.py,factory.py,dependencies.py,headers.py,resources.py,static.py— addons no longer need to replace the entire filepy_edit): New module usingruff_python_parserfor surgical code modifications —add_import(),add_class_member(),add_call_keyword()with 16 unit testsBackendAddonSpec+PythonEditenum for declarative addon definitions that apply via AST edits instead of file overlaylakebase_lifespanandDependencies.Sessionsql,serving-endpoint,genie— stub addons with dependency injectionMinimaltemplate skips frontend entirely — no Vite, no bun, no[tool.apx.ui]DatabricksAppsHeadersmodel,DatabricksResourcesConfigwith env prefixcreate_app(lifespans=[...])with_chain_lifespans()for stacking multiple backend addonsTest plan
cargo checkpassesapx initwith Minimal template creates backend-only projectapx initwith Essential template creates full-stack projectapx dev starton backend-only project starts only backendapx dev apply lakebaseapplies addon via AST edits🤖 Generated with Claude Code