Skip to content

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

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

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

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Purpose

Canonical non-destructive reconstruction of issue #9 / historical PR #11: one bounded reusable originweave-http HTTP/1.1 authority over an existing authenticated TLS stream, with strict framing, resource budgets, integrity/MIME/disposition evidence, realistic loopback tests, ADRs, and current repository quality contracts.

Implemented boundary

The branch supports one bounded HTTP/1.1 GET or HEAD exchange over AuthenticatedTlsConnection; it performs no DNS, reconnect, proxy/PAC, browser control, cookie persistence, file persistence, or model call. It enforces RFC 9110/9112 framing, bounded headers/body/chunks/trailers/interim responses/decoding/deadline, gzip/zlib decoding, RFC 9530 digest validation, conservative MIME/no-sniff/disposition handling, redirect evidence without automatic follow, and credential-safe immutable evidence.

Historical custom coverage-verifier machinery was intentionally not replayed because protected main owns the current exact-coverage pipeline. Historical HTTP ADRs were reconstructed as 0011/0012 on this lineage.

Current exact state

Protected main is 0841d2ab3d8b5e60a03c0a8e818cf438e2716829. Current exact contributor head is 097e51ef1f0a945b7ec5668fa16254222535effc. GitHub reports the PR open, Ready, and mergeable.

The latest repair removed a duplicated MIME-classification facade and restored one canonical classifier boundary. The canonical HTML signature test now follows the current WHATWG MIME Sniffing table: every listed HTML signature is recognized only when its next byte is ASCII space (0x20) or > (0x3e). Prefixes such as <htmlx>, <scriptx>, <article> via the short <a signature, and signatures followed by HT/LF/FF/CR therefore remain plain text rather than being promoted to text/html. The repair also removed the stale mime_checked.rs source that violated the repository's expected HTTP source inventory.

Test-first lineage for the latest repair

  • Pre-repair head e20de068e47e0c04bfd357c830255624c2850d86 had two verified defects: repository governance rejected the unregistered mime_checked.rs source, and the MIME facade/raw classifier duplicated incompatible HTML-signature termination rules.
  • RED commit 2a47bdee4326db85ef7fccf5d44609bbb4b60816 added mime_tag_termination_contract.rs, covering all 17 classifier signatures, valid SP/> termination, invalid no-next/x/HT/LF/FF/CR next bytes, and a BOM+whitespace <htmlx> false-positive regression. CI run 32161410185 reached the intended classifier boundary with two RED failures while repository governance still rejected mime_checked.rs.
  • Production commit 94849f6d7ac181e2f306f044dfe0909a5a36d9f9 restored direct mod mime, deleted mime_checked.rs, and enforced the terminator rule in the canonical looks_like_html implementation.
  • Formatting commit 2ac59cb4222be01137452b95c903a38217aecdf3 made the new test canonical-rustfmt clean. Its exact CI then exposed only one strict-Clippy style defect (byte-char-slices) in the new regression test.
  • Current commit 097e51ef1f0a945b7ec5668fa16254222535effc applies the narrow Clippy repair using *b" >" without changing the classifier contract.

No predecessor-head check, review, or status transfers to this head.

Exact-current native evidence

On unchanged exact head 097e51ef1f0a945b7ec5668fa16254222535effc:

  • native CI run 32162472018: success;
  • Rust contracts job 95794313131: repository contracts, canonical formatting, workspace/all-target checks, full tests, strict Clippy, and API documentation success;
  • Production coverage job 95794313050: exact owned-production function/line/region/branch measurement and enforcement success;
  • current inline review threads: all returned threads resolved; and
  • GitHub mergeability: mergeable.

Security Scan run 32162472028 and SAST Semgrep run 32162472085 are currently queued on this exact head. Queued evidence is non-passing and is not represented as success. The branch must remain unchanged while those transient lanes execute unless an exact-current failure identifies an OriginWeave-owned defect.

Current formal-review state

The latest returned formal OpenCode CHANGES_REQUESTED reviews are anchored to predecessor heads, including c95542a3d6799c55850fcbdd70ed56bd668ed783, not current head 097e51ef1f0a945b7ec5668fa16254222535effc. They are therefore stale evidence for this head. Their reported cause was the read-only central .github coverage-evidence path, already tracked in the existing owner lane ContextualWisdomLab/.github#1056, not a proven current OriginWeave source failure.

A current-head qualifying independent approval/latest-push approval must still come through live organization governance. Passing CI, coverage, scanners, model reviews, comments, or author activity are not approval.

Governance / integration boundary

Protected-main AGENTS.md prohibits this scheduled writer from merging, self-approving, tagging, publishing, altering workflows, adding secrets, or weakening checks. Issue #9 remains open until the canonical replacement is integrated through an authorized path and protected-main acceptance is freshly re-established. Historical PR #11 remains lineage-only until its unique valuable delta is proven preserved, integrated, or explicitly rejected.

@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 크레이트 재구축을 정확하고 간결하게 설명합니다.
✨ 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

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 89b761031e24f5202958aa6785763ad0bbac751e.

  • Head SHA: 89b761031e24f5202958aa6785763ad0bbac751e

  • Workflow run: 32003668784

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: ci.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (42 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (42 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs (10 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (10 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (3 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (3 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head b686685075bfd0573fd58198776cdfca7084be35.

  • Head SHA: b686685075bfd0573fd58198776cdfca7084be35

  • Workflow run: 32107539057

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: ci.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (42 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (42 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs (10 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (10 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (3 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (3 files)"]
  R4 --> V4["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Fresh exact-head review requested for b686685075bfd0573fd58198776cdfca7084be35 after the central coverage dependency repair ContextualWisdomLab/.github@092df969f71c7afc56dd9ab2662b016ad40696c8 (#1116), which replaced the releases.astral.sh uv sink that returned HTTP 403 with the pinned official GitHub Releases path. The current formal CHANGES_REQUESTED on this exact head came from central run 32107539057 before that repair and cites only coverage-evidence failure. OriginWeave-native exact-head CI 32105543794, Security Scan 32105543786, and SAST Semgrep 32105543843 are completed success; all current inline review threads are resolved. Re-evaluate this unchanged exact head from fresh central trusted-source state. Do not transfer predecessor evidence or treat statuses/model output as approval; preserve fail-closed coverage and review semantics.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head c95542a3d6799c55850fcbdd70ed56bd668ed783.

  • Head SHA: c95542a3d6799c55850fcbdd70ed56bd668ed783

  • Workflow run: 32132748096

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: ci.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (44 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (44 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs (10 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (10 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (3 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (3 files)"]
  R4 --> V4["targeted test run"]
Loading

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