feat(console): drive resident timers and TCP streams

Add a revision-scoped ResidentSupervisor that serializes Host events through ResidentSession while Tokio tasks own timers, TCP listeners, and stream sockets.

Enforce deny-by-default endpoint policy, bounded event and stream queues, startup rollback, deterministic service shutdown, stale Actor replacement, and deployment restoration across Runtime restarts.

Add timer and real TCP integration coverage for port conflicts, multi-chunk echo traffic, service restart, and full Runtime recovery.
This commit is contained in:
Maofeng
2026-07-31 10:04:36 +08:00
parent ef2eddc31f
commit 7939285e9f
7 changed files with 1728 additions and 35 deletions
+4 -1
View File
@@ -70,9 +70,12 @@ impl ResidentGuest for ResidentProbe {
command: source.kind,
payload: source.payload,
})],
// A TCP FIN is a read-half close. This fixture has no additional
// response to send, so it explicitly asks the Host to close the
// remaining write half and release the stream resource.
Event::StreamHalfClosed(stream_id) => vec![Effect::CloseStream(stream_id)],
Event::StreamOpened(_)
| Event::StreamWritable(_)
| Event::StreamHalfClosed(_)
| Event::StreamClosed(_)
| Event::Shutdown => Vec::new(),
})