Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions dag/test/claim/discovery_census_witness_test.dag
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ fn live_tree_site(module_path: String, function: String) -> DiscoveredSite {
// balance whether or not the census could classify a withheld row at all.
fn mixed_sites() -> List<DiscoveredSite> {
[
hermetic_site(module_path: "v2.test.claim.alpha_witness", function: "w_alpha"),
hermetic_site(module_path: "v2.test.claim.alpha_witness", function: "w_beta"),
hermetic_site(module_path: "test.claim.infer_alpha_witness", function: "w_alpha"),
hermetic_site(module_path: "test.claim.infer_alpha_witness", function: "w_beta"),
hermetic_site(module_path: "test.claim.long.slow_witness", function: "w_slow"),
live_tree_site(module_path: "v2.test.fixture.walk_plan_stage.common", function: "w_member"),
live_tree_site(module_path: "v2.test.claim.reads_tree_witness", function: "w_reads"),
live_tree_site(module_path: "test.claim.infer_reads_tree_witness", function: "w_reads"),
hermetic_site(module_path: "test.claim.live_deploy.some_product_witness", function: "w_product"),
hermetic_site(
module_path: "dag.test.claim.lifecycle_survivor_corpus_census",
Expand Down Expand Up @@ -143,8 +143,8 @@ fn refusal_is_empty_target_name(c: LabelRefusal) -> Bool {

test fn w_site_label_is_the_module_path_as_package() -> Bool {
let rendered = rendered_planned_labels(sites: mixed_sites())
list_holds(xs: rendered, wanted: "//test/claim/alpha_witness:w_alpha")
&& list_holds(xs: rendered, wanted: "//test/claim/alpha_witness:w_beta")
list_holds(xs: rendered, wanted: "//test/claim/infer_alpha_witness:w_alpha")
&& list_holds(xs: rendered, wanted: "//test/claim/infer_alpha_witness:w_beta")
}

// THE LEADING EMPTY SEGMENT IS THE CONTROL THE OBVIOUS JOIN FAILS. An accumulator that skips the
Expand Down Expand Up @@ -243,8 +243,8 @@ test fn w_long_home_module_declines_with_its_matched_prefix() -> Bool {
// control beside the decline above: without it the decline could pass under a `contains` test.
test fn w_long_home_is_a_prefix_not_a_substring() -> Bool {
match required_floor_site_disposition(
module_path: "v2.test.claim.not_test_claim_long.witness",
identity: "v2.test.claim.not_test_claim_long.witness.a_claim"
module_path: "test.claim.infer_not_test_claim_long.witness",
identity: "test.claim.infer_not_test_claim_long.witness.a_claim"
) {
Planned => true
DeclinedLongModule { matched_prefix: _ } => false
Expand All @@ -259,8 +259,8 @@ test fn w_long_home_is_a_prefix_not_a_substring() -> Bool {

test fn w_site_is_planned_when_no_home_matched() -> Bool {
match required_floor_site_disposition(
module_path: "v2.test.claim.ordinary_witness",
identity: "v2.test.claim.ordinary_witness.a_claim"
module_path: "test.claim.infer_ordinary_witness",
identity: "test.claim.infer_ordinary_witness.a_claim"
) {
Planned => true
DeclinedLongModule { matched_prefix: _ } => false
Expand Down Expand Up @@ -444,7 +444,7 @@ test fn w_partition_returns_both_sides_and_loses_no_row() -> Bool {
// from census_partition_step: the outside row then reaches runtime pattern-match failure.
test fn w_planned_and_outside_gate_rows_partition_once_each() -> Bool {
let rows = census_rows_of(sites: [
hermetic_site(module_path: "v2.test.claim.compiler_witness", function: "w_compiler"),
hermetic_site(module_path: "test.claim.infer_compiler_witness", function: "w_compiler"),
hermetic_site(module_path: "test.claim.live_deploy.product_witness", function: "w_product")
])
let split = census_partition(rows: rows)
Expand Down Expand Up @@ -507,8 +507,8 @@ test fn w_duplicate_identity_refuses_even_when_declined() -> Bool {
// every module that appears twice.
test fn w_two_functions_in_one_module_are_two_identities() -> Bool {
match discovery_census(sites: [
hermetic_site(module_path: "v2.test.claim.alpha_witness", function: "w_alpha"),
hermetic_site(module_path: "v2.test.claim.alpha_witness", function: "w_beta")
hermetic_site(module_path: "test.claim.infer_alpha_witness", function: "w_alpha"),
hermetic_site(module_path: "test.claim.infer_alpha_witness", function: "w_beta")
]) {
CensusAccepted { rows: rows } => (rows |> count) == 2
CensusRefused { cause: _ } => false
Expand All @@ -529,11 +529,11 @@ test fn w_required_aggregate_dependencies_are_exactly_the_planned_subset() -> Bo
is_required_aggregate(t: a)
&& (target_identity(t: a) == "//:required")
&& ((a.dependencies |> count) == 3)
&& list_holds(xs: rendered, wanted: "//test/claim/alpha_witness:w_alpha")
&& list_holds(xs: rendered, wanted: "//test/claim/alpha_witness:w_beta")
&& list_holds(xs: rendered, wanted: "//test/claim/infer_alpha_witness:w_alpha")
&& list_holds(xs: rendered, wanted: "//test/claim/infer_alpha_witness:w_beta")
&& !list_holds(xs: rendered, wanted: "//test/claim/long/slow_witness:w_slow")
&& !list_holds(xs: rendered, wanted: "//v2/test/fixture/walk_plan_stage/common:w_member")
&& list_holds(xs: rendered, wanted: "//test/claim/reads_tree_witness:w_reads")
&& list_holds(xs: rendered, wanted: "//test/claim/infer_reads_tree_witness:w_reads")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn probe_row(entry: String, function: String) -> FloorDiscoveryRow {
data probe_seam_modules: List<String> = ["v2.std.probe_seam"]

data probe_nodes: List<ModuleDeclarationFact> = [
probe_node(module: "v2.test.probe_a", path: "fx/a_test.dag"),
probe_node(module: "test.claim.infer_probe_a", path: "fx/a_test.dag"),
probe_node(module: "v2.test.probe_b", path: "fx/b.dag"),
probe_node(module: "v2.std.probe_seam", path: "fx/seam.dag"),
probe_node(module: "v2.test.long.probe_c", path: "fx/c_test.dag"),
Expand Down Expand Up @@ -103,14 +103,14 @@ fn probe_digest(join: FloorStandingJoin) -> String {

test fn floor_join_witness_control_joins_exactly_the_seam_reaching_claims() -> Bool {
let j = probe_join()
probe_has_identity(join: j, identity: "v2.test.probe_a.t_a")
probe_has_identity(join: j, identity: "test.claim.infer_probe_a.t_a")
&& probe_has_identity(join: j, identity: "v2.test.long.probe_c.t_c")
&& probe_has_identity(join: j, identity: "test.claim.probe_d.t_d")
&& !probe_has_identity(join: j, identity: "v2.test.probe_n.t_n")
}

test fn floor_join_witness_transitive_reach_counts() -> Bool {
probe_has_identity(join: probe_join(), identity: "v2.test.probe_a.t_a")
probe_has_identity(join: probe_join(), identity: "test.claim.infer_probe_a.t_a")
}

test fn floor_join_witness_an_unreached_entry_is_excluded_not_refused() -> Bool {
Expand All @@ -122,7 +122,7 @@ test fn floor_join_witness_an_unreached_entry_is_excluded_not_refused() -> Bool

test fn floor_join_witness_standing_is_the_floors_own_rule() -> Bool {
let j = probe_join()
probe_disposition_of(join: j, identity: "v2.test.probe_a.t_a", expected: fn(d) { match d { Planned => true, PlannedAsChangedWitness => false, DeclinedLongModule { matched_prefix } => false, DeclinedFixtureMember { matched_prefix } => false, DeclinedOutsideRequiredGate => false, DeclinedOutsideGateClosure => false, DeclinedDiscoveryExcluded { matched_substring } => false, DeclinedCostDebt => false } })
probe_disposition_of(join: j, identity: "test.claim.infer_probe_a.t_a", expected: fn(d) { match d { Planned => true, PlannedAsChangedWitness => false, DeclinedLongModule { matched_prefix } => false, DeclinedFixtureMember { matched_prefix } => false, DeclinedOutsideRequiredGate => false, DeclinedOutsideGateClosure => false, DeclinedDiscoveryExcluded { matched_substring } => false, DeclinedCostDebt => false } })
&& probe_disposition_of(join: j, identity: "v2.test.long.probe_c.t_c", expected: fn(d) { match d { Planned => false, PlannedAsChangedWitness => false, DeclinedLongModule { matched_prefix } => matched_prefix == "v2.test.long.", DeclinedFixtureMember { matched_prefix } => false, DeclinedOutsideRequiredGate => false, DeclinedOutsideGateClosure => false, DeclinedDiscoveryExcluded { matched_substring } => false, DeclinedCostDebt => false } })
&& probe_disposition_of(join: j, identity: "test.claim.probe_d.t_d", expected: fn(d) { match d { Planned => false, PlannedAsChangedWitness => false, DeclinedLongModule { matched_prefix } => false, DeclinedFixtureMember { matched_prefix } => false, DeclinedOutsideRequiredGate => true, DeclinedOutsideGateClosure => false, DeclinedDiscoveryExcluded { matched_substring } => false, DeclinedCostDebt => false } })
}
Expand Down Expand Up @@ -154,7 +154,7 @@ test fn floor_join_witness_a_duplicate_identity_refuses() -> Bool {
match effect_demand_floor_join(discovered: [probe_row(entry: "fx/a_test.dag", function: "t_a"), probe_row(entry: "fx/a_test.dag", function: "t_a")], nodes: probe_nodes, edges: probe_edges, seam_modules: probe_seam_modules, owned_data_records_supplied: 0) {
FloorStandingJoined { rows, counts, digest, seam_modules, owned_data_records_supplied } => false,
FloorStandingJoinRefused { cause } => match cause {
DuplicateClaimIdentity { claim_identity } => claim_identity == "v2.test.probe_a.t_a",
DuplicateClaimIdentity { claim_identity } => claim_identity == "test.claim.infer_probe_a.t_a",
EntryPathUndeclared { entry_path, function } => false,
JoinPopulationEmpty => false,
DiscoveryRefused { reason } => false
Expand Down Expand Up @@ -187,7 +187,7 @@ test fn floor_join_witness_counts_partition_the_rows() -> Bool {
test fn floor_join_witness_digest_is_a_function_of_identity_and_standing() -> Bool {
let same = probe_digest(join: probe_join()) == probe_digest(join: probe_join())
let relocated_c = [
probe_node(module: "v2.test.probe_a", path: "fx/a_test.dag"),
probe_node(module: "test.claim.infer_probe_a", path: "fx/a_test.dag"),
probe_node(module: "v2.test.probe_b", path: "fx/b.dag"),
probe_node(module: "v2.std.probe_seam", path: "fx/seam.dag"),
probe_node(module: "v2.test.probe_c", path: "fx/c_test.dag"),
Expand All @@ -201,7 +201,7 @@ test fn floor_join_witness_digest_is_a_function_of_identity_and_standing() -> Bo
test fn floor_join_witness_live_seam_modules_are_the_fourteen_seams_homes() -> Bool {
let homes = floor_join_seam_modules(roster: effect_demand_seam_roster)
any(xs: homes, predicate: fn(m) { m == "v2.std.decl_index" })
&& any(xs: homes, predicate: fn(m) { m == "v2.std.compilers.lexing" })
&& any(xs: homes, predicate: fn(m) { m == "v2.std.node" })
&& !any(xs: homes, predicate: fn(m) { m == "" })
}

Expand Down