diff --git a/scripts/mutate-cultnet-selection-rust.entries.ps1 b/scripts/mutate-cultnet-selection-rust.entries.ps1 index 8ff9233d..7dfaa6f4 100644 --- a/scripts/mutate-cultnet-selection-rust.entries.ps1 +++ b/scripts/mutate-cultnet-selection-rust.entries.ps1 @@ -1,7 +1,10 @@ # Entries for tools/eureka-mutations.ps1 (C:\Users\Meta\.claude\skills\eureka\tools): # CultNet typed selection, Cut 1 commit 3 - the Rust evaluator -# (src/selection.rs), mirroring the reference's rules at wire parity -# (docs/cultnet-selection-cut.md section 6/7/10). Target: src/selection.rs. +# (packages/cultnet-rs/src/selection.rs), mirroring the reference's rules at +# wire parity (docs/cultnet-selection-cut.md section 6/7/10). `File` values +# are relative to the CultLib repo root (run with -Repo C:\wal and -Target +# 'packages/cultnet-rs/src/selection.rs,packages/cultnet-rs/src/snapshot_query.rs', +# since -Entries and -Target resolve against the same -Repo). # # Two commands are in play (the harness runs M0 once per distinct Command in the suite): # `cargo test --test selection -- --skip @@ -29,8 +32,8 @@ Id = 'RS-S3-Revert' Rule = 'S3: order reverses under descending.' Test = 'orders_by_ordinal_then_identity_and_reverses' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if descending { ordering.reverse() } else { ordering }' New = 'let _ = descending; ordering' }, @@ -38,8 +41,8 @@ Id = 'RS-CursorStale-Revert' Rule = 'A cursor from a moved asOf is refused cursor_stale.' Test = 'pages_exactly_once_and_refuses_a_stale_or_mismatched_cursor' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if cursor.as_of != as_of {' New = 'if false {' }, @@ -47,8 +50,8 @@ Id = 'RS-CursorStale-Loosening' Rule = 'Staleness compares equality, not only "cursor is newer than the current asOf".' Test = 'pages_exactly_once_and_refuses_a_stale_or_mismatched_cursor' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if cursor.as_of != as_of {' New = 'if cursor.as_of > as_of {' }, @@ -56,8 +59,8 @@ Id = 'RS-CursorDigest-Revert' Rule = 'A cursor whose digest does not match this selection is refused cursor_invalid.' Test = 'pages_exactly_once_and_refuses_a_stale_or_mismatched_cursor' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if cursor.digest != Cursor::compute_digest(selection) {' New = 'if false {' }, @@ -65,8 +68,8 @@ Id = 'RS-S7-Revert' Rule = 'S7: cited { exists } is honoured, not ignored.' Test = 'cited_exists_is_the_one_negation' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'candidates.retain(|row| incoming.contains(row.record_key()) == exists);' New = 'candidates.retain(|row| incoming.contains(row.record_key()) || true);' }, @@ -74,8 +77,8 @@ Id = 'RS-S7-Loosening' Rule = 'exists:true and exists:false must answer opposite sets, not the same test inverted twice.' Test = 'cited_exists_is_the_one_negation' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'candidates.retain(|row| incoming.contains(row.record_key()) == exists);' New = 'candidates.retain(|row| incoming.contains(row.record_key()) != exists);' }, @@ -83,8 +86,8 @@ Id = 'RS-S16-Le-Revert' Rule = 'S16: le includes the equal boundary.' Test = 'compares_numbers_at_the_boundary_for_all_four_operators' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'SelectionOperator::Le => ordering != Ordering::Greater,' New = 'SelectionOperator::Le => ordering == Ordering::Less,' }, @@ -92,8 +95,8 @@ Id = 'RS-S16-Ge-Revert' Rule = 'S16: ge includes the equal boundary.' Test = 'compares_numbers_at_the_boundary_for_all_four_operators' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'SelectionOperator::Ge => ordering != Ordering::Less,' New = 'SelectionOperator::Ge => ordering == Ordering::Greater,' }, @@ -101,8 +104,8 @@ Id = 'RS-S18-Revert' Rule = "D9/S18: an edge naming a row outside its reference's declared target refuses the selection." Test = 'refuses_an_edge_outside_its_declared_target' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if leaves.is_empty() || leaves.iter().any(|leaf| leaf == to.schema_id()) { return Ok(()); }' @@ -114,8 +117,8 @@ Id = 'RS-QJ-Door-Regex-Revert' Rule = 'Q-J: the door refuses a non-canonical number spelling rather than accepting it.' Test = 'validation_refuses_non_canonical_number_spellings' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'Some(number) if !canonical_number::is_canonical(number) => {' New = 'Some(number) if false && !canonical_number::is_canonical(number) => {' }, @@ -123,8 +126,8 @@ Id = 'RS-QJ-Door-NegativeZero-Revert' Rule = 'Q-J: "-0" is excluded even though the digit grammar alone matches it.' Test = 'validation_refuses_non_canonical_number_spellings' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if value == "-0" { return false; }' @@ -134,8 +137,8 @@ Id = 'RS-QJ-Compare-IntegerLength-Revert' Rule = "Q-J: the comparator checks the integer part's length before its digits." Test = 'canonical_number_compares_by_magnitude' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let magnitude = if integer_left.len() != integer_right.len() { integer_left.len().cmp(&integer_right.len()) } else {' @@ -147,8 +150,8 @@ Id = 'RS-QJ-Compare-Sign-Revert' Rule = 'Q-J: the comparator orders a negative value below a positive one.' Test = 'canonical_number_compares_by_sign' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if negative_left != negative_right {' New = 'if false {' }, @@ -156,8 +159,8 @@ Id = 'RS-QJ-RenderInteger-Float64-Revert' Rule = 'Q-J: an i64 renders its exact decimal, never through f64 (2^53 boundary).' Test = 'selection::canonical_number::tests::render_i64_past_2_pow_53_is_exact' - Command = 'cargo test --lib' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'pub fn render_i64(value: i64) -> String { canonicalize_decimal_digits(&value.to_string()) }' @@ -169,8 +172,8 @@ Id = 'RS-QJ-DecimalTrailingZeros-Revert' Rule = 'Q-J: canonicalize_decimal_digits strips trailing fractional zeros.' Test = 'selection::canonical_number::tests::canonicalize_decimal_digits_strips_leading_and_trailing_zeros' - Command = 'cargo test --lib' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' Old = "let fraction_part = fraction_part.trim_end_matches('0');" New = 'let fraction_part = fraction_part;' }, @@ -189,8 +192,8 @@ Id = 'RS-D-ExponentBranch-Revert' Rule = "R-D: exponent >= 0 shifts left (mantissa * 2^exponent); a negative exponent must take the fraction branch, not the shift branch." Test = 'selection::canonical_number::tests::render_f32_and_f64_of_0_1_render_the_distinct_exact_binary_values' - Command = 'cargo test --lib' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let unsigned = if exponent >= 0 {' New = 'let unsigned = if true {' }, @@ -198,8 +201,8 @@ Id = 'RS-D-SubnormalExponent-Revert' Rule = 'R-D: a subnormal f64 uses exponent -1074 (1 - bias - fraction bits), not the normal formula on a zero-implicit-bit mantissa.' Test = 'selection::canonical_number::tests::render_f32_and_f64_subnormals_round_trip' - Command = 'cargo test --lib' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' Old = '(fraction, -1074) // subnormal: 1 - 1023 (bias) - 52 (fraction bits)' New = '(fraction, biased_exponent - 1023 - 52)' }, @@ -217,22 +220,103 @@ # the now-explicit single-digit-factor precondition) in src/selection.rs instead of carrying a # mutation entry for a branch that was never reachable. @{ + # Self's ruling, 2026-09-22 ("the C# reference's alias rule is the rule"): this entry used + # to pin the deleted hash-stripping matcher (comparing two inferred hash-id names). It now + # pins the ported behaviour: a candidate's inferred name is bridged against the schema's + # declared *name*, exactly as CultNetSchemaAliasMatching's descriptor overload does. Id = 'RS-E-Alias-Revert' - Rule = 'R-E: schema-alias matching bridges two ids by their inferred name, not only exact equality.' - Test = 'selection::schema_alias::tests::matches_by_inferred_name_across_versions' - Command = 'cargo test --lib' - File = 'src/selection.rs' + Rule = "R-E: schema-alias matching bridges a candidate's inferred name against the schema's declared name, not only exact equality." + Test = 'selection::schema_alias::tests::matches_by_inferred_name_alias_against_the_declared_name' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let candidate_name = infer_schema_name(candidate).unwrap_or(candidate); - let schema_name = infer_schema_name(schema_id).unwrap_or(schema_id); candidate_name == schema_name' New = 'false' }, + @{ + # The revert: go back to hash stripping (deleted this cut). Restores the old + # schema_id-vs-schema_id comparison in place of the name-comparison rule, exactly the + # behaviour Self's ruling retired. + Id = 'RS-E-Alias-RevertToHashStripping' + Rule = 'Revert: schema_alias must not fall back to comparing schema_id against its own inferred name (the deleted hash-stripping matcher).' + Test = 'selection::schema_alias::tests::does_not_match_a_hash_shaped_alias' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' + Old = 'let candidate_name = infer_schema_name(candidate).unwrap_or(candidate); + candidate_name == schema_name' + New = 'let candidate_name = infer_schema_name(candidate).unwrap_or(candidate); + let inferred_schema_name = infer_schema_name(schema_id).unwrap_or(schema_id); + candidate_name == schema_name || candidate_name == inferred_schema_name' + }, + @{ + # The loosening: accept any ".vN" without comparing the name (case-insensitively would be + # a different loosening; this one drops the name check entirely once a candidate merely + # carries a recognisable ".v" marker). + Id = 'RS-E-Alias-AcceptAnyVersionSuffix-Loosening' + Rule = "A candidate carrying a bare '.v' marker must still match the schema's declared name - carrying the marker alone is not enough." + Test = 'selection::schema_alias::tests::matches_by_inferred_name_alias_against_the_declared_name' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' + Old = 'let candidate_name = infer_schema_name(candidate).unwrap_or(candidate); + candidate_name == schema_name' + New = 'infer_schema_name(candidate).is_some() || infer_schema_name(candidate).unwrap_or(candidate) == schema_name' + }, + @{ + # A loosening that compares names case-insensitively - C#'s Ordinal comparison is + # case-sensitive throughout; this entry proves every_comparison_is_case_sensitive still + # catches a lowercased comparator. + Id = 'RS-E-Alias-CaseInsensitive-Loosening' + Rule = 'Every schema-alias comparison is case-sensitive (Ordinal), never case-insensitive.' + Test = 'selection::schema_alias::tests::every_comparison_is_case_sensitive' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' + Old = 'if candidate == schema_id || candidate == schema_name { + return true; + } + let candidate_name = infer_schema_name(candidate).unwrap_or(candidate); + candidate_name == schema_name' + New = 'if candidate.eq_ignore_ascii_case(schema_id) || candidate.eq_ignore_ascii_case(schema_name) { + return true; + } + let candidate_name = infer_schema_name(candidate).unwrap_or(candidate); + candidate_name.eq_ignore_ascii_case(schema_name)' + }, + @{ + # A function-of-input mutant: infer_schema_name stripping any suffix after the *last* dot + # (not only a ".v" marker) - wrong for a bare name that legitimately contains a + # dot, and wrong for "a.v5.v2" (must resolve at the marker, "a.v5", not at the last dot + # regardless of what follows it - though here they coincide, so the real kill comes from + # a name carrying a non-".vN" trailing segment). + Id = 'RS-E-InferSchemaName-StripAnyLastDotSuffix-Loosening' + Rule = "infer_schema_name strips only a trailing '.v' marker, not any text after the last dot." + Test = 'selection::schema_alias::tests::a_trailing_dot_v_with_no_digits_falls_back_to_the_literal_candidate' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' + Old = 'fn infer_schema_name(schema_id: &str) -> Option<&str> { + let marker = schema_id.rfind(".v")?; + if marker == 0 { + return None; + } + let version = &schema_id[marker + 2..]; + if version.is_empty() || !version.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + Some(&schema_id[..marker]) + }' + New = 'fn infer_schema_name(schema_id: &str) -> Option<&str> { + let marker = schema_id.rfind(''.'')?; + if marker == 0 { + return None; + } + Some(&schema_id[..marker]) + }' + }, @{ Id = 'RS-E-InferSchemaName-LeadingMarker-Revert' Rule = 'R-E: a schema id that IS just ".vN" (marker at position 0) infers no name.' Test = 'selection::schema_alias::tests::infer_schema_name_refuses_a_leading_marker_and_a_non_numeric_or_empty_version' - Command = 'cargo test --lib' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --lib' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if marker == 0 { return None; }' @@ -242,13 +326,12 @@ Id = 'RS-E-CitesTarget-Revert' Rule = 'R-E: cites.target.schemaId is refused at the door when it matches no known schema.' Test = 'validate_refuses_a_cites_target_schema_that_matches_no_known_schema' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' - Old = 'if !row_set - .all_schema_ids() - .iter() - .any(|schema_id| schema_alias::matches(&cites.target.schema_id, schema_id)) - {' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' + Old = 'if !row_set.all_schema_ids().iter().any(|schema_id| { + let name = row_set.schema_name(schema_id).unwrap_or_else(|| schema_id.clone()); + schema_alias::matches(&cites.target.schema_id, schema_id, &name) + }) {' New = 'if false {' }, # The first run of this suite found this call site's own real bug, via a pre-existing entry @@ -262,15 +345,17 @@ Id = 'RS-E-EmptySchemasNeverMatchesEverything-Revert' Rule = 'R-E: an empty-but-present schemas list matches nothing at the fast path, not everything.' Test = 'matches_treats_an_empty_but_present_schemas_list_as_matching_nothing' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if let Some(schemas) = &selection.schemas - && !schemas.iter().any(|candidate| schema_alias::matches(candidate, row.schema_id())) + && !schemas + .iter() + .any(|candidate| schema_alias::matches(candidate, row.schema_id(), row.schema_name())) { return false; }' New = 'if let Some(schemas) = &selection.schemas - && !schema_alias::matches_any(schemas, row.schema_id()) + && !schema_alias::matches_any(schemas, row.schema_id(), row.schema_name()) { return false; }' @@ -279,8 +364,8 @@ Id = 'RS-F-SelectValidatesFirst-Revert' Rule = 'R-F: select() validates the selection before evaluating it, and returns the typed refusal.' Test = 'select_refuses_an_invalid_selection_instead_of_evaluating_it' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'validate(selection, row_set)?;' New = '' }, @@ -288,8 +373,8 @@ Id = 'RS-F-MatchesAssert-Revert' Rule = "R-F: matches()'s hop guard is a real assert!, not a debug_assert! a release build compiles out." Test = 'matches_refuses_a_hop_bearing_selection_even_in_a_release_style_assert' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'assert!( !selection.has_hop(), "a hop-bearing selection (cites/cited) is set-dependent and cannot use the single-row \ @@ -301,8 +386,8 @@ Id = 'RS-G-Matched-Revert' Rule = 'R-G/P-1: Evaluation.matched is the total match count, not the page count.' Test = 'matched_is_the_total_count_not_the_page_count' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let matched_total = matched.len() as u32;' New = 'let matched_total = 0u32;' }, @@ -310,8 +395,8 @@ Id = 'RS-H-DigestLengthPrefix-Revert' Rule = 'R-H: the cursor digest length-prefixes every list, so two differently split lists never collide.' Test = 'cursor_digest_does_not_collide_on_differently_split_lists' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'fn write_length_prefixed_list(buffer: &mut String, values: &[String]) { buffer.push_str(&values.len().to_string()); buffer.push(''[''); @@ -328,8 +413,8 @@ Id = 'RS-B-CitedEdgeDirection-Revert' Rule = "R-B: under `cited`, an edge's owning page row is its To (the citee), not its From (the citer)." Test = 'cited_selections_page_the_citee_and_their_edges_survive_the_page_filter' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let cited_direction = selection.cited.is_some();' New = 'let cited_direction = false;' }, @@ -337,8 +422,8 @@ Id = 'RS-B-CitesEdgeDirection-Revert' Rule = "R-B: under `cites`, an edge's owning page row is its From (the citer) - the converse of RS-B-CitedEdgeDirection-Revert." Test = 'cites_selections_still_page_the_citer_and_key_edges_off_it' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let cited_direction = selection.cited.is_some();' New = 'let cited_direction = true;' }, @@ -346,8 +431,8 @@ Id = 'RS-I-HeaderCarriesNoEdgePayload-Revert' Rule = "S20/R-I: a header-projection page's edges carry no payload, even when the underlying edge has one." Test = 'select_page_header_projection_carries_no_payload_in_rows_or_edges' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'payload: if want_document { edge.payload.clone() } else { None },' New = 'payload: edge.payload.clone(),' }, @@ -355,8 +440,8 @@ Id = 'RS-I-ProjectionChoosesHeadersOrDocuments-Revert' Rule = 'R-I: document projection carries documents, not headers - the two are never both Some.' Test = 'select_page_document_projection_carries_payload_in_rows_and_edges' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'let want_document = selection.projection == PROJECTION_DOCUMENT;' New = 'let want_document = false;' }, @@ -364,8 +449,8 @@ Id = 'RS-S2-Revert' Rule = 'S2: an any_of predicate matches row-value membership, not "any value at all".' Test = 'conjoins_any_of_and_comparison_predicates' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if !values.iter().any(|v| wanted.iter().any(|w| w == v)) {' New = 'if false {' }, @@ -373,8 +458,8 @@ Id = 'RS-S6-Revert' Rule = 'S6: cites.role, when present, filters which declared reference the hop follows.' Test = 'cites_role_excludes_a_second_reference_at_the_same_target' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = "if let Some(wanted_role) = &citation.role && *wanted_role != role {" @@ -384,8 +469,8 @@ Id = 'RS-EmptySchemas-Revert' Rule = 'S1: an empty (but present) schemas list is refused, never answered as an empty page.' Test = 'validation_refuses_undeclared_index_role_and_empty_lists' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if matches!(&selection.schemas, Some(schemas) if schemas.is_empty()) {' New = 'if false {' }, @@ -393,8 +478,8 @@ Id = 'RS-EmptyKeys-Revert' Rule = 'S1: an empty (but present) keys list is refused, never answered as an empty page.' Test = 'validation_refuses_undeclared_index_role_and_empty_lists' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if matches!(&selection.keys, Some(keys) if keys.is_empty()) {' New = 'if false {' }, @@ -403,8 +488,8 @@ Id = 'RS-BlankSchema-Revert' Rule = 'The door refuses a blank entry inside a present schemas list, not only an empty list.' Test = 'validation_refuses_a_blank_entry_in_schemas_or_keys' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if schema.trim().is_empty() {' New = 'if false {' }, @@ -412,8 +497,8 @@ Id = 'RS-BlankKey-Revert' Rule = 'The door refuses a blank entry inside a present keys list.' Test = 'validation_refuses_a_blank_entry_in_schemas_or_keys' - Command = 'cargo test --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' - File = 'src/selection.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test selection -- --skip selection_vectors_written_by_the_reference_decode_and_evaluate_identically_in_rust' + File = 'packages/cultnet-rs/src/selection.rs' Old = 'if key.trim().is_empty() {' New = 'if false {' }, @@ -428,8 +513,8 @@ # test in that binary, not a correctness question this entry is about. Filtering M0 and # the entry run to this test's own name keeps this suite from depending on that binary's # unrelated health; the flake itself is a separate finding, not fixed here. - Command = 'cargo test --test cultnet serve_read_only_raw_snapshot' - File = 'src/snapshot_query.rs' + Command = 'cargo test --manifest-path packages/cultnet-rs/Cargo.toml --test cultnet serve_read_only_raw_snapshot' + File = 'packages/cultnet-rs/src/snapshot_query.rs' Old = 'if filtered.is_empty() { None } else { Some(filtered) }' New = 'Some(filtered)' }