Align D&D validator policies and diagnostics
This commit is contained in:
@@ -358,15 +358,19 @@ validator defers when shape is invalid, then checks every non-empty spell name
|
||||
against the immutable effective SRD and overlay catalog. It accepts normalized
|
||||
canonical names and aliases without rewriting the artifact; unknown names
|
||||
reject the complete result with bounded, stable index/name diagnostics. The
|
||||
source-reference validator applies generic source-reference validation to every
|
||||
cited range. The relatedness validator resolves all cited ranges through the
|
||||
shared document-order traversal, then warns when a case-insensitive spell name
|
||||
is absent from the cited source text. Invalid shape or cited ranges produce no
|
||||
relatedness warnings; the shape and source-reference validators own those
|
||||
defects.
|
||||
source-reference validator defers malformed shapes, validates every cited
|
||||
range, and reports all range defects through a bounded aggregate while
|
||||
preserving `invalid_source_refs`. The relatedness validator resolves all cited
|
||||
ranges through the shared document-order traversal, then warns when a
|
||||
case-insensitive spell name is absent from the cited source text. Invalid shape
|
||||
or cited ranges produce no relatedness warnings; the shape and source-reference
|
||||
validators own those defects.
|
||||
|
||||
These validators are deterministic. Their selectable keys and production order
|
||||
are defined in
|
||||
These validators are deterministic. Shape, source-reference, and relatedness
|
||||
each expose a local semantic `policy` checkpoint fingerprint. The catalog
|
||||
validator instead exposes its effective catalog digest as its semantic
|
||||
checkpoint identity and does not add a separate policy fingerprint. Their
|
||||
selectable keys and production order are defined in
|
||||
[Configuration](../config.md#implemented-production-validators); their durable
|
||||
payload rules are defined in the
|
||||
[artifact contract](../integrations/dnd-spell-artifacts.md).
|
||||
@@ -374,23 +378,26 @@ payload rules are defined in the
|
||||
## D&D NPC Validators
|
||||
|
||||
NPC shape validation checks required strings, arrays, and source-reference
|
||||
shape. The source-reference validator checks current-document identity, unit
|
||||
existence, and range ordering; source relatedness uses the shared document-order
|
||||
traversal and normalized consecutive-token matching, emitting at most one
|
||||
bounded warning per record when neither the canonical name nor an alias occurs
|
||||
near its cited text. Invalid shape or cited ranges produce no relatedness
|
||||
warnings. Normalize identity validation checks deterministic IDs, canonical
|
||||
names, aliases, and cross-record ownership or canonical collisions. All are
|
||||
deterministic and expose the policy fingerprints used by the production chains.
|
||||
shape. The source-reference validator defers malformed shapes, checks
|
||||
current-document identity, unit existence, and range ordering, and reports all
|
||||
defects through bounded aggregates. Source relatedness uses the shared
|
||||
document-order traversal and normalized consecutive-token matching, emitting at
|
||||
most one bounded warning per record when neither the canonical name nor an
|
||||
alias occurs near its cited text. Invalid shape or cited ranges produce no
|
||||
relatedness warnings. Normalize identity validation checks deterministic IDs,
|
||||
canonical names, aliases, and cross-record ownership or canonical collisions.
|
||||
All are deterministic and expose the policy fingerprints used by the
|
||||
production chains.
|
||||
|
||||
## D&D Combat Validators
|
||||
|
||||
Combat shape validation owns required arrays, strings, nullable values, positive
|
||||
rounds, and supported enums. Combat source-reference validation defers invalid
|
||||
shape and checks source identity, unit existence, and range order. Combat
|
||||
source-relatedness defers invalid shape or ranges, uses the shared traversal to
|
||||
combine overlapping cited units in document order, and emits at most one
|
||||
bounded advisory warning per turn for unrelated actors or declaration text.
|
||||
shape, checks source identity, unit existence, and range order, and reports all
|
||||
defects through bounded aggregates. Combat source-relatedness defers invalid
|
||||
shape or ranges, uses the shared traversal to combine overlapping cited units
|
||||
in document order, and emits at most one bounded advisory warning per turn for
|
||||
unrelated actors or declaration text.
|
||||
Actors use normalized consecutive-token matching; declarations retain the
|
||||
minimum four-rune token heuristic. The normalized-invariants
|
||||
validator owns display normalization, comparison-unique targets, canonical
|
||||
|
||||
Reference in New Issue
Block a user