fix(engine): forged pinned-contour ordinal stays an Incomplete verdict

The 5.5 pinned-entry shortcut in ContourEntryFeasibility looked up the
choice's contour before the probe's own validation, so an owned choice with
an out-of-range contour ordinal threw instead of returning Incomplete as it
did before. The lookup now runs only for an ordinal inside the preparation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ajandClaude Opus 5.5 committed 2026-10-16 15:33:27 -04:00
1 parent 6c691cc23b
commit 2f91f1b036
2 files changed
+5 -1

No files matched your search

@@ -90,7 +90,9 @@ public sealed class ContourEntryFeasibility
return new(ContourFeasibilityStatus.Incomplete, "Foreign contour choice.");
// A drawing pin's entry is a fixed emission, accepted as given: it is never filtered
// out here. The emitted program's checks report its violations as warnings.
if (prepared.PinnedEntry(choice.ContourOrdinal) == choice)
// A forged ordinal falls through to the probe, which refuses it as Incomplete.
if (choice.ContourOrdinal >= 0 && choice.ContourOrdinal < prepared.Count
&& prepared.PinnedEntry(choice.ContourOrdinal) == choice)
return new(ContourFeasibilityStatus.Clear, null);
var key = new Key(choice.ContourOrdinal, choice.EntityOrdinal,
choice.Point.X, choice.Point.Y, nodeContext ?? string.Empty);