R-BA: delete the unreachable to.schemaId tiebreak from both edge comparators
Soul could not construct a selection where To.SchemaId decides the EdgesFor/page_edges order once From, Role and To.RecordKey already tie, but flagged that as a claim, not a proof - the same shape of argument that was wrong twice before on this comparator (R-AT). Traced instead of asserted: TryResolveReferenceTarget (C#) and resolve_reference_target (Rust) resolve a reference purely from the citer's schema, the role, and the record key, against the evaluation's own fixed candidate index (byKey/by_key) - no edge- or caller-specific input steers which candidate wins. Once From and Role tie (pinning the citer's schema and the declared target type/leaves) and To.RecordKey also ties, the resolved row - schema included - is forced identical by construction, in both runtimes, every time. No mutation can distinguish it because no input can, so it was deleted rather than recorded as "equivalent": a component nothing can distinguish is a line every future reader must reason about for no behavioural gain. Deletes the To.Descriptor.SchemaId/to.schema_id() ThenBy/then_with from CultNetSelectionEvaluator.EdgesFor and selection.rs's page_edges sort, and updates the comments (in-code and the Survivor 5 test block) that described the old five-key chain. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
cda28fa2ae
commit
492dd0e754
3 changed files with 43 additions and 19 deletions
|
|
@ -248,16 +248,21 @@ namespace GameCult.Networking.Tests
|
|||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
// Survivor 5: CultNetSelectionEvaluator.EdgesFor - the five ordering keys after page-row
|
||||
// position (From.SchemaId, From.Key, Role, To.SchemaId, To.Key) each mutated ThenBy<->
|
||||
// ThenByDescending. Rule (R-B): "page-row order, then (from, role, to) in code-point order."
|
||||
// Two behavioural angles: the From.SchemaId tiebreak (two differently-schema'd citers, same
|
||||
// key, citing one target under the same role), and the Role tiebreak (one citer with two
|
||||
// reference members that both resolve to the same target, so From and To tie and only Role
|
||||
// differs). To.SchemaId/To.Key could not be isolated: within one hop direction, an edge's
|
||||
// (From, Role) already determines its To deterministically (one declared value per member), so
|
||||
// two edges sharing an anchor, From and Role always share To too - see the equivalence note at
|
||||
// the bottom of this file.
|
||||
// Survivor 5: CultNetSelectionEvaluator.EdgesFor - the ordering keys after page-row position
|
||||
// (From.SchemaId, From.Key, Role, To.Key) each mutated ThenBy<->ThenByDescending. Rule (R-B):
|
||||
// "page-row order, then (from, role, to.recordKey) in code-point order." Two behavioural
|
||||
// angles: the From.SchemaId tiebreak (two differently-schema'd citers, same key, citing one
|
||||
// target under the same role), and the Role tiebreak (one citer with two reference members
|
||||
// that both resolve to the same target, so From and To tie and only Role differs).
|
||||
//
|
||||
// A fifth component, To.SchemaId, used to sit last in this chain. R-BA (docs/cultnet-selection
|
||||
// -cut.md, "Soul, the merge gate, fourth pass") deleted it from both runtimes'
|
||||
// comparators: TryResolveReferenceTarget/resolve_reference_target resolve purely from
|
||||
// (the citer's schema, role, recordKey) against the evaluation's own fixed candidate index, so
|
||||
// once From and Role already tie (pinning the citer's schema and the target type/leaves) and
|
||||
// To.RecordKey also ties, To.SchemaId is forced equal - no input can make it decide an order
|
||||
// the earlier keys did not already decide, so a Stryker mutant on it cannot be killed and the
|
||||
// component bought nothing.
|
||||
// ---------------------------------------------------------------------------------------------
|
||||
[Test]
|
||||
public void EdgesFor_BreaksATiedAnchorByFromSchemaIdWhenFromKeysAreEqual()
|
||||
|
|
|
|||
Loading…
Reference in a new issue