fix(network): bind socket port to canonical origin - #167
Draft
seonghobae wants to merge 51 commits into
Draft
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merge the current socket-use freshness prerequisite without changing the bounded origin-port contribution. Signed-off-by: Seongho Bae <me@seonghobae.me>
Restore the workspace TLS fixtures after the socket-use API split while preserving the explicit trusted-time authority path. Signed-off-by: Seongho Bae <me@seonghobae.me>
Merge the repaired socket-use freshness prerequisite and retain the stricter combined changelog contract. Signed-off-by: Seongho Bae <me@seonghobae.me>
Merge the current open planning prerequisite so the origin-port slice no longer depends on a closed intermediate pull request. Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae
changed the base branch from
feat/socket-use-resolution-freshness
to
feat/network-consume-resolution-freshness
September 4, 2026 13:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial hardening of the direct-network authority stack, stacked on exact PR #54 head
8030c6d843a0f860b465c15b06c822d4c9b47831.Buyer/security and reliability gaps
A fresh resolution approves an exact address, not every service port on that address.
FreshConnectionPlantherefore binds the requested socket port to the canonical origin's effective HTTP/HTTPS port. The branch also closes adjacent input-ordering and freshness-timing defects:InvalidPort, not an unrelated origin-port authority failure;connect()path anchors elapsed monotonic time at the start of plan authorization, so time spent completing plan construction cannot be omitted from the freshness budget.Live dependency alignment
Current exact prerequisite #50 head is
44c9fef65a009c814266b03fe07116449b616420. Current exact contributor head is14cd1bdbae7462b18ec5bfa2b453f32851e9b9c6.Fresh exact compare reports ahead 51 / behind 0, with merge base exactly the live prerequisite. GitHub reports the PR open, Draft, and mergeable. Keep Draft while #50 remains active. Closed PR #54 is no longer a dependency; its socket-use freshness behavior is absorbed here on top of #50. No prerequisite check, review, mergeability, coverage, or approval evidence transfers.
Test-first RCA and repair lineage
0d0fbba7fc42d31cc3b2b0d8f6f9d2eab742b968proved the prior wrongOriginPortMismatchclassification in CI31939622147.8d27a44b4e9f2cc206f45d31016f9853c2ce7f75proved malformed timeout/attempt inputs were being masked by unrelated authority decisions in CI31940046251.Instant, deliberately consumes more than the resolution validity interval before plan completion, and requiresconnect()to fail asDestinationError::ResolutionApprovalExpiredbefore socket I/O.32068058981then exposed only strict-Clippy defects in that new regression (for_loops_over_fallibles). Subsequent repair exposed canonical rustfmt drift, and workspace policy also forbids testpanic!. The current test uses anOptionerror-source chain with no panic/catch-all suppression, preserving the typed destination error proof.No production gate, freshness limit, timeout limit, attempt limit, or fail-closed behavior was weakened.
Current restack evidence
On exact current head
14cd1bdbae7462b18ec5bfa2b453f32851e9b9c6against exact prerequisite44c9fef65a009c814266b03fe07116449b616420:cargo test --locked --workspace --all-features: the complete Rust workspace and doctests passed;Exact-head CI for this restack is pending. The prior head's successful CI is historical evidence only and is not promoted as current proof. Security/SAST/central/model workflows absent from this stacked Draft are not passing evidence. No predecessor-head, prerequisite-head, queued, cancelled, stale, synthetic, status-only, or model-only result is promoted as current proof.
Truth boundary
This slice is deterministic fresh-resolution/direct-socket plan admission and immediate-use hardening. It performs no DNS lookup, hostname reconnect, TLS/HTTP exchange, proxy/PAC selection, browser control, persistence, secret/model work, or release action. Later integrated paths must still compose trusted resolution, exact peer verification, TLS identity, HTTP authority, browser policy, typed action, and observed post-condition evidence.
Passing automation is not independent approval. This scheduled actor does not merge, self-approve, alter workflows, add secrets, weaken checks, tag, or publish.