Release v0.3.0-alpha.3#40
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Release prep for v0.3.0-alpha.3 by updating crate metadata and recording the release in the changelog.
Changes:
- Bump crate version
0.3.0-alpha.2→0.3.0-alpha.3inCargo.tomlandCargo.lock. - Add a
0.3.0-alpha.3section toCHANGELOG.mddated2026-06-01.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
CHANGELOG.md |
Adds the 0.3.0-alpha.3 release heading and places the existing release notes under it. |
Cargo.toml |
Updates the crate version to 0.3.0-alpha.3. |
Cargo.lock |
Updates the locked gatehouse package version to 0.3.0-alpha.3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third alpha of the v0.3 line. Consolidates everything merged since alpha.2 on crates.io (#37, #38, #39).
Summary
0.3.0-alpha.2→0.3.0-alpha.3(pre-release).[Unreleased]→[0.3.0-alpha.3] - 2026-06-01.What's new since alpha.2
API ergonomics
PermissionChecker::check(subject, action, resource, context)— convenience wrapper for RBAC/ABAC-only callers; wrapsevaluate_in_session(EvaluationSession::shared_empty(), ...).PermissionChecker::named(name)+name()accessor; records on tracing spans aschecker.nameso multi-checker audit pipelines can disambiguate.EvalCtx::grant/deny/grant_with_facts/deny_with_factsshortcut methods that build aPolicyEvalResulttagged withctx.policy_type— no more re-passingself.policy_type()in policy bodies.AccessEvaluationtest helpers:assert_granted_by,assert_denied,assert_denied_with_reason_containing, plus the trace-awareassert_denied_by(policy_type)(symmetric withassert_granted_by) andassert_trace_contains(needle)for per-policy reason matching in the multi-policy case.Performance
Policy::policy_typereturn type changed from&strtoCow<'static, str>. Static-name policies are zero-allocation end-to-end through the helper path.PolicyBuilder-built policies now overridePolicy::evaluate_batchto short-circuit the batch-shared axes (.subjects()/.actions()) once for the whole batch. Bench-measured: 13–32% throughput win vs the same shape through the serial-loop default, growing with batch size; trace volume drops from N events to 1 for subject- or action-discriminator policies.policy_typestraight into theEvalCtxinstead of cloning, saving one allocation per evaluation for dynamic-name policies.Combinators
NotPolicy::evaluate_batchbug fix: previously forwarded the outerBatchEvalCtxunchanged, so wrapped policy's batch leaves were tagged with"NotPolicy". Now reconstructs the inner ctx with the wrapped policy's name.AndPolicy/OrPolicy/NotPolicydrop redundantCow::Owned(self.policy_type().to_string())wrapping now thatpolicy_type()already returnsCow<'static, str>.Method renames
evaluate_batch_with_context_in_session_by→evaluate_batch_in_session_by_resourcefilter_authorized_with_context_in_session_by→filter_authorized_in_session_by_resourceOld names are removed (no deprecation aliases — pre-1.0 clean break). Migrate via:
Documentation
PermissionCheckerrustdoc gains "One checker per resource type" and "Modeling list/scope endpoints" recipes.PolicyBuilderrustdoc gains "Type-inference notes" — three patterns that anchor<S, R, A, C>and the misleading "type annotations needed for&_" closure error.EvalCtx::contextrustdoc carries the "same subject, same resource, different calls → different decisions" heuristic on hover.examples/mfa_freshness_context.rs— Context grounded in a concrete decision (high-value refund approval gated on MFA freshness).FactSourcerustdoc gains a(subject, scope) → resolved-idexample showing the trait isn't relationship-shaped.Policy::evaluaterustdoc signposts the "register a FactSource instead of calling the backing service directly" pattern.Policy::evaluate_batchrustdoc names the serial-by-default design choice explicitly and points at the override shapes (join_all,FuturesUnordered, semaphore-bounded).MSRV
rust-version = "1.82"pinned inCargo.toml. The pin caught three accidental 1.87-stdlib usages in test code during this alpha cycle.Breaking since alpha.2
Policy::policy_typereturn type changed (&str→Cow<'static, str>). Migrate impls with one line each:fn policy_type(&self) -> Cow<'static, str> { Cow::Borrowed("MyPolicy") }. Dynamic-name policies now returnCow::Owned(self.name.clone())and pay an allocation per call (the previous&strAPI let them return&self.namewithout allocating).EvalCtx/BatchEvalCtxgain apolicy_type: Cow<'static, str>field. CustomPolicyimpls and tests that construct these directly need to populate it.DelegatingPolicyconstructorpolicy_typeparameter changed fromimpl Into<String>toimpl Into<Cow<'static, str>>.Validation
cargo fmt --all --check✅cargo clippy --all-targets --all-features -- -D warnings✅cargo test --all-targets --all-features✅cargo test --doc --all-features✅cargo publish --dry-run --allow-dirty✅ (packaged cleanly, 48 files / 700KB)