feat(cascade): Extract cascade metadata to dedicated table#397
Merged
feat(cascade): Extract cascade metadata to dedicated table#397
Conversation
Moves cascade-specific fields (stage, pr_url) from documents table to a dedicated document_cascade_metadata table. This improves schema clarity and allows cascade features to evolve independently. Changes: - Add new document_cascade_metadata table with foreign key to documents - Add emdx/database/cascade.py module with cascade-specific operations - Update documents.py to dual-write for backward compatibility - Add migration_032 to create table and backfill existing data - Update cascade commands and UI to use new module The documents table still has stage/pr_url columns for backward compatibility during transition. The new cascade module reads from the dedicated table. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved conflicts: - pyproject.toml: Use newer typer 0.15+ from main
The old release script had corrupted python_version and minversion. These conflict markers were left behind from a previous merge.
The gui function is decorated with @app.command(), so pointing to it directly caused the lazy loader to wrap it incorrectly, showing help instead of launching the GUI. Now points to the app which has the single gui command registered.
The gui function was decorated with @app.command() which made it a Typer subcommand. When lazy loading tried to use it, it created a group requiring 'emdx gui gui'. Now gui is a plain function that the lazy loader wraps correctly as a direct command.
The LazyCommand class extends click.MultiCommand which makes it always behave like a group. Single commands like gui need to be registered eagerly to work correctly. This matches how prime and status are registered.
arockwell
added a commit
that referenced
this pull request
Feb 6, 2026
The gui command was moved from lazy to eager registration in #397 to fix it not launching. The lazy loading test needs to reflect this by no longer expecting emdx.ui.gui to stay unloaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 task
arockwell
added a commit
that referenced
this pull request
Feb 6, 2026
The gui command was moved from lazy to eager registration in #397 to fix it not launching. The lazy loading test needs to reflect this by no longer expecting emdx.ui.gui to stay unloaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
arockwell
added a commit
that referenced
this pull request
Feb 6, 2026
The gui command was moved from lazy to eager registration in #397 to fix it not launching. The lazy loading test needs to reflect this by no longer expecting emdx.ui.gui to stay unloaded. Co-authored-by: Claude Opus 4.6 <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
stage,pr_url) fromdocumentstable to dedicateddocument_cascade_metadatatableChanges
document_cascade_metadatatable with foreign key to documents (ON DELETE CASCADE)emdx/database/cascade.pymodule with cascade-specific operationsdocuments.pyto dual-write for backward compatibilitymigration_032to create table and backfill existing dataNew Module API
Testing
🤖 Generated with Claude Code