Crafter.Debug/implementations
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 47f2325664
feat(transport): serve the session over QUIC on loopback
A Session with listen = true (the default) now listens on 127.0.0.1 with
the ALPN crafter-debug/1 and writes its discovery record (port, token,
protocol, source id, client path), which goes first when it ends. One
request per stream the client opens: the request and a FIN in, zero or
more stream lines and then the reply and a FIN out, one JSON object per
line.

It holds no thread while nothing arrives. Crafter.Network delivers a
new stream on the pool, its bytes on msquic's worker through OnRecieve,
and replies leave through SendAsync, which never waits. The handler,
which takes the session's mutex, runs on a pool task rather than inside
the stream's callback, so no msquic worker ever waits on the session,
and the session's threads only send, which Network allows under any
lock. Stream wrappers are let go outside every lock their callbacks
take. The rules head the implementation.

Limits: a request over 1 MiB is answered with an error, not buffered,
and a log follower more than 8 MiB behind is reset. quit --force exits
200 ms after its reply was taken, from a thread of its own, since
"sent" means msquic has the bytes, not that they left. A client killed
without closing is let go at the 10 s idle timeout.

The Session refuses a pool without a worker: Network hands it new
streams there, and with Start(1) nothing would run them. The partition
exports nothing, so an app's view of the module is unchanged and it
does not see Crafter.Network's types.

Crafter.Network comes from forgejo, unpinned, with the args unchanged;
--local takes ../Crafter.Network, and $CRAFTER_DEBUG_NETWORK any
project.cpp, for the branch the callback API is on until it lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 03:06:56 +01:00
..
Crafter.Debug-Condition.cpp feat(registry): commands, watches, samples, the timeline and conditions 2026-11-01 01:40:59 +01:00
Crafter.Debug-Registry.cpp feat(session): serve requests without blocking a thread, pause and step 2026-11-01 01:53:15 +01:00
Crafter.Debug-Session.cpp feat(transport): serve the session over QUIC on loopback 2026-11-01 03:06:56 +01:00
Crafter.Debug-Timeline.cpp feat(session): serve requests without blocking a thread, pause and step 2026-11-01 01:53:15 +01:00
Crafter.Debug-Transport.cpp feat(transport): serve the session over QUIC on loopback 2026-11-01 03:06:56 +01:00
Crafter.Debug.Cli-Client.cpp fix(session): log --last 0 means no backlog 2026-11-01 03:06:38 +01:00
Crafter.Debug.Core-Codec.cpp feat(core): Value, reflection, codecs and results, shared by app and client 2026-11-01 01:31:58 +01:00
Crafter.Debug.Core-Discovery.cpp feat(discovery): find live instances across sandboxes; build info 2026-11-01 01:56:31 +01:00
Crafter.Debug.Core-Protocol.cpp feat(session): serve requests without blocking a thread, pause and step 2026-11-01 01:53:15 +01:00
Crafter.Debug.Core-Value.cpp feat(core): Value, reflection, codecs and results, shared by app and client 2026-11-01 01:31:58 +01:00
main.cpp feat(cli): crafter-debug, the client agents drive an app with 2026-11-01 02:03:38 +01:00