Repository navigation
fix(lifecycle): recover from transport loss - #56
Merged
petesramek merged 1 commit intoOct 28, 2026
Merged
petesramek merged 1 commit into
petesramek merged 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
9 of 14 tasks
14 tasks done
petesramek
added a commit
that referenced
this pull request
Oct 28, 2026
#62) * status.h replaced with ackresult * ackmessage rewritten * updated ackmessage * added telemetryevent.h * updated stats.h * updated stats.h * updated messagetype.h * updated version.h * updated handshakemessage.h * update logmessage.h * update loglevel * updated state.h * updated fletche16.h * update cobscodec.h * updated packet.h * removed packed.h * rtemoved duplicate code * updated tinylink.h * updated adapters * removed plan folder * added skills * removed tests * test: add native Fletcher-16 suite (#32) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: add comprehensive TinyLink native suite (#33) * test: add native Fletcher-16 suite Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: add comprehensive TinyLink native suite Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: cover remaining native components (#34) * test: add native Fletcher-16 suite Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: add comprehensive TinyLink native suite Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: cover remaining native components Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * readme * switch prompt and result order * merged src structure with large project flat structure issue. * updated model * feat(adapter): report transport write results (#52) Add a shared result type and propagate accepted-byte counts from all built-in adapters. Expand native adapter stubs and tests for complete, partial, failed, and zero-length writes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(engine): handle transport write results (#53) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(engine): require trivially copyable payloads (#54) Enforce trivially copyable payload types on all toolchains including AVR, document opaque-byte portability limits, and add compile-contract checks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix: saturating engine telemetry and ACK sequence validity (layer 4) (#55) * Saturate engine telemetry and validate ACK sequence Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: changelog for stats saturation and ACK validity Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(lifecycle): recover from transport loss (#56) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(adapters): cover POSIX adapter with PTYs (#57) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: organize suites by responsibility and split TinyLink tests (#58) Move suites to test/suites, isolate platform stubs under test/support/stubs, and split the TinyLink suite into behavior files. All 142 registrations preserved. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test: document infrastructure and improve loop assertion diagnostics (#59) * test: document infrastructure and improve loop assertion diagnostics Document test helpers, platform stubs, compile-contract probes and capacity assumptions. Loop-based assertions now report the failing index, length or value via TEST_ASSERT_*_MESSAGE and a diag() helper. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * build(test): enforce strict native warnings and add sanitizer CI (#60) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * removed cod etesting skill * bumped version to 0.5.0 * fix: reconcile remedation merge with main duplicates (#63) Restore the verified stacked implementation (src, tests, tools, CI) where the main merge left duplicate TinyWriteResult/test files and broken TinyLink.h. Drop duplicate README write-result section and obsolete scripts/ probe. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Description
Implements layer 5 of the TinyLink remediation sequence:
update()detects adapter closure and enters the existingConnectionState::Failed; it clears partial RX and pending ACK state while retaining delivered polling data and the next TX sequence. Reopening restarts handshake mode with a fresh request and normal retry timing, while peer-synchronized mode returns toInactiveto await synchronization. The ACK validity introduced in layer 4 is invalidated across transport loss.Files changed:
src/TinyLink.h,src/protocol/State.h,test/test_tinylink/test_main.cpp,README.md, andCHANGELOG.md.Behavior/API impact: no public method, wire format, or enum value changes.
Failednow becomes observable afterupdate()detects a closed adapter; it is recoverable after the adapter opens. Already-transmitted frames are not retried, and the next application send uses the next sequence.Assumptions and limitations: a link previously synchronized by an incoming peer request (without
begin()) returns toInactiveand awaits a fresh peer request. The handshake format has no session nonce, so a delayed compatible response arriving after a fresh request cannot be distinguished from the current response. Validation is native-only; no physical hardware or POSIX coverage is included, per layer-5 scope.Closes #
Type of Change
Checklist
pio test -e native).CHANGELOG.mdentry under[Unreleased].Testing Done
pio test -e native— passed, 124 test cases succeeded across 11 test environments. PlatformIO Core 6.1.19; Clang 21.1.8 on Windows.python tools/compile_contract/check.py— passed, all 3 payload compile-contract cases.testTransportLossCancelsAcksAndRestartsHandshakeWithoutSequenceReuse,testTransportLossDiscardsPartialFrameAndRestoresBasicLinkForSynchronization, andtestTransportLossPreservesDeliveredPollingPayload.Screenshots / Logs (if applicable)