Harden Link lifecycle and release validation for v0.1.0 - #3
Merged
Conversation
Collaborator
Author
Implementation validation updateFinal branch head: Completed validation:
The final CI run for the current head is queued behind obsolete runs generated during the implementation commits. It must still complete successfully before the PR leaves draft. Physical execution of |
zekageri
marked this pull request as ready for review
July 19, 2026 14:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Harden Link before
v0.1.0by eliminating the submission/shutdown semaphore race, serializing complete lifecycle transitions, making response ownership explicitly fallible, validating every value narrowed into ESP-IDF signed parameters, aligning buffered and streaming redirect handling, and making the complete test suite release-gating.Closes #2.
Root causes
fetch()previously published a queue entry, released the runtime mutex, and only then signaled_items. Shutdown could drain the queue, delete the semaphore, and leave the submitting task with a stale handle.init()exposedStartingand partially allocated runtime storage whiledeinit()could run concurrently and free it before startup completed.intparameters without representability checks.Implementation
Lifecycle and submission safety
init()anddeinit()transitionsdeinit()is waiting fordeinit()behavior: state remainsStoppingand runtime storage stays alive for a later retryUninitializedinstanceESP-IDF bounds
defaultTimeoutMs > INT_MAXInvalidTimeoutmaxRequestBodySize > INT_MAXstreamChunkSize > INT_MAXExplicit response ownership
LinkOwnedBuffer,LinkHeaders,LinkBody, andLinkResponsemove-onlycopyFrom()operationsLinkResponse::copyFrom()a strong guarantee: failed header/body duplication leaves the destination unchangedRedirect behavior
Validation and release gates
deinit()/init()in both connection modesci.yml7.0.0in PIOArduino and current ArduinoJson v7 in Arduino CLIArduinoJson (>=7.0.0)consistently in Arduino metadataCompatibility impact
This intentionally changes allocation-backed response types to move-only before the first stable release. Existing code that implicitly copies
LinkResponse,LinkHeaders,LinkBody, orLinkOwnedBuffermust move ownership or call the explicitcopyFrom()API and handle its result.The default HTTP mode remains
PerRequest. Persistent per-worker clients remain opt-in. No automatic request replay was added.Validation
GitHub Actions is the automated source of truth for this branch and must pass:
Physical ESP32 execution and the persistent HTTPS soak cannot be performed through the GitHub connector. They remain explicit release gates documented in
docs/release-validation.md; the PR should stay draft until that evidence is attached.