Skip to content

feat(http): rebuild bounded HTTP/1.1 authority on current main - #37

Open
seonghobae wants to merge 69 commits into
mainfrom
feat/http11-semantics-main
Open

feat(http): rebuild bounded HTTP/1.1 authority on current main#37
seonghobae wants to merge 69 commits into
mainfrom
feat/http11-semantics-main

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Purpose

Complete the non-destructive reconstruction of issue #9 / historical PR #11 on current protected-main lineage. The replacement restores the bounded originweave-http production crate, realistic integration tests, governing ADR/doctoring, and current workspace/governance contracts without replaying obsolete branch-specific coverage machinery or overwriting protected-main network/TLS/proxy/sensitive-data/resource/extension/governance work.

Reconstruction evidence

The replacement preserves the predecessor's production HTTP semantics while adopting current-main contracts rather than stale branch history. Representative high-risk modules preserve the reconstructed semantics for chunked transfer/trailers, content decoding, exchange orchestration, message framing, RFC 9530 integrity, request serialization, response-head parsing and bounded MIME/disposition handling. Historical changes to the old custom coverage verifier were not replayed because protected main now owns the canonical exact-coverage pipeline.

The replacement also repaired the historical Cargo.lock checksum divergence for cpufeatures 0.2.17 rather than bypassing locked dependency verification.

Product boundary

  • one HTTP/1.1 GET or HEAD exchange over an existing authenticated AuthenticatedTlsConnection;
  • no DNS, reconnect, ambient proxy/PAC, browser control, cookie jar, file persistence, or model call;
  • strict RFC 9110/9112 status/header/framing semantics and no automatic redirect follow;
  • bounded request/header/body/chunk/trailer/interim/decode/deadline resources, including cumulative response-head wire-budget enforcement;
  • bounded gzip and zlib-deflate decoding;
  • RFC 9530 SHA-256/SHA-512 digest validation;
  • conservative MIME, no-sniff, disposition, and redirect metadata;
  • immutable credential-free evidence;
  • realistic loopback TLS integration and fail-closed transport/error behavior.

Latest RCA and exact-head evidence

A later cumulative-final-head-budget contract moved the test module declaration in crates/originweave-http/src/lib.rs; exact head a6e7a64158e96d707cf0797f6f9b2bacc20420e9 retained 100% production coverage and passed Security/SAST, but CI run 31361870383 failed only at cargo fmt --all --check. Rustfmt required mod field; to precede the cfg-gated final_head_budget_contract declaration.

Current exact head a38980683f073c8df8bebb8d674efaca4cf3e66d applies exactly that canonical module ordering. Against unchanged protected main 67af7c87589edc2039545af335c95064d9b8391c:

  • CI run 31364041997: success;
  • exact production function/line/region/branch coverage: success;
  • Security Scan run 31364041741: success;
  • SAST Semgrep run 31364041727: success;
  • CodeRabbit exact-head commit status: success;
  • all returned inline review threads are resolved; and
  • GitHub reports the PR mergeable against live protected main.

No predecessor-head check, review, or mergeability result is transferred to this exact head.

Supersession

After this replacement reaches protected main and protected-main acceptance is re-established, historical PR #11 can be closed as superseded by this clean current-lineage reconstruction. Historical predecessor checks/reviews are not reused as merge authority.

Closes #9 only after protected integration.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

Bounded HTTP/1.1 교환

Layer / File(s) Summary
정책 및 요청 계약
Cargo.toml, crates/originweave-http/Cargo.toml, crates/originweave-http/src/{error,policy,request,target,field}.rs
워크스페이스에 originweave-http를 추가했습니다. 요청 대상, 필드, 메서드, 정책 제한 및 구조화된 HttpError를 구현했습니다.
응답 파싱 및 본문 디코딩
crates/originweave-http/src/{response_head,framing,chunked,content}.rs
엄격한 HTTP 응답 헤드와 본문 framing을 추가했습니다. chunked/trailer 파싱과 identity·gzip·deflate 디코딩에 제한을 적용했습니다.
무결성 및 응답 메타데이터
crates/originweave-http/src/{integrity,mime,disposition}.rs
SHA-256·SHA-512 digest 검증, MIME 분류, 안전한 파일명 검증 및 redirect 메타데이터 처리를 추가했습니다.
TLS 교환 오케스트레이션
crates/originweave-http/src/{exchange,evidence,lib}.rs
인증된 TLS 연결에서 단일 HTTP/1.1 교환을 실행하고, deadline·ALPN·framing·디코딩·메타데이터와 불변 증거를 처리했습니다.
통합 검증 및 거버넌스
crates/originweave-http/src/tests/*, crates/originweave-http/tests/*, tests/*, docs/adr/*, docs/doctoring/*, docs/superpowers/*
계약 테스트, loopback TLS 통합 테스트, 회귀 테스트, ADR, 설계 문서 및 저장소 거버넌스 검사를 추가했습니다.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related PRs

  • ContextualWisdomLab/OriginWeave#5: HttpExchangePlan이 인증된 TLS 연결과 TCP 연결 모델의 전송·피어 증거를 사용하므로 관련성이 있습니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning #9의 핵심 구현과 테스트는 포함되지만, Mermaid 흐름도와 정확한 100% 프로덕션 커버리지 근거는 변경 요약에서 확인되지 않습니다. #9의 Mermaid 아키텍처 흐름도를 추가하고, 프로덕션 코드 100% 커버리지를 입증하는 설정과 검증 근거를 포함하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed 변경 사항은 HTTP 구현, 테스트, 관련 문서, 거버넌스 및 CI 개선으로 PR 목표와 #9의 범위에 있습니다.
Docstring Coverage ✅ Passed Docstring coverage is 80.73% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 bounded HTTP/1.1 구현을 재구축하는 PR의 핵심 변경을 정확히 요약하며, 간결하고 구체적입니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/http11-semantics-main

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.

@seonghobae seonghobae changed the title feat(http): rebuild HTTP/1.1 authority on current main feat(http): rebuild bounded HTTP/1.1 authority on current main Aug 9, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 9, 2026 18:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/adr/0011-bounded-http11-semantics.md`:
- Line 128: Update the RFC 9651 reference in the ADR bibliography to list M.
Nottingham and P-H. Kamp as the authors, replacing L. Pardue while preserving
the existing APA 7 formatting and citation details.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 309012b3-0507-4ad0-a120-79860db60d68

📥 Commits

Reviewing files that changed from the base of the PR and between 68eb12e and 4ae4168.

📒 Files selected for processing (8)
  • crates/originweave-http/src/exchange.rs
  • crates/originweave-http/src/integrity.rs
  • crates/originweave-http/src/response_head.rs
  • crates/originweave-http/tests/response_failure_regressions.rs
  • docs/adr/0011-bounded-http11-semantics.md
  • docs/doctoring/http11-security-evidence.md
  • docs/superpowers/plans/2026-08-07-http11-semantics.md
  • docs/superpowers/specs/2026-08-07-http11-semantics-design.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • docs/doctoring/http11-security-evidence.md
  • crates/originweave-http/src/response_head.rs
  • docs/superpowers/plans/2026-08-07-http11-semantics.md
  • crates/originweave-http/src/exchange.rs
  • crates/originweave-http/src/integrity.rs

Comment thread docs/adr/0011-bounded-http11-semantics.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 95: Update the workflow step containing the `cargo llvm-cov report | tee
missing-lines.txt` pipeline to enable pipefail before running it, ensuring
failures from `cargo llvm-cov report` propagate instead of being masked by
`tee`.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db50be84-103e-4454-aec3-105b7dd2e9e6

📥 Commits

Reviewing files that changed from the base of the PR and between 695a023 and 6c3eec0.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • crates/originweave-http/src/integrity.rs
  • crates/originweave-http/src/lib.rs
  • crates/originweave-http/src/tests/no_content_integrity_contract.rs
  • crates/originweave-http/src/tests/response_debug_runtime_contract.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • crates/originweave-http/src/tests/no_content_integrity_contract.rs
  • crates/originweave-http/src/lib.rs
  • crates/originweave-http/src/integrity.rs

Comment thread .github/workflows/ci.yml Outdated
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.

[Product Gap] Bound HTTP/1.1 semantics over the authenticated TLS stream

1 participant