lilleman
0fd6da1542
Separate a receipt's fields on any whitespace, not only a space
...
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01Csos3Vfm66NrAywQUe3e4V
2026-09-01 21:37:19 +02:00
lilleman
471923a7b6
Log the dropped request, and scope the receipt sentence to a reconnect
2026-09-01 20:53:58 +02:00
lilleman
e6250ef44e
Drop a request whose link went while onRequest ran, and pin the wire in the test
2026-09-01 20:40:17 +02:00
lilleman
c8d265d5fa
Tie the refusal to the link, not to the hold, so a released message is refused too
2026-09-01 20:25:57 +02:00
lilleman
82a95593bd
Refuse to answer a message whose link went, instead of reporting it delivered
2026-09-01 19:20:06 +02:00
lilleman
a91c55cc64
Merge pull request #72 from larvit/sms-id-format
...
Read a peer's submit and receipt message ids into one notation before comparing them
2026-09-01 18:20:09 +02:00
lilleman
8a8d6faccf
Merge pull request #73 from larvit/reconnect-by-default
...
Re-bind a dropped client link by default, and hold the sends it could not carry
2026-09-01 18:19:19 +02:00
lilleman
f0327044b1
Cover the receipt refusal and the sweep that wakes a drain
2026-09-01 18:13:35 +02:00
lilleman
042a62be97
Sweep held messages before each hold, so expiry needs no live timer
2026-09-01 18:02:15 +02:00
lilleman
61985fb914
Say what a peer did with each receipt segment, and leave no drop unlogged
2026-09-01 17:59:37 +02:00
lilleman
67c0402def
Bound the messages held for a shutdown, and report a partial receipt
2026-09-01 17:42:22 +02:00
lilleman
1e7e113bd7
Put a receipt's segments on the wire together, like a message's
2026-09-01 17:03:33 +02:00
lilleman
8becbc0ab6
Give the gate, the window and the pending map one owner
2026-09-01 16:52:15 +02:00
lilleman
3bcea108e3
Wait out the messages the application holds before shutting a session down
2026-09-01 13:58:28 +02:00
lilleman
a99e1227ac
Give the project ordered goals and let them decide what a decision record is
2026-09-01 12:21:58 +02:00
lilleman
2fe36fa4e8
Say once why the hold timer is not unref'd
2026-09-01 10:48:20 +02:00
lilleman
2c0dfd172f
Keep the process alive while a send waits for a link
2026-09-01 10:38:16 +02:00
lilleman
58817eebbf
Loop a held send on the gate's own answer, not on the socket too
2026-09-01 10:15:07 +02:00
lilleman
35dd1e7678
Count every request that went out unanswered, and gate a send on a bound link
2026-09-01 10:08:56 +02:00
lilleman
8d9656b4e0
Hold a send with no link for the next one, and count the rest as unanswered
2026-09-01 08:02:37 +02:00
lilleman
bfc85ee4dd
Say in the options table that a proven link resets the backoff
...
maxDelay bounds the wait and sets the bar a link must clear, and only the
first was documented, so tuning it up quietly lengthened every recovery.
The unreadable PDU the tests write is one named constant now.
2026-08-31 22:59:57 +02:00
lilleman
8e4d472f72
Back off from a link that dies as soon as it comes up
...
A bind that returns is not proof the link works: an unreadable stream is
only found afterwards, so resetting the delay there handed a link that
died on arrival a fresh minDelay every cycle — one connect and bind per
second forever, which is how an account gets blocked for bind flooding.
The loop resets only once a link has outlasted maxDelay.
Also covers the unreadable stream that has no loop to retry it.
2026-08-31 22:45:29 +02:00
lilleman
b1c790b9a0
Retry a stream we cannot read, and cover the framer reset on attach
...
A framing or codec error tears the link down rather than the session, so
the loop retries it on a fresh socket with a fresh framer — which is what
a desynced stream needs. Removing that reset failed nothing before; the
reconnect test now leaves half a PDU on the dying link, and does.
`disconnected` counts failed links rather than outages, which the README
now says, and the transport wires its socket as it is built.
2026-08-31 22:27:16 +02:00
lilleman
b2d121b4f3
Emit exactly one close, and read the socket through a PduTransport
...
Ending a session while the link was down emitted nothing: the retried
drop had already torn it down, so close() found nothing left to do. The
terminal event is now guarded by its own flag rather than by `closed`.
The socket, the framer and the parse move to PduTransport, which is what
takes session.ts back under its line cap; `session.sock` reads through a
getter. The backoff also refuses an inverted pair and an unknown key.
2026-08-31 21:53:11 +02:00
lilleman
880454b4f4
Split a retried drop out of close, and range-check the backoff
...
`close` fires only where nothing will bring the session back; a drop the
reconnect loop will retry is `disconnected`, pairing with `reconnected`.
`minDelay: 0` never doubles, so the backoff never started — both delays
are range-checked now, and only `false` spells reconnect off.
2026-08-31 21:11:19 +02:00
lilleman
18177053bc
Re-bind a dropped client link by default, and take false to turn it off
...
Surviving a drop is most of what the session layer is for, and behind an
opt-in an application that never read the options table got none of it.
`reconnect` still takes `{ minDelay, maxDelay }` to retune the backoff;
`false` is the one spelling for off.
2026-08-31 20:18:29 +02:00
lilleman
140464802b
Put the submit_sm summary back on the function it describes and tidy the review nits
2026-08-30 23:12:22 +02:00
lilleman
706b61d6ca
Leave an unknown notation alone and read a receipt's TLV as the id the submit answered
2026-08-30 23:01:39 +02:00
lilleman
696e018b77
Derive the notation names from one table and refuse an smsIdFormat that is not the pair
2026-08-30 22:45:02 +02:00
lilleman
8e5b9bb556
Read a peer's submit and receipt message ids into one notation before comparing them
2026-08-30 22:35:09 +02:00
lilleman
098891bb84
Cover the enquire_link we answer and stop draining a peer that answers nothing
2026-08-30 22:17:27 +02:00
lilleman
685495f534
Let a listener's teardown run last and answer the sends the tests left hanging
2026-08-30 22:03:23 +02:00
lilleman
427565ed3e
Tear down what a test opens in t.after so a failing assertion ends the run
2026-08-30 21:35:09 +02:00
lilleman
fa720e244a
Drop the line count that drifts and reuse the delay helper
2026-08-30 21:09:19 +02:00
lilleman
7e8af3c308
Tear down at once on a peer unbind and stop reporting a reconnect after close
2026-08-30 21:01:46 +02:00
lilleman
66b7d90bbf
Let onClose end the session through the same path as every other close
2026-08-30 20:30:40 +02:00
lilleman
5c618e0061
Stop accepting before the drain and report the link that dropped during it
2026-08-30 20:27:38 +02:00
lilleman
bebd74b42b
Drain the requests already on the wire before close() and unbind() tear down
2026-08-30 20:08:36 +02:00
lilleman
c06eda4582
Pin the spent-base cap and state the boundary the merge rule covers
2026-08-30 11:39:09 +02:00
lilleman
5c797f5383
Forget the base closed longest ago rather than the one handed out again
2026-08-30 11:31:22 +02:00
lilleman
aa3cf41c7f
Merge a message id base once so a straggler cannot join a later report
2026-08-30 11:17:02 +02:00
lilleman
8a71dbbc87
Drop the arrangement comment and record the review's DlrMerger findings
2026-08-28 15:09:47 +02:00
lilleman
f4e55909a1
Keep the delivery-receipt merges across a reconnect instead of dropping them
2026-08-28 14:44:32 +02:00
lilleman
30e0cfd38a
Record what re-declaring the listener methods costs a subclass
2026-08-27 23:15:46 +02:00
lilleman
344249b080
Accept an async listener in the types and normalise any rejection reason
2026-08-27 23:07:48 +02:00
lilleman
0c55e5ee11
Cap the CI jobs at ten minutes so a hang fails fast
2026-08-27 23:07:48 +02:00
lilleman
a5fe43d7a9
Normalise a listener's rejection reason before routing it to sessionError
2026-08-27 22:41:26 +02:00
lilleman
0e8f298957
Route a rejecting async listener to sessionError instead of the process
2026-08-27 22:22:51 +02:00
lilleman
3c6195a938
Collapse the two id emptiness tests into one and pin the reassembler wording
2026-08-27 16:42:26 +02:00
lilleman
cf315737b7
Keep the body scrape for reserved message types and an empty receipt id marker
2026-08-27 16:32:01 +02:00