Repository navigation
Commit 36df60a
committed
fix(stack-encrypt): address the review of the planned lowering
The review of #1597 found five in-diff mutants surviving. Three were
equivalent: the "keys nothing" distinction in `compose` under a label
context, where a passthrough ignores its context either way, and the
context-field disjunct of the predicate, dead because a context field
is always a passthrough. The distinction is removed rather than
excluded. Two were checks nothing reached: `check_stored` and
`check_names` are now reached by unit tests in `planned.rs`.
`validate` is deleted. Its duplicate-field and label rules were refused
by the parser first; the one live rule, shared identity between keyed
fields, is in `Plan::build`'s loop beside the target rule. The
builder's `join`, `field_label`, `FROM_PLAN` and `FROM_CALL` are shared
with the lowering rather than copied. A target field is skipped by
`operation_of` returning `None`, so no `unreachable!` sits in library
code. Docs that still described lowering through the builder, or that
said the checks run the lowering, are reworded: the checks share
`check_names`, `check_stored` and `opening_base` with it.
Tests added: a context field declared last, a batch with absent fields
under a context field opened with an expected context, the stored and
value checks refusing each kind of misfit, and the shared-identity
table with exact reasons.
Refs #1488.1 parent cf748de commit 36df60a
8 files changed
Lines changed: 512 additions & 207 deletions
File tree
- docs/plans
- packages/stack-encrypt
- docs/adr
- src
- dynamic
- plan
- target
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1998 | 1998 | | |
1999 | 1999 | | |
2000 | 2000 | | |
2001 | | - | |
2002 | | - | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
2003 | 2004 | | |
2004 | 2005 | | |
2005 | 2006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 61 | | |
72 | 62 | | |
73 | 63 | | |
| |||
507 | 497 | | |
508 | 498 | | |
509 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
510 | 509 | | |
511 | 510 | | |
512 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
385 | 388 | | |
386 | 389 | | |
387 | 390 | | |
| |||
0 commit comments