detached 1cfa521

docs(architecture): document active warm broker pool

commit
1cfa5210d18a70e9875ec2e64cd09565348ee56c
author
brice · · 2026-09-22 21:27 UTC
parent
e4992c6
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +11 -7
M docs/architecture.md +11 -7
@@ -175,7 +175,7 @@ mutation, so a racing close can never admit work after shutdown. The codec
175175 itself stays stateless over `wire.ScanEnvelope`. No socket, framing pump,
176176 or P3.2 transport is introduced here.
177177
178-## Broker pool core (Plan 001 P2.2, not activated)
178+## Broker connection pool
179179
180180 `internal/usecase/broker.Pool` owns bounded physical keys and logical stream
181181 reservations, but no session data or traffic queues. Local and registered remote
@@ -200,16 +200,20 @@ and are canceled when their final reservation leaves. Acquisition coalescing
200200 keys on the exact policy plus the explicit `BrokerDaemonStartMode`, so an
201201 existing-only request is never shared with a dial that may start the target;
202202 after authentication the canonical key is identity plus exact policy alone.
203-Physical retirement keeps its key occupied until Close finishes. Fake-clock idle
204-eviction and shutdown close transports outside the bookkeeping lock.
203+Physical retirement keeps its key occupied until Close finishes. The pool keeps
204+at most eight idle physical transports warm by default, including connections
205+established by a first successful probe. `warmTransports: 0` disables warm
206+reuse; `warmIdleTimeout` defaults to `off` and may set an idle deadline.
207+Broker shutdown always closes warm transports. Fake-clock idle eviction and
208+shutdown close transports outside the bookkeeping lock.
205209
206210 Logical and physical ports expose terminal signals independent of message reads.
207211 A stream terminal failure releases only its reservation; physical failure fans
208212 out separately scoped typed loss errors. The pool owns neither framing nor
209-fairness: future transport adapters must implement independently bounded queues
210-and prompt cancellation/Close. Shutdown joins owned operations and relies on
211-that explicit port contract. No production composition or real multiplexing is
212-introduced here, and existing production connectivity ownership is unchanged.
213+fairness: transport adapters implement independently bounded queues and
214+prompt cancellation/Close. Shutdown joins owned operations and relies on
215+that explicit port contract. Production clients use this pool for local and
216+remote logical streams.
213217
214218 Physical `Done` is authoritative: adapters publish stable `Err` and
215219 `FailureKind`, then close physical `Done` before terminating affected logical
@@ -175,7 +175,7 @@ mutation, so a racing close can never admit work after shutdown. The codec
175 itself stays stateless over `wire.ScanEnvelope`. No socket, framing pump,175 itself stays stateless over `wire.ScanEnvelope`. No socket, framing pump,
176 or P3.2 transport is introduced here.176 or P3.2 transport is introduced here.
177 177
178-## Broker pool core (Plan 001 P2.2, not activated)178+## Broker connection pool
179 179
180 `internal/usecase/broker.Pool` owns bounded physical keys and logical stream180 `internal/usecase/broker.Pool` owns bounded physical keys and logical stream
181 reservations, but no session data or traffic queues. Local and registered remote181 reservations, but no session data or traffic queues. Local and registered remote
@@ -200,16 +200,20 @@ and are canceled when their final reservation leaves. Acquisition coalescing
200 keys on the exact policy plus the explicit `BrokerDaemonStartMode`, so an200 keys on the exact policy plus the explicit `BrokerDaemonStartMode`, so an
201 existing-only request is never shared with a dial that may start the target;201 existing-only request is never shared with a dial that may start the target;
202 after authentication the canonical key is identity plus exact policy alone.202 after authentication the canonical key is identity plus exact policy alone.
203-Physical retirement keeps its key occupied until Close finishes. Fake-clock idle203+Physical retirement keeps its key occupied until Close finishes. The pool keeps
204-eviction and shutdown close transports outside the bookkeeping lock.204+at most eight idle physical transports warm by default, including connections
205+established by a first successful probe. `warmTransports: 0` disables warm
206+reuse; `warmIdleTimeout` defaults to `off` and may set an idle deadline.
207+Broker shutdown always closes warm transports. Fake-clock idle eviction and
208+shutdown close transports outside the bookkeeping lock.
205 209
206 Logical and physical ports expose terminal signals independent of message reads.210 Logical and physical ports expose terminal signals independent of message reads.
207 A stream terminal failure releases only its reservation; physical failure fans211 A stream terminal failure releases only its reservation; physical failure fans
208 out separately scoped typed loss errors. The pool owns neither framing nor212 out separately scoped typed loss errors. The pool owns neither framing nor
209-fairness: future transport adapters must implement independently bounded queues213+fairness: transport adapters implement independently bounded queues and
210-and prompt cancellation/Close. Shutdown joins owned operations and relies on214+prompt cancellation/Close. Shutdown joins owned operations and relies on
211-that explicit port contract. No production composition or real multiplexing is215+that explicit port contract. Production clients use this pool for local and
212-introduced here, and existing production connectivity ownership is unchanged.216+remote logical streams.
213 217
214 Physical `Done` is authoritative: adapters publish stable `Err` and218 Physical `Done` is authoritative: adapters publish stable `Err` and
215 `FailureKind`, then close physical `Done` before terminating affected logical219 `FailureKind`, then close physical `Done` before terminating affected logical

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close