docs(overhaul): resolve malformed building reciprocal guard
Use the existing InvalidDataException content-integrity boundary for a loaded destination's out-of-range positive reciprocal index. Preserve negative/unavailable skips; record the managed guard with AP-159 at implementation landing. Co-Authored-By: OpenAI Codex <noreply@openai.com>
This commit is contained in:
parent
f72d471a31
commit
4c3aafcd07
1 changed files with 13 additions and 0 deletions
|
|
@ -79,6 +79,19 @@ hitsInteriorCell reporting are correct for their own callers.
|
|||
Do not silently invent policy for malformed positive reciprocal indices;
|
||||
identify existing validation/error handling if this requires a new choice.
|
||||
|
||||
**Resolved before implementation:** existing BuildingPhysics stores a signed
|
||||
short with no cross-cell upper-bound validation; the sphere helper never
|
||||
indexes it. For an otherwise available destination, explicitly reject a
|
||||
nonnegative reciprocal index >= destination.Portals.Count with
|
||||
InvalidDataException, consistent with TryGetPortalPlane's prepared topology/
|
||||
polygon corruption boundary. Include destination/index/count in its message.
|
||||
Do not clamp, substitute portal0, silently skip, load a cell, or let an
|
||||
unchecked indexer dictate the error. Negative and unavailable/rootless cases
|
||||
keep their preceding skip semantics. Add exact-count and larger-index tests.
|
||||
This managed malformed-input guard is not claimed as native behavior (retail
|
||||
indexes trusted authored metadata unchecked); lead records this adaptation
|
||||
with the narrowed AP159 row in the implementation commit.
|
||||
|
||||
## Required discriminating tests
|
||||
|
||||
Drive real `BuildShadowCellSetFromParts` where possible; tests may use a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue