Skip to content

fix(core): expose standard origin error contract - #164

Draft
seonghobae wants to merge 8 commits into
mainfrom
fix/core-origin-error-contract
Draft

seonghobae wants to merge 8 commits into
mainfrom
fix/core-origin-error-contract

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Buyer/API gap

Origin::parse is a foundational trust-boundary API, but protected main does not yet expose public OriginError through Rust's standard Display / std::error::Error contract. This PR adds exhaustive credential-free Display, std::error::Error, and focused regression coverage without changing origin parsing or authority semantics.

Test-first lineage

The original test-only head established the semantic RED: OriginError did not implement the standard error contract. Production then added deterministic messages for every existing variant and source() == None; formatting-only follow-up preserved canonical rustfmt. Historical checks/reviews remain predecessor evidence only.

Current protected-main topology — 2026-09-24 KST

Protected main is exact 87c4daa1830bac5a5228b6036752ad5633232085. Current exact head is d8bdd5100442d1ef349f7cab0b47a05ff52b7328, open / Draft / mergeable.

This head is a normal non-force two-parent reconciliation commit. Its first parent is the previous #164 head 12438c3a9171f44c1b18219478a2ec367cb78696; its second parent is current protected main 87c4daa.... The merge tree starts from protected main and reapplies only the three validated #164 product blobs.

Fresh compare from current protected main is 8 ahead / 0 behind, with merge base exactly 87c4daa.... The effective PR delta remains exactly three paths:

  • CHANGELOG.md;
  • crates/originweave-core/src/lib.rs; and
  • crates/originweave-core/tests/origin_error_contract.rs.

There is no effective .github/**, dependency, browser/network/policy authority, secret, ruleset, or coverage-denominator delta. The protected CI/MV3 lifecycle generation was adopted rather than overwritten.

Exact-current Ready-transition RED

After reconciliation, this exact head was marked Ready specifically to reacquire hosted exact-head evidence. The transition reproduced the protected #286 lifecycle defect tracked by #279:

  • CI 35913199175 was created for pull_request on exact fix(core): expose standard origin error contract #164 head d8bdd510... / base 87c4daa..., but the workflow concluded skipped;
  • Rust contracts 107358002627: completed/skipped, steps=[], no runner;
  • Production coverage 107358037478: completed/skipped, steps=[], no runner;
  • Manifest V3 Compatibility 35913199170 also concluded skipped on the same Ready transition;
  • same-generation Security 35913199336, Semgrep 35913199456, and CodeQL 35913199730 materialized separately, but they do not substitute for native repository/coverage execution.

Exact reproduction is recorded in #279 comment 5802045567. This is a workflow lifecycle/control-plane RED, not an OriginError source/test failure and not runner starvation: the native jobs were skipped before runner admission.

The PR has therefore been returned to Draft. Do not manufacture a source-neutral synchronize wake, blindly rerun the skipped generation, edit .github/** in this product lane, or weaken Draft/closed guards. #279 remains the canonical workflow-owner repair path.

Pre-reconciliation CI/MV3/Security/SAST successes on 12438c3a... are historical evidence only and do not transfer to d8bdd510....

Acceptance

The ancestry defect is repaired: this head is now based on current protected main with the intended three-path delta intact. The remaining native verification blocker is the exercised Ready-transition defect under #279. After the canonical workflow owner repairs and normally integrates that lifecycle path, this unchanged product lineage must obtain fresh executable repository contracts, formatting, tests, strict Clippy, rustdoc, exact 100% production coverage, security/SAST/CodeQL, and applicable review/ruleset acceptance.

Keep Draft until that owner prerequisite is satisfied. No self-approval, bypass, force push, destructive rebase, workflow/ruleset/secret mutation, gate weakening, protected-main merge, tag, release, or publication is authorized here.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: da15ac06-31c1-4168-8b94-9b767380c5ce

📥 Commits

Reviewing files that changed from the base of the PR and between 542ca1e and b8ae750.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • crates/originweave-core/src/lib.rs
  • crates/originweave-core/tests/origin_error_contract.rs

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


📝 Walkthrough

Walkthrough

OriginError에 사람이 읽을 수 있는 오류 메시지와 표준 오류 트레이트 구현을 추가했습니다. 아홉 가지 오류 변형의 문자열 출력과 source() 결과를 통합 테스트로 검증합니다. 변경 로그도 갱신했습니다.

Changes

OriginError 표준 오류 계약

Layer / File(s) Summary
오류 계약 구현 및 검증
crates/originweave-core/src/lib.rs, crates/originweave-core/tests/origin_error_contract.rs, CHANGELOG.md
OriginError의 아홉 가지 변형에 fmt::Display 메시지를 추가하고 std::error::Error를 구현했습니다. 각 변형의 to_string() 결과와 source() == None을 테스트합니다. 변경 로그에 오류 계약 범위를 반영했습니다.

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

Suggested reviewers: cursoragent

Merge Risk: ⚪ Minimal · up to 12438

This localized change adds standard error support and deterministic messages for existing origin-validation failures without changing parsing behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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 제목은 OriginError에 표준 오류 계약을 공개하는 핵심 변경을 정확하고 간결하게 설명합니다.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/core-origin-error-contract

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 marked this pull request as ready for review August 15, 2026 00:51

@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 3172883992f1fd5d456a40e1a5b826fc67dc02c6.

  • Head SHA: 3172883992f1fd5d456a40e1a5b826fc67dc02c6

  • Workflow run: 32163664883

  • 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["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 3172883992f1fd5d456a40e1a5b826fc67dc02c6
  • Workflow run: 32163664883
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

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 3172883992f1fd5d456a40e1a5b826fc67dc02c6.

  • Head SHA: 3172883992f1fd5d456a40e1a5b826fc67dc02c6

  • Workflow run: 32163664883

  • 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["Changed file (3 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (3 files)"]
  R1 --> V1["required checks"]
Loading

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae
seonghobae force-pushed the fix/core-origin-error-contract branch from 1cf12fa to 262d5a8 Compare August 27, 2026 05:27
@seonghobae seonghobae added the bug Something isn't working label Sep 2, 2026 — with ChatGPT Codex Connector
@seonghobae
seonghobae marked this pull request as draft September 3, 2026 16:21
@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: d8bdd5100442d1ef349f7cab0b47a05ff52b7328

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

Labels

bug Something isn't working priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant