Skip to content

fix(config): preserve runtime objects in blueprint configuration - #3373

Draft
Nabla7 wants to merge 1 commit into
mainfrom
fix/blueprint-runtime-values
Draft

fix(config): preserve runtime objects in blueprint configuration#3373
Nabla7 wants to merge 1 commit into
mainfrom
fix/blueprint-runtime-values

Conversation

@Nabla7

@Nabla7 Nabla7 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What changed

Preserve explicitly configured callable and opaque Python values after Pydantic validation instead of serializing them through model_dump().

A regression test sends a callable dataclass through blueprint parsing, pickle worker serialization, and Pydantic reconstruction.

Root cause

BlueprintConfigParser validated module configuration correctly, then model_dump(mode="python") converted nested dataclasses into plain dictionaries. Rerun callbacks and other runtime objects therefore stopped being callable after crossing the worker boundary.

Validation

  • pytest dimos/core/coordination/blueprint_config/test_parser.py -q
  • 28 tests passed
  • Repository pre-commit hooks passed

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/core/coordination/blueprint_config/values.py 87.50% 1 Missing and 1 partial ⚠️
@@           Coverage Diff           @@
##             main    #3373   +/-   ##
=======================================
  Coverage   75.80%   75.80%           
=======================================
  Files        1172     1172           
  Lines      113568   113599   +31     
  Branches    10258    10264    +6     
=======================================
+ Hits        86090    86114   +24     
- Misses      24492    24495    +3     
- Partials     2986     2990    +4     
Flag Coverage Δ
OS-ubuntu-24.04-arm 69.94% <93.75%> (+<0.01%) ⬆️
OS-ubuntu-latest 71.93% <93.75%> (+<0.01%) ⬆️
Py-3.10 71.93% <93.75%> (+<0.01%) ⬆️
Py-3.11 71.93% <93.75%> (-0.01%) ⬇️
Py-3.12 71.93% <93.75%> (-0.01%) ⬇️
Py-3.13 71.93% <93.75%> (+<0.01%) ⬆️
Py-3.14 71.93% <93.75%> (+<0.01%) ⬆️
Py-3.14t 71.93% <93.75%> (+<0.01%) ⬆️
SelfHosted-Large 29.61% <62.50%> (+<0.01%) ⬆️
SelfHosted-Linux 35.74% <28.12%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
dimos/core/coordination/blueprint_config/parser.py 86.01% <100.00%> (ø)
.../core/coordination/blueprint_config/test_parser.py 97.40% <100.00%> (+0.15%) ⬆️
dimos/core/coordination/blueprint_config/values.py 80.45% <87.50%> (+1.58%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant