Skip to content

fix(resource): expose standard budget error contract - #156

Open
seonghobae wants to merge 5 commits into
mainfrom
fix/resource-budget-error-contract
Open

fix(resource): expose standard budget error contract#156
seonghobae wants to merge 5 commits into
mainfrom
fix/resource-budget-error-contract

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Buyer/reliability gap

originweave-resource::BudgetError is a public failure type, but protected main did not implement the standard Rust Display / std::error::Error contract. Resource-governor callers therefore had to special-case validation failures instead of preserving typed context through ordinary Rust integration boundaries.

TDD lineage

This branch starts directly from protected main 0c376acf059be9ddddddfbde1d0189e4f39ef014.

Exact test-only head fe871b17d07a3a08592144384a780775b7b88526 required deterministic credential-free messages for both current BudgetError variants and required Error::source() to remain empty before production support existed. The production remedy adds only exhaustive Display plus source-free std::error::Error.

Current implementation

Exact head d9166d89f154962af7a6b2b7902ff3b2c4579606:

  • renders ZeroLimit as a deterministic non-secret operator message;
  • renders SoftExceedsHard as a deterministic non-secret operator message;
  • implements std::error::Error without fabricating a nested source;
  • leaves all resource-budget values, limits, pressure classification, and governor decisions unchanged; and
  • records resource-budget failures in the existing standard-error changelog contract.

The exact diff is limited to the resource crate, its focused public integration regression, and the canonical changelog line.

Exact-head verification

On unchanged exact head d9166d89f154962af7a6b2b7902ff3b2c4579606 against exact protected main 0c376acf059be9ddddddfbde1d0189e4f39ef014:

  • CI 31823695097: success;
  • Rust contracts job 94842723654: repository contracts, formatting, locked workspace/all-target checks, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 94842723607: exact owned-production function, line, region, and branch coverage enforcement success;
  • SAST Semgrep 31823695066: success;
  • Security Scan 31823695031: success;
  • no formal review or unresolved inline thread is currently returned; and
  • GitHub reports the PR open, Ready, and mergeable.

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

Scope boundary

This changes no resource limits, pressure classification, governor decisions, telemetry, process attribution, persistence, workflow, or release behavior. Passing automation is not independent approval; protected integration remains subject to the live ruleset and unchanged-head review evidence.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d0ece893-8b66-44d8-8928-431cc7e17045

📥 Commits

Reviewing files that changed from the base of the PR and between 0841d2a and 50fa3c3.

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

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 14, 2026 17:58
@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.

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