Commit a356926
committed
feat: PropertySpec.marking field + with_marking builder (LF-6 extension)
Per SMB session REQUEST at bus 5c8543a (16:30). Additive — every
PropertySpec gains a `marking: Marking` field initialised to
Marking::Internal (GDPR-safe baseline) by all 3 const constructors.
New const builder method `.with_marking(m)` chains with the existing
.with_semantic_type/.with_nars_floor/.with_codec_route pattern.
Why:
Before: SMB carried a side-table of (entity, predicate, Marking)
tuples in smb-ontology::markings::SMB_MARKINGS. Two sources of
truth (schema + side-table) could drift; typos silently fell
back to Marking::Internal.
After: marking lives directly on PropertySpec. SMB ontology dissolves
the side-table; per-row fold becomes
`schema.properties.iter().map(|p| p.marking).collect()`.
Pattern matches with_semantic_type from PR #263 (commit 76a7237).
Zero breaking change: existing PropertySpec construction sites
inherit Marking::Internal default. New tests verify the default,
override per-predicate, chained construction with_semantic_type +
with_marking, and the W-2 most_restrictive fold over a row's markings.
243 contract lib tests pass (3 new). Clippy clean on new code.
https://claude.ai/code/session_01SbYsmmbPf9YQuYbHZN52Zh1 parent 90c8a2d commit a356926
1 file changed
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| 78 | + | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
90 | 99 | | |
| 100 | + | |
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
| |||
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
99 | 117 | | |
100 | 118 | | |
101 | 119 | | |
| |||
456 | 474 | | |
457 | 475 | | |
458 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
459 | 512 | | |
460 | 513 | | |
461 | 514 | | |
| |||
0 commit comments