Skip to content

🪲 BUG-#247: Fix _serialize_context crash with non-Context list items#249

Merged
FernandoCelmer merged 10 commits intodevelopfrom
feature/247
Apr 11, 2026
Merged

🪲 BUG-#247: Fix _serialize_context crash with non-Context list items#249
FernandoCelmer merged 10 commits intodevelopfrom
feature/247

Conversation

@FernandoCelmer
Copy link
Copy Markdown
Member

Summary

  • Fix _serialize_context crash when ctx.storage is a list of raw objects (dicts, strings, etc.) instead of Context objects
  • Fix context_validator using truthy check instead of explicit None check
  • Add support for tuple storage serialization
  • Add _format_raw method for serializing non-Context values
  • Configure pytest testpaths to exclude examples/

Test plan

  • List of dicts serializes without error
  • List of strings serializes without error
  • List of Context objects still works
  • Mixed list (Context + raw) serializes correctly
  • Context without task_id in list uses index as key
  • Tuple storage serializes correctly
  • Empty list returns empty dict
  • None context returns None
  • Context with None storage returns None
  • All 449 existing tests pass

Closes #247

Comment thread dotflow/core/serializers/task.py
@FernandoCelmer FernandoCelmer added bug Something isn't working edge-case Edge case handling 0.15.0 Introduced in v0.15.0 labels Apr 11, 2026
Comment thread dotflow/core/serializers/task.py
@FernandoCelmer FernandoCelmer merged commit 4f828d6 into develop Apr 11, 2026
10 checks passed
@FernandoCelmer FernandoCelmer deleted the feature/247 branch April 11, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.15.0 Introduced in v0.15.0 bug Something isn't working edge-case Edge case handling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant