Skip to content

Migrate Seal memory ownership to Strata - #1

Open
zekageri wants to merge 24 commits into
mainfrom
strata-memory-policy
Open

Migrate Seal memory ownership to Strata#1
zekageri wants to merge 24 commits into
mainfrom
strata-memory-policy

Conversation

@zekageri

@zekageri zekageri commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • migrate Seal to the shared Strata::MemoryPolicy contract and bump library metadata to v0.2.0
  • replace SealStackType / preferPsram with memory.allocation and memory.taskStack
  • route Seal-owned token buffers, temporary strings/vectors, async jobs, internal ArduinoJson storage, queue storage, mutex, binary shutdown semaphore, and worker task through Strata v0.1.2
  • remove Seal-local heap/ESP-IDF task allocation backends
  • preserve secure clearing of sensitive token/job/signature data before release
  • change async worker shutdown to signal + suspend so Strata can safely reclaim the static task stack from deinit()
  • strengthen source audits and adapt the host FreeRTOS lifecycle simulator for Strata static primitives
  • add memory-policy documentation, migration notes, troubleshooting guidance, and an example

Breaking changes

Seal v0.2.0 removes:

  • SealStackType
  • SealConfig::stackType
  • SealConfig::preferPsram

Use instead:

SealConfig config;
config.memory.allocation = Strata::Placement::PreferExternal;
config.memory.taskStack = Strata::Placement::PreferExternal;

The default for both fields is PreferExternal, preserving Seal v0.1.0's PSRAM-preferred behavior while using Strata fallback semantics.

Memory contract

  • movable Seal-owned storage follows memory.allocation
  • async worker stack follows memory.taskStack
  • FreeRTOS control blocks remain internal through Strata
  • caller-provided buffers and caller-provided JsonDocuments remain caller-owned
  • RequireExternal does not silently fall back

Validation

  • production source ownership audit passes
  • existing host JWT, ESP32 lifecycle, Node jsonwebtoken compatibility, PlatformIO matrix, and Arduino CLI matrix are retained and updated for Strata v0.1.2

CI is running on the branch and will be updated further if it finds integration issues.

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