Skip to content

🪲 BUG-#204: Replace unsafe ctypes memory access in StorageDefault#226

Merged
FernandoCelmer merged 2 commits intodevelopfrom
feature/204
Apr 9, 2026
Merged

🪲 BUG-#204: Replace unsafe ctypes memory access in StorageDefault#226
FernandoCelmer merged 2 commits intodevelopfrom
feature/204

Conversation

@FernandoCelmer
Copy link
Copy Markdown
Member

Description

Replace ctypes.cast(id, py_object) with a safe dict-based in-memory storage in StorageDefault.

Issue: 📌 ISSUE-#204

Changes

  • post() — now stores context in _store dict (was no-op returning None)
  • get() — retrieves from dict, returns Context() for missing keys (was ctypes.cast on memory address)
  • key() — returns f"{workflow_id}-{task_id}" consistent with S3/GCS/File (was id() memory address)
  • Removed ctypes import
  • Updated tests with roundtrip, missing key, and key format assertions

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@FernandoCelmer FernandoCelmer added the bug Something isn't working label Apr 9, 2026
@FernandoCelmer FernandoCelmer self-assigned this Apr 9, 2026
@FernandoCelmer FernandoCelmer merged commit f3f7f5f into develop Apr 9, 2026
10 checks passed
@FernandoCelmer FernandoCelmer deleted the feature/204 branch April 9, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant