Skip to content

fix(core): expose standard extension-id error contract - #163

Open
seonghobae wants to merge 5 commits into
mainfrom
fix/extension-id-error-contract
Open

fix(core): expose standard extension-id error contract#163
seonghobae wants to merge 5 commits into
mainfrom
fix/extension-id-error-contract

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible defect

ExtensionId::parse exposes the public ExtensionIdError type, but protected main does not expose it through Rust's standard Display / std::error::Error contract. Downstream adapters therefore have to special-case one canonical trust-boundary parser instead of handling its validation failure through the same standard diagnostic interface as adjacent OriginWeave errors.

Test-first proof

Historical test-only head bc4b682adee2513db70465b64a235711891a3601 added a public integration regression requiring:

  • ExtensionIdError: std::error::Error;
  • a deterministic operator-safe message for the canonical extension-ID validation failure; and
  • no fabricated nested source.

CI run 31852429522 / Rust contracts job 94930549852 proved the intended RED boundary: workspace type checking failed because ExtensionIdError lacked the standard error/display contract.

Root-cause remedy

The production change adds deterministic Display plus source-free std::error::Error for ExtensionIdError, with the unreleased changelog updated accordingly.

An intermediate head 56e502a25ac12fec911a0c4482e7b342beb70f0e exposed a separate test-harness quality failure in CI run 31852788487: the new regression used expect_err(), which violates the repository's strict -D clippy::unwrap-used contract. The test was rewritten to use panic-free Result inspection without weakening Clippy or changing production behavior.

Current exact state

Protected main is exact 0841d2ab3d8b5e60a03c0a8e818cf438e2716829; current exact contributor head is 4396ae9e999268bc7a5598ac1cf05faf10b450cc.

Fresh comparison is ahead 5 / behind 0, with merge base exactly current protected main. The exact semantic diff remains three intended paths: CHANGELOG.md, crates/originweave-core/src/lib.rs, and crates/originweave-core/tests/extension_error_contract.rs. GitHub reports the PR open, Ready, and mergeable.

No predecessor-head check or review evidence transfers to this current head.

Exact-current native evidence

On unchanged exact head 4396ae9e999268bc7a5598ac1cf05faf10b450cc:

  • CI run 31973618270: success;
  • Rust contracts job 95229727479: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 95229727528: exact owned-production function/line/region/branch measurement and enforcement success;
  • Manifest V3 Compatibility run 31973618261: success;
  • SAST Semgrep run 31973618306: success;
  • Security Scan run 31973618267: success; and
  • no inline review threads are currently returned.

No predecessor-head, queued, skipped, cancelled, absent, stale, synthetic, status-only, or model-only result is promoted as current proof.

Current central-review / governance state

The current formal OpenCode review is CHANGES_REQUESTED on exact head 4396ae9e999268bc7a5598ac1cf05faf10b450cc. Central run 32175174001 reports non-passing coverage-evidence / test-docstring evidence and does not establish a new source-backed ExtensionIdError defect. This is the recurring read-only central .github evidence boundary already routed to the existing central owner lane; OriginWeave product code must not be churned or gates weakened to mask it. Only fresh same-head central evidence after the owner repair can supersede that state.

There is no qualifying independent current-head/latest-push approval. Passing native automation, statuses, bot/model output, comments, or author activity are not approval. Protected-main AGENTS.md forbids this scheduled actor from merging, self-approving, altering workflows, adding secrets, weakening checks, tagging, or publishing.

Scope boundary

This PR changes only the standard public extension-ID error contract and its focused test/changelog evidence. It changes no extension-ID parsing semantics, Chrome/Agent authority, browser execution, network behavior, secret handling, persistence, workflow, or release behavior.

@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: Pro Plus

Run ID: fcb555e9-86fd-48c5-8517-c027a23a6def

📥 Commits

Reviewing files that changed from the base of the PR and between 0c376ac and e033a9b.

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

📝 Walkthrough

Walkthrough

ExtensionIdError에 표준 Displaystd::error::Error 구현이 추가되었습니다. 고정된 오류 메시지, 오류 변형, source() 결과를 검증하는 테스트와 변경 로그가 추가되었습니다.

Changes

ExtensionIdError 오류 계약

Layer / File(s) Summary
오류 계약 구현 및 검증
crates/originweave-core/src/lib.rs, crates/originweave-core/tests/extension_error_contract.rs, CHANGELOG.md
ExtensionIdError가 고정된 표시 문자열을 반환하고 std::error::Error를 구현합니다. 잘못된 식별자 입력, InvalidExtensionId 변형, source() 부재를 테스트합니다. 변경 로그에 오류 계약 항목을 기록합니다.

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

Merge Risk: ⚪ Minimal · up to e033a

This PR adds the standard Display and Error behavior for extension-ID validation failures with regression coverage and no actionable merge-blocking risk remaining after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 제목은 ExtensionIdError의 표준 오류 계약 공개라는 변경의 주요 내용을 정확하고 간결하게 설명합니다.
✨ 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 fix/extension-id-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:18

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Please perform an independent review of exact head e033a9b78f59783205b7eb80394ecce3314d1992 against protected base 0c376acf059be9ddddddfbde1d0189e4f39ef014. Submit a formal review only if this unchanged exact head is acceptable; do not transfer predecessor-head evidence.

@cursor

cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@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 4396ae9e999268bc7a5598ac1cf05faf10b450cc.

  • Head SHA: 4396ae9e999268bc7a5598ac1cf05faf10b450cc

  • Workflow run: 32175174001

  • 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: 4396ae9e999268bc7a5598ac1cf05faf10b450cc
  • Workflow run: 32175174001
  • 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 4396ae9e999268bc7a5598ac1cf05faf10b450cc.

  • Head SHA: 4396ae9e999268bc7a5598ac1cf05faf10b450cc

  • Workflow run: 32175174001

  • 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

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