Migrate to fastmcp v3 and update firefly models#79
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
+ Coverage 97.56% 97.66% +0.09%
==========================================
Files 19 19
Lines 3118 3121 +3
==========================================
+ Hits 3042 3048 +6
+ Misses 76 73 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✅ Actions performedReview triggered.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughMigration to FastMCP v3 and related infra updates, OpenAPI bumped to Firefly III v6.5.5 (new endpoint and config keys), server composition changed from async import to sync mount with FileTreeStore replacing DiskStore, plus generated model and test updates. Changes
Sequence Diagram(s)sequenceDiagram
participant Init as ServerInit
participant Store as FileTreeStore
participant Composer as compose_all_servers
participant MCP as FastMCP
participant FF as FireflyClient
Init->>Store: instantiate FileTreeStore(data_directory)
Init->>Composer: compose_all_servers(mcp, client)
Composer->>MCP: mount(accounts, transactions, budgets, insights)
Composer->>FF: use FireflyClient to configure routes
MCP-->>Init: servers mounted (synchronous return)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
pyproject.toml (1)
2-5: Cap the FastMCP major version.This migration is coupled to v3 behavior, but the published package metadata now allows any future
4.xrelease as well. The lockfile only protects local syncs; a fresh install of the wheel can still resolve a new major. Constraining this to the audited major would make the upgrade boundary explicit.💡 Suggested change
- "fastmcp>=3.0", + "fastmcp>=3.0,<4",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pyproject.toml` around lines 2 - 5, Update the FastMCP dependency in the pyproject.toml dependencies list: replace the loose spec "fastmcp>=3.0" with a constraint that caps the major version to 3 by adding an upper bound (for example, add "<4.0") so installs cannot pick up a potential incompatible 4.x release.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 18-21: The workflow pins uv to 0.11 only in the lint-and-format
job; update the build-test and integration-tests jobs to use the same action and
version by replacing astral-sh/setup-uv@v5 with astral-sh/setup-uv@v7 and
changing their with: version from "latest" to "0.11" so all jobs
(lint-and-format, build-test, integration-tests) use the identical uv toolchain.
In `@firefly-iii-6.5.5-v1.yaml`:
- Around line 21848-21857: The example values for the recurrence date fields are
chronologically inconsistent: swap or update the example values so first_date is
before or equal to latest_date; specifically adjust the schema fields first_date
and latest_date so first_date (e.g., "2026-03-01") is earlier than latest_date
(e.g., "2026-03-31") to make the examples consistent with the descriptions.
- Around line 15627-15629: The multi-line description under the operation
currently contains a literal "summary: Finish a batch of unprocessed
transactions." inside the description block (the "description: |" literal);
remove the embedded "summary:" line from that block and instead place the text
"Finish a batch of unprocessed transactions." into the operation's top-level
"summary" field (or simply change the description text to a plain sentence
without the "summary:" prefix). Update the "description: |" content to be a
normal descriptive paragraph and ensure the operation has a proper "summary"
entry rather than embedding it inside the description literal.
In `@src/lampyrid/models/firefly_models.py`:
- Around line 413-418: The ConfigValueUpdateFilter enum additions
(configuration_enable_exchange_rates, configuration_use_running_balance,
configuration_enable_external_map, configuration_enable_external_rates,
configuration_allow_webhooks, configuration_valid_url_protocols) are not
mirrored in the response-side enum, causing ConfigurationSingle deserialization
failures; update the schema so ConfigValueFilter (used for Configuration.title /
ConfigurationSingle) includes these six members or refactor to use a single
shared enum type for both ConfigValueUpdateFilter and ConfigValueFilter to
ensure GET/PUT responses can contain the same keys without validation errors.
In `@src/lampyrid/server.py`:
- Around line 38-43: The FileTreeStore constructor is called with the wrong
keyword arg; change the parameter from
data_directory=settings.oauth_storage_path to
directory=settings.oauth_storage_path so it matches the FileTreeStore API;
update the call where FileTreeStore(...) is instantiated (adjacent to
FernetEncryptionWrapper and Fernet(settings.oauth_storage_encryption_key)) to
use directory instead of data_directory.
---
Nitpick comments:
In `@pyproject.toml`:
- Around line 2-5: Update the FastMCP dependency in the pyproject.toml
dependencies list: replace the loose spec "fastmcp>=3.0" with a constraint that
caps the major version to 3 by adding an upper bound (for example, add "<4.0")
so installs cannot pick up a potential incompatible 4.x release.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e923e47f-4642-4517-8cc1-d9fe97afdf1f
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (12)
.github/workflows/ci.ymlDockerfilefirefly-iii-6.5.5-v1.yamlpyproject.tomlsrc/lampyrid/models/firefly_models.pysrc/lampyrid/server.pysrc/lampyrid/services/budgets.pysrc/lampyrid/tools/__init__.pytests/conftest.pytests/integration/test_accounts.pytests/integration/test_budgets.pytests/unit/test_server.py
e015faa to
9e66adb
Compare
Migrates to fastmcp v3 and regens firefly models from latest OpenAPI spec.
Resolves #77