Skip to content

Bump docket to main for CI testing#3353

Closed
chrisguidry wants to merge 3 commits intomainfrom
bump-docket-main
Closed

Bump docket to main for CI testing#3353
chrisguidry wants to merge 3 commits intomainfrom
bump-docket-main

Conversation

@chrisguidry
Copy link
Copy Markdown
Collaborator

Just pointing docket at its main branch to run the full test suite against the latest docket changes. Draft PR, no intent to merge as-is.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chrisguidry chrisguidry added the DON'T MERGE PR is not ready for merging. Used by authors to prevent premature merging. label Mar 2, 2026
@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality. For issues and smaller PR improvements. tests labels Mar 2, 2026
@marvin-context-protocol
Copy link
Copy Markdown
Contributor

marvin-context-protocol Bot commented Mar 2, 2026

Test Failure Analysis

Updated (run 22585174106, 2026-03-02): Re-analyzed latest workflow run — findings are consistent with prior analysis.

Summary: The static_analysis job fails due to 2 ty type errors. The Dependency class from the new docket main no longer statically declares an execution attribute — it's monkeypatched at runtime — so ty correctly flags accesses to Dependency.execution as unresolved.

Root Cause: In the docket main branch (>=0.18.0), the Dependency base class is now re-exported from the uncalled-for library. The execution ContextVar was moved to module scope and then patched back onto Dependency dynamically for backwards compatibility:

# docket main — simplified
from uncalled_for import Dependency as Dependency
current_execution: ContextVar[Execution] = ContextVar("current_execution")
Dependency.execution = current_execution  # type: ignore[attr-defined]  <- runtime patch

Because execution is not declared in the class body, ty reports:

  • error[unresolved-attribute]: Class Dependency has no attribute execution in context.py:412 and dependencies.py:110
  • warning[unused-type-ignore-comment] in context.py:425 (the type: ignore is no longer needed or applicable)

Suggested Solution: Replace Dependency.execution accesses with the new module-level ContextVar that docket exports directly:

# Instead of:
from docket.dependencies import Dependency
execution = Dependency.execution.get()

# Use:
from docket.dependencies import current_execution
execution = current_execution.get()

Apply in both files, and remove the now-unnecessary # type: ignore[attr-defined] comment on context.py:425.

Note: The loq file-size violations are explicitly flagged as "not enforced... yet!" and don't cause the failure.

Detailed Analysis

Failing step: Run prek (static analysis)

ty errors:

error[unresolved-attribute]: Class `Dependency` has no attribute `execution`
 --> src/fastmcp/server/context.py:412:25
411 |         # Get current execution from worker context
412 |         execution = Dependency.execution.get()
    |                     ^^^^^^^^^^^^^^^^^^^^

warning[unused-type-ignore-comment]: Unused blanket `type: ignore` directive
 --> src/fastmcp/server/context.py:425:57
425 |         execution._fastmcp_last_progress = current  # type: ignore[attr-defined]
    |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[unresolved-attribute]: Class `Dependency` has no attribute `execution`
 --> src/fastmcp/server/dependencies.py:110:21
109 |     try:
110 |         execution = DocketDependency.execution.get()
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^

Runtime vs. static: runtime still works

The monkeypatch (Dependency.execution = current_execution) runs at import time, so Dependency.execution.get() continues to work at runtime. This is a static-typing-only failure — no runtime regression from this PR.

loq file-size violations (non-blocking)

✖  src/fastmcp/tools/tool_transform.py      (1001 > 1000)
✖  src/fastmcp/server/auth/oauth_proxy/proxy.py (1827 > 1796)
✖  src/fastmcp/cli/cli.py                   (1064 > 1000)
✖  src/fastmcp/server/context.py            (1374 > 1272)
✖  src/fastmcp/server/dependencies.py       (1402 > 1000)

These are logged but not currently enforced.

Related Files
  • src/fastmcp/server/context.py:412 — calls Dependency.execution.get() for docket progress tracking
  • src/fastmcp/server/context.py:425 — has the now-stale # type: ignore[attr-defined]
  • src/fastmcp/server/dependencies.py:110 — calls DocketDependency.execution.get() to get task context info

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chrisguidry chrisguidry closed this Mar 2, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chrisguidry chrisguidry reopened this Mar 2, 2026
@chrisguidry chrisguidry closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DON'T MERGE PR is not ready for merging. Used by authors to prevent premature merging. enhancement Improvement to existing functionality. For issues and smaller PR improvements. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant