fix(network): recheck resolution freshness at socket use - #54
Draft
seonghobae wants to merge 8 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks 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 |
This was referenced Aug 10, 2026
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.
Follow-up to #50 / #47.
Buyer/security gap
The stacked prerequisite #50 removes the ordinary public untimed planning bypass, but its
FreshConnectionPlan::newchecks resolution freshness only when the plan is created. A caller could authorize a plan inside the validity window, delay, and then invoke socket I/O after that authority expired. That preserves a plan-to-connect TOCTOU gap unless freshness is rechecked at actual socket use.TDD and implemented boundary
The original test-only line established the missing immediate-use boundary before production support. The implementation then:
FreshResolutionSnapshotand socket authority inside the single-use plan;connect_at(current_time)so authority-bearing callers re-run destination freshness immediately before socket I/O under the same trusted monotonic clock domain;DestinationError::ResolutionApprovalExpired/ResolutionUseBeforeApprovaloutcomes throughNetworkError::DestinationNotApproved;connect()only as a fail-closed compatibility surface backed by a process-local monotonicInstant, preventing delayed replay of stale plans; andNo DNS lookup, hostname reconnect, ambient proxy/PAC, or wall-clock authority is added.
Live dependency alignment
PR #50 is now at exact head
3f7fe102951a6d5b224b36097d40216cec37b5d9. This branch is already non-destructively aligned to that exact prerequisite: current base metadata is #50 head3f7fe102951a6d5b224b36097d40216cec37b5d9, current contributor head is8030c6d843a0f860b465c15b06c822d4c9b47831, and a fresh exact compare reports ahead 8 / behind 0 with merge base equal to the live prerequisite.The current semantic delta relative to #50 is only two files:
crates/originweave-network/src/fresh_connection.rsandcrates/originweave-network/tests/fresh_resolution_plan.rs. Earlier references to prerequisite135851a6050fdc658c111f3256c8f6b55c63c602and contributor8b8a5b443ad4620613b79f381db3fbe4d5a5f994are historical lineage only; they are not current base/head proof.Current exact-head evidence
On unchanged exact head
8030c6d843a0f860b465c15b06c822d4c9b47831against exact prerequisite3f7fe102951a6d5b224b36097d40216cec37b5d9:31980345148: success;95245964858: success, including repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc;95245964907: success, including exact owned-production function/line/region/branch enforcement;Security/SAST/central review workflows were not produced for this Draft stacked base and are therefore absent, not represented as passing evidence. No predecessor-head, prerequisite-head, skipped, queued, cancelled, synthetic-merge, status-only, or model-only evidence is promoted as current proof.
Scope / governance boundary
No resolver adapter, DNS lookup, wall-clock clock source, proxy/PAC, TLS policy change, HTTP, browser control, persistence, secret, model call, workflow mutation, or release claim is introduced. The explicit path still requires one caller-owned trusted monotonic clock domain; the compatibility path uses a process-local monotonic elapsed-time anchor only to prevent stale replay.
Keep Draft while #50 and #47 remain active. No prerequisite check, review, mergeability, or approval evidence transfers. Passing automation is not independent approval. The active organization ruleset requires one independent approving review, dismissal of stale reviews after pushes, latest-push approval, and resolved review threads for protected-main integration; no bypass actors are configured. The scheduled actor does not merge, self-approve, alter workflows, weaken checks, add secrets, tag, or publish.