test(core): Kani for Direction::of and part_weight

Both were exceptions for lacking all three backing kinds; neither is a
wrapper or an enum map. `Direction::of` is the sign classification the
party direction law is stated over (law 23), and `part_weight` is the
weight the proration charges are computed from (laws 26-28).

- `direction_of_is_the_sign` explores any `i64` and covers paid,
  received and neither (`kani::cover!`).
- `part_weight_is_days_of_the_month` explores `days` and `month_days`
  up to 40 and covers a partial month, a whole month and an invalid
  part.
- each spec block now carries its `SOURCE:` line, so the gate's
  right-law check applies to them.
- `docs/proofs/entries.md` records each harness's law in the
  machine-readable table; the exception list drops from 16 to 14
  (`Direction::key` and `MonthPart::is_valid` stay, with their reasons).

Co-Authored-By: DeepSeek V4.1 Flash <noreply@opencode.ai>
This commit is contained in:
swaitsandDeepSeek V4.1 Flash committed 2026-11-08 21:54:10 -07:00
1 parent 6f2e2cf1eb
commit 080a3ffbf5
4 files changed
+94 -15

No files matched your search

@@ -1747,7 +1747,7 @@ fn every_claim_is_backed() {
}
assert_eq!(
EXCEPTIONS.len(),
16,
14,
"the kernel exception list changes only on purpose"
);
@@ -1876,11 +1876,6 @@ const EXCEPTIONS: &[(&str, &str, &str)] = &[
"a bridge property",
"it maps a three-variant enum with no amount to bridge; engine tests check it",
),
(
"Direction::of",
"a Kani harness, a bridge property and a law",
"it is a three-way sign classification, exercised through `party_target`; no harness or law states it directly",
),
(
"Direction::key",
"a Kani harness, a bridge property and a law",
@@ -1891,11 +1886,6 @@ const EXCEPTIONS: &[(&str, &str, &str)] = &[
"a Kani harness, a bridge property and a law",
"it is a range predicate with no arithmetic; `part_weight` and the proration harnesses exercise it",
),
(
"part_weight",
"a Kani harness, a bridge property and a law",
"it is generic over `Units`, not `Amount`; laws 26-28 are stated through `prorate_by_days`, which calls it",
),
(
"fx_booked_minor",
"a Kani harness and a law",