You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1ed1f3d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(stack-encrypt): address the review of the operator-typed query
- A match configuration whose `MatchCase` disagrees with its options is
refused when the query is awaited, with the new
`PlanError::MatchCase`, instead of answering in a case its index does
not fold. `Supports` gains `check`.
- `Supports::query` takes an `op::QueryToken` only this crate can make,
so no caller can turn a stored term into a query term by hand.
- `MatchTerms::matches(&MatchQuery)` tests a stored filter against a query;
`MatchQuery::filter` is crate-only.
- Docs say what is a compile error and what is refused when awaited: on a
field of a fields plan, which is data, an undeclared index, other match
options and a mislabelled case are runtime refusals. A typed field of a
fields plan answers through the operator's default index, not its
type's `Answers`; the ADR, `DefaultIndex` and the CHANGELOG say so.
- `QueryTerm`'s doc no longer calls every term that refines nothing exact
before `Probabilistic` exists. A broken ADR sentence is fixed.
- `Operator::NAME` is gone (nothing read it); `Matches` is `Hash`.
- Tests: the case mismatch, a refused query loading no named keyset (kills
the `QueryOp::check` mutant), a query under a named keyset, and
`MatchQuery`'s `Debug`. The three `via` mutants and `Matches::clone`'s
are equivalent (unit structs) and are excluded in .cargo/mutants.toml.
Claude-Session: https://claude.ai/code/session_01VYKAWbd361xDLmqBdLoUcB
Copy file name to clipboardExpand all lines: .cargo/mutants.toml
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,10 @@ exclude_re = [
72
72
'stack-encrypt/src/cipher\.rs:\d+:\d+: replace client_key_provider -> EnvKeyProvider with Default::default\(\)$',
73
73
'stack-encrypt/src/target/pending\.rs:443:9: replace <impl IntoFuture for Pending<.*>>::into_future -> Self::IntoFuture with Default::default\(\)$',
74
74
# stack-encrypt — equivalent.
75
+
# An operator and an operator's index are unit structs, whose `Default`
76
+
# is the value `clone` and `via` already return.
77
+
'stack-encrypt/src/op(/mod)?\.rs:\d+:\d+: replace <impl Clone for Matches<C>>::clone -> Self with Default::default\(\)$',
78
+
'stack-encrypt/src/op(/mod)?\.rs:\d+:\d+: replace <impl (Answers<Eq, S> for EqualityTerm|DefaultIndex<S> for Eq|DefaultIndex<S> for Matches<<DefaultMatch as MatchCase>::Case>)>::via -> (Equality|Match) with Default::default\(\)$',
75
79
'stack-encrypt/src/cipher\.rs:\d+:\d+: replace StackCipher<FromEnv>::builder -> StackCipherBuilder with Default::default\(\)$',
76
80
'stack-encrypt/src/sem/mod\.rs:\d+:\d+: replace <impl MatchConfig for DefaultMatch>::options -> MatchOptions with Default::default\(\)$',
77
81
# Both unit-context conversions explicitly return Self::default().
0 commit comments