instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
PrairieLearn__PrairieLearn__14078
PrairieLearn/PrairieLearn
14,078
defect
e7d8acc24280957ecb3605aff05f7116b661d608
857e29b2a1db496de12e3729ff469eee61cc4661
Move question creation from modal to dedicated page
## Description Moves the question creation flow from a Bootstrap modal on the questions list page to a dedicated full page at `/course_admin/questions/new`. The form content remains the same (QID/title inputs, template selection radio cards, template dropdown), but is now presented as a complete page with cleaner se...
diff --git a/apps/prairielearn/assets/scripts/esm-bundles/hydrated-components/CreateQuestionFormContents.ts b/apps/prairielearn/assets/scripts/esm-bundles/hydrated-components/CreateQuestionFormContents.ts new file mode 100644 index 00000000000..dd12b7b3cd5 --- /dev/null +++ b/apps/prairielearn/assets/scripts/esm-bundle...
4
2
0
[{"id": "G0", "claim": "The reviewer asks whether this code is a direct copy of the previous implementation and, if it is not, why it does not do client-side validation.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'template/' string literal should...
null
PrairieLearn__PrairieLearn__14110
PrairieLearn/PrairieLearn
14,110
defect
231799d53faced33b65ce67f035b09c501130a05
db88103b63b61f799ce39d0628285c235736e5fe
Set Zod default for external grading enabled to `true`; add `NOT NULL`
<!-- Etiquette and expectations for contributions can be found here: https://docs.prairielearn.com/contributing --> # Description Title. This moves from a database default to a Zod default, which is now true. As for backwards compatibility, I checked production for usages in the `info.json` files for quest...
diff --git a/apps/prairielearn/src/batched-migrations/20260212202738_questions__external_grading_enabled__backfill.sql b/apps/prairielearn/src/batched-migrations/20260212202738_questions__external_grading_enabled__backfill.sql new file mode 100644 index 00000000000..d4111580c34 --- /dev/null +++ b/apps/prairielearn/src...
5
3
0
[{"id": "G0", "claim": "Use the split \"NOT VALID\" constraint and then \"VALIDATE\" approach instead of a direct SET NOT NULL in the nonnull migration.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Drop the external_grading_enabled column entirely in a...
null
PrairieLearn__PrairieLearn__14147
PrairieLearn/PrairieLearn
14,147
defect
2bf8ae0e9a0afe28d7bab3b4a7bdeb65b2b4e50f
62efe929a6b1819e1ef0f9c4809f869dbf4633f5
Default `externalGradingOptions.enabled` to `false`
## Summary - Adds `.default(false)` to the `enabled` field in `ExternalGradingOptionsJsonSchema` - This eliminates the write path that inserts NULL into `questions.external_grading_enabled` during question sync - When a question doesn't specify `externalGradingOptions.enabled`, it now defaults to `false` instead o...
diff --git a/apps/prairielearn/src/migrations/README.md b/apps/prairielearn/src/migrations/README.md index dc03d1cd33a..b1f9035399a 100644 --- a/apps/prairielearn/src/migrations/README.md +++ b/apps/prairielearn/src/migrations/README.md @@ -108,6 +108,19 @@ If you have no meaningful reads/writes to the old column, you ...
3
2
0
[{"id": "G0", "claim": "An end-to-end plan for when and how the default will be changed safely should be written up (e.g. in an issue) and reviewed before merging.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G2", "claim": "The README's first-PR guidance shoul...
null
PrairieLearn__PrairieLearn__14230
PrairieLearn/PrairieLearn
14,230
defect
674755c83c7f9aa9b5003ef56a1dbe9c6e37bd55
9dcb2f7a63553ca48e5f29ae407ffa7dd25810fd
Add truncateMiddle string formatting function
# Description Adds a `truncateMiddle` function to the `@prairielearn/formatter` package that truncates strings in the middle while preserving recognizability of both start and end. This uses a 60/40 character split favoring the start, making it ideal for display scenarios like navbar elements where full text might n...
diff --git a/.changeset/add-truncate-middle.md b/.changeset/add-truncate-middle.md new file mode 100644 index 00000000000..9ca9a77f7ca --- /dev/null +++ b/.changeset/add-truncate-middle.md @@ -0,0 +1,5 @@ +--- +'@prairielearn/formatter': minor +--- + +Add `truncateMiddle` function that truncates a string in the middle,...
3
1
0
[{"id": "G0", "claim": "The PR should not add a new barrel re-export of truncateMiddle in packages/formatter/src/index.ts; callers should import it from its module directly per the re-export guideline.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "truncat...
null
PrairieLearn__PrairieLearn__14232
PrairieLearn/PrairieLearn
14,232
defect
c26c8600f6beb8992a9439ea38316408a134b3cf
6bb9893ba9edc9ec2b5cc8512d71abffa3bd5e38
Fully remove untyped SQL functions
<!-- Etiquette and expectations for contributions can be found here: https://docs.prairielearn.com/contributing --> # Description This removes remaining usages of untyped SQL functions. In PT this was done in https://github.com/PrairieLearnInc/PrairieTest/pull/2646. <!-- - Summarize your changes and ex...
diff --git a/.changeset/remove-deprecated-sql-exports.md b/.changeset/remove-deprecated-sql-exports.md new file mode 100644 index 00000000000..12bf8b388a6 --- /dev/null +++ b/.changeset/remove-deprecated-sql-exports.md @@ -0,0 +1,5 @@ +--- +'@prairielearn/postgres': minor +--- + +Remove deprecated untyped SQL exports: ...
8
6
2
[{"id": "G0", "claim": "The changeset for @prairielearn/postgres should declare a major change, not a minor one, since it removes exported functions.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "A changeset entry for the @prairielearn/migrations...
null
PrairieLearn__PrairieLearn__14366
PrairieLearn/PrairieLearn
14,366
defect
690dbd79df040d68ac0482e0ccf00c9dcf202774
578886f496648580a1036402e21448a2e8c6beaf
Convert sproc ip_to_mode to library function
<!-- Etiquette and expectations for contributions can be found here: https://docs.prairielearn.com/contributing --> # Description Follow-up to #14365. Converts the ip_to_mode library to a library. The library function already existed as a wrapper, so this basically moves all remaining functionality to call...
diff --git a/apps/prairielearn/src/ee/lib/terms.ts b/apps/prairielearn/src/ee/lib/terms.ts index 132220152ef..5a24f3dfe43 100644 --- a/apps/prairielearn/src/ee/lib/terms.ts +++ b/apps/prairielearn/src/ee/lib/terms.ts @@ -29,11 +29,7 @@ function hasUserAcceptedTerms(user: User): boolean { async function shouldRedirectT...
1
1
0
[{"id": "G0", "claim": "The comment in exam-mode.sql should read \"if either\" instead of the typo \"is either\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PrairieLearn__PrairieLearn__14372
PrairieLearn/PrairieLearn
14,372
defect
183c368f3d8c59d8b44fd656bb346a3fe4b968a8
ef04bbd011d7ccc381162c07bcd4ecb5626a5531
Prevent renaming questions to subdirectories of existing questions
## Summary - Adds a validation check in `QuestionRenameEditor` that prevents renaming a question QID to a path that is a subdirectory or parent directory of an existing question's QID - Adds a reusable `assertEditError` test helper in `helperClient.ts` for asserting edit error page contents - Adds integration test...
diff --git a/apps/prairielearn/src/lib/editors.ts b/apps/prairielearn/src/lib/editors.ts index 71abc55c64e..936c1926f6d 100644 --- a/apps/prairielearn/src/lib/editors.ts +++ b/apps/prairielearn/src/lib/editors.ts @@ -1642,6 +1642,49 @@ export class QuestionRenameEditor extends Editor { }); } + // Ensur...
3
2
1
[{"id": "G0", "claim": "The QID nesting comparison combines OS-dependent path.normalize() with a hardcoded '/' separator, so on Windows (where normalize produces backslashes) the check may silently never match; the reviewer asks for platform-independent normalization (path.sep, later path.posix.normalize).", "category"...
null
PrairieLearn__PrairieLearn__14477
PrairieLearn/PrairieLearn
14,477
defect
4aec2714152a0750839594a5929267a238247ea2
c09a3a7556be9b915be8495b6bf48d1483488751
Add UI for editing assessment / zone tools
# Description This pull request introduces support for configuring assessment-level and zone-level tools in the UI editor. It adds the ability to enable or override tool settings both in the assessment settings and for individual zones, with the settings persisted and displayed in the UI. The main changes span backe...
diff --git a/apps/prairielearn/src/lib/editors.ts b/apps/prairielearn/src/lib/editors.ts index b6b5ba2daae..34026a959ae 100644 --- a/apps/prairielearn/src/lib/editors.ts +++ b/apps/prairielearn/src/lib/editors.ts @@ -23,6 +23,7 @@ import { updateCourseCommitHash, } from '../models/course.js'; import { selectQuesti...
13
10
3
[{"id": "G0", "claim": "The tools UI in the question detail panel is visually inconsistent and should follow the same design as the \"Allow real-time grading\" checkbox, for consistency with the assessment settings page and the rest of the assessment editor detail panel.", "category": "design", "verdict": "supported", ...
null
PrairieLearn__PrairieLearn__14502
PrairieLearn/PrairieLearn
14,502
defect
146406051e2619f3d6153f50e465ccdf8b27220f
7224deef5b6e0d673f03ba21c9c38548e151b839
Clean up access control sync and validation
# Description Addresses items from #14469. This PR cleans up the access control sync and validation layer: - **Simplify `mapField`**: Collapses the null/non-null branches into a single return, since both produce `{ overridden: true, value: jsonValue }`. - **Flatten `validateAccessControlArray` return type**: Changes ...
diff --git a/apps/prairielearn/src/batched-migrations/20240523183853_sync_courses_for_implicit_flag.ts b/apps/prairielearn/src/batched-migrations/20240523183853_sync_courses_for_implicit_flag.ts index fcba990eaf8..53259ea857e 100644 --- a/apps/prairielearn/src/batched-migrations/20240523183853_sync_courses_for_implicit...
6
3
0
[{"id": "G0", "claim": "The date literals in the access-control sync tests could specify timezones to avoid ambiguity.", "category": "testing", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "syncDiskToSqlWithLock need not create courseId/courseDir aliases; it could just use cours...
null
PrairieLearn__PrairieLearn__14505
PrairieLearn/PrairieLearn
14,505
defect
a3f980defe1c51d6292f94053f4ac6996235f1d7
d421b4c8c28af9dbce43fa49e9f27b7af9fbc529
Clean up access control schema definitions and validation limits
# Description Fixes schema inconsistencies, tightens validation limits, and cleans up unused schema properties in the access control feature. Addresses items from https://github.com/PrairieLearn/PrairieLearn/issues/14469. Changes: - **Fix nullable inconsistency on after-complete dates**: Added `.nullable()` to `showQ...
diff --git a/apps/prairielearn/src/lib/access-control-data.ts b/apps/prairielearn/src/lib/access-control-data.ts index 7cfc8686940..086417ba203 100644 --- a/apps/prairielearn/src/lib/access-control-data.ts +++ b/apps/prairielearn/src/lib/access-control-data.ts @@ -146,11 +146,9 @@ function buildAfterComplete( } fun...
6
4
3
[{"id": "G0", "claim": "The comment explaining main-rule-only listBeforeRelease semantics that the PR removed from mergeRules was useful and should be put back.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Materializing listBeforeRelease as a ha...
null
PrairieLearn__PrairieLearn__14512
PrairieLearn/PrairieLearn
14,512
defect
b7a997b2ca10347f1ffb0d1f866603a36e02c5fc
ec1e367170841dcc074c7008df1db624de8ea789
Align access control validation across sync, tRPC, and UI
# Description Closes validation gaps between the three paths that accept access control data: sync from disk (`course-db.ts`), the tRPC save mutation (`trpc.ts`), and the client-side UI. Adds missing validation to the tRPC path, and adds new validation (date ordering, credit monotonicity) that doesn't exist anywhere y...
diff --git a/apps/prairielearn/src/pages/instructorAssessmentAccess/trpc.ts b/apps/prairielearn/src/pages/instructorAssessmentAccess/trpc.ts index d22faaa4b51..034b3b1e9a8 100644 --- a/apps/prairielearn/src/pages/instructorAssessmentAccess/trpc.ts +++ b/apps/prairielearn/src/pages/instructorAssessmentAccess/trpc.ts @@ ...
3
3
3
[{"id": "G0", "claim": "Credit monotonicity checks should be skipped when date ordering already failed, because validateRuleCreditMonotonicity() assumes chronological deadlines and an out-of-order array like [2024-03-20/110, 2024-03-15/120] currently also reports a bogus 'monotonically decreasing' error even though the...
null
PrairieLearn__PrairieLearn__14593
PrairieLearn/PrairieLearn
14,593
defect
f98f45721e0a24dbd1196238ac779949c6d86b6a
80af325c6b749efb9ff16c3e8b7ccaea06649830
Repair Access Control override Deadline fields overflowing, enhance and relocate SplitPane
# Description - as referenced in #14469, > - Early/Late deadline date/time inputs bleed over the horizontal edge of the container (see screenshot attached to https://github.com/PrairieLearn/PrairieLearn/pull/14521) - This PR moves the Percentage input and Delete button down to a second line when a single line won'...
diff --git a/apps/prairielearn/src/pages/instructorAssessmentAccess/components/fields/DeadlineArrayField.tsx b/apps/prairielearn/src/pages/instructorAssessmentAccess/components/fields/DeadlineArrayField.tsx index c67f8afc0cf..9e68c9c8701 100644 --- a/apps/prairielearn/src/pages/instructorAssessmentAccess/components/fie...
5
5
3
[{"id": "G0", "claim": "The `Credit` label's `htmlFor` has no matching `id` on the number input, which breaks label association and click-to-focus behavior.", "category": "accessibility", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "`ml-auto` is Bootstrap 4 syntax and should ...
null
PrefectHQ__fastmcp__3022
PrefectHQ/fastmcp
3,022
defect
f7cdd20a42b11f6443489c9d114fe7328c552be2
be0a0f4916e49fdae02ec786b2ceba8dd4eea982
Add concurrent tool execution with sequential flag
## Overview Implements parallel tool execution for sampling with configurable concurrency. When an LLM returns multiple tool calls in a single response, they can now be executed concurrently for improved performance. ## Key Features - **Backward compatible**: Default behavior remains sequential execution - **...
diff --git a/src/fastmcp/server/context.py b/src/fastmcp/server/context.py index a9245fa2b1..31e759c981 100644 --- a/src/fastmcp/server/context.py +++ b/src/fastmcp/server/context.py @@ -754,6 +754,7 @@ async def sample_step( tool_choice: ToolChoiceOption | str | None = None, execute_tools: bool = Tru...
4
2
1
[{"id": "G1", "claim": "The logger.exception() calls in execute_tools use f-string interpolation, so the string is always formatted even when the log level is disabled; use lazy %-style or extra-args logging instead.", "category": "performance", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "...
null
PrefectHQ__fastmcp__3062
PrefectHQ/fastmcp
3,062
defect
b076b2154c6f8da19ea7dd2d63e30a9998e0561c
9785b1e5bcbcb5d08d25000b582cb0d4aaef98c3
Add helpers for converting FunctionTool and TransformedTool to SamplingTool
## Overview This PR adds helpers to convert existing server tools (FunctionTool and TransformedTool) into SamplingTool objects, enabling servers to reuse their tools in sampling contexts without duplication. Previously, if you had a tool defined with `@mcp.tool` and wanted to use it in `ctx.sample()`, you had to ...
diff --git a/src/fastmcp/server/sampling/run.py b/src/fastmcp/server/sampling/run.py index 7299689162..54b1e57c3b 100644 --- a/src/fastmcp/server/sampling/run.py +++ b/src/fastmcp/server/sampling/run.py @@ -334,20 +334,40 @@ def prepare_messages( def prepare_tools( - tools: Sequence[SamplingTool | Callable[...,...
8
5
3
[{"id": "G0", "claim": "Move the inline imports in run.py and sampling_tool.py to the top of the module (there is no circular dependency) and replace the `Any` type hint on from_callable_tool/prepare_tools with a proper union type.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "int...
null
PrefectHQ__fastmcp__3086
PrefectHQ/fastmcp
3,086
defect
5e0211dd5ed8bfaa763ca9ad83fea900234cfdc0
d7c6526fb89dcf61fe0cbd6e6dca42669a72c29c
feat: add Static Client Registration (#3085)
## Context Some MCP servers do **not** support OAuth 2.0 Dynamic Client Registration (DCR). The MCP specification explicitly does **not** require DCR support: > MCP clients and authorization servers **SHOULD** support the OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591) to allow MCP clients to obtain ...
diff --git a/src/fastmcp/client/auth/oauth.py b/src/fastmcp/client/auth/oauth.py index 393844d073..057690fcbd 100644 --- a/src/fastmcp/client/auth/oauth.py +++ b/src/fastmcp/client/auth/oauth.py @@ -152,6 +152,8 @@ def __init__( additional_client_metadata: dict[str, Any] | None = None, callback_port: ...
7
7
5
[{"id": "G0", "claim": "`_initialize()` reads `self._static_client_info` unconditionally while the attribute is only created when client_id and client_secret are provided, so without static credentials initialization raises AttributeError and breaks existing OAuth usage (confirmed by failing tests).", "category": "corr...
null
PrefectHQ__fastmcp__3133
PrefectHQ/fastmcp
3,133
defect
cdad99583ef7bafae77c8089b3404a784ac5b4fb
bd3c3ccf4ed7ce1dca1ff47d8a3f776397441a41
Fix unhandled exceptions in OpenAPI POST tool calls
`OpenAPITool.run()` only catches `httpx.*` exceptions, so any failure during request building (parameter routing, body construction) escapes unhandled and surfaces to clients as a generic "Internal Server Error" with no diagnostic info. This particularly affects POST requests where the body construction code exercises ...
diff --git a/docs/python-sdk/fastmcp-server-providers-openapi-components.mdx b/docs/python-sdk/fastmcp-server-providers-openapi-components.mdx index bc0b40d3cd..55f80de6a5 100644 --- a/docs/python-sdk/fastmcp-server-providers-openapi-components.mdx +++ b/docs/python-sdk/fastmcp-server-providers-openapi-components.mdx @...
2
1
1
[{"id": "G0", "claim": "The new catch-all `except Exception` in `OpenAPITool.run` covers the whole method rather than just request construction, so failures after `send()` (response parsing, ToolResult validation) are rethrown as misleading \"Error building request ...\" errors; the handler should be scoped to the buil...
null
PrefectHQ__fastmcp__3134
PrefectHQ/fastmcp
3,134
defect
cdad99583ef7bafae77c8089b3404a784ac5b4fb
f7c45759522a345fbaeb08918b939488fcd09973
Add validate_output option for OpenAPI tools
When backends don't conform to their own OpenAPI response schemas, the MCP SDK's output validation rejects the response and the tool fails with "Output validation error." Users have no way to opt out — they're stuck if the backend is wrong. This adds `validate_output` (default `True`) to `OpenAPIProvider` and `FastMCP...
diff --git a/docs/python-sdk/fastmcp-server-providers-openapi-provider.mdx b/docs/python-sdk/fastmcp-server-providers-openapi-provider.mdx index 6892d11746..69c2b0dae8 100644 --- a/docs/python-sdk/fastmcp-server-providers-openapi-provider.mdx +++ b/docs/python-sdk/fastmcp-server-providers-openapi-provider.mdx @@ -21,7 ...
1
1
1
[{"id": "G0", "claim": "With validate_output=False, a backend that returns an array or primitive while the spec declares type: object is not wrapped, so OpenAPITool.run passes non-dict structured_content and ToolResult raises 'structured_content must be a dict' — the tool still fails instead of acting as a validation o...
null
PrefectHQ__fastmcp__3138
PrefectHQ/fastmcp
3,138
defect
efcc12bc7644d0afb8f484db344841c7b76c4ca6
e200d89ff5dced57a0f6e9febca2764b5867fcf9
fix: snapshot access token for background tasks (#3095)
## Summary Makes `get_access_token()` return the caller's token inside Docket background tasks. The token is snapshotted to Redis at submission time and restored into a ContextVar when the worker picks up the task. Also fixes `lifespan_context` returning `{}` in background tasks by falling back to the server's lifesp...
diff --git a/src/fastmcp/server/context.py b/src/fastmcp/server/context.py index d65e87c436..9889aaee94 100644 --- a/src/fastmcp/server/context.py +++ b/src/fastmcp/server/context.py @@ -318,6 +318,10 @@ def lifespan_context(self) -> dict[str, Any]: Returns an empty dict if no lifespan was configured or if the...
3
1
1
[{"id": "G0", "claim": "The static-analysis workflow fails because ruff format finds a trailing blank line after line 1060 in src/fastmcp/server/dependencies.py and a trailing blank line at the end of tests/server/tasks/test_context_background_task.py, and these formatting violations should be removed so CI passes.", "...
null
PrefectHQ__fastmcp__3151
PrefectHQ/fastmcp
3,151
defect
25e2f4da32bd2ceb4c1d866d3dedc4a0906df4be
861a76ea3e43928c34ffdc98819076cf4bb5650d
Make $ref dereferencing optional via FastMCP(dereference_refs=...)
`compress_schema()` unconditionally inlined all `$ref`/`$defs`, which can more than double schema size for complex Pydantic models. This was added for MCP client compatibility (VS Code Copilot doesn't handle `$ref`), but penalizes every server regardless of client. Dereferencing is now controlled by a per-server kwarg...
diff --git a/docs/development/v3-notes/v3-features.mdx b/docs/development/v3-notes/v3-features.mdx index 93420c6b88..43aa4da670 100644 --- a/docs/development/v3-notes/v3-features.mdx +++ b/docs/development/v3-notes/v3-features.mdx @@ -66,6 +66,16 @@ async def get_emails( Background tasks now use a distributed Redis ...
3
2
1
[{"id": "G0", "claim": "The pull request should not hand-edit files under docs/python-sdk/** (auto-generated); those edits will be overwritten by the doc generator and cause drift, so the changes should be made in the generator/source inputs instead of the generated output.", "category": "maintainability", "verdict": "...
null
PrefectHQ__fastmcp__3175
PrefectHQ/fastmcp
3,175
defect
359575b12f90990154864cb1bb3fc9e99d32a495
cf308da05b0af83c17f70000032c4ba864f046a1
fix: propagate origin_request_id to background task workers
Closes #2877. Follows #2905, #2906. ## Description In task mode, tool code runs in a Docket worker where request-scoped context isn’t present. Without an originating request id, background logs and traces lose the ability to reliably correlate work back to the request that queued it. This PR snapshots the submitting ...
diff --git a/docs/servers/icons.mdx b/docs/servers/icons.mdx index c9b5580945..983f6db9cc 100644 --- a/docs/servers/icons.mdx +++ b/docs/servers/icons.mdx @@ -12,7 +12,7 @@ Icons provide visual representations for your MCP servers and components, helpin ## Icon Format -Icons use the standard MCP Icon type from the...
9
2
2
[{"id": "G0", "claim": "OptionalCurrentContext is added as a new public API but is missing from dependencies.__all__; add it there for consistency and discoverability if it is intended as public API.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":...
null
PrefectHQ__fastmcp__3248
PrefectHQ/fastmcp
3,248
defect
ea1328660e70182e20d9084252750d8010ed9f57
a76930f78ab0eac247dc16d3db31aa5b6826123e
Add verify_id_token option to OIDCProxy
`OIDCProxy` always verifies the upstream `access_token`, but many OIDC providers (Clerk, Zoho, others) issue opaque access tokens that the default `JWTVerifier` can't validate. The existing workaround — passing a custom `token_verifier` that hits `/userinfo` or the introspection endpoint — works but adds a network roun...
diff --git a/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx b/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx index dcb22c638a..c3cbcb23f7 100644 --- a/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx +++ b/docs/python-sdk/fastmcp-server-auth-oauth_proxy-proxy.mdx @@ -273,7 +273,7 @@ Imple...
6
3
3
[{"id": "G0", "claim": "When verify_id_token is enabled, _get_verification_token only reads id_token from raw_token_data and returns None when it is missing, so refresh responses that omit id_token (as many providers do) make load_access_token reject all newly issued FastMCP access tokens until users re-authorize.", "c...
null
PrefectHQ__fastmcp__3253
PrefectHQ/fastmcp
3,253
defect
f84b2dae0469e6fd29c51a2ecb07205eb3b7f738
ccb52f07f7802189eda629d5f4eb4ec275d86c3d
Fix ty ignore syntax in OpenAPI provider
The `type: ignore[arg-type]` comment on `SchemaPath.from_dict()` uses mypy syntax, which ty doesn't recognize as a targeted suppression. Newer ty flags it as an unused blanket ignore, breaking the upgrade checks workflow (#3214). Replaced with `ty: ignore[invalid-argument-type]`. Also fixes two flaky tests that only f...
diff --git a/src/fastmcp/server/providers/openapi/provider.py b/src/fastmcp/server/providers/openapi/provider.py index 975e0228b2..8ece942625 100644 --- a/src/fastmcp/server/providers/openapi/provider.py +++ b/src/fastmcp/server/providers/openapi/provider.py @@ -122,7 +122,7 @@ def __init__( # Create openapi...
2
2
0
[{"id": "G0", "claim": "The test test_rate_limiting_blocks_rapid_requests is timing-sensitive (a 10 tokens/second refill can replenish a token between async calls) and fails intermittently on Python 3.10/ubuntu, so it needs to be made timing-independent, e.g. by a much lower refill rate or a mocked clock.", "category":...
null
PrefectHQ__fastmcp__3298
PrefectHQ/fastmcp
3,298
defect
270783e6149fece5e14dd0b2b9ad53e098d5cb9b
f0e353c5db583dd9e69018c93470853895a7354d
Add in-memory caching for token introspection results
Token introspection validates every request against the authorization server, which can become a bottleneck under load. This adds optional in-memory caching to `IntrospectionTokenVerifier` that reduces introspection calls while respecting token lifecycles. Caching is disabled by default to preserve real-time revocat...
diff --git a/src/fastmcp/server/auth/providers/introspection.py b/src/fastmcp/server/auth/providers/introspection.py index 707e254714..ed64fc8f0d 100644 --- a/src/fastmcp/server/auth/providers/introspection.py +++ b/src/fastmcp/server/auth/providers/introspection.py @@ -24,7 +24,9 @@ from __future__ import annotations...
4
4
4
[{"id": "G0", "claim": "When caching is enabled and max_cache_size is set to 0 or any negative value, the size check is immediately true even for an empty cache, so next(iter(self._cache)) raises StopIteration, which the broad except Exception in verify_token swallows, making valid introspection responses return None a...
null
PrefectHQ__fastmcp__3306
PrefectHQ/fastmcp
3,306
defect
892e1731f7f651eb847eac38ca1bb9aa714acfe1
653508ba565f7f886cf20e8991d588e3591fa646
OpenAPI: rewrite $ref under propertyNames and patternProperties in _replace_ref_with_defs; add regression test for dict[StrEnum, Model]
## Summary This PR fixes a gap in the OpenAPI → JSON Schema normalization path. The function `_replace_ref_with_defs` already rewrote `#/components/schemas/...` to `#/$defs/...` in common locations (e.g., properties, items, `additionalProperties`, and combinators), but it did **not** recurse into **`propertyNames`**...
diff --git a/$null b/$null new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/fastmcp/utilities/json_schema.py b/src/fastmcp/utilities/json_schema.py index fc0a0d7592..2e38b7dea3 100644 --- a/src/fastmcp/utilities/json_schema.py +++ b/src/fastmcp/utilities/json_schema.py @@ -6,6 +6,31 @@ from jsonref i...
2
2
2
[{"id": "G0", "claim": "Migrating components.schemas into $defs with dst.setdefault(k, v) keeps a pre-existing $defs entry on collision, so rewritten #/components/schemas/... refs dereference to the stale $defs definition and validation semantics change; make the migration deterministic for collisions.", "category": "c...
null
PrefectHQ__fastmcp__3323
PrefectHQ/fastmcp
3,323
defect
c96c0400f349898a4eecaeb625b8c1b98050c4c4
ab9296d7ff20bfa3e8671b824d7cd75d0bf0c9fe
feat(contrib): auto-sync MCPMixin decorators with from_function signatures
## Description Replace hard-coded parameter lists in mcp_tool/mcp_resource/mcp_prompt with **kwargs validated at decoration time against inspect.signature of the underlying from_function. Registration methods now splat **kwargs through directly, so any new from_function parameter is supported automatically without ...
diff --git a/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py b/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py index 7d40635c15..a0f1e2d4ed 100644 --- a/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py +++ b/src/fastmcp/contrib/mcp_mixin/mcp_mixin.py @@ -1,11 +1,10 @@ """Provides a base mixin class and decorators for easy registratio...
1
1
1
[{"id": "G0", "claim": "Removing the named keyword parameters and placing `enabled` as a positional parameter in mcp_tool and mcp_prompt remaps positional arguments, so existing calls like @mcp_tool(\"name\", \"desc\") silently bind the second value to `enabled` instead of description/title - a backwards-incompatible r...
null
PrefectHQ__fastmcp__3330
PrefectHQ/fastmcp
3,330
defect
610551c7b610e8f7b9367672c42acc80a2b12038
ae71307f01f14d25cc39c9598577f7efd600ccc6
Fix session persistence across tool calls in multi-server MCPConfigTransport
### Root cause `MCPConfigTransport.connect_session()` created `ProxyClient` instances but never connected them before passing to `create_proxy()`. This meant `_create_client_factory()` saw them as disconnected and used the `client.new()` path, creating a fresh connection (and new session ID) for every tool call. ##...
diff --git a/src/fastmcp/client/transports/config.py b/src/fastmcp/client/transports/config.py index 5f303567dd..5802539092 100644 --- a/src/fastmcp/client/transports/config.py +++ b/src/fastmcp/client/transports/config.py @@ -91,40 +91,52 @@ async def connect_session( yield session return...
2
1
1
[{"id": "G0", "claim": "connect_session() appends each backend transport to self._transports but no longer clears that list before building a new multi-server session, so reusing one MCPConfigTransport across repeated connect/disconnect cycles accumulates stale transport objects indefinitely and close() repeatedly re-c...
null
PrefectHQ__fastmcp__3331
PrefectHQ/fastmcp
3,331
defect
72129c3d0379e1f866fb2bb47e56f9d32388bb8b
e2f077c125f9acc9cc663ca5ebecbfa7756412d3
Add -m/--module flag to `fastmcp run` and `dev inspector`
## Description Currently `fastmcp run` always attempts to import a server object from a Python file — but some MCP servers are designed to be invoked as modules (`python -m <module>`), where the server starts as a side effect of running `__main__.py`. This PR adds a `-m / --module` flag so users can run `fastmcp run -...
diff --git a/src/fastmcp/cli/cli.py b/src/fastmcp/cli/cli.py index 07b2ddb5b6..1605f567ba 100644 --- a/src/fastmcp/cli/cli.py +++ b/src/fastmcp/cli/cli.py @@ -212,6 +212,13 @@ async def inspector( help="Directories to watch for changes (default: current directory)", ), ] = None, + module: ...
5
5
3
[{"id": "G0", "claim": "In module mode the inspector command still executes `await config.source.load_server()` earlier in the same function, so `fastmcp dev inspector -m my_server` tries to resolve the module as a filesystem source and exits before the inspector subprocess is launched.", "category": "correctness", "ve...
null
PrefectHQ__fastmcp__3337
PrefectHQ/fastmcp
3,337
defect
610551c7b610e8f7b9367672c42acc80a2b12038
7d70767e799a8391f922bc62287a0e42fb5477b5
Add search_result_serializer hook and serialize_tools_for_output_markdown
## Description While migrating the OpenBB MCP server to FastMCP v3 I was playing around with `CodeMode` and noticed that search results were eating a lot of the context savings it's supposed to provide. The LLM gets back full JSON tool definitions (same as `list_tools` ) which is fine for simple tools but balloons f...
diff --git a/docs/servers/transforms/code-mode.mdx b/docs/servers/transforms/code-mode.mdx index f1caecc2d0..f15e36e1da 100644 --- a/docs/servers/transforms/code-mode.mdx +++ b/docs/servers/transforms/code-mode.mdx @@ -72,6 +72,55 @@ mcp = FastMCP( ) ``` +### Search Result Format + +By default, `search` returns too...
4
3
2
[{"id": "G0", "claim": "When CodeMode is constructed with a preconfigured search transform that has its own search_result_serializer, the initializer unconditionally falls back to serialize_tools_for_output_json unless CodeMode(search_result_serializer=...) is also set, so the transform's serializer is silently ignored...
null
PrefectHQ__fastmcp__3349
PrefectHQ/fastmcp
3,349
defect
1e72f2457bfbc8480c397873986d939a23f8ccbe
2ce57743a4ab3f0bde37c91937643e9b4195ece1
Add include_unversioned option to VersionFilter
## Description <!-- Please provide a clear and concise description of the changes made in this pull request. Using AI to generate code? Please include a note in the description with which AI tool you used. --> This PR adds an `include_unversioned` option to `VersionFilter`, defaulting to `True` to preserve th...
diff --git a/docs/servers/versioning.mdx b/docs/servers/versioning.mdx index 2d180a851c..4c44a73bd1 100644 --- a/docs/servers/versioning.mdx +++ b/docs/servers/versioning.mdx @@ -60,7 +60,7 @@ VersionFilter(version_gte="2.0", version_lt="3.0") ``` <Note> -**Unversioned components are exempt from version filtering.*...
2
2
1
[{"id": "G0", "claim": "Prompts and resource templates have no test coverage for include_unversioned=False despite the feature being implemented for them, and tests following the same pattern as the existing ones should be added.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"},...
null
PrefectHQ__fastmcp__3377
PrefectHQ/fastmcp
3,377
defect
fec8e8d5abfd2bf6897e56ca7f2e210f91179b8e
6061bfb0df872093ab57ce78197faebb2f120315
Fix ty 0.0.20 compatibility
ty 0.0.20 introduced stricter Liskov Substitution Principle checks for method overrides, which flagged 19 diagnostics across the codebase. Closes #3341. The bulk of the fixes (10/19) are in `dependencies.py` where `__aexit__` overrides used `*args: object` instead of matching `Dependency`'s explicit `(exc_type, exc_va...
diff --git a/.github/workflows/run-upgrade-checks.yml b/.github/workflows/run-upgrade-checks.yml index 62a91267be..728156bd6f 100644 --- a/.github/workflows/run-upgrade-checks.yml +++ b/.github/workflows/run-upgrade-checks.yml @@ -117,14 +117,17 @@ jobs: **Branch**: {{ref}} **Event**: {{eventN...
1
1
1
[{"id": "G0", "claim": "The reproduction guidance added to the upgrade-check notification uses `uv sync --resolution=upgrade`, but `--resolution` only accepts `highest`, `lowest`, or `lowest-direct`, so the exact command the text tells maintainers to run exits with `invalid value 'upgrade'`.", "category": "correctness"...
null
PrefectHQ__fastmcp__3380
PrefectHQ/fastmcp
3,380
defect
fce41828603fa4b6fbfc31d2ef9a47fa27ca7f81
46d727b807665a3a65e581a286e1cbd631b3859e
feat: add `--config-path` flag to claude-desktop install command
## Description Currently, `fastmcp install claude-desktop` fails for users who have Claude Desktop installed in a non-standard location, because the tool only checks hardcoded OS-specific paths. This PR adds an optional `--config-path` flag to the `fastmcp install claude-desktop` command, allowing users to manual...
diff --git a/docs/cli/install-mcp.mdx b/docs/cli/install-mcp.mdx index bf1b60b36d..0171b78541 100644 --- a/docs/cli/install-mcp.mdx +++ b/docs/cli/install-mcp.mdx @@ -65,6 +65,7 @@ See [Server Configuration](/deployment/server-configuration) for the full config | Python | `--python` | Python version (e.g., `3.11`) | ...
1
1
1
[{"id": "G0", "claim": "When a user provides --config-path and the path does not exist, they get the generic \"Claude Desktop config directory not found\" message; a distinct error like \"The specified config path does not exist: {path}\" should be shown instead.", "category": "correctness", "verdict": "supported", "pr...
null
PrefectHQ__fastmcp__3436
PrefectHQ/fastmcp
3,436
defect
85c71fa83493d709ae6c196e93426540dc68cfeb
dcdf0f4de29ee7e279ff3166030e29bbd40d8894
Redact sensitive headers in OpenAPI provider debug logging
The experimental OpenAPI provider logged full request headers at debug level, including Authorization, X-API-Key, and other sensitive values. Debug logs are often captured in production logging systems, so these should be redacted even at debug level. Closes #3427
diff --git a/src/fastmcp/server/providers/openapi/components.py b/src/fastmcp/server/providers/openapi/components.py index 1f52033fae..aff0c727e4 100644 --- a/src/fastmcp/server/providers/openapi/components.py +++ b/src/fastmcp/server/providers/openapi/components.py @@ -29,6 +29,17 @@ if TYPE_CHECKING: from fastm...
1
1
1
[{"id": "G0", "claim": "The redaction list only masks four exact header names, so user-defined OpenAPI apiKey headers (e.g. Api-Key / X-Auth-Token) passed through RequestDirector still get logged in debug output despite the security fix.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "intr...
null
PrefectHQ__fastmcp__3437
PrefectHQ/fastmcp
3,437
defect
85c71fa83493d709ae6c196e93426540dc68cfeb
6730dad8f3c0307142fe358b223555fc27058b34
Validate version metadata to reject non-scalar types
Version metadata accepted any type via \`str(v)\`, so passing a list or dict would silently produce versions like \`"[1, 2]"\` — confusing downstream. Now \`_coerce_version\` accepts \`str | int | float | None\`, coerces numeric types to strings, and raises \`TypeError\` for non-scalar types like lists and dicts. Same ...
diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.py index 0dc47f143c..fb652448b2 100644 --- a/src/fastmcp/server/server.py +++ b/src/fastmcp/server/server.py @@ -79,7 +79,7 @@ from fastmcp.tools.function_tool import FunctionTool from fastmcp.tools.tool import Tool, ToolResult from fastmcp.tools....
1
1
0
[{"id": "G0", "claim": "The new constructor path version=_coerce_version(version) or fastmcp.__version__ changes behavior for version=False: _coerce_version(False) returns the truthy string \"False\", so the server now advertises \"False\" instead of falling back to the package version as before.", "category": "correct...
null
PrefectHQ__fastmcp__3438
PrefectHQ/fastmcp
3,438
defect
85c71fa83493d709ae6c196e93426540dc68cfeb
b2bbb598de99033cf40a9e4f490ec1808963c27c
Fix async partial callables rejected by iscoroutinefunction
\`inspect.iscoroutinefunction()\` returns \`False\` for \`functools.partial\` wrapping an async function on Python < 3.12. This caused async partials to be rejected for \`task=True\`, routed to the sync threadpool, and misidentified in dependency injection. Adds \`is_coroutine_function()\` utility that unwraps partial...
diff --git a/src/fastmcp/experimental/transforms/code_mode.py b/src/fastmcp/experimental/transforms/code_mode.py index 1ebc3da35a..4d7723532d 100644 --- a/src/fastmcp/experimental/transforms/code_mode.py +++ b/src/fastmcp/experimental/transforms/code_mode.py @@ -1,4 +1,3 @@ -import asyncio import importlib import jso...
1
1
1
[{"id": "G0", "claim": "is_coroutine_function should also recognize callables marked via _is_coroutine (which asyncio.iscoroutinefunction does), because _ensure_async in code_mode now wraps them as sync callables, producing un-awaited coroutine warnings and incorrect return values for such external functions passed to ...
null
PrefectHQ__fastmcp__3439
PrefectHQ/fastmcp
3,439
defect
85c71fa83493d709ae6c196e93426540dc68cfeb
ea21f0f091bda9e715d35153390b77a0a2ec7930
Fix get_* returning None when latest version is disabled
When the highest version of a component was disabled via the visibility transform, \`get_tool\`/\`get_resource\`/\`get_resource_template\`/\`get_prompt\` returned \`None\` instead of falling back to the next-highest enabled version. The \`list_*\` path was unaffected because \`dedupe_with_versions\` already runs after ...
diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.py index 0dc47f143c..eb278f2c90 100644 --- a/src/fastmcp/server/server.py +++ b/src/fastmcp/server/server.py @@ -84,6 +84,7 @@ from fastmcp.utilities.types import FastMCPBaseModel, NotSet, NotSetT from fastmcp.utilities.versions import ( Versi...
1
1
1
[{"id": "G0", "claim": "In the fallback branch, get_tool() (and the same pattern in get_resource, get_resource_template, and get_prompt) selects candidates from super().list_tools() filtering only by visibility, bypassing the component auth filtering done in the normal get path, so on non-STDIO requests it can return a...
null
PrefectHQ__fastmcp__3798
PrefectHQ/fastmcp
3,798
defect
4bbc4eec3b1c1a977930504b6a78e61c7426783c
832be497d53a1006566d820b6a251108b1c0582e
fix: task.wait() hangs indefinitely when task enters input_required
`Task.wait()` was using a hardcoded allowlist of terminal states (`completed`, `failed`, `cancelled`). When a task transitions to `input_required` during a human-in-the-loop workflow, it falls outside this set and `wait()` keeps polling until the 300s timeout — making it impossible to respond to elicitation prompts in ...
diff --git a/src/fastmcp/client/tasks.py b/src/fastmcp/client/tasks.py index ae6b0ad98d..654dc53af1 100644 --- a/src/fastmcp/client/tasks.py +++ b/src/fastmcp/client/tasks.py @@ -217,7 +217,7 @@ async def wait( Args: state: Desired state ('submitted', 'working', 'completed', 'failed'). - ...
4
2
1
[{"id": "G0", "claim": "With state=None, wait() returns for a task status of \"submitted\" as if it were done, so Task.result() can request payloads before execution has completed on servers that emit a submitted phase.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id"...
null
PrefectHQ__fastmcp__3849
PrefectHQ/fastmcp
3,849
defect
95102c7d7c7f1847d64c23a342a335294a8deb94
27c3b2b85abaacbf41e87a3b365b314d6f028d89
fix: GoogleGenaiSamplingHandler leaks thought parts and gives unhelpful errors on empty responses
Fixes #3846 ## Problem Three related bugs in `GoogleGenaiSamplingHandler`'s response conversion: 1. **Thought parts leak as TextContent** — Line 364 has a comment "Skip thought parts" but only checks `if part.text:` which is truthy for thought parts too. Internal reasoning text appears in MCP responses. 2. **Thinki...
diff --git a/src/fastmcp/client/sampling/handlers/google_genai.py b/src/fastmcp/client/sampling/handlers/google_genai.py index ad1a3d1e80..80993abb70 100644 --- a/src/fastmcp/client/sampling/handlers/google_genai.py +++ b/src/fastmcp/client/sampling/handlers/google_genai.py @@ -318,7 +318,16 @@ def _response_to_create_...
1
1
1
[{"id": "G0", "claim": "The has_thoughts check uses any(...), so a response containing at least one thought part plus other non-thought content is classified as thinking-only, emitting the wrong diagnostic and hiding the real finish_reason; the check should verify all relevant parts are thought parts before emitting th...
null
PrefectHQ__fastmcp__3851
PrefectHQ/fastmcp
3,851
defect
95102c7d7c7f1847d64c23a342a335294a8deb94
83263cac1cacc823d7b5bb9bc3e05d87622e5a08
fix: cap consecutive final_response validation retries
Fixes #3848 ## Problem When `result_type` is set and the LLM repeatedly calls `final_response` with invalid data, the only limit is the shared `max_iterations = 100`. A model that can't satisfy a schema burns through 100 LLM calls (with growing context each time) before failing. ## Fix Add a separate counter for co...
diff --git a/src/fastmcp/server/sampling/run.py b/src/fastmcp/server/sampling/run.py index 4ea31f0b6e..4bbe8aa0eb 100644 --- a/src/fastmcp/server/sampling/run.py +++ b/src/fastmcp/server/sampling/run.py @@ -46,6 +46,10 @@ ResultT = TypeVar("ResultT") +# Maximum number of consecutive final_response validation failu...
3
1
1
[{"id": "G0", "claim": "The `Run static analysis` workflow fails because the new module-level helpers `_final_response` and `_tool_call` in tests/client/test_sampling_result_types.py declare quoted \"CreateMessageResultWithTools\" return-type annotations while the import for that name lives inside the function bodies, ...
null
PrefectHQ__fastmcp__3861
PrefectHQ/fastmcp
3,861
defect
95102c7d7c7f1847d64c23a342a335294a8deb94
31be24215bad8f55cb34673d269daa21da980d66
fix: strip title fields from tool schemas for Gemini 2.5 Flash compatibility
Fixes #3860 ## Problem Gemini 2.5 Flash consistently returns `MALFORMED_FUNCTION_CALL` when a function declaration's `parameters_json_schema` contains `"title"` fields. Pydantic adds these by default to every field and object in `.json_schema()` output. This breaks all `ctx.sample(result_type=...)` calls on Gemini 2...
diff --git a/src/fastmcp/client/sampling/handlers/google_genai.py b/src/fastmcp/client/sampling/handlers/google_genai.py index ad1a3d1e80..e338846173 100644 --- a/src/fastmcp/client/sampling/handlers/google_genai.py +++ b/src/fastmcp/client/sampling/handlers/google_genai.py @@ -141,18 +141,35 @@ def _get_model(self, mo...
2
1
1
[{"id": "G0", "claim": "The new _strip_titles helper removes every dictionary entry whose key is \"title\", so a JSON Schema properties map can legitimately lose an entire property definition named \"title\", making required references inconsistent and hiding that argument from Gemini for any tool schema containing a r...
null
PrefectHQ__fastmcp__3872
PrefectHQ/fastmcp
3,872
defect
95102c7d7c7f1847d64c23a342a335294a8deb94
26eb1fc39371302808dfa95db3073d4f8a256f5e
Extract parameter descriptions from docstrings
FastMCP has always collapsed the entire function docstring into a tool or prompt's description, ignoring parameter documentation entirely. That meant users were paying a double token tax on anything with an `Args:` section — it appeared in the description *and* the parameters had no descriptions at all, losing informat...
diff --git a/docs/servers/prompts.mdx b/docs/servers/prompts.mdx index bdfefc24eb..bbe93d4ca8 100644 --- a/docs/servers/prompts.mdx +++ b/docs/servers/prompts.mdx @@ -54,7 +54,7 @@ def generate_code_request(language: str, task_description: str) -> list[Message] * **Parameters:** The function parameters define the in...
2
1
1
[{"id": "G0", "claim": "In both tool and prompt construction, parse_docstring runs on the original object before callable instances are switched to fn.__call__, so for callable objects parameter descriptions can be missing or, when names overlap, incorrectly injected from the class docstring into the exposed schema.", ...
null
PrefectHQ__fastmcp__3881
PrefectHQ/fastmcp
3,881
defect
57f1b1bcedfeb60b2c3d2b43c88a6d1bccd1589f
8b2a8db49ebaef600df6d66c76ccb9f0ca5d3fd1
fix: strip titles from bare-metadata nodes (Gemini 2.5 Flash)
Follow-up to [#3861](https://github.com/PrefectHQ/fastmcp/pull/3861). Two edge cases Codex flagged on the original Gemini title-stripping PR that were left open: **Bare-metadata nodes leak through.** Pydantic emits `{"title": "X"}` for `Any`-typed fields — no `type`, no `properties`, nothing to make the heuristic fir...
diff --git a/src/fastmcp/utilities/json_schema.py b/src/fastmcp/utilities/json_schema.py index fc4e069c6c..9b8851c2ab 100644 --- a/src/fastmcp/utilities/json_schema.py +++ b/src/fastmcp/utilities/json_schema.py @@ -304,6 +304,40 @@ def _prune_param(schema: dict[str, Any], param: str) -> dict[str, Any]: return sche...
3
3
3
[{"id": "G0", "claim": "Omitting `example` from `_LITERAL_KEYWORDS` means `prune_titles=True` still descends into example values and strips user data fields named `title` (e.g. from `json_schema_extra={\"example\": {\"title\": \"Dashboard\"}}`), a regression that contradicts the goal of preserving literal values.", "ca...
null
PrefectHQ__fastmcp__3885
PrefectHQ/fastmcp
3,885
defect
0a921f5372db5e300077a98475170c4f2adfdd70
2a105b8b91e269f6c85df97b8489a540e18a72fc
Harden forced client disconnect cleanup
This fixes forced `Client.close()` cleanup when caller cancellation arrives while the client is waiting for the background session task to unwind. The forced disconnect path now uses the same `anyio.CancelScope(shield=True)` + `move_on_after()` pattern used during connection-startup cancellation, then clears `session_t...
diff --git a/src/fastmcp/client/client.py b/src/fastmcp/client/client.py index 17fb7be909..c5763a4334 100644 --- a/src/fastmcp/client/client.py +++ b/src/fastmcp/client/client.py @@ -642,10 +642,20 @@ async def _disconnect(self, force: bool = False): # stop the active session if self._session_...
3
3
2
[{"id": "G0", "claim": "Shielding the forced-disconnect wait means a cancelled close() no longer cancels the session task, so _disconnect can exit with the task still unwinding while it stays tracked, letting a concurrent _connect() reuse the dying session and subsequent client calls fail.", "category": "correctness", ...
null
PrefectHQ__fastmcp__3889
PrefectHQ/fastmcp
3,889
defect
0a921f5372db5e300077a98475170c4f2adfdd70
1991dc9992402d56b7ddd037ef25a34bf0a97fc1
OTEL: Fix attribute compliance with MCP semantic conventions
**Step 1 of 3** in the OTEL instrumentation series. This PR fixes attribute compliance and improves the telemetry helpers. Steps 2 (#3890) and 3 (#3892) build on this. ## Attribute compliance Removes `rpc.system`, `rpc.service`, `rpc.method` from all spans — MCP is not a traditional RPC system and the emerging MCP OT...
diff --git a/src/fastmcp/client/mixins/prompts.py b/src/fastmcp/client/mixins/prompts.py index 4b87bf2703..bb32cc280e 100644 --- a/src/fastmcp/client/mixins/prompts.py +++ b/src/fastmcp/client/mixins/prompts.py @@ -130,6 +130,7 @@ async def get_prompt_mcp( "prompts/get", name, ses...
5
5
2
[{"id": "G0", "claim": "Five files (including src/fastmcp/client/telemetry.py and src/fastmcp/server/server.py) do not match `ruff format` output, so the static_analysis CI job fails; run the formatter locally and commit the result.", "category": "style", "verdict": "supported", "priority": "P0", "scope": "unclear"}, {...
null
PrefectHQ__fastmcp__3896
PrefectHQ/fastmcp
3,896
defect
0a921f5372db5e300077a98475170c4f2adfdd70
174a1936e99055a97e62af5b0bc6b4c5a8a9c7a7
fix: handle circular JSON Pointer $ref in dereference_refs
Closes #3893. `dereference_refs` crashes with `RecursionError` when schemas contain circular `$ref` using JSON Pointer paths (e.g. `#/properties/nodes/items`) instead of `$defs`-based paths. This is the format emitted by .NET/C# MCP servers using `System.Text.Json`. The existing `_defs_have_cycles` check only detects ...
diff --git a/src/fastmcp/utilities/json_schema.py b/src/fastmcp/utilities/json_schema.py index b33c4f945f..5048207646 100644 --- a/src/fastmcp/utilities/json_schema.py +++ b/src/fastmcp/utilities/json_schema.py @@ -171,8 +171,11 @@ def dereference_refs(schema: dict[str, Any]) -> dict[str, Any]: return derefe...
3
1
1
[{"id": "G0", "claim": "Strengthen the regression test assertion so it verifies the circular JSON Pointer $ref is preserved verbatim (assert children_items[\"$ref\"] == \"#/properties/nodes/items\") instead of only checking that a $ref key exists, so the test fails if dereferencing rewrites or partially inlines the ref...
null
PrefectHQ__fastmcp__3925
PrefectHQ/fastmcp
3,925
defect
7d7607473d7713d9937cbbbe0bfc635976c511d3
ae298a5cd84a9edc43525dbfe276e66e29c02929
fix: reject self-mount to prevent infinite recursion
`mcp.mount(mcp)` is silently accepted, producing infinite recursion when listing tools. A simple identity check in `mount()` catches this at mount time with a clear error. ```python mcp = FastMCP("test") mcp.mount(mcp) # Before: silently accepted await mcp.list_tools() # Before: infinite recursion # After:...
diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.py index 967ef1ceb5..9bde6b4cbf 100644 --- a/src/fastmcp/server/server.py +++ b/src/fastmcp/server/server.py @@ -476,7 +476,8 @@ async def _run_middleware( return await chain(context) def add_middleware(self, middleware: Middleware) -...
2
2
0
[{"id": "G0", "claim": "add_middleware() should deduplicate by object identity (`is`) instead of list membership (`__eq__`) so that two distinct middleware instances that compare equal are not silently collapsed.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
PrefectHQ__fastmcp__3926
PrefectHQ/fastmcp
3,926
defect
7d7607473d7713d9937cbbbe0bfc635976c511d3
db1f0835769e6be69324e73c684dc2354eb84b54
fix: ProxyTool crashes on non-TextContent error responses
The `ProxyTool.run` error handler used `cast(mcp.types.TextContent, ...)` which is a no-op at runtime — if the error content is `ImageContent` or `EmbeddedResource`, accessing `.text` raises `AttributeError`. This replaces the unsafe cast with a proper `isinstance` check, falling back to `str()` for non-text content. ...
diff --git a/src/fastmcp/server/providers/proxy.py b/src/fastmcp/server/providers/proxy.py index b59024c707..9638644f4a 100644 --- a/src/fastmcp/server/providers/proxy.py +++ b/src/fastmcp/server/providers/proxy.py @@ -158,7 +158,11 @@ async def run( name=backend_name, arguments=arguments, meta=met...
1
1
0
[{"id": "G0", "claim": "For non-TextContent error responses, ToolError(str(first)) stringifies full ImageContent/EmbeddedResource objects including raw base64 payload fields, which can bloat error responses and leak raw data; prefer a bounded generic message or only safe textual fields.", "category": "security", "verdi...
null
PrefectHQ__fastmcp__3929
PrefectHQ/fastmcp
3,929
defect
7d7607473d7713d9937cbbbe0bfc635976c511d3
7a7a8021f1244b5cc2b20de52098c034fd1b1400
fix: allow hyphens in resource template parameter names
URI templates with hyphenated parameter names like `{user-id}` failed at registration because the param-extraction regex used `\w+` which excludes hyphens. This also affected `build_regex()` which created invalid Python named groups from hyphenated names. The fix widens param-extraction regexes to `[\w-]+`, converts h...
diff --git a/src/fastmcp/resources/template.py b/src/fastmcp/resources/template.py index 53ea6a15e7..56dc9fa62f 100644 --- a/src/fastmcp/resources/template.py +++ b/src/fastmcp/resources/template.py @@ -44,7 +44,9 @@ def extract_query_params(uri_template: str) -> set[str]: return set() -def build_regex(templat...
7
5
4
[{"id": "G0", "claim": "Normalizing every query parameter name with a hyphen-to-underscore replace can overwrite an already-extracted path parameter when a template contains both spellings as distinct variables (e.g. data://{user_id}/profile{?user-id}), losing the path value and passing the wrong argument to resource f...
null
PrefectHQ__fastmcp__3932
PrefectHQ/fastmcp
3,932
defect
7d7607473d7713d9937cbbbe0bfc635976c511d3
748a374f428599c671105902ddf6d7e4023da238
fix: OpenAPI request director sends multipart and form-urlencoded as JSON
The OpenAPI request director's `build()` method detects the declared content type from the spec but only handles JSON variants. Three bugs result: 1. **multipart/form-data sent as JSON** -- When an OpenAPI spec declares `multipart/form-data` (e.g. file uploads), the body falls through to the JSON branch and is sent as...
diff --git a/src/fastmcp/utilities/openapi/director.py b/src/fastmcp/utilities/openapi/director.py index 8980e3d6a9..fa03aa992f 100644 --- a/src/fastmcp/utilities/openapi/director.py +++ b/src/fastmcp/utilities/openapi/director.py @@ -54,8 +54,8 @@ def build( ) # Step 1: Un-flatten arguments into pa...
3
3
3
[{"id": "G0", "claim": "The multipart branch wraps every non-tuple body value as (None, value) and passes it to httpx files=, so valid multipart schemas containing integer/boolean scalar fields crash at runtime when the request is read or sent (e.g. AttributeError: 'int' object has no attribute 'read'); scalar form fie...
null
PrefectHQ__fastmcp__3938
PrefectHQ/fastmcp
3,938
defect
8d1b28958fb6105ba121580e1de5f52240a7a7df
98fdc55efa61c32ec0728828c247ce9a9e38a5a8
fix: FileSystemProvider reload race condition
Supersedes #3660, which had the same race condition it was trying to fix (the atomic swap exposed a partially-populated dict during the registration loop). The fix is simpler: hold the reload lock across both the reload AND the subsequent read. Since every reader method (`_list_tools`, `_get_tool`, etc.) already calle...
diff --git a/src/fastmcp/server/providers/filesystem.py b/src/fastmcp/server/providers/filesystem.py index 774021dcae..6c69272399 100644 --- a/src/fastmcp/server/providers/filesystem.py +++ b/src/fastmcp/server/providers/filesystem.py @@ -28,8 +28,9 @@ def greet(name: str) -> str: from __future__ import annotations ...
4
1
0
[{"id": "G0", "claim": "The new test imports asyncio inside the test function (tests/fs/test_provider.py:296) although the file already imports asyncio at module scope and the project convention is all imports at module level — drop the local import.", "category": "maintainability", "verdict": "supported", "priority": ...
null
PrefectHQ__fastmcp__3945
PrefectHQ/fastmcp
3,945
defect
7dd573980a829e898ed7affed0083dec4d793a73
cf8b7923b3e0b9968492bc2d4950852201cc12c2
Restore task snapshot via a worker-level dependency
`get_access_token()` returned `None` inside background tasks whenever `FASTMCP_DOCKET_URL` pointed at a `redis+cluster://` URL. The write side was fine — it went through `docket.redis()`, which is cluster-aware — but fastmcp kept a parallel sync Redis client just to read the snapshot back, and `Redis.from_url()` reject...
diff --git a/pyproject.toml b/pyproject.toml index d3748bbb49..d06445a1b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ azure = ["azure-identity>=1.16.0", "PyJWT>=2.12.0"] code-mode = ["pydantic-monty==0.0.11"] gemini = ["google-genai>=1.18.0"] openai = ["openai>=1.102.0"] -tasks = ["pydocket>=0...
1
1
1
[{"id": "G0", "claim": "restore_task_snapshot declares `key: str = TaskKey()`, which executes TaskKey() at import time, so in environments without pydocket the fallback TaskKey raises NotImplementedError and importing fastmcp.server.tasks.context (and transitively fastmcp.server.dependencies) fails for non-task users."...
null
PrefectHQ__fastmcp__3956
PrefectHQ/fastmcp
3,956
defect
34313ea1126aba0cfb48f1439f5e39e4f3c57bc4
f400e8b65e32bff189bce1d8c1aae7db91ab48c2
Forward backend capabilities in ProxyProvider
Before this change, `create_proxy()` / `ProxyProvider` always advertised the full set of MCP capabilities (tools, resources, prompts) regardless of what the backend actually supports. Clients querying an unsupported capability (e.g. `resources/list` against a tools-only backend) got an empty list rather than the `METHO...
diff --git a/src/fastmcp/server/mixins/lifespan.py b/src/fastmcp/server/mixins/lifespan.py index b64d725ed1..d3b7a9e1e3 100644 --- a/src/fastmcp/server/mixins/lifespan.py +++ b/src/fastmcp/server/mixins/lifespan.py @@ -175,6 +175,10 @@ async def _lifespan_manager(self: FastMCP) -> AsyncIterator[None]: for ...
5
5
5
[{"id": "G0", "claim": "Treat proxy providers with missing capabilities as unknown and skip pruning when any ProxyProvider's _backend_capabilities is not loaded, so one unloaded backend cannot make a multi-proxy server remove handlers globally and return METHOD_NOT_FOUND for capabilities another backend could serve.", ...
null
PrefectHQ__fastmcp__3957
PrefectHQ/fastmcp
3,957
defect
34313ea1126aba0cfb48f1439f5e39e4f3c57bc4
e5ea1b419e6c7a79d5f71e251cc03f9d45c9156d
Allow upstream client_id to be used directly without DCR
When `GitHubProvider` (or `OAuthProxy`) is added as a remote MCP server in claude.ai, the OAuth flow fails immediately with a 400 "Client Not Registered" error. The cause: claude.ai skips Dynamic Client Registration and sends the upstream OAuth App's `client_id` directly in the `/authorize` request. `OAuthProxy.get_cli...
diff --git a/src/fastmcp/server/auth/oauth_proxy/proxy.py b/src/fastmcp/server/auth/oauth_proxy/proxy.py index 1b0baead27..f3c18ee069 100644 --- a/src/fastmcp/server/auth/oauth_proxy/proxy.py +++ b/src/fastmcp/server/auth/oauth_proxy/proxy.py @@ -698,6 +698,20 @@ async def get_client(self, client_id: str) -> OAuthClien...
2
2
2
[{"id": "G0", "claim": "When allowed_client_redirect_uris is explicitly [] (the documented hard-block configuration), the synthetic upstream client can still pass redirect validation for the hardcoded http://localhost because ProxyDCRClient.validate_redirect_uri() falls back to base redirect_uris matching when the allo...
null
PrefectHQ__fastmcp__3959
PrefectHQ/fastmcp
3,959
defect
e3f845f5581fbba4fb26a6eb8ccb8010a5778084
74b4a82cca4281c5f6bb7e959b7b264c13e7bbf7
Graceful fallback for unsupported regex patterns in json_schema_to_type
Real-world OpenAPI schemas (especially from AWS and Azure) use regex features that Pydantic's Rust engine doesn't support: lookahead/lookbehind (`(?!aws:).+`), Unicode properties (`\p{Graph}`), and patterns that exceed compiled size limits. Previously these crashed `json_schema_to_type` with a `SchemaError`, making the...
diff --git a/src/fastmcp/utilities/json_schema_type.py b/src/fastmcp/utilities/json_schema_type.py index 22b99b36aa..93ad75af21 100644 --- a/src/fastmcp/utilities/json_schema_type.py +++ b/src/fastmcp/utilities/json_schema_type.py @@ -14,6 +14,24 @@ - Enums and constants - Union types +## Unsupported regex patterns...
1
1
1
[{"id": "G0", "claim": "The fallback should catch only the relevant Pydantic schema error type and gate on a regex-compilation error condition, instead of catching every TypeAdapter build failure as an unsupported regex, which drops pattern, emits a misleading warning, and can hide genuine adapter-construction bugs.", ...
null
PrefectHQ__fastmcp__3973
PrefectHQ/fastmcp
3,973
defect
54e83367a3b0f2c4a428fecb518cfba6798322d7
81f1a99e9cd558e13dd6b4f25d9e0496933c1c4f
Reject plugin registration after the setup pass completes
The guard on `FastMCP.add_plugin()` only blocked when `_started` was set, but `_started` is a narrow signal — it's set after provider lifespans enter and cleared before teardown, so there are real windows inside a live lifespan where `add_plugin()` would silently accept a plugin whose `run()` never enters and whose con...
diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.py index c75b4173dc..b136a021fd 100644 --- a/src/fastmcp/server/server.py +++ b/src/fastmcp/server/server.py @@ -541,10 +541,20 @@ def add_plugin(self, plugin: Plugin) -> None: plugin: A :class:`Plugin` instance. Plugins are registered i...
1
1
0
[{"id": "G0", "claim": "Two documentation inconsistencies in add_plugin() were introduced by this PR: the new error message names `run()` as the loader entry point while the docstring says `setup()`, and the `Raises` docstring still says 'after the server has started' although the guard now fires earlier, on the plugin...
null
PrefectHQ__fastmcp__3974
PrefectHQ/fastmcp
3,974
defect
54e83367a3b0f2c4a428fecb518cfba6798322d7
8255b12c7dcc8707fd0e0fa150f08dc13693f175
Add PluginMeta.from_package() helper
Plugin authors shouldn't hand-write `version`, `description`, `author`, and the containing-package pin on every release — that's a drift target, and it's exactly the metadata `pyproject.toml` already carries. `PluginMeta.from_package(dist_name, **overrides)` reads it for them: ```python class MyPiiRedactor(Plugin): ...
diff --git a/src/fastmcp/server/plugins/base.py b/src/fastmcp/server/plugins/base.py index 5a06fcad80..ed2c428070 100644 --- a/src/fastmcp/server/plugins/base.py +++ b/src/fastmcp/server/plugins/base.py @@ -13,8 +13,10 @@ import json from collections.abc import AsyncIterator from contextlib import asynccontextmanage...
7
5
4
[{"id": "G0", "claim": "from_package builds the self-dependency as \"<dist>>=<version>\", which becomes an invalid PEP 440 requirement when the installed distribution has a local version segment (e.g. 1.2.3+abc), so it fails to parse in Plugin._validate_meta and breaks plugin construction/manifest generation for local-...
null
PrefectHQ__fastmcp__3982
PrefectHQ/fastmcp
3,982
defect
e2e49f77d29114a32d3183cdd4abb91f8baacfe5
6244fc668c254e097aca4554faca49e4c9ff75af
Add Plugin.capabilities() hook and auto-derive Plugin.meta
Plugins can now contribute to the MCP `initialize` response via a new `capabilities()` hook. Contributions from every registered plugin are deep-merged in registration order onto the server's built-in capabilities — so later plugins can add to or override earlier ones (the same ordering contract plugins already have fo...
diff --git a/src/fastmcp/server/low_level.py b/src/fastmcp/server/low_level.py index 36255f4c74..90d48b1b87 100644 --- a/src/fastmcp/server/low_level.py +++ b/src/fastmcp/server/low_level.py @@ -220,6 +220,10 @@ def get_capabilities( ) capabilities.extensions = {**existing_extensions, UI_EXTENSION_ID:...
2
1
1
[{"id": "G0", "claim": "deep_merge assigns nested dict values from `update` by reference when the branch is missing, so later merges can mutate plugin-owned (e.g. class-level cached) capabilities dicts and leak state across plugin initializations; store a deep-copied value when assigning new branches instead.", "catego...
null
PrefectHQ__fastmcp__3983
PrefectHQ/fastmcp
3,983
defect
ff0ae10d8871d1a043c706df788b2620e1cc2379
778967c4af64147645c818f08c611bfc97a5fca3
Make Plugin generic over its Config model
`Plugin[ConfigType]` now binds a pydantic config model to the subclass at the type level — `self.config.<field>` is statically typed in editors and type checkers, and passing a dict to the constructor validates against the declared model. The config class is resolved once at class-creation time via `__init_subclass__` ...
diff --git a/src/fastmcp/server/plugins/base.py b/src/fastmcp/server/plugins/base.py index 200498a626..07474105ca 100644 --- a/src/fastmcp/server/plugins/base.py +++ b/src/fastmcp/server/plugins/base.py @@ -2,8 +2,9 @@ Plugins package server-side behavior — middleware, component transforms, providers, and custom HT...
7
5
2
[{"id": "G0", "claim": "Plugins that still declare a nested `class Config` are silently treated as `_EmptyConfig`, so previously valid configs are rejected with no diagnostic; the reviewer asks to fall back to `cls.Config` when no generic parameter is given (or raise an explicit migration error at class definition time...
null
PrefectHQ__fastmcp__3986
PrefectHQ/fastmcp
3,986
defect
cc290b3a2e182608d8b8b2d83f70ab7deb26eda9
007de80bcb2d934f877f85e49ed6f9fbe37643e2
Enforce JSON-serializable contract on Plugin Config
Plugin configs are the distribution surface — they're loaded from JSON/YAML, rendered into Horizon and registry forms, and published in manifest artifacts. Any field that can't round-trip through JSON silently breaks every downstream consumer, so the contract has to be enforced at authoring time rather than discovered ...
diff --git a/src/fastmcp/server/plugins/base.py b/src/fastmcp/server/plugins/base.py index 540bae4f50..5c0b2eba90 100644 --- a/src/fastmcp/server/plugins/base.py +++ b/src/fastmcp/server/plugins/base.py @@ -417,6 +417,13 @@ def __init_subclass__(cls, **kwargs: Any) -> None: config_cls = _resolve_plugin_config_...
4
3
3
[{"id": "G0", "claim": "The eager model_json_schema() check in __init_subclass__ rejects valid pydantic forward-reference configs (class-not-fully-defined) at import time, so modules defining Plugin subclasses before all referenced model types are declared fail during import even though the config becomes valid once mo...
null
PrefectHQ__fastmcp__3995
PrefectHQ/fastmcp
3,995
defect
2d6143c6d8ef74afa9d100b1ddb30104d79f8f7a
ff2ea477b2174857ef8f5e3a16a0767be54f157d
feat: add AzureB2CProvider for Azure AD B2C user flows
## Summary Closes #3994. Adds `AzureB2CProvider`, a new auth provider for **Azure AD B2C** user flows. Azure AD B2C is widely used for external-user (consumer/partner) identity and has three endpoint and scope differences that make the existing `AzureProvider` incompatible: | | Entra ID | Azure AD B2C | |---|...
diff --git a/docs/docs.json b/docs/docs.json index 86798bbcd9..c894cd5acf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -278,6 +278,7 @@ "integrations/authkit", "integrations/aws-cognito", "integrations/azure", + "integratio...
7
7
5
[{"id": "G0", "claim": "AzureB2CProvider subclasses AzureProvider without overriding OBO behavior, so _find_azure_provider()/EntraOBOToken will call get_obo_credential() even though Azure AD B2C does not implement the on-behalf-of flow, failing at runtime for downstream-token usage instead of failing fast with a clear ...
null
PrefectHQ__fastmcp__4010
PrefectHQ/fastmcp
4,010
defect
008f91d84b6ff239929a76af58b1b9d4b59556b3
67078e2d457bb6e7901ae4abc29f7e218b0311c3
Add run_in_thread opt-out for sync tools with thread affinity
Sync tools dispatch to a worker thread by default so a slow call can't stall the event loop. That's the right default for almost everything, but it silently breaks libraries that bind state to a specific thread — most visibly Windows COM (`uiautomation`, `comtypes`, `pywin32`), which requires `CoInitialize` on the call...
diff --git a/docs/servers/tools.mdx b/docs/servers/tools.mdx index 073a16f6d5..10e78a876f 100644 --- a/docs/servers/tools.mdx +++ b/docs/servers/tools.mdx @@ -132,6 +132,10 @@ def search_products_implementation(query: str, category: str | None = None) -> l Optional JSON schema for the tool's output. When provided,...
3
3
3
[{"id": "G0", "claim": "When run_in_thread=False, the sync function is called directly inside anyio.fail_after, but a blocking sync call has no cancellation checkpoints, so the timeout is silently ignored and the tool returns only after the full blocking duration, breaking the existing timeout contract for tools that o...
null
PrefectHQ__prefect__19116
PrefectHQ/prefect
19,116
defect
1711fcc29f3d6c3a95f04e631785419864c5b60f
48cf4d953b60c7584a923a1eb8617574ada1056b
Fix multiprocessing deadlock after using prefect_test_harness on Linux
## Summary Fixes a deadlock that occurs on Linux when using multiprocessing after `prefect_test_harness()`. ## Issue On Linux, `multiprocessing.Process()` defaults to `fork()`, which copies all process state including locks from background threads. When `prefect_test_harness()` exits, background threads (`WorkerThread...
diff --git a/src/prefect/_internal/concurrency/services.py b/src/prefect/_internal/concurrency/services.py index a68d0bf49236..745516222acf 100644 --- a/src/prefect/_internal/concurrency/services.py +++ b/src/prefect/_internal/concurrency/services.py @@ -5,8 +5,10 @@ import concurrent.futures import contextlib impor...
3
2
0
[{"id": "G0", "claim": "It is unclear whether explicitly exiting the forked multiprocessing test worker with os._exit(0), bypassing Python cleanup, is a good thing to do.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The os._exit workaround for the test...
null
PrefectHQ__prefect__19277
PrefectHQ/prefect
19,277
defect
8e19b0e0172d2d212658e443f54e1594944511a3
4833b5152624fc4959edfdbf6232ba748f4bf7bb
Add on_running hook support for tasks
Closes #19276 ## Summary Adds support for the `on_running` lifecycle hook for tasks, providing parity with the existing flow `on_running` hook behavior. ## Changes - **`src/prefect/tasks.py`**: Added `on_running` parameter to Task class, decorator, and with_options() method - **`src/prefect/task_engine.py`**: Updat...
diff --git a/docs/v3/how-to-guides/workflows/state-change-hooks.mdx b/docs/v3/how-to-guides/workflows/state-change-hooks.mdx index 0990ef0ec403e..c588741054f93 100644 --- a/docs/v3/how-to-guides/workflows/state-change-hooks.mdx +++ b/docs/v3/how-to-guides/workflows/state-change-hooks.mdx @@ -12,7 +12,7 @@ description: ...
4
4
2
[{"id": "G0", "claim": "The pull request should include tests covering how `on_running` hooks interact with task retries, as a record of that behavior.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The hook call only addresses the initial `Running` sta...
null
PrefectHQ__prefect__19278
PrefectHQ/prefect
19,278
defect
8e19b0e0172d2d212658e443f54e1594944511a3
078bce728a92a0b1dea31a16436dcbd8a163f3ce
Fix datetime parameter serialization in run_deployment
Closes #19257 fixes datetime.datetime and datetime.date parameters being rejected in `run_deployment()` with 409 Conflict errors. ## root cause `PrefectBaseModel` has `ser_json_timedelta="float"` config (added in #13603) to serialize timedelta objects as floats. as an unintended side effect, this also causes datetim...
diff --git a/src/prefect/client/schemas/actions.py b/src/prefect/client/schemas/actions.py index 924d2a24cea5..594c34d7663e 100644 --- a/src/prefect/client/schemas/actions.py +++ b/src/prefect/client/schemas/actions.py @@ -1,11 +1,18 @@ from __future__ import annotations +import datetime from copy import deepcopy ...
1
1
0
[{"id": "G0", "claim": "The three consecutive isinstance checks for datetime, date and time in convert_temporal can be collapsed into a single check on a tuple of those types.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PrefectHQ__prefect__19414
PrefectHQ/prefect
19,414
defect
e62b0d5268670f6de94d6d53cdfe39038ae23066
81b411772f036f2a2c8caa9e0dc1ae54d6613f6b
fix: validate deployment triggers after templating so jinja-based booleans work, should close #19348
**What this changes** - Moves deployment trigger initialization/validation to run after templating/variable resolution in prefect deploy. - Ensures fields like enabled: "{{ prefect.variables.is_prod }}" are resolved to a boolean before validation. **Why** - Previously, triggers were validated before templatin...
diff --git a/src/prefect/cli/deploy/_core.py b/src/prefect/cli/deploy/_core.py index b0873cb8f67b..9081f21cecba 100644 --- a/src/prefect/cli/deploy/_core.py +++ b/src/prefect/cli/deploy/_core.py @@ -246,13 +246,6 @@ async def _run_single_deploy( console=app.console, deploy_config=deploy_config, actions=act...
1
1
1
[{"id": "G0", "claim": "Add a regression test for the fix that validates deployment triggers after templating so jinja-resolved boolean `enabled` values work (issue #19348).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PrefectHQ__prefect__19443
PrefectHQ/prefect
19,443
defect
6e305792d9485802b4c1c1a35cf2a88f9807a6e7
8063e12f41864e76e77426923eacc6e1535d5d44
prefect-snowflake: Support workload identity federation (WIF) in the SnowflakeCredentials block
closes #18900 Adds `workload_identity` as a supported `authenticator` for the `SnowflakeCredentials` block, following Snowflake's [docs](https://docs.snowflake.com/en/user-guide/workload-identity-federation#getting-started). Makes the `user` field optional since it isn't required when using WIF. Bumps the minimum r...
diff --git a/docs/contribute/contribute-integrations.mdx b/docs/contribute/contribute-integrations.mdx index 9930cd676b64..4b23db09802e 100644 --- a/docs/contribute/contribute-integrations.mdx +++ b/docs/contribute/contribute-integrations.mdx @@ -38,7 +38,7 @@ To contribute to an existing integration, please follow the...
4
3
0
[{"id": "G0", "claim": "Replace the `uv pip install -e . --group dev` command in the integration contribution docs with `uv sync`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new `_validate_user_kwargs` validator seems redundant and could b...
null
PrefectHQ__prefect__19580
PrefectHQ/prefect
19,580
defect
16e3fb62a8de525c08c59ff5a63188993c249ef8
71021cfff62eabd23f55cf43ddaa6895a6294b83
feat: Add support for AWS IAM authentication for PostgreSQL database
Add support for AWS IAM authentication for PostgreSQL database with new settings. Close #19576 <!-- Include an overview of the proposed changes here --> ### Checklist - [x] This pull request references any related issue by including "closes #19576 " - [x] If this pull request adds new functionality, it i...
diff --git a/pyproject.toml b/pyproject.toml index 698fa791cf4d..39d6489daef2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,6 +82,7 @@ dependencies = [ "semver>=3.0.4", "pluggy>=1.6.0", "pydocket>=0.13.0", + "boto3>=1.40.61", ] [project.urls] Changelog = "https://github.com/PrefectHQ/pref...
4
4
4
[{"id": "G0", "claim": "The string `rds.amazonaws.com` may match at an arbitrary position in the URL host, so the region inferred from splitting the host may be wrong.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `boto3` dependency and the infras...
null
PrefectHQ__prefect__19694
PrefectHQ/prefect
19,694
defect
f2fe5a501bbf3d6a7bf284595b00fdf7e724ae93
2b8259f1a621ea831bb43e38747b3047330bc74d
fix(prefect-dbt): fix command detection when flags precede command
## Summary Fixes command detection in `PrefectDbtRunner.invoke()` when CLI flags with values appear before the command. When flags with values appear before the command (e.g., `["--log-format", "json", "deps"]`), the command detection was picking up the flag value ("json") instead of the actual command ("deps"). This...
diff --git a/src/integrations/prefect-dbt/prefect_dbt/core/runner.py b/src/integrations/prefect-dbt/prefect_dbt/core/runner.py index a3375a0d46b7..01a4a6412679 100644 --- a/src/integrations/prefect-dbt/prefect_dbt/core/runner.py +++ b/src/integrations/prefect-dbt/prefect_dbt/core/runner.py @@ -1027,9 +1027,15 @@ def in...
1
1
0
[{"id": "G0", "claim": "The reviewer questions whether the `from dbt.cli.main import cli` import added inside `invoke` needs to be deferred, implying it could be moved to the top of the file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PrefectHQ__prefect__19833
PrefectHQ/prefect
19,833
defect
3d56c1a63362873180a6516395c15f20987d9ffe
e618127a61084d9aa200c7e7653611f767465b27
feat(prefect-aws): Add AWS AssumeRole support to AWSCredentials Block
This PR adds support for assuming IAM roles in `AwsCredentials`, enabling cross-account access and temporary credentials. ### Summary Adds `role_arn` and `assume_role_kwargs` to `AwsCredentials` to assume IAM roles via AWS STS. When `role_arn` is provided, the credentials block assumes the role and returns a sess...
diff --git a/src/integrations/prefect-aws/prefect_aws/assume_role_parameters.py b/src/integrations/prefect-aws/prefect_aws/assume_role_parameters.py new file mode 100644 index 000000000000..6f207112a95d --- /dev/null +++ b/src/integrations/prefect-aws/prefect_aws/assume_role_parameters.py @@ -0,0 +1,151 @@ +"""Module h...
1
1
0
[{"id": "G0", "claim": "The new `role_arn` field on AwsCredentials should be named `assume_role_arn` for consistency with the `assume_role_kwargs` field.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PrefectHQ__prefect__19851
PrefectHQ/prefect
19,851
defect
1e9af6c12c81ac63eea60fbc80a36168ef9b03fb
43683564c09e9b3ff659a866467173c76582d149
Add url property to server-side ReceivedEvent for automation templates
Adds a `url` property to the server-side `ReceivedEvent` class, allowing users to easily link to events in automation templates using `{{ event.url }}` without needing to manually parse date strings. supersedes #19546 **Background:** Automation templates bind `event` to `triggered_action.triggering_event`, which is t...
diff --git a/src/prefect/server/events/schemas/events.py b/src/prefect/server/events/schemas/events.py index 68ba87be1e04..fbbbc667a1c1 100644 --- a/src/prefect/server/events/schemas/events.py +++ b/src/prefect/server/events/schemas/events.py @@ -212,6 +212,14 @@ class ReceivedEvent(Event): description="When t...
3
2
0
[{"id": "G0", "claim": "The special-case block handling server-side ReceivedEvent in url_for seems like an unnecessary hack, and the reviewer asks why it is necessary.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replacing the isinstance check...
null
PrefectHQ__prefect__20022
PrefectHQ/prefect
20,022
defect
f47935f1141e0c844d80c799e4c2690c44834ee2
ce07c10097bf6e9132a7388e98317972df8d32f3
Add worker-side cancellation for pending flow runs
## Summary Implements optional worker-side cancellation handling for flow runs that are cancelled while still in PENDING state (before the runner starts). This addresses the gap where cancelling a pending flow run would leave the infrastructure running indefinitely. **Key changes:** - Add `PREFECT_WORKER_ENABLE_CANCE...
diff --git a/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py b/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py index 60ed56848a7b..34db9eb556a7 100644 --- a/src/integrations/prefect-kubernetes/prefect_kubernetes/worker.py +++ b/src/integrations/prefect-kubernetes/prefect_kubernetes/wor...
10
7
4
[{"id": "G0", "claim": "KubernetesWorker.kill_infrastructure should not accept a None configuration, since cancellation would always fail without a job configuration; that case should be handled by the base class instead.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "...
null
PrefectHQ__prefect__20118
PrefectHQ/prefect
20,118
defect
9fb5a5ec73103ca3f6fb3f15546621fbaf460e61
8c67faf0728d46aa5ab23d1c087e189d3b430a13
Add `prefect automation update` CLI command
Adds a new `prefect automation update` CLI command that allows users to update existing automations from a YAML/JSON file or JSON string. This addresses the feature request in #20116 where the API supports automation updates but the CLI did not expose this functionality. ### Usage ```bash # Update from a YAML file pr...
diff --git a/src/prefect/events/cli/automations.py b/src/prefect/events/cli/automations.py index 7fc6e3cc67e2..7331e9e91fda 100644 --- a/src/prefect/events/cli/automations.py +++ b/src/prefect/events/cli/automations.py @@ -468,3 +468,77 @@ async def create( raise typer.Exit(1) else: raise typer.E...
5
3
0
[{"id": "G0", "claim": "The @requires_automations decorator appears to be dead code, and a separate follow-up issue should be created to remove it from all automation CLI commands (ls, inspect, resume, pause, delete, create).", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_exist...
null
PrefectHQ__prefect__20140
PrefectHQ/prefect
20,140
defect
6645cd63c2e36f1a342d0f39de01cf4b3dd1e045
5d64016743d0957e5eb83ee9de262787496b031a
fix(prefect-aws): Refactor deployment steps to use AwsCredentials.get_s3_client()
This PR refactors how `prefect-aws` deployment steps `push_to_s3` and `pull_from_s3` perform authentication to allow for assume role support. This implementation addresses changes requested on the prior PR #20129. ## Changes ### Refactor S3 client creation for deployment steps - Updated `get_s3_client` in `s3...
diff --git a/src/integrations/prefect-aws/prefect_aws/deployments/steps.py b/src/integrations/prefect-aws/prefect_aws/deployments/steps.py index 86d8bd146309..ac1e5d3d204a 100644 --- a/src/integrations/prefect-aws/prefect_aws/deployments/steps.py +++ b/src/integrations/prefect-aws/prefect_aws/deployments/steps.py @@ -8...
1
1
0
[{"id": "G0", "claim": "Lines 45-50 would mutate the caller's credentials dict, so the function should copy it first (credentials = dict(credentials or {})).", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PrefectHQ__prefect__20162
PrefectHQ/prefect
20,162
defect
e56e6be16f24ca7621229513f294b48dc3e82113
407ff9d455747c2c60aaa2766afefd8000d72441
fix(prefect-aws): Fix comparison for container essential field
## Changes Updated the task definition comparison logic to properly normalize the `essential` field: 1. **Updated `_task_definitions_equal()`**: Normalize `essential` field during comparison by setting it to `True` for all containers if not explicitly set (matching AWS behavior) 2. **Modified `_drop_empty_keys_f...
diff --git a/src/integrations/prefect-aws/prefect_aws/workers/ecs_worker.py b/src/integrations/prefect-aws/prefect_aws/workers/ecs_worker.py index 215ee915d4b5..3ff5165b2fec 100644 --- a/src/integrations/prefect-aws/prefect_aws/workers/ecs_worker.py +++ b/src/integrations/prefect-aws/prefect_aws/workers/ecs_worker.py @...
1
1
0
[{"id": "G0", "claim": "The test should use `pytest.raises` rather than a try/except/else block when asserting that the ValueError is raised.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
PrefectHQ__prefect__20178
PrefectHQ/prefect
20,178
defect
ecfc19b680173ea5a1570e83627cfa7a2e1ea072
8b3af0ef0375f0fdbfed269da3c5d3565b94666a
Migrate pause/suspend/resume and run_input from @sync_compatible to @async_dispatch
Part of #15008: Synchronous and asynchronous compatibility within Prefect This PR migrates `pause_flow_run`, `suspend_flow_run`, and all `BaseRunInput` methods from the `@sync_compatible` decorator to the `@async_dispatch` pattern, fully removing `@sync_compatible` from the pause/suspend code paths. ## Changes ### `...
diff --git a/src/prefect/__init__.py b/src/prefect/__init__.py index bc41e34707418..57a6fdb62710b 100644 --- a/src/prefect/__init__.py +++ b/src/prefect/__init__.py @@ -12,8 +12,10 @@ from importlib.machinery import ModuleSpec from .main import ( allow_failure, + apause_flow_run, ares...
3
3
2
[{"id": "G0", "claim": "The sync pause_flow_run/suspend_flow_run wait_for_input paths use placeholder `pass` statements instead of actually loading and saving the run input, which this PR is supposed to handle.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "...
null
PrefectHQ__prefect__20323
PrefectHQ/prefect
20,323
defect
fb03cafc1522c6b8252e1587cf9c2fb13a62e5a4
0d4eabc5ab18743dfebbac25b7afa97dc6147ec2
Fix websocket cleanup AttributeError in event clients
<!-- Thanks for opening a pull request to Prefect! If this is your first contribution, please make sure to review our contribution guidelines: https://docs.prefect.io/contribute/index --> Fixes an `AttributeError: 'connect' object has no attribute 'connection'` that occurs during flow run cleanup when a websock...
diff --git a/src/prefect/events/clients.py b/src/prefect/events/clients.py index 6e758ac3e87c..ae59c0633f68 100644 --- a/src/prefect/events/clients.py +++ b/src/prefect/events/clients.py @@ -295,7 +295,8 @@ async def __aexit__( exc_tb: Optional[TracebackType], ) -> None: self._websocket = None - ...
3
3
1
[{"id": "G0", "claim": "Add a comment explaining why the connection guard in PrefectEventsClient.__aexit__ is necessary.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment explaining why the connection guard in PrefectEventSubscriber._...
null
PrefectHQ__prefect__21035
PrefectHQ/prefect
21,035
defect
79cf6403524091b341f2956c4e6748a4f8146f3e
9169bc6386491abcebc3fe1df1164cd7d0f6beb5
Log PermissionError when UI static directory creation fails
Fixes #19317 ### Overview In HA deployments with read-only site-packages directories, the `OrchestrationClient` would fail silently when trying to create the UI static directory. The `PermissionError` was propagated up through the action handler and eventually sent to the dead letter queue without any clear error mes...
diff --git a/src/prefect/server/api/server.py b/src/prefect/server/api/server.py index 43f1c829afaac..8d8e724b478c7 100644 --- a/src/prefect/server/api/server.py +++ b/src/prefect/server/api/server.py @@ -535,7 +535,17 @@ def create_ui_static_subpath() -> None: # If the static files have already been copied, c...
1
1
1
[{"id": "G0", "claim": "A test should be added covering the new code path that catches PermissionError when creating the UI static directory.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PrefectHQ__prefect__21210
PrefectHQ/prefect
21,210
defect
a74453a3544b6e146a7b422d9bfb3d9bd0a55594
75ca0a29cd54a3b2952d3eb80803cbc083bfa268
feat(prefect-redis): add url field to RedisMessagingSettings
closes #21223 ## Summary - Adds a `url` field to `RedisMessagingSettings` so users can configure the Redis connection via a single URL (e.g. `redis://user:pass@host:6379/0` or `rediss://…` for TLS) instead of separate `host`/`port`/`db`/`username`/`password`/`ssl` fields - Configurable via `PREFECT_REDIS_MESSAGING...
diff --git a/src/integrations/prefect-redis/prefect_redis/client.py b/src/integrations/prefect-redis/prefect_redis/client.py index 3a1f2c20eb05..1f8a90d1568c 100644 --- a/src/integrations/prefect-redis/prefect_redis/client.py +++ b/src/integrations/prefect-redis/prefect_redis/client.py @@ -1,6 +1,6 @@ import asyncio ...
2
1
0
[{"id": "G0", "claim": "The URL-conflict warning logic would fit better in a pydantic model-after validator than in an overridden __init__.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstrings should call out that when url wins, discrete kwargs ...
null
PrefectHQ__prefect__21269
PrefectHQ/prefect
21,269
defect
506781bb04ec791fdbbe4dfd99c8ff692bbffb6f
0e9aab7321381131123c03e49706985dbfe0aaf5
fix: degrade gracefully when events WebSocket is rejected (HTTP 4xx)
## Summary Fixes #21099 Flow runs created with Prefect client <=3.6.13 crash on server >=3.6.14 when `PREFECT_SERVER_API_AUTH_STRING` is configured. ### Root cause In 3.6.14 the server started requiring the `prefect` WebSocket subprotocol + auth handshake on `/api/events/in`. Old clients (<=3.6.13) don't negotiate...
diff --git a/src/prefect/runner/_event_emitter.py b/src/prefect/runner/_event_emitter.py index 9f39f98d065f..93975585ae5f 100644 --- a/src/prefect/runner/_event_emitter.py +++ b/src/prefect/runner/_event_emitter.py @@ -16,6 +16,19 @@ from prefect.client.schemas.responses import DeploymentResponse from prefect...
2
2
0
[{"id": "G0", "claim": "The `from prefect.events.clients import NullEventsClient` import inside `__aenter__` should be lifted to the top of the file.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The try/except ImportError guard around the webs...
null
PrefectHQ__prefect__21276
PrefectHQ/prefect
21,276
defect
3d9b4de505dd372937efab3b0db0cf8f6d8777a7
682842d903b2b7ad93a4b1a8c1bab8a833f53c25
Fix heartbeat starvation under CPU-bound workloads
closes #20887 ## Summary - Replaces the dual `send_heartbeats_sync`/`send_heartbeats_async` with a single thread-based `send_heartbeats` context manager that works for both sync and async flows - The async implementation used `asyncio.create_task` which was starved when the event loop was blocked by CPU-bound wo...
diff --git a/src/prefect/flow_engine.py b/src/prefect/flow_engine.py index b3e28932eb7b..33c2cb4bcbd3 100644 --- a/src/prefect/flow_engine.py +++ b/src/prefect/flow_engine.py @@ -167,17 +167,16 @@ def load_flow_and_flow_run(flow_run_id: UUID) -> tuple[FlowRun, Flow[..., Any]]: @contextmanager -def send_heartbeats_...
2
2
2
[{"id": "G0", "claim": "Renaming the heartbeat context manager to `_send_heartbeats` removes `send_heartbeats_sync` and `send_heartbeats_async` from `prefect.flow_engine`, breaking existing callers with ImportError, so compatibility wrappers should be kept.", "category": "correctness", "verdict": "supported", "priority...
null
PrefectHQ__prefect__21332
PrefectHQ/prefect
21,332
defect
f787907655c96354a4e24c02d6301106bf6bb68c
69c89247539c80b552340c040e75329f6fb87401
Fix `parameters_to_args_kwargs` greedily assigning kwargs as positional args
`inspect.signature(fn).bind_partial()` greedily assigns keyword arguments as positional args when splitting a parameters dict into `(args, kwargs)`. This causes a `TypeError` when a `@task`-decorated function is wrapped with a `functools.wraps` decorator — the parameters get passed as extra positional args to the wrapp...
diff --git a/src/prefect/utilities/callables.py b/src/prefect/utilities/callables.py index 31e1b79e9f04..f7feca1cb8ad 100644 --- a/src/prefect/utilities/callables.py +++ b/src/prefect/utilities/callables.py @@ -185,14 +185,30 @@ def parameters_to_args_kwargs( The function _must_ have an identical signature to the ...
2
2
2
[{"id": "G0", "claim": "Converting every defaulted POSITIONAL_OR_KEYWORD parameter to KEYWORD_ONLY can produce an invalid parameter ordering when the function has *args after such a parameter (e.g. def fn(a=1, *args)), making sig.replace raise ValueError so parameters_to_args_kwargs fails at runtime for otherwise valid...
null
PrefectHQ__prefect__21350
PrefectHQ/prefect
21,350
defect
45186a33d5e3f0f66383f27b984c25e3a29e6302
9f20a54ef3155d63a02c877563719d622b79422d
Add configurable parameter size limit for flow runs and deployments
Adds a `PREFECT_SERVER_API_MAX_PARAMETER_SIZE` setting (default 512KB / 524,288 bytes) that validates JSON-serialized parameter size on flow run and deployment creation/update. Set to `0` to disable the limit. This matches the existing Prefect Cloud behavior and prevents users from accidentally storing gigabytes of dat...
diff --git a/src/prefect/_internal/schemas/validators.py b/src/prefect/_internal/schemas/validators.py index 535bb96820c0..5f968db9461a 100644 --- a/src/prefect/_internal/schemas/validators.py +++ b/src/prefect/_internal/schemas/validators.py @@ -20,6 +20,7 @@ from zoneinfo import ZoneInfo import jsonschema +import...
3
3
2
[{"id": "G0", "claim": "The new parameter size limit is enforced only on FlowRunCreate, so a client can create a run with small parameters and then patch in a very large parameter payload via PATCH /flow_runs/{id} (FlowRunUpdate.parameters), storing oversized data and defeating the PR's stated goal.", "category": "corr...
null
PrefectHQ__prefect__21379
PrefectHQ/prefect
21,379
defect
69775fbacada216f639d444d25535de62ff8f651
6dba8a7f715efeeb7decd147f59cd1c3e1b9c1c9
Ensure logging is configured on remote task workers
When tasks run on remote Dask or Ray workers via a serialized context, the worker process may never have called `setup_logging()`. This is because `setup_logging()` lives in `prefect.main`, which is lazily imported via `prefect.__getattr__` — remote workers that don't access names like `prefect.flow` or `prefect.task` ...
diff --git a/src/prefect/logging/configuration.py b/src/prefect/logging/configuration.py index 22dfadb81271..2fbcefa7680a 100644 --- a/src/prefect/logging/configuration.py +++ b/src/prefect/logging/configuration.py @@ -65,6 +65,29 @@ def load_logging_config(path: Path) -> dict[str, Any]: return flatdict_to_dict(fl...
2
2
1
[{"id": "G0", "claim": "Remove the is_logging_configured helper from logging/configuration.py because nothing other than tests uses it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Fold the ensure_logging_setup call into hydrated_context inste...
null
PrefectHQ__prefect__21384
PrefectHQ/prefect
21,384
defect
42ae6fde9c76e1f5cf40f1449226659319d4220b
7be79533cc51512fb7daafeef9219728ab066701
Fix git argument injection in GitRepository pull steps
Fixes a git argument injection vulnerability in `GitRepository` where user-controlled `commit_sha` and `directories` values are passed directly as positional arguments to git subprocesses. A malicious `commit_sha` like `"--upload-pack=touch /tmp/pwned"` could achieve RCE on worker machines processing deployments. **Ch...
diff --git a/src/prefect/runner/storage.py b/src/prefect/runner/storage.py index c8527a4ea748..9008f423fa5a 100644 --- a/src/prefect/runner/storage.py +++ b/src/prefect/runner/storage.py @@ -1,5 +1,6 @@ from __future__ import annotations +import re import shutil import subprocess from copy import deepcopy @@ -176...
3
3
3
[{"id": "G0", "claim": "The new commit_sha guard's {7,40} regex rejects valid 64-character SHA-256 commit IDs, so deployments pinning to SHA-256 commits now fail early with ValueError; widen the accepted length (or validate via Git itself).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":...
null
PrefectHQ__prefect__21386
PrefectHQ/prefect
21,386
defect
af24495ae011332c836f2b65ec3de70921bbcc6c
8919274514e0a825ded6c81719d2dacdb09ab948
Pin prefect version during package installation to prevent self-overwrite
When a deployment pull step's `requires` field triggers `install_packages()`, the bare `pip install` can upgrade the currently running `prefect` package to an incompatible version (e.g. if `prefect-aws>=0.4.0` pulls in a newer prefect), causing import errors mid-execution. This PR adds a `prefect=={current_version}` c...
diff --git a/src/prefect/_internal/installation.py b/src/prefect/_internal/installation.py index 396a7f029f1b..01ec59694439 100644 --- a/src/prefect/_internal/installation.py +++ b/src/prefect/_internal/installation.py @@ -2,6 +2,7 @@ import subprocess import sys +import prefect import prefect.utilities.processuti...
1
1
1
[{"id": "G0", "claim": "The pin should exclude the `prefect=={prefect.__version__}` constraint when `__version__` contains the extra local-version info present on non-tagged/editable installs.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PrefectHQ__prefect__21405
PrefectHQ/prefect
21,405
defect
9e5a66d5349659382e36e0a673f6a3c8f16671f0
0921155aee279e8d966589218972c0abbc868519
Fix flaky tests: SubprocessASGIServer singleton cleanup and SQLite lock retry
Fixes two flaky test failures from [CI workflow run #23918569067](https://github.com/PrefectHQ/prefect/actions/runs/23918569067) on commit 9b4f7e9. ### Fix 1: `SubprocessASGIServer` singleton cache leak `SubprocessASGIServer.__new__` keys instances by the `port` argument (often `None`), but `start()` mutates `self.po...
diff --git a/src/prefect/server/api/server.py b/src/prefect/server/api/server.py index 7e4c9b9ba1cb..086b9d480b63 100644 --- a/src/prefect/server/api/server.py +++ b/src/prefect/server/api/server.py @@ -881,6 +881,7 @@ def __new__(cls, port: int | None = None, *args: Any, **kwargs: Any) -> Self: def __init__(self,...
1
1
1
[{"id": "G0", "claim": "retry_asserts wraps the bulk-delete POST and all its assertions, so any AssertionError (e.g. a wrong deletion count from a successful request) is retried and repeated destructive delete calls can mask a regression in limit handling; restrict retries to transient 503 responses and keep the deleti...
null
PrefectHQ__prefect__21411
PrefectHQ/prefect
21,411
defect
34f66a7cfc986e5b47688ea8ea7a91f8fc58e01f
b47d277873cd86e0b78f584316627e5b19a45ea4
fix: skip Submitting state proposal in `prefect flow-run execute` CLI path
When running against Prefect Cloud, `prefect flow-run execute` gets stuck because it proposes the `Submitting` state, but the `InfrastructurePending → Submitting` transition is not legal. Rather than teaching the client to reinterpret `ABORT` as success generically (which would be ugly tech debt), this PR adds a narrow...
diff --git a/src/prefect/cli/flow_run.py b/src/prefect/cli/flow_run.py index b6f1ec6a892b..138ff7458f9c 100644 --- a/src/prefect/cli/flow_run.py +++ b/src/prefect/cli/flow_run.py @@ -711,5 +711,6 @@ def _handle_reschedule_sigterm(_signal: int, _frame: FrameType | None): flow_run, EngineCommand...
1
1
1
[{"id": "G0", "claim": "Keep an explicit is_cancelling early-return/propose_cancelled path even when Submitting proposals are disabled, because gating the whole propose_submitting rejection path behind self._propose_submitting lets already-Cancelling runs fall through and start executing in the CLI execute path.", "cat...
null
PrefectHQ__prefect__21436
PrefectHQ/prefect
21,436
defect
c67da4a32e2997d627f1cf074cd59e7a0bf604e3
909f455802e3d7b409caf8d91fb4dab1f30950e0
fix(schedules): persist explicit DTSTART on RRule schedules at write time
closes #21362 bare RRule schedules (no `DTSTART`) used to fall back to a hardcoded 2020-01-01 anchor, forcing dateutil's `xafter()` to walk every occurrence from 2020 to "now" on every scheduler loop — ~660k iterations for a 5-minute rule, enough to peg a CPU core across ~30 deployments. this PR makes `DTSTART` explic...
diff --git a/src/prefect/_internal/schemas/validators.py b/src/prefect/_internal/schemas/validators.py index c2d421515c9d..8b60ed21b3de 100644 --- a/src/prefect/_internal/schemas/validators.py +++ b/src/prefect/_internal/schemas/validators.py @@ -306,6 +306,137 @@ def validate_rrule_string(v: str) -> str: return v...
3
3
1
[{"id": "G0", "claim": "Question whether the backfill migration is necessary (suggesting users with problematic schedules could explicitly recreate them instead), and if it is kept, add tests for the migrations.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "clai...
null
PrefectHQ__prefect__21443
PrefectHQ/prefect
21,443
defect
a6344b22b58356eab60d6e21163d3520134df4b0
74c498660fcdf06bcb0f799c500158414f1735d7
fix(engine): identity-verify run_results lookups for weakref-able objects
closes #20558 `flow_run_context.run_results` is keyed by `id(obj)`. Python's `id()` is a memory address — when an object is GC'd, its address can be recycled, and a naive `run_results.get(id(v))` returns the *previous* task's state. The reporter saw this manifest as phantom `task_run` parents in `task_inputs` for para...
diff --git a/src/prefect/context.py b/src/prefect/context.py index e6abedfdd678..9cb6c65b9461 100644 --- a/src/prefect/context.py +++ b/src/prefect/context.py @@ -471,9 +471,16 @@ class EngineContext(RunContext): observed_flow_pauses: dict[str, int] = Field(default_factory=dict) # Tracking for result from t...
5
5
0
[{"id": "G0", "claim": "The docstring should not include the issue number (#20558) since docstrings end up in the API reference docs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docstring should include a link to the issue #20558 instead of...
null
PrefectHQ__prefect__21501
PrefectHQ/prefect
21,501
defect
029a22229aad5be8d13a610941d29c62b2354107
ea02521e9e63681421ccb7789b2bfcb21e65c113
fix: add validation for malformed block document placeholder format
## Summary Fixes #20234 When a user writes a malformed block placeholder like `{{ prefect.blocks.my-block }}` (i.e., missing the document name), the existing code in `src/prefect/utilities/templating.py` calls `.split(".", 2)` on the stripped placeholder name, which can produce a list with only 1 element. The subsequ...
diff --git a/src/prefect/utilities/templating.py b/src/prefect/utilities/templating.py index 5043a74b9d42..4fcb44581c27 100644 --- a/src/prefect/utilities/templating.py +++ b/src/prefect/utilities/templating.py @@ -364,6 +364,11 @@ async def resolve_block_document_references( parts = placeholder.name.repla...
1
1
1
[{"id": "G0", "claim": "The PR should add test coverage for the new malformed block placeholder validation change.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
PrefectHQ__prefect__21528
PrefectHQ/prefect
21,528
defect
34066080dfb06fc75663e28630f86dc4495313fb
20e15f3feb5d9974cfe034e54e54d1979a1f2c58
Fix serve not clearing work pool config on existing deployments
<!-- Thanks for opening a pull request to Prefect! If this is your first contribution, please make sure to review our contribution guidelines: https://docs.prefect.io/contribute/index --> <!-- Include an overview of the proposed changes here --> ### Checklist <!-- These boxes may be checked after opening th...
diff --git a/src/prefect/deployments/runner.py b/src/prefect/deployments/runner.py index ec268dd4676f..d7354bf239cd 100644 --- a/src/prefect/deployments/runner.py +++ b/src/prefect/deployments/runner.py @@ -576,6 +576,13 @@ async def _update( else: update_payload["pull_steps"] = None + # ...
1
1
0
[{"id": "G0", "claim": "The explicit work_pool_name/work_queue_name additions in _update() and _update_sync() are redundant because model_dump(exclude_unset=True) already includes every field in model_fields_set, so the four blocks could be dropped without changing behavior.", "category": "maintainability", "verdict": ...
null
PrefectHQ__prefect__21545
PrefectHQ/prefect
21,545
defect
768d8b359dbfd10dac3a0427ecd32955b376436e
a2cb57a7776724b0f70c820c29eade2cec3a15a3
Register test harness server under default singleton key
Closes https://github.com/PrefectHQ/prefect/issues/21544 ## Problem Starting in 3.6.26, `prefect_test_harness` creates a `SubprocessASGIServer(port=_find_available_port())`, which registers the instance under a specific port key in the `_instances` singleton dict. However, internal code during flow execution (e.g., e...
diff --git a/src/prefect/testing/utilities.py b/src/prefect/testing/utilities.py index e51144c54e76..c2ef4d0ba2cd 100644 --- a/src/prefect/testing/utilities.py +++ b/src/prefect/testing/utilities.py @@ -166,6 +166,12 @@ def cleanup_temp_dir(temp_dir): ) # start a subprocess server to test against ...
1
1
1
[{"id": "G0", "claim": "Overwriting SubprocessASGIServer._instances[None] loses any pre-existing default server instance and teardown later pops the key instead of restoring it, so in the 'default server already running' scenario the original server process is left running but unreachable via SubprocessASGIServer() and...
null
PrefectHQ__prefect__21586
PrefectHQ/prefect
21,586
defect
1b37d6273146985d9e4e5fe37b51530dee281ec3
9266ea426ae99f67ce96506ed316704b848e3d4c
fix(prefect-shell): kill whole process tree on ShellOperation cleanup
closes #20979 ## summary on posix, `ShellOperation` spawned its subprocess in the same process group as the flow run. when the worker cancelled the flow run, `ProcessManager.kill()` signalled only the flow process's pid, and the shell's subprocess (and any child it spawned, like `sleep 9999`) outlived the flow, repar...
diff --git a/src/integrations/prefect-shell/prefect_shell/commands.py b/src/integrations/prefect-shell/prefect_shell/commands.py index 082516b84cec..466016e0167a 100644 --- a/src/integrations/prefect-shell/prefect_shell/commands.py +++ b/src/integrations/prefect-shell/prefect_shell/commands.py @@ -5,6 +5,7 @@ import a...
2
2
1
[{"id": "G0", "claim": "The \"pre-PR\" references in the docstrings are inaccurate and should be reworded.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Cleanup skips signalling the process tree when the shell has already exited, so detached desc...
null
PrefectHQ__prefect__21591
PrefectHQ/prefect
21,591
defect
c6cb397fd2a1bfb0c1d9d92f7b83db9184a920c5
f2bad07afafe89a42e86ad5f6756237e102c7f59
Fix DNS rebinding TOCTOU bypass in `validate_restricted_url`
Closes [OSS-7874](https://linear.app/prefect/issue/OSS-7874/fix-dns-rebinding-toctou-bypass-in-validate-restricted-url). `validate_restricted_url()` previously resolved a hostname once via `socket.gethostbyname()`, checked if the returned IP was private, then passed the original hostname to httpx. httpx re-resolves DN...
diff --git a/src/prefect/blocks/notifications.py b/src/prefect/blocks/notifications.py index 5f0eb3890b12..1aeded73302c 100644 --- a/src/prefect/blocks/notifications.py +++ b/src/prefect/blocks/notifications.py @@ -13,7 +13,11 @@ from prefect.logging import LogEavesdropper from prefect.types import SecretDict from p...
2
2
2
[{"id": "G0", "claim": "The connect path pins only resolved[0], so validated but unreachable DNS answers are not retried and dual-stack hosts can falsely fail; all validated addresses should be tried before giving up.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": ...
null
PrefectHQ__prefect__21607
PrefectHQ/prefect
21,607
defect
6373056dad307ad9526f0257987e885e30934f87
3568da645d769702f768a4b4f320d79a449adf8f
Skip `uv pip freeze` in bundle creation when a non-uv launcher is set
closes https://github.com/PrefectHQ/prefect/issues/21606 When a flow is decorated with a non-uv `launcher` override (e.g. `launcher={"upload": ["python"], "execution": ["python"]}`), the user has opted out of uv-based launchers entirely. Running `uv pip freeze` to populate `bundle["dependencies"]` is therefore unneces...
diff --git a/src/prefect/_experimental/bundles/__init__.py b/src/prefect/_experimental/bundles/__init__.py index f6318454c4d4..82154a8d64dd 100644 --- a/src/prefect/_experimental/bundles/__init__.py +++ b/src/prefect/_experimental/bundles/__init__.py @@ -411,38 +411,45 @@ def create_bundle_for_flow_run( """ c...
1
1
1
[{"id": "G0", "claim": "The freeze skip should trigger only when the execution side of the launcher is overridden (or otherwise preserve dependency collection), because with any non-None launcher — including upload-only overrides that still execute via the default `uv run` path — `dependencies` becomes empty and `execu...
null
PrefectHQ__prefect__21622
PrefectHQ/prefect
21,622
defect
73b19f44043634090013d011cb912fed06d952b6
935f115c18d7c476fc1c443c8294ddc72a60810f
Batch-acknowledge Redis stream messages to reduce round-trips
The Consumer was calling xack individually for each message after handling, requiring one Redis round-trip per message (~0.67ms each). With read_batch_size of 4096, this added ~2.7 seconds of pure ack overhead per batch. Collect successfully handled message IDs and acknowledge them in a single xack call at the end o...
diff --git a/src/integrations/prefect-redis/prefect_redis/messaging.py b/src/integrations/prefect-redis/prefect_redis/messaging.py index 2e5df3c32066f..fccf0e3855c85 100644 --- a/src/integrations/prefect-redis/prefect_redis/messaging.py +++ b/src/integrations/prefect-redis/prefect_redis/messaging.py @@ -384,6 +384,8 @@...
1
1
1
[{"id": "G0", "claim": "Batching the acks makes orphaned messages (stream entry missing) no longer automatically acknowledged when automatically_acknowledge=False, a behavior change from before these changes; ensure orphaned messages are still automatically acknowledged so they don't get redelivered, ideally with a tes...
null
PrefectHQ__prefect__21640
PrefectHQ/prefect
21,640
defect
6f89b6d66878624ed5e572f85370cb518b630208
59b0a386dcf52ed2d4d67f4a1b3254b496f7ef29
refactor whenever API compat helpers and fix in_local_tz for naive datetimes
<!-- Thanks for opening a pull request to Prefect! If this is your first contribution, please make sure to review our contribution guidelines: https://docs.prefect.io/contribute/index --> <!-- Include an overview of the proposed changes here --> ### Checklist <!-- These boxes may be checked after opening th...
diff --git a/.github/workflows/python-tests.yaml b/.github/workflows/python-tests.yaml index ef3f08b9c9d3..acb4ae30207d 100644 --- a/.github/workflows/python-tests.yaml +++ b/.github/workflows/python-tests.yaml @@ -114,6 +114,7 @@ jobs: tests/test_background_tasks.py tests/test_cache_polic...
1
1
0
[{"id": "G0", "claim": "Bump the whenever version in uv.lock so CI gives good signal that all the deprecation warnings are taken care of, without affecting users.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}]
null
PrefectHQ__prefect__21644
PrefectHQ/prefect
21,644
defect
cb40da03fd8b7b165d966c4866cf08379e38fca1
e89791c578d2bb2bdbae30659f7644f096612721
Feat:Handle unknown serializers during dispatch
## Summary This changes serializer dispatch so Prefect can deserialize persisted result metadata even when the referenced serializer class is not available in the current process. Instead of raising immediately during dispatch lookup, unknown serializer types now load as an opaque placeholder that prese...
diff --git a/src/prefect/_result_records.py b/src/prefect/_result_records.py index 1b04d14574fb..8edc9fb5c0b9 100644 --- a/src/prefect/_result_records.py +++ b/src/prefect/_result_records.py @@ -17,6 +17,7 @@ BaseModel, Field, ValidationError, + field_validator, model_validator, ) @@ -24,7 +25...
3
3
2
[{"id": "G0", "claim": "Widening lookup_type's contract via Serializer.__dispatch_missing__ makes any Serializer(type=...) call, such as a config typo at construction time, silently return an UnknownSerializer placeholder instead of raising; the tolerance should apply only where serializer metadata crosses a process bo...
null
PrefectHQ__prefect__21651
PrefectHQ/prefect
21,651
defect
f1f4e625e21bb3b822d4b0fd560d17b84bb137b9
17e1bd514bd36ddcfaab9f387d1fea51776b4d41
fix(bundles): pin current Prefect version in bundle-step `uv run` commands
<!-- Thanks for opening a pull request to Prefect! If this is your first contribution, please make sure to review our contribution guidelines: https://docs.prefect.io/contribute/index --> ### Root cause The outer bundle-step process is launched by ``` uv run --with <step requires> -m <integration>.experime...
diff --git a/src/prefect/_experimental/bundles/__init__.py b/src/prefect/_experimental/bundles/__init__.py index d1858c83e8b1..7fbfa32a8903 100644 --- a/src/prefect/_experimental/bundles/__init__.py +++ b/src/prefect/_experimental/bundles/__init__.py @@ -23,7 +23,10 @@ import anyio import cloudpickle # pyright: ig...
1
1
1
[{"id": "G0", "claim": "The `_is_bundle_step_module` helper is not useful and the underlying design is fragile — it should not pin only when a bundle module is used.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
Pressio__pressio-rom__545
Pressio/pressio-rom
545
defect
b008233c555b13925a4909a052880b123e791058
5813bf208ce9d61b3398eff0fd6855f6aeda7e4a
ops: epetra: revise rank-2 `update`
Contents: - [x] revised overload constraints - [x] added extent checks - [x] added explicit type casting for coefficients - [x] fixed NaN injection bug and added related unit tests - [x] covered no-alpha overload in unit tests refs #449
diff --git a/include/pressio/ops/epetra/ops_multi_vector_update.hpp b/include/pressio/ops/epetra/ops_multi_vector_update.hpp index 982aa87e2..4a0c4f55b 100644 --- a/include/pressio/ops/epetra/ops_multi_vector_update.hpp +++ b/include/pressio/ops/epetra/ops_multi_vector_update.hpp @@ -54,20 +54,61 @@ namespace pressio{ ...
5
5
0
[{"id": "G0", "claim": "The locally created copies of the update coefficients should be declared `const`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The call to `set_zero` should be written with the `::pressio::ops::` qualification, or unqua...
null
Pressio__pressio-rom__715
Pressio/pressio-rom
715
defect
67f0099add584fa94d7ba56be90e0b630c6774c3
9c4da5a7a77b02491248334e5d3f0ea868e5216e
#714: remove epetra from pressio
Fixes #714
diff --git a/.github/workflows/ci-trilinos.yml b/.github/workflows/ci-trilinos.yml index 70fa63e97..db9935d36 100644 --- a/.github/workflows/ci-trilinos.yml +++ b/.github/workflows/ci-trilinos.yml @@ -37,9 +37,6 @@ jobs: build_type: - Release - Debug - epetra_toggle: - - O...
1
1
0
[{"id": "G0", "claim": "The header guard and struct in problem7.hpp were renamed to PROBLEM6/Problem6 by this pull request although the file is still problem7.hpp, leaving the names inconsistent with the file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null