Skip to content

Optimize CLI startup imports for issue #108#112

Merged
harumiWeb merged 3 commits intomainfrom
feat/cli-optimize
Mar 21, 2026
Merged

Optimize CLI startup imports for issue #108#112
harumiWeb merged 3 commits intomainfrom
feat/cli-optimize

Conversation

@harumiWeb
Copy link
Copy Markdown
Owner

@harumiWeb harumiWeb commented Mar 20, 2026

Summary

  • lazily resolve public exports from �xstruct and �xstruct.edit to avoid front-loading heavy extraction/edit imports
  • defer edit and extraction CLI implementation imports until command routing is known while keeping existing monkeypatch surfaces
  • add startup isolation tests and document the lightweight CLI/package import rule

Testing

  • uv run pytest tests/cli/test_cli.py tests/cli/test_edit_cli.py tests/cli/test_cli_lazy_imports.py tests/edit/test_architecture.py -q
  • uv run task precommit-run

Closes #108


Open with Devin

@harumiWeb harumiWeb requested a review from Copilot March 20, 2026 13:15
chatgpt-codex-connector[bot]

This comment was marked as resolved.

@harumiWeb
Copy link
Copy Markdown
Owner Author

@coderabbitai review

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

This comment was marked as resolved.

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@harumiWeb harumiWeb merged commit c0c8c52 into main Mar 21, 2026
11 checks passed
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.

CLI startup optimization: lazy import heavy modules in exstruct.cli.main

2 participants