security: reject timeout-policy subclasses on the current policy stack - #220
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 |
|
@coderabbitai review Please review exact head |
|
Please perform a fresh exact-head semantic review of |
Rate Limit Exceeded
|
|
@cwl-noema-review Please independently review exact head |
Purpose
Reconstruct the unique exact
EgressTimeoutPolicytype boundary from stale/diverged Draft #158 on the current policy stack without transferring historical merge evidence.This PR is intentionally stacked on #204 because both lanes modify
src/egressweave/policy.py. Serializing them avoids parallel writers and lets the timeout boundary inherit the exact HTTP-method integrity tree rather than racing it.Exact stack identity
mainancestor:7faf7a3b8a47980113982914000e724ab6a6cda5;ab51ef1725bd20c898a3e3df82994b576e675e7b;a460ca5927c19ae593d70e508e7829dd772252ec;0b72ac4bd946f7a4aa4d6668f701859e03e45cdb;b0e9b43d4b3c8701e8b6af7a93f1e82a0e9030c7;496d81709ad63be6b921510c447e7d2393daed96.Test-first evidence
The RED-only head added two regressions requiring both public policy constructors to reject an
EgressTimeoutPolicysubclass before a later transport can dynamically dispatch an overriddenas_httpcore_timeout()implementation.Hosted CI run
31783324371failed on every Python 3.10–3.14 lane exactly because both new tests reportedDID NOT RAISE TypeError; the Python 3.14 lane otherwise had 1,032 passing tests.The minimal GREEN change replaces the subclass-accepting
isinstance(...)check with an exact-type boundary. Follow-up commits document the pre-1.0 compatibility narrowing and add a documentation contract requiring the threat and migration path to remain explicit.Implemented boundary
EgressTimeoutPolicydataclass type during trustedEgressPolicyconstruction;Exact-head verification
Exact head:
b0e9b43d4b3c8701e8b6af7a93f1e82a0e9030c7main.Merge contract
Keep Draft behind #204. Historical #158 checks, reviews, base identity, and mergeability are not acceptance evidence for this branch. Do not merge until:
Progresses #113. Supersedes #158 only after dependent #182 is safely retargeted to this replacement and #158 is closed as historical predecessor.