Repository navigation
feat: complete bounded TLS client/server streams - #3
Joshua Tenner (jtenner) wants to merge 18 commits into
Conversation
138411c to
0607e37
Compare
eddbfa6 to
5b5177f
Compare
5b5177f to
8b9c944
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b9c9445b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
| if uint64(profile.maxClientSessionBytes) > MaximumAggregateRetainedBytes-sessionBytes { | ||
| return nil, ErrInvalidProfile | ||
| } | ||
| sessionBytes += uint64(profile.maxClientSessionBytes) |
There was a problem hiding this comment.
Include stream storage in the aggregate session-cache bound
When session resumption is enabled on multiple profiles, this check allows the caches alone to reserve the entire 64 MiB aggregate retention budget without accounting for stream and listener storage. For example, sixteen profiles with 4 MiB caches pass this check alongside the default stream configuration, although their combined retention exceeds MaximumAggregateRetainedBytes. The backend repeats the separate cache-only and stream-only checks, so it does not reject this configuration either. Validate the checked sum of cache capacities and the storage plan's TotalBytes against the aggregate ceiling.
Useful? React with 👍 / 👎.
Goal
Complete the bounded standard-Go TLS client/server stream and listener foundation while preserving the existing outbound release-readiness work. HTTP, HTTPS, and a portable TinyGo cryptographic TLS engine are explicitly outside this checkpoint.
This is a stacked draft on top of
agent/tls-release-readiness. It must not be merged or described as completing the broader TLS/HTTPS/TinyGo grid.Published state
agent/tls-full-grideddbfa6agent/tls-release-readinessat138411c76158704b80bc4e930acdfa048d8ee9ec30184215804passed every required check for headeddbfa6on July 26, 202630179421788passed every required check for head634d471on July 25, 2026No existing commits were amended, squashed, reordered, force-pushed, or otherwise rewritten.
What changed
tls.Config.Timecallbacks with immutabletls.ValidationTime; nonnil clock callbacks are rejected before profile publicationcrypto.Signercallbacks are rejected because they cannot be deterministically canceledconnection_info_v1compatibility: offset 68 remains a boolean resumed value of exactly 0 or 1connection_info_v2role and peer-authentication flags without exposing certificate chains or private keystls.AllowListeners()authority separately from server-profile storage; raw-TCP authority is never implied and applicable raw-TCP denies still constrain private listenerslisten/acceptwago_net_tlsto 14 imports: additiveconnection_info_v2plus a fixed 32-byte RFC 9266channel_binding; accepted streams use the bounded handshake, read, write, shutdown, metadata, channel-binding, close, and poll operationsclose_notify, abrupt truncation, listener reuse, quota/lease release, close/accept races, and namespace teardown29757140541, job88402308965, by pumping the final TLS 1.3 client flight before waiting for the peer handshake[new, old]to[new]rotationtls-exporterchannel binding; exporter label, context, and length are not guest-selectableTryFinishConnectafter TLS has started; this preserves abrupt EOF forcrypto/tlstruncation classification rather than allowing a retired TCP stream to surface a later connection-refused resultCommits added in this completion pass
ba8b247— fix: flush the final TLS client handshake flight0a29624— fix: preserve TLS connection info v1 ABIf5184e6— feat: require explicit TLS listener authoritybeac180— test: exercise live TLS client server lifecycle0acb287— docs: record TLS server foundation evidenced1e87c7— test: preserve TLS metadata output atomicitya99aa77— docs: record final TLS signoff target counte40fb5e— fix: harden TLS cloning and DHCP leases27a766f— ci: bound TinyGo package hangs2f9c2e5— feat: add bounded TLS session resumption634d471— feat: expose fixed TLS channel binding1d0ebcc— fix: bound TLS profile callbacks530b011— test: certify bounded TLS certificate rotation06b2514— fix: retain established TLS transport stateeddbfa6— docs: describe bidirectional TLS authorityThe earlier PR commits
35b2fcfand52c9d8dremain unchanged and in their original order.Local validation
Passed on the current head:
go test ./...go test -shuffle=on -count=1 ./...go vet ./...internal/namespace/tlstargeted tests; the exact five real-TLS packages remain standard-Go-onlyinternal/backend/gotlsandinternal/backend/lneto/tls; the public TLS package remains blocked only by the accepted pinned-Wagoruntime.HostCtrlFrameBytesdiagnosticCurrent hosted run
30184215804completed the full exact 123-package TinyGo-supported matrix in 37m39s and passed custom test/shuffle/vet/source-boundary, race, standard-Go TLS signoff, and checkptr/386 jobs. Prior retained evidence also covers custom CLI inspection and the four-binary arm64 cross-build.Hosted CI note
Run
30183264224on intermediate head530b011found one shuffle-only lifecycle race: after the raw TCP peer half-closed without TLSclose_notify, a laterTryFinishConnectrecheck could observe the retired TCP stream before the TLS engine consumed EOF, returning connection-refused instead of TLS protocol truncation. Commit06b2514caches the successful transport-establishment transition, adds client/server regression transports that fail any second finish-connect call, passes focused race tests, and passes 500 consecutive live truncation runs. Replacement run30184215804passed every required check after the follow-up comment-only authority correction ineddbfa6.Explicitly incomplete
TLS remains granular-only and outside aggregate
register. No insecure TinyGo stub, plaintext shim, or device-offload-only substitution is included or claimed.2026-11-02 restack
Rebased onto PR #2 head
dd08034bb40e8acf5682450eceda9ad15332f35d; current head is8b9c9445b08eb510788199d40285f9c971014505. The TLS import/inspection path is ported to the current Wago plugin runtime and Wago90f2b57dafa7f8c3cc7e3aca38b91148f15e1d1e. Current TLS signoff resolves 164 targets across 17 package runs. Full ordinary, shuffle, vet, source-boundary, race, checkptr, backend-neutral 386,wagodebug,wago_regalloccheck, and three-mode benchmark-compilation gates passed locally. A local TinyGo 0.43.0/Go 1.27.3 run proved real progress past the prior 90-second stop: the root aggregate and the first ten additional supported packages passed before the non-authoritative run was ended to continue restacking; exact hosted TinyGo 0.41.1/Go 1.24.4 evidence remains CI-owned. July benchmark results remain historical; no benchmark timing was executed during this restack. Rewritten commits are unsigned because no desktop signing agent was available.