Skip to content

Share _signature_cache with uncalled-for#357

Merged
chrisguidry merged 1 commit intomainfrom
share-signature-cache
Mar 2, 2026
Merged

Share _signature_cache with uncalled-for#357
chrisguidry merged 1 commit intomainfrom
share-signature-cache

Conversation

@chrisguidry
Copy link
Owner

docket.execution had its own _signature_cache dict, separate from the one in uncalled_for.introspection. FastMCP clears docket.execution._signature_cache after mutating function signatures (via transform_context_annotations), but get_dependency_parameters reads from uncalled-for's copy — so the stale entry stuck around and dependency resolution silently returned {}.

Now both _signature_cache and _parameter_cache are re-exported from uncalled-for, so there's one shared dict for each. Added contract tests asserting cache identity.

🤖 Generated with Claude Code

`docket.execution` had its own `_signature_cache` dict, separate from the
one in `uncalled_for.introspection`.  FastMCP clears
`docket.execution._signature_cache` after mutating function signatures
(via `transform_context_annotations`), but `get_dependency_parameters`
reads from uncalled-for's cache — so the stale entry stuck around and
dependency resolution silently returned `{}`.

Now both `_signature_cache` and `_parameter_cache` are re-exported from
uncalled-for, so there's one shared dict for each.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@read-the-docs-community
Copy link

Documentation build overview

📚 docket | 🛠️ Build #31624956 | 📁 Comparing 9317e0e against latest (d2fa250)


🔍 Preview build

Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
File Status
api-reference/index.html 📝 modified

@chrisguidry chrisguidry merged commit 744a614 into main Mar 2, 2026
133 of 136 checks passed
@chrisguidry chrisguidry deleted the share-signature-cache branch March 2, 2026 15:56
@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d2fa250) to head (9317e0e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #357   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          108       108           
  Lines         3159      3163    +4     
  Branches        26        26           
=========================================
+ Hits          3159      3163    +4     
Flag Coverage Δ
cli-python-3.10 100.00% <ø> (ø)
cli-python-3.11 100.00% <ø> (ø)
cli-python-3.12 100.00% <ø> (ø)
cli-python-3.13 100.00% <ø> (ø)
cli-python-3.14 100.00% <ø> (ø)
python-3.10 100.00% <100.00%> (ø)
python-3.11 98.07% <100.00%> (+<0.01%) ⬆️
python-3.12 100.00% <100.00%> (ø)
python-3.13 100.00% <100.00%> (ø)
python-3.14 100.00% <100.00%> (ø)
windows-python-3.10 100.00% <100.00%> (ø)
windows-python-3.11 97.95% <100.00%> (+<0.01%) ⬆️
windows-python-3.12 100.00% <100.00%> (ø)
windows-python-3.13 100.00% <100.00%> (ø)
windows-python-3.14 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/docket/dependencies/_functional.py 100.00% <ø> (ø)
src/docket/execution.py 100.00% <ø> (ø)
tests/test_uncalled_for_contract.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants