Skip to content

test(destination): lock exact proxy, redirect, and freshness bounds - #335

Open
seonghobae wants to merge 3 commits into
mainfrom
test/destination-policy-bounds
Open

seonghobae wants to merge 3 commits into
mainfrom
test/destination-policy-bounds

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Destination tests now accept the exact maximum proxy and PAC authority sets and still reject a set that exceeds those ceilings.
  • The redirect guard walks every hop at the maximum hop budget and continues to reject a downgrade, a cycle, and an extra hop.
  • Freshness checks stay fail-closed at the published validity bounds.

Test plan

  • cargo test -p originweave-destination --offline (40 passed)
  • cargo fmt -p originweave-destination -- --check

Summary by CodeRabbit

  • 테스트
    • 프록시 서버 32개와 PAC 출처 16개의 허용 한도, 한도 초과 및 미등록 항목 거부를 검증했습니다.
    • 리디렉션은 20홉까지 허용하고 21번째 홉은 거부하는지 확인했습니다.
    • 해석 정보 유효 기간의 경계값, 만료 시각 계산 및 관련 오류 메시지를 검증했습니다.
    • 기본 포트가 명시된 HTTPS IPv6 프록시 주소의 파싱 결과를 확인했습니다.
  • 문서
    • 프록시·PAC 경로 정책과 리디렉션 한도에 대한 회귀 테스트 기준을 테스트 전략에 추가했습니다.

Exact-head redirect oracle repair — October 4, 2026

  • Current head: aa5cdf6cb8e322a4b7648886c7c6d9c48171858b; parent: 9d0cd1fe706852f5645277fe24ff352be5529bd5; complete reviewed tree: 931fd9b01cfe6af2bf8f83b367ca3700529e7f3d.
  • Increment: only the existing redirect tests, CHANGELOG.md, and docs/TEST_STRATEGY.md. Production policy, public APIs, workflow source, and verification gates are unchanged.
  • The old constant-derived seven-test suite admitted both synthetic ceiling changes to 19 and 21. The repaired literal 20/21 oracles reject each same mutation with six passes and one intended failure; restored production passes all seven. This is a test-sensitivity correction, not an observed production defect.
  • Independent complete eight-file source review: PASS, report SHA-256 aac549f646e3231f685b079076f8f99d3d22a714abe0a5998036bcdd6570e56f. This local source verdict is not a counted GitHub approval.
  • Fresh verification executed in the clean committed checkout: all nine gates passed; 279 Rust tests, zero failed/ignored; 152 Python tests; production functions, lines, regions and branches each 100%. Coverage SHA-256 246170ac47f33be4cb6074ba34436ef95849431f9bfda9a8a94b96da2cb66802.
  • Normal non-force push completed and current remote branch / PR head equality verified. Initial lagging pull ref was retained and later confirmed equal; the push was not repeated.
  • Current exact-head CI run 37170158892 (Rust contracts / Production coverage) and dynamic CodeQL Code Quality run 37170156692 failed before execution: authenticated CheckRun annotations state account locked due to billing. Local passes do not replace hosted acceptance.
  • Formal reviews: none at the observed head; merge not performed. Required hosted/security/review/branch-protection gates remain open; no payment, credentials, runner ACL/group changes or blind rerun was performed.

Evidence: fleet/originweave-pr335-redirect-literal-repair-20261004/ under the existing absolute fleet report root.

Destination policy now has executable evidence for the maximum proxy and
PAC authority sets, a full walk of the maximum redirect hop budget, and
freshness limits that stay fail-closed at the published ceilings.
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0e922255-c298-4a20-ba08-5e44059ae7d9
📥 Commits

Reviewing files that changed from the base of the PR and between 9d0cd1f and aa5cdf6.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • crates/originweave-destination/tests/redirect_policy.rs
  • docs/TEST_STRATEGY.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGELOG.md
  • docs/TEST_STRATEGY.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

프록시/PAC 권한 한도와 목적지 정책의 시간 경계값을 검증하는 회귀 테스트를 추가했습니다. 테스트 문서와 변경 로그도 갱신했습니다. 프로덕션 경로 정책과 네트워크 권한은 변경하지 않았습니다.

Changes

정책 경계값 테스트

Layer / File(s) Summary
프록시/PAC 경로 계약 및 권한 한도
crates/originweave-destination/tests/proxy_authority_literal_bounds.rs, crates/originweave-destination/tests/proxy_route_policy.rs, crates/originweave-destination/tests/proxy_server_identity.rs, docs/TEST_STRATEGY.md, CHANGELOG.md
프록시 32개와 PAC origin 16개의 승인을 확인합니다. 목록에 없는 항목과 한도를 초과한 입력의 거부, 경로 메타데이터, HTTPS IPv6 주소의 기본 포트 정규화도 검사합니다. 테스트 전략과 변경 로그에 관련 경계값 검증을 기록합니다.
목적지 시간 경계값 및 오류 표시
crates/originweave-destination/tests/redirect_policy.rs, crates/originweave-destination/tests/resolution_freshness.rs, crates/originweave-destination/tests/error_contract.rs, docs/TEST_STRATEGY.md
정확히 20개의 리다이렉트 홉과 최대 해석 유효 기간을 검증합니다. 0 또는 오버플로하는 유효 기간, 승인 시각 전 사용, 유효 종료 시각과 같은 시각의 사용에 대한 오류 문자열도 확인합니다. 테스트 전략은 검증 범위를 설명합니다.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to aa5cd

This PR adds regression tests and documentation without changing runtime policy; no concrete merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 6 files. (2 skipped: 2 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 프록시, 리다이렉트, 유효 기간의 정확한 한도 검증을 추가하는 변경의 핵심을 구체적이고 간결하게 요약합니다.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant