feat(domain): Error::source() chain propagation for better error diagnostics#126
Conversation
Work item: work-8cb6a554
Tests verify AC1-AC4: - RuleCompileError::InvalidRegex chains source() - RuleCompileError::InvalidGlob chains source() - OverrideCompileError::InvalidGlob chains source() - SchemaValidationError::source() returns None Note: The error types already implement source() correctly via thiserror 2.0's automatic chaining for fields named 'source'.
Work item: work-8d7001a2 ADR documents the architectural decision to use per-item state files with atomic claims for parallel conveyor processing. Specs document acceptance criteria for parallel claims, state integrity, claim lifecycle, and migration path.
- Expand FileExistsError comment to explain stale lock recovery rationale - Expand IsADirectoryError comment to explain the rare race condition - Add module-level comment explaining artifact_map purpose in add_artifact
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 5 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (118)
📒 Files selected for processing (138)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
| error.source().is_some(), | ||
| "source() should return Some for InvalidGlob" | ||
| ); | ||
| let _ = error.source().unwrap().downcast_ref::<globset::Error>(); |
| error.source().is_some(), | ||
| "source() should return Some for InvalidRegex" | ||
| ); | ||
| let _ = error.source().unwrap().downcast_ref::<regex::Error>(); |
| error.source().is_some(), | ||
| "source() should return Some for InvalidGlob" | ||
| ); | ||
| let _ = error.source().unwrap().downcast_ref::<globset::Error>(); |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f75131874
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,184 @@ | |||
| //! Fuzz target for error chain propagation via `source()` method. | |||
There was a problem hiding this comment.
Register error_chain target in fuzz/Cargo.toml
This new fuzz target is never runnable in the current repo setup because fuzz/Cargo.toml uses explicit [[bin]] entries for each target and this commit does not add one for error_chain. As a result, fuzz/fuzz_targets/error_chain.rs is effectively dead and the added error-chain fuzz coverage is not actually exercised.
Useful? React with 👍 / 👎.
Implements Error::source() chain propagation in diffguard-domain and diffguard-testkit for improved error diagnostics and debugging.
Changes
Testing
Closes #1