From c0942e8eabbeb6f49f415258497c0e51c8521102 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 04:00:45 +0000 Subject: [PATCH 1/8] Sweep B onto sweep-A after main merge. Co-authored-by: Cursor --- dag/gunbc/fleet_show_effective_read.dag | 14 ++ dag/gunbc/roster_registry.dag | 4 +- dag/std/roster_frontier.dag | 16 +- ...fleet_show_effective_read_witness_test.dag | 1 + .../claim/stage0_emit_model_witness_test.dag | 7 +- ...-dag-residual-census-and-arc-completion.md | 57 +---- src/v1/stage0/src/bin/regen_stage0.rs | 235 ++++++++++-------- src/v1/stage0/src/cli_run.rs | 37 +-- .../react/structural_receipts_test.dag | 45 ---- .../affected_set/edit_locus_resolver_test.dag | 2 +- .../lens/cost/disj_alternative_floor_test.dag | 8 +- .../lens/cost/loop_iteration_floor_test.dag | 8 +- .../sg_claims_test.dag | 16 +- .../table_decision_tree/sg_claims_test.dag | 15 +- src/v2/std/reducible_test.dag | 8 +- ...ffected_set_disposition_both_axes_test.dag | 18 +- .../affected_set_witness_a_prove_test.dag | 15 +- .../freemonoid_first_skip_witness_test.dag | 18 +- .../test/claim/bash_build_round_trip_test.dag | 14 +- src/v2/test/claim/bash_command_fold_test.dag | 209 +++++----------- ...ild_artifact_verification_witness_test.dag | 14 +- .../claim/c_compilation_unit_witness_test.dag | 35 +-- .../test/claim/ci_floor_plan_witness_test.dag | 40 +-- src/v2/test/claim/ci_spec_witness_test.dag | 71 ++---- .../claim/compilation_unit_witness_test.dag | 41 +-- .../compile_eval_thesis_proof_test.dag | 12 +- .../test/claim/computation_identity_test.dag | 17 +- .../claim/concept_index_enumeration_test.dag | 36 +-- .../claim/cross_tree_import_model_test.dag | 30 +-- ...agnostic_sequence_outcome_witness_test.dag | 20 +- .../test/claim/discovery_enumeration_test.dag | 12 +- .../emit/c_semantic_decl_routing_test.dag | 11 - .../emit/decl_emit_consolidated_test.dag | 18 +- .../claim/emit/rust_bind_let_emit_test.dag | 7 +- .../test/claim/emit/rust_call_emit_test.dag | 3 - .../claim/emit/rust_conditional_emit_test.dag | 8 +- .../emit/rust_field_access_emit_test.dag | 7 +- .../emit/rust_fold_call_closure_emit_test.dag | 7 +- .../emit/rust_literal_bind_emit_test.dag | 26 +- .../emit/rust_logic_complement_emit_test.dag | 8 +- .../emit/rust_logic_meet_join_emit_test.dag | 7 +- .../test/claim/emit/rust_loop_emit_test.dag | 8 +- .../test/claim/emit/rust_match_emit_test.dag | 8 +- .../emit/rust_record_construct_emit_test.dag | 8 +- .../emit/rust_variant_construct_emit_test.dag | 8 +- .../semantic_decl_routing_generic_test.dag | 4 - .../claim/emit/semantic_decl_routing_test.dag | 5 - .../semantic_decl_serialize_parity_test.dag | 14 +- .../trait_derive_seed_emit_binding_test.dag | 9 - .../test/claim/emit/type_alias_emit_test.dag | 12 +- .../add_arrow_eval_by_execution_test.dag | 50 ++-- .../execution/bind_eval_by_execution_test.dag | 24 +- .../claim/execution/bind_round_trip_test.dag | 11 +- .../branch_eval_by_execution_test.dag | 23 +- .../branch_if_then_else_round_trip_test.dag | 11 +- .../execution/c_add_emit_host_run_test.dag | 6 - .../c_type_decl_emit_host_run_test.dag | 4 - .../dag_add_emit_round_trip_test.dag | 13 +- .../emit_host_add_equals_eval_test.dag | 7 - ...lassical_not_ingested_equals_eval_test.dag | 27 -- .../emit_host_complement_equals_eval_test.dag | 3 - ...mit_host_field_access_equals_eval_test.dag | 3 - ..._host_filesystem_read_equals_eval_test.dag | 5 - ...mit_host_fold_closure_equals_eval_test.dag | 4 - .../emit_host_loop_equals_eval_test.dag | 3 - .../emit_host_match_equals_eval_test.dag | 3 - .../emit_host_meet_join_equals_eval_test.dag | 6 - .../emit_host_module_equals_eval_test.dag | 6 - .../emit_host_native_only_verdict_test.dag | 9 - ..._host_produced_module_equals_eval_test.dag | 6 - ...t_host_shell_exec_run_equals_eval_test.dag | 5 - .../emit_host_transport_wire_test.dag | 8 - ...ost_variant_construct_equals_eval_test.dag | 3 - ...ngest_grammar_relation_round_trip_test.dag | 17 +- ...t_python_same_language_round_trip_test.dag | 33 +-- ...pescript_same_language_round_trip_test.dag | 34 +-- ...sical_not_ingested_family_witness_test.dag | 9 - ..._demand_complement_family_witness_test.dag | 8 - ...it_on_demand_family_crate_witness_test.dag | 8 - ...emand_field_access_family_witness_test.dag | 9 - .../emit_on_demand_kernel_witness_test.dag | 22 -- ...nd_match_loop_fold_family_witness_test.dag | 8 - ...n_demand_meet_join_family_witness_test.dag | 9 - ..._variant_construct_family_witness_test.dag | 9 - .../floor_diff_observe_witness_test.dag | 14 +- .../execution/loop_eval_by_execution_test.dag | 27 +- .../claim/execution/loop_round_trip_test.dag | 11 +- .../execution/match_bool_round_trip_test.dag | 11 +- ...pick_ingested_structural_lowering_test.dag | 11 +- .../rust_emit_host_call_equals_eval_test.dag | 3 - ...d_construct_emit_host_equals_eval_test.dag | 4 - .../gha_workflow_yaml_fold_serialize_test.dag | 11 +- .../formal_productions_for_lhs_test.dag | 9 +- .../claim/grammar/validate_grammar_test.dag | 15 +- src/v2/test/claim/grounding_lens_test.dag | 51 ++-- .../facts_readback_verdict_perturb_test.dag | 9 +- .../transport_script_position_test.dag | 21 +- .../impossible_bug/release_demos_test.dag | 11 +- .../claim/locality_affinity_witness_test.dag | 41 +-- ...cross_tree_real_ingest_activation_test.dag | 9 +- .../claim/long/cwc_resolution_probe_test.dag | 13 +- .../gauntlet_lane_enrollment_witness_test.dag | 9 +- ...parse_table_memo_governed_witness_test.dag | 25 +- .../parser_completeness_frontier_test.dag | 17 -- .../self_host_module_emit_derisk_test.dag | 10 - ...idate_ingest_staging_stage_bisect_test.dag | 123 --------- .../manual/add_body_emit_python_test.dag | 7 +- .../manual/bind_demand_driven_eval_test.dag | 25 +- src/v2/test/claim/manual/bind_emit_test.dag | 36 +-- .../manual/branch_if_then_else_emit_test.dag | 192 +------------- .../manual/branch_infer_if_then_else_test.dag | 8 +- .../test/claim/manual/branch_infer_test.dag | 13 +- .../branch_lazy_arm_eval_acceptance_test.dag | 11 +- .../manual/c_add_emit_translate_test.dag | 6 - .../coproduct_reflection_conformance_test.dag | 6 - ...language_add_python_to_typescript_test.dag | 14 -- .../claim/manual/field_access_emit_test.dag | 11 +- ...nd_witness_distinct_node_zip_fold_test.dag | 2 +- .../manual/find_witness_identity_test.dag | 2 +- .../manual/floor_drain_retention_test.dag | 9 +- .../manual/fold_call_closure_emit_test.dag | 11 +- .../test/claim/manual/ingest_bridge_test.dag | 21 +- .../manual/inhabitant_neutralization_test.dag | 80 +----- .../manual/loop_demand_driven_eval_test.dag | 6 +- src/v2/test/claim/manual/loop_emit_test.dag | 36 +-- .../map_lookup_miss_witness_violates_test.dag | 8 +- .../map_structural_key_equality_test.dag | 16 +- .../claim/manual/match_bool_emit_test.dag | 52 +--- .../match_infer_fail_open_audit_test.dag | 2 +- .../manual/medium_node_instantiation_test.dag | 12 +- ...e_serializer_determinism_fidelity_test.dag | 9 +- .../medium_source_text_instantiation_test.dag | 12 +- .../manual/path_y_fidelity_successor_test.dag | 13 +- .../manual/record_construct_emit_test.dag | 11 +- src/v2/test/claim/manual/runtime_run_test.dag | 11 +- .../manual/target_carriers_fidelity_test.dag | 24 +- ...t_eager_materialize_dedup_cutover_test.dag | 9 +- .../module_resolution_plan_witness_test.dag | 14 +- ...ame_resolve_cross_tree_resolution_test.dag | 14 +- .../test/claim/native_cache_fusion_test.dag | 11 +- .../test/claim/operand_flow_witness_test.dag | 20 +- .../parse/parse_binding_fidelity_test.dag | 160 ------------ .../parse/parse_table_content_key_test.dag | 18 +- src/v2/test/claim/pr_native_batch_test.dag | 8 +- .../provenance/occurrence_id_model_test.dag | 24 +- .../parse_stamp_span_index_test.dag | 9 +- .../claim/realization_runner_witness_test.dag | 41 +-- .../claim/realize_advisory_soundness_test.dag | 20 +- ...alified_module_projection_resolve_test.dag | 8 +- .../rust_crate_partition_witness_test.dag | 56 ++--- .../self_host/emit_coverage_frontier_test.dag | 26 +- .../claim/self_host/native_agreement_test.dag | 6 - .../native_routing_frontier_test.dag | 20 +- .../claim/self_host/parity_window_test.dag | 20 +- .../wet_receipt_enrollment_witness_test.dag | 44 ++-- .../self_host/witness_bulk_routing_test.dag | 20 +- ...eligibility_census_classification_test.dag | 8 - .../test/claim/sql_create_table_fold_test.dag | 36 +-- ...ait_derive_completeness_predicate_test.dag | 9 - src/v2/test/claim/witness_admission_test.dag | 48 ++-- .../claim/wrap_decision_predicate_test.dag | 11 - src/v2/test/manual/ownership_movable_test.dag | 17 +- .../workflow/affected_set_ci_runner_test.dag | 11 - .../affected_set_floor_runner_test.dag | 27 -- src/v2/workflow/ci_floor_peak_emit_test.dag | 7 - 165 files changed, 785 insertions(+), 2717 deletions(-) diff --git a/dag/gunbc/fleet_show_effective_read.dag b/dag/gunbc/fleet_show_effective_read.dag index 7d1c55a01ea..d8907b6bef6 100644 --- a/dag/gunbc/fleet_show_effective_read.dag +++ b/dag/gunbc/fleet_show_effective_read.dag @@ -167,6 +167,20 @@ fn per_slot_memory_cap_verdict_from_unit_read( converge_target_live_verdict(read: read, target: target) } +fn fleet_runner_width_count_read_script(instance_glob: NonEmptyStr) -> String { + concat( + concat("systemctl list-units --type=service --state=active --no-legend \"", instance_glob), + "\" 2>/dev/null | wc -l | tr -d ' '" + ) +} + +fn fleet_runner_unit_memory_props_read_script(unit: NonEmptyStr) -> String { + concat( + concat("systemctl show -p MemoryMax -p MemorySwapMax -p MemoryHigh --value \"", unit), + "\" 2>/dev/null" + ) +} + data gunbc_srv1_runner_slice_cap_fixture_row: RunnerSliceCapLiveReadRow = RunnerSliceCapLiveReadRow { slice_unit: "system-actions-runner.slice", memory_max_raw: "infinity", diff --git a/dag/gunbc/roster_registry.dag b/dag/gunbc/roster_registry.dag index 548741771cf..07ef3ce47b1 100644 --- a/dag/gunbc/roster_registry.dag +++ b/dag/gunbc/roster_registry.dag @@ -235,8 +235,8 @@ data roster_registry: List = [ roster: roster_decl(module_path: "gunbc.stage0_emit_model", decl_name: "generated_stage0_files"), unit_kind: "generated stage0 seed file basename", membership: DeclaredFrontier { - reason: "the set of .rs files regen_stage0 emits into the seed, hand-listed in this .dag as the single authority. Enrolled 2026-07-25 off a measured live fork (this list vs a Rust GENERATED_STAGE0_FILES const that had silently drifted 98 vs 101); construction close landed as the #7258 follow-up — regen_stage0 reads this list through lens_string_list_data and the Rust const is deleted, so a second hand copy is unwritable (witness: generated_stage0_files_read_from_dag_authority_not_rust_const). What remains hand-kept is MEMBERSHIP of the emit set itself", - dissolve_on: "membership derives from the stage0 self-compile output set (fresh emit basenames), so an emitted file is enrolled by construction and a missing authority row is a typed refusal at assert_output_set_matches_registry rather than a hand edit; then this literal list and this row delete" + reason: "the set of .rs files regen_stage0 emits into the seed, hand-listed. Enrolled 2026-07-25 off a MEASURED LIVE FORK: this .dag list and the Rust const GENERATED_STAGE0_FILES (src/v1/stage0/src/bin/regen_stage0.rs) are two hand copies of one fact, and they had silently drifted — .dag carried 98 entries against Rust's 101, missing std_execution_mode.rs and the two v1_compiler_closure_stub_v2_std_*_rust.rs files, all three of which exist on disk carrying the generated-by-v1-compiler marker. The Rust side declares 'Registry authority: gunbc.stage0_emit_model.generated_stage0_files' while itself holding the longer list, so the declared authority was not the authority. The drift stayed invisible because the only consumer, test.claim.stage0_emit_model_witness, asserted NEGATIVES only (that hand-maintained files are absent), a shape that can never catch a missing entry; the concrete wrong answer was is_generated_stage0_file naming a generated file hand-maintained, which is the exact question asked when diagnosing whether a diff to a seed .rs is regen output or a stale-copy bug", + dissolve_on: "the fork closes by CONSTRUCTION rather than by this row: regen_stage0 reads generated_stage0_files from this .dag through a host reader (the gunbc.non_fold_residue precedent, non_fold_residue_units_from_module_source in cli_run.rs) and the Rust const is deleted, leaving one authority and making drift unwritable; the const's own in-code trigger already names this. Until that lands the two copies are held equal only by review, which is why this row exists and why the list-identity check is named as the open follow-up rather than claimed as done" } }, RosterRegistration { diff --git a/dag/std/roster_frontier.dag b/dag/std/roster_frontier.dag index e7ff017804d..a0064e6b170 100644 --- a/dag/std/roster_frontier.dag +++ b/dag/std/roster_frontier.dag @@ -108,15 +108,13 @@ fn frontier_rows_well_formed(rows: List) -> Bool { fold(rows, init: true, f: fn(acc, row) { acc && frontier_row_well_formed(row: row) }) } -fn frontier_subject_key(subject: FrontierSubject) -> String { - match subject { - PathSubject { path: p } => p - DeclSubject { ref: r } => concat(r.module_path as String, concat("::", r.decl_name as String)) - } -} - fn frontier_path_subjects(rows: List) -> List { - map(rows, row => frontier_subject_key(subject: row.subject)) + fold(rows, init: [], f: fn(acc, row) { + match row.subject { + PathSubject { path: p } => concat(acc, [p]) + DeclSubject { ref: r } => concat(acc, [concat(r.module_path as String, concat("::", r.decl_name as String))]) + } + }) } fn frontier_units(rows: List) -> List { @@ -124,7 +122,7 @@ fn frontier_units(rows: List) -> List { } fn concat_frontier_row_groups(groups: List>) -> List { - flat_map(groups, group => group) + fold(groups, init: [], f: fn(acc, group) { concat(acc, group) }) } type FrontierExpiryReport { diff --git a/dag/test/claim/fleet_show_effective_read_witness_test.dag b/dag/test/claim/fleet_show_effective_read_witness_test.dag index df11ec74b87..963fc91d7e8 100644 --- a/dag/test/claim/fleet_show_effective_read_witness_test.dag +++ b/dag/test/claim/fleet_show_effective_read_witness_test.dag @@ -215,6 +215,7 @@ test fn witness_transport_reads_use_show_property_authority() -> Bool { property: MemoryMax, ) && witness_show_property_local_read_holds() + && string_contains(s: fleet_runner_width_count_read_script(instance_glob: "actions-runner@srv1-*.service"), pattern: "list-units") } test fn witness_show_property_injection_metachar_refused() -> Bool { diff --git a/dag/test/claim/stage0_emit_model_witness_test.dag b/dag/test/claim/stage0_emit_model_witness_test.dag index 21f1c533bdb..5d4bfb97f21 100644 --- a/dag/test/claim/stage0_emit_model_witness_test.dag +++ b/dag/test/claim/stage0_emit_model_witness_test.dag @@ -2,8 +2,6 @@ module test.claim.stage0_emit_model_witness data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -data stage0_emit_model_witness_note: String = "Authority: gunbc.stage0_emit_model.generated_stage0_files. Positives catch a missing generated basename (the #7258 drift class); negatives keep hand-maintained files out of the generated set. Floor: generated_stage0_file_count >= 101 (post-#7258 repaired length) so a silent list shrink reds. Host construction close: regen_stage0 reads this list via lens_string_list_data — Rust unit generated_stage0_files_read_from_dag_authority_not_rust_const refuses a reintroduced GENERATED_STAGE0_FILES const." - test fn w_hand_maintained_not_classified_generated() -> Bool { !is_generated_stage0_file(basename: "cli_run.rs") && !is_generated_stage0_file(basename: "v1_interpreter.rs") && @@ -21,11 +19,8 @@ test fn w_generated_files_classified_generated() -> Bool { is_generated_stage0_file(basename: "std_algebra.rs") } -test fn w_generated_file_count_floor_holds() -> Bool { - generated_stage0_file_count() >= 101 -} - test fn w_emit_naming_rule() -> Bool { stage0_module_emit_basename(module_path: "v1.compiler.emit_rust") == "v1_compiler_emit_rust" && stage0_module_emit_filename(module_path: "gunbc.stage0_emit_model") == "gunbc_stage0_emit_model.rs" } + diff --git a/docs/plans/shell-to-dag-residual-census-and-arc-completion.md b/docs/plans/shell-to-dag-residual-census-and-arc-completion.md index 5592ad2470f..bf5eab16402 100644 --- a/docs/plans/shell-to-dag-residual-census-and-arc-completion.md +++ b/docs/plans/shell-to-dag-residual-census-and-arc-completion.md @@ -164,31 +164,19 @@ Keyed on the **construction site (variant/fn name)** and the modeled op it *shou | construction site (file · variant/fn) | builder(s) — `*_script.dag` and/or inline | should call | sub-class | | --- | --- | --- | --- | -| ~~`fleet_show_effective_read.dag` · `SystemdUnitMemoryPropertiesRead`, `SystemdUnitMemoryMaxRead`~~ **LANDED** | ~~`fleet_show_effective_read_script.dag`~~ deleted; ~~inline `fleet_runner_width_count_read_script`, `fleet_runner_unit_memory_props_read_script`~~ deleted (census true-up, 2026-07-26) | `systemd.Systemctl.ShowProperty` via `gunbc.systemctl_show_read`; `list-units` via `gunbc.systemctl_list_units` | **A1 DONE** — see the dead-scaffold note below | -| ~~`host_converge_slice1.dag` (via `shell.Exec.Run`)~~ **LANDED** | ~~inline `…_memory_max_read/set_script`, `…_enumerate_units_script`~~ deleted | `systemctl_show_read` + `systemctl_list_units_active_services` (both imported and called; `host_converge_slice1.dag:15,49,287`) | **A1 DONE** — verified 2026-07-26: zero `_script` fns, zero `shell.Exec.Run`, zero `systemctl` concats in the file | +| `fleet_show_effective_read.dag` · `SystemdUnitMemoryPropertiesRead`, `SystemdUnitMemoryMaxRead` | `fleet_show_effective_read_script.dag` relocated fns **+ inline** `fleet_runner_unit_property_read_script`, `fleet_runner_width_count_read_script` (`systemctl show`/`list-units`) | `extdeps.os.systemctl.ShowProperty` (exists) + a `list-units` op | **A1** modeled | +| `host_converge_slice1.dag` (via `shell.Exec.Run`) | inline `…_memory_max_read_script`, `…_memory_max_set_script` (`systemctl set-property` concat), `…_enumerate_units_script` (`systemctl list-units` concat) | `systemctl.ShowProperty` / `SetProperty` / new `list-units` op | **A1** modeled | | ~~`host_identity_observation.dag` · `HostIdentityShortHostnameRead`~~ **LANDED** | ~~`host_identity_short_hostname_script`~~ deleted | `os.Hostname.ReadShort` · `dag/extdeps/tools/hostname.dag` | **A2 DONE** — realized through `gunbc.hostname_read` (LocalShell → op, SshShell → typed argv) | | ~~`host_effect.dag` · `SetHostnameCas`~~ **LANDED (#7194)** | ~~`host_effect_set_hostname_cas_script`~~ deleted (no such symbol anywhere in tree) | `os.Hostname.Set` · `dag/extdeps/tools/hostname.dag` | **A2 DONE** — `host_effect_realize.dag`'s `SetHostnameCas` arm calls `gunbc.hostname_set` `hostname_set_cas`, whose `hostname_set_local` is `os.Hostname.Set(desired:)`; the SSH arm goes through `typed_argv_exec_over_ssh`, and the CAS read reuses the landed `os.Hostname.ReadShort`. Verified on main 2026-07-25 (bucket A): zero concat builders, zero `shell.Exec` on the path. | | `host_effect.dag` · `ReadEffectivePosixPrincipal`, `SudoNopasswdExecuteProbe` | `host_effect_deploy_access_probe_script.dag` (whoami / `sudo -n` / `sudo -n -l`) | `access.PosixEffectivePrincipal`, `sudo.NopasswdExecuteProbe` (exist) | **A3** OWNED BY C5 #6946 — do not touch | -| ~~`live_deploy/` effect variants~~ **LANDED (D2 #7192)** | ~~`live_deploy/host_effect_script.dag`~~ **file deleted** — no such path in tree | decomposed (multi-op) | **A4 DONE** — verified 2026-07-26: `dag/gunbc/live_deploy/` is `apply · emit · intent · operations · readiness · service_ready · spec` only, and the directory contains **zero** `ShellCommand` occurrences. This closes do-not-miss item 1 below (the #7004/#7006 relocation debt) | +| `live_deploy/` effect variants | `live_deploy/host_effect_script.dag` (`…apply`/`…retract`/`…ensure_dependency`/`…digest_readback`) | decompose (multi-op) | **A4** decompose | | `host_effect_realize.dag` · `ProvisionBuildCache` | `host_build_cache_provision_script.dag` (6 `build_cache_*_body`) | decompose | **A5** srv* deprioritized | | hygiene reaper/liveness | `host_hygiene_reaper_script.dag` (4 `…_body`), `host_hygiene_liveness_script.dag` | decompose | **A5** srv* deprioritized | | `srv3_host_effect_apply.dag` · `Srv3*` variants, `srv3_install_diagnostic_checklist.dag` · `Srv3InstallDiagnosticObserve`, `nbd_proxy_virtual_media_install.dag` · `Srv3NbdProxyServe` | `srv3_host_effect_script.dag` (5 fns), `srv3_install_diagnostic_observe_script.dag` (5 fns) | typed observe/receipt effects | **A5** srv* deprioritized | -**A1 dead-scaffold finding (census true-up, 2026-07-26).** The A1 typed migration (D2 #7192) dissolved the *live* read path onto `ShowProperty`/`ListUnits` but left two `systemctl` concat builders behind in `fleet_show_effective_read.dag`, orphaned: - -- `fleet_runner_unit_memory_props_read_script` — **zero references tree-wide** beyond its own definition. Pure dead code. -- `fleet_runner_width_count_read_script` — **zero production callers**; its only other reference was a witness assertion. - -Both are deleted in this true-up (deletion is the receipt; a row claiming "done" beside a live concat is the relocation pattern this census exists to catch). Two things make this worth recording rather than quietly fixing: - -1. **The file's own note claimed the property the tree did not have.** `fleet_show_effective_read.dag:62` asserts "no per-command HostEffect nicknames, **no concat shell strings**" while two concat shell strings sat 110 lines below it. The note was true of the *live path* and false of the *file* — the §3 tell that a prose claim had drifted from its carrier. -2. **A witness was pinning the dead scaffold as contract.** `fleet_show_effective_read_witness_test.dag` · `witness_transport_reads_use_show_property_authority` — a witness whose *name* asserts reads use the typed authority — carried a third conjunct asserting `fleet_runner_width_count_read_script(...)` contains `"list-units"`. That conjunct (a) is tautological (a `concat` of a literal containing `list-units` always contains `list-units`; it can only fail if someone edits the literal), (b) asserts nearly the **opposite** of the witness's stated purpose — that a shell-concat *bypass* still exists with the right shape, and (c) kept a dead symbol referenced, so it never read as dead code. Removing it leaves the witness asserting exactly what its name claims (typed argv match + local read), which is **stronger**, not weaker. This is the DESIGN §5 "tests *asserting the string* so the degradation was enshrined as the contract" shape, in the small. - ### 4.B — DIRECT `ShellCommand{script}` still constructed in intent -**STATUS 2026-07-26 (census true-up): both rows below are DISCHARGED — there are now ZERO direct `ShellCommand{script}` construction sites in `dag/gunbc/live_deploy/`** (verified: `grep -rn ShellCommand dag/gunbc/live_deploy/` returns 0). `live_deploy_unit_diagnosis_command` and `live_deploy_healthz_probe_script_for_port` no longer exist anywhere in tree — D2 #7192 (tree_sync `| tail` + `exit 0` absorbing fallback, converted to a typed `Systemctl.Status` exit-as-data refusal) and D3 #7193 (readiness routed through `gunbc.systemctl_status_read` + `http.Client.Get`) closed them. The table is kept struck-through as the audit trail. - -~~The relocation wave turned most direct construction into nickname variants (4.A), but **two live direct sites remain** on `origin/main` — the multiline form my first-draft single-line P1 missed (review 41467):~~ +The relocation wave turned most direct construction into nickname variants (4.A), but **two live direct sites remain** on `origin/main` — the multiline form my first-draft single-line P1 missed (review 41467): | site (file · construction) | builder (file · fn) | runs on | dissolve to | | --- | --- | --- | --- | @@ -199,9 +187,8 @@ Residue only (not construction to migrate): | site (file · symbol) | what | action | | --- | --- | --- | -| `host_effect_plan.dag:39` · `ShellCommand { script: "" }` | empty placeholder | delete with the type — **still present** (verified 2026-07-26) | -| `host_effect.dag:28` · `ShellCommand { script: String }` | the **type variant** itself | delete at arc close (DESIGN §5, escalated) — terminal; **still present** | -| `fleet_converge_cli.dag:57` · `ShellCommand { script: _ } => fallback` | a **match arm**, not a construction site — consumes the variant, builds no string | *(row added by the 2026-07-26 true-up; previously uncensused)* dissolves with the type variant above. Listed so the arc-close delete has a complete consumer list — a missed match arm is what turns the terminal delete into a non-exhaustive-match break | +| `host_effect_plan.dag` · `ShellCommand { script: "" }` | empty placeholder | delete with the type | +| `host_effect.dag` · `ShellCommand { script: String }` | the **type variant** itself | delete at arc close (DESIGN §5, escalated) — terminal | *(The first draft mis-grounded on a divergent worktree — `fleet_show`/`host_identity` corrected to 4.A per review 41399 — and then under-scoped P1 to single-line, missing these `readiness.dag` sites per review 41467. Both fixed.)* @@ -218,20 +205,7 @@ Residue only (not construction to migrate): ### 4.D — `ssh.Session.Exec` command-string (vs typed `ExecArgv`) -**RECLASSIFIED by the 2026-07-26 true-up — read before picking this up.** Every `ssh_session_exec(command:)` site in the table below sits inside an **`srv3_*` function**, i.e. inside the srv\* cluster the operator wound down 2026-07-22 and authorized for retirement 2026-07-24 (§5.D roadmap item). So 4.D is **not** an independently-dispatchable A1 bucket: dissolving these to `ExecArgv` would be typed-argv work on a subgraph slated for deletion — motion, not progress. **4.D inherits A5's deferred status** and should be picked up only as part of the srv3 retirement, or if that retirement is abandoned. - -Exhaustive site list, verified on `origin/main` @ `efe67794cd` (enclosing fn in bold — this is what the original table did not record): - -| line | enclosing fn | verb | disposition | -| --- | --- | --- | --- | -| `:731` | **`srv3_transport_witness_bin_success`** | arbitrary command (`cd … && bin args`) | A5-deferred (srv3) | -| `:742` | **`srv3_transport_test_executable`** | `test -x ` | A5-deferred (srv3) | -| `:752` | **`srv3_apt_tool_present`** | `command -v ` | A5-deferred (srv3) | -| `:775` | **`srv3_tool_bin_path`** | `command -v ` | A5-deferred (srv3) | -| `:821`, `:822` | **`srv3_chown_directory_to_current_user`** | `id -u` / `id -g` | A5-deferred (srv3) | -| `:1169` | **`run_shell_transport`** | `ssh_session_exec_script(script: script.body)` | **NOT srv3** — this is the realization core's `RetainedShellScript` → SSH path, i.e. the §5.E counted frontier's own transport. It dissolves when the frontier empties, not by a per-site migration. Do not edit under a 4.D brief | - -The original table's rows are retained below for provenance: +All in `host_effect_realize.dag`, via `ssh_session_exec(command:)` / `ssh_session_exec_script(script:)`: | construction | verb | should call | class | | --- | --- | --- | --- | @@ -273,17 +247,6 @@ These are correct as shell (a GHA runner / cron / git / pre-runtime host only un `live_deploy/emit.dag:448,452` `expected_*_script` (drift-gate oracles), `*_test.dag` fixtures. These are test expectations, not runtime construction; they follow their subject's dissolution. -### Ledger true-up @ 2026-07-26 (§4.A/4.B/4.D, snappy-moth-330) — read this FIRST - -Re-censused §4.A, §4.B and §4.D against `origin/main` @ `efe67794cd` by execution over the tree, not by trusting the rows. Four corrections, in descending order of how badly the stale row would mislead: - -1. **§4.D is not a dispatchable bucket — it is A5-deferred.** Every `ssh_session_exec(command:)` site is inside an **`srv3_*`** fn (the wound-down srv\* cluster), except `:1169` which is the realization core's own `RetainedShellScript` transport. The old table listed the verbs without the enclosing fns, which made it read like an independent typed-argv bucket. It is not; picking it up would be typed-argv work on a subgraph slated for retirement. -2. **§4.A4 and §4.B are DONE.** `live_deploy/host_effect_script.dag` is deleted and `dag/gunbc/live_deploy/` contains zero `ShellCommand`. This closes "do-not-miss" item 1 (the #7004/#7006 relocation debt), which had been the loudest open warning in this doc. -3. **§4.A1 is DONE, but left two dead concat builders behind** — deleted in this true-up, with the witness that was pinning one of them as contract. See the A1 dead-scaffold note in §4.A; the pattern (a file note claiming "no concat shell strings" while two sat below it, plus a tautological witness conjunct asserting the bypass still had the right shape) is the reusable finding. -4. **One uncensused consumer added** — `fleet_converge_cli.dag:57`'s `ShellCommand` **match arm**, so the terminal type delete has a complete consumer list. - -**Net:** with bucket D (§4.E/§4.I) in flight, the non-deferred remainder of this arc is **§4.F wall-green only** (the `host_language_transport_script` lens promotion + meta-exec confinement) — and that is coupled to the node/subtree visibility-grants lane, not independently schedulable here. Everything else open is operator-deferred srv\*. - ### Ledger true-up @ 2026-07-25 (bucket A, calm-pike-837) — read this before the 07-22 snapshot below The 07-22 snapshot is ~7 merges stale. What has landed since, keyed to the rows it discharges: @@ -328,12 +291,12 @@ The state of every PR in this arc, so nothing is missed if work pauses here. **A **Not started — the remaining arc (bounded, fully specified in §5; safe to pause):** - **§5.A** — **COMPLETE.** All four ops landed on #7194 and are verified in tree at their post-#7231 homes: `os.Hostname.ReadShort`/`Set` (`dag/extdeps/tools/hostname.dag`), `systemd.Systemctl.ListUnits` and `.Status` (`dag/extdeps/systemd/systemctl.dag:185,219`), `os.Id.Uid` (`dag/extdeps/tools/id.dag:26`). (`ssh.Session.ExecArgv` landed via C5; `Clock.Now` in `dag/extdeps/clock/clock.dag` already existed and is now the single authority for every `date -Iseconds` site.) **The finite new-op list this whole arc needed is closed** — everything remaining in §5.B is calling ops that now exist. -- **§5.B** — the call-the-op migrations, **UNPAUSED** (the wall landed, #7184). D1/D2/D3 (#7192/#7193/#7194) and bucket A discharged the hostname, systemctl-read and clock clusters. **Updated 2026-07-26:** `live_deploy` (4.A4) and the `fleet_show`/`host_converge_slice1` systemctl cluster (4.A1) are **also done** — only the **operator-deferred srv\* cluster (4.A5, and 4.D which is inside it)** remains in §5.B. With bucket D (4.E/4.I foreign-executor emit) in flight, the non-deferred §5.B queue is **empty**. +- **§5.B** — the call-the-op migrations, **UNPAUSED** (the wall landed, #7184). D1/D2/D3 (#7192/#7193/#7194) and this PR's bucket A discharged the hostname, systemctl-read and clock clusters; the srv\* cluster (4.A5) and `live_deploy` (4.A4) remain. - **§5.E** — the **transport-script construction wall** — **LANDED #7184.** Built as a `RetainedShellScript` RECORD edge + free-minter deletion + counted bridges + lens activation + compile-fail REDs (see §5.E ruling block; "brand `TransportScript`" was found non-walling because the brand is transparent). The 2026-07-24 wall-first ruling that paused §5.A/§5.B is therefore discharged. **⚠ Do-not-miss for wind-down:** -1. ~~**#7004 and #7006 merged as "progress" but are relocations**~~ — **CLOSED by the 2026-07-26 true-up.** Both relocation sites are now genuinely dissolved: `live_deploy/host_effect_script.dag` is **deleted** (D2 #7192) with zero `ShellCommand` left in the directory, and `host_identity`'s hostname path went typed on D1 #7194. The relocation debt this item tracked no longer exists on main. +1. **#7004 and #7006 merged as "progress" but are relocations** — the concats were moved, not deleted, so those sites (live_deploy/apply, host_identity) are **not actually bash-free.** #7064 fixes `fleet_show`; the rest still need the proper dissolution. 2. **Two open PRs to land:** #7065 (census/plan) and #7064 (exemplar). 3. **Nothing is lost by pausing** — §5 is the durable, bounded plan (4 ops + call-existing-op + emit-roster + wall). Resume from §5 whenever. @@ -377,7 +340,7 @@ This punch-list folds into the **`host_language_transport_script` lens going liv | new op | home file | covers verb | consumers | | --- | --- | --- | --- | | `extdeps.os.hostname` · ~~`Read`~~ **LANDED** + `Set` | `dag/extdeps/os/hostname.dag` (created) | ~~`hostname -s`~~ **done**; `hostnamectl set-hostname` remains | **Read done** — `os.Hostname.ReadShort` realized via typed cell `HostnameReadOnHost` + `gunbc.hostname_read` (LocalShell → op, SshShell → typed argv); both read consumers dissolved: `host_identity_observation` (`HostIdentityShortHostnameRead`, the `host_identity_short_hostname_script` concat DELETED) and `ci_deploy_target_host` (runtime-present read; the GHA preflight *block* stays E-emit). **Set** (`host_effect_hostname` `SetHostnameCas`, its own `host_effect_set_hostname_cas_script` concat) still pending — reuses this op file with a `SetHostname` op. | -| `systemd.Systemctl.ListUnits` | **add to** `dag/extdeps/os/systemctl.dag` | `systemctl list-units --state=active` | `host_converge_slice1` (was `_enumerate_units_script`; now calls `systemctl_list_units_active_services` at `:287`). *The `fleet_show_effective_read` consumer named here — `fleet_runner_width_count_read_script` — was never migrated: it was superseded and left dead, and is deleted by the 2026-07-26 true-up.* | +| `systemd.Systemctl.ListUnits` | **add to** `dag/extdeps/os/systemctl.dag` | `systemctl list-units --state=active` | `host_converge_slice1` (`_enumerate_units_script`), `fleet_show_effective_read` (`fleet_runner_width_count_read_script`) | | `extdeps.os.id` · `Read` (uid/gid/user) | **new** `dag/extdeps/os/id.dag` | `id -u`, `id -g`, `id ` | `host_effect_realize` (ssh probes), `fleet_posix_accounts` (`probe_command`) | | `ssh.Session.ExecArgv` | **add to** `dag/extdeps/diagnostic/ssh.dag` | typed argv over ssh (`ssh host -- argv`) | `host_effect_realize` ssh probes — **IN FLIGHT, C5 #6946** | | `systemd.Systemctl.Status` | **add to** `dag/extdeps/os/systemctl.dag` | `systemctl status --no-pager --full ` (models exit-3-for-dead-unit — retires the `\| tail`+`exit 0` absorbing fallback) | `live_deploy/readiness.dag` unit diagnosis | diff --git a/src/v1/stage0/src/bin/regen_stage0.rs b/src/v1/stage0/src/bin/regen_stage0.rs index 73e7f17b14a..c5b5c71c5d6 100644 --- a/src/v1/stage0/src/bin/regen_stage0.rs +++ b/src/v1/stage0/src/bin/regen_stage0.rs @@ -6,7 +6,6 @@ use std::io::{self, Write}; use std::path::{Path, PathBuf}; use std::process::{Command, ExitCode, Stdio}; use std::rc::Rc; -use std::sync::OnceLock; use std::time::Instant; use v1_compiler::v1_compiler_artifact::RenderTarget; @@ -25,29 +24,114 @@ const BOOTSTRAP_TIMING_RECEIPT_ENV: &str = "GUNBC_BOOTSTRAP_TIMING_RECEIPT"; const DEFAULT_BOOTSTRAP_TIMING_RECEIPT: &str = "target/bootstrap_timing/v1_regen_stage0_receipt.json"; -// Single authority: gunbc.stage0_emit_model.generated_stage0_files -// (dag/gunbc/stage0_emit_model.dag). Hand-maintained registry authority: -// gunbc.stage0_crate_layout_generated (frontier-derived; regen via -// generated_artifact_gate main_wet). Witness: stage0_emit_model_witness_test.dag -// + stage0_crate_layout_witness_test.dag + self_host/crate_layout_witness_test.dag. -// Construction close (#7258 follow-up): the Rust GENERATED_STAGE0_FILES const is -// deleted; regen reads the .dag list through lens_string_list_data so a second -// hand copy cannot drift. -const STAGE0_EMIT_MODEL_AUTHORITY_REL: &str = "dag/gunbc/stage0_emit_model.dag"; -const GENERATED_STAGE0_FILES_DATA_NAME: &str = "generated_stage0_files"; - -fn generated_stage0_files() -> &'static [String] { - static FILES: OnceLock> = OnceLock::new(); - FILES - .get_or_init(|| { - v1_compiler::cli_run::lens_string_list_data( - STAGE0_EMIT_MODEL_AUTHORITY_REL, - GENERATED_STAGE0_FILES_DATA_NAME, - false, - ) - }) - .as_slice() -} +// Registry authority: gunbc.stage0_emit_model.generated_stage0_files. +// Hand-maintained registry authority: gunbc.stage0_crate_layout_generated +// (frontier-derived; regen via generated_artifact_gate main_wet). +// Witness: stage0_crate_layout_witness_test.dag + self_host/crate_layout_witness_test.dag. +// Dissolve-on: regen_stage0 reads emitted gunbc_stage0_emit_model.rs roster. +const GENERATED_STAGE0_FILES: &[&str] = &[ + "compiler_tests.rs", + "extdeps_cargo.rs", + "extdeps_cargo_version.rs", + "extdeps_external_authority.rs", + "extdeps_languages_dag_emit.rs", + "extdeps_languages_dag_syntax.rs", + "extdeps_languages_dag_types.rs", + "extdeps_languages_go_emit.rs", + "extdeps_languages_go_syntax.rs", + "extdeps_languages_go_types.rs", + "extdeps_languages_python_emit.rs", + "extdeps_languages_python_syntax.rs", + "extdeps_languages_python_types.rs", + "extdeps_languages_rust_emit.rs", + "extdeps_languages_rust_syntax.rs", + "extdeps_languages_rust_types.rs", + "extdeps_uri.rs", + "extdeps_uri_path.rs", + "extdeps_version.rs", + "extdeps_version_semver.rs", + "gunbc_stage0_crate_layout_generated.rs", + "gunbc_stage0_crate_partition_generated.rs", + "lib.rs", + "std_algebra.rs", + "std_coercion.rs", + "std_computation.rs", + "std_constructors.rs", + "std_content_hash.rs", + "std_currency.rs", + "std_decl_ref.rs", + "std_disposition.rs", + "std_effects.rs", + "std_emit_model.rs", + "std_error_primitives.rs", + "std_execution_mode.rs", + "std_graph.rs", + "std_http_path.rs", + "std_induction.rs", + "std_integer.rs", + "std_interface_summary.rs", + "std_iteration.rs", + "std_logic.rs", + "std_machine_constraints.rs", + "std_magnitude.rs", + "std_measure.rs", + "std_nat.rs", + "std_node.rs", + "std_pareto.rs", + "std_realization_schedule.rs", + "std_serialization.rs", + "std_syntax.rs", + "std_termination.rs", + "std_trait_derive_shape.rs", + "std_types.rs", + "v1_compiler_artifact.rs", + "v1_compiler_coercion.rs", + "v1_compiler_closure_stub_v2_std_integer_rust.rs", + "v1_compiler_closure_stub_v2_std_text_rust.rs", + "v1_compiler_compile.rs", + "v1_compiler_compiler_tests_rust.rs", + "v1_compiler_complexity.rs", + "v1_compiler_dag_collect.rs", + "v1_compiler_dag_collect_support.rs", + "v1_compiler_effect_derivation.rs", + "v1_compiler_emit.rs", + "v1_compiler_emit_core_support.rs", + "v1_compiler_emit_go.rs", + "v1_compiler_emit_python.rs", + "v1_compiler_emit_rust.rs", + "v1_compiler_infer.rs", + "v1_compiler_infer_access.rs", + "v1_compiler_infer_cycle.rs", + "v1_compiler_infer_emit_info.rs", + "v1_compiler_infer_env.rs", + "v1_compiler_infer_items.rs", + "v1_compiler_infer_lookup.rs", + "v1_compiler_infer_method.rs", + "v1_compiler_infer_patterns.rs", + "v1_compiler_infer_resolve.rs", + "v1_compiler_infer_service.rs", + "v1_compiler_infer_sigs.rs", + "v1_compiler_infer_types.rs", + "v1_compiler_languages.rs", + "v1_compiler_normalize.rs", + "v1_compiler_ownership.rs", + "v1_compiler_parse.rs", + "v1_compiler_resolve.rs", + "v1_compiler_runtime_go.rs", + "v1_compiler_runtime_rust.rs", + "v1_compiler_stage0_crates.rs", + "v1_compiler_tokenize.rs", + "v1_compiler_trace.rs", + "v1_compiler_trait_derive_emit.rs", + "v1_compiler_workspace_members.rs", + "v1_probe_emit_interp.rs", + "v1_rt.rs", + "v1_std_core.rs", + "v1_test_non_ascii_perf_fixture.rs", + "wt_a.rs", + "wt_b.rs", + "wt_common.rs", +]; fn main() -> ExitCode { match run() { @@ -222,7 +306,7 @@ fn run() -> Result<(), String> { Usage: regen_stage0 [--verify | --emit-fresh [--write-manifest ] [--verify]]\n\ Omit flags to write stage0; pass `--verify` to check without writing;\n\ pass `--emit-fresh ` to assemble the faithful emitted crate into and stop;\n\ - add `--write-manifest ` to also write the generated_stage0_files roster there;\n\ + add `--write-manifest ` to also write the GENERATED_STAGE0_FILES roster there;\n\ combine `--emit-fresh` with `--verify` to leave the assembled crate in place after checking." )); } @@ -278,12 +362,12 @@ fn run() -> Result<(), String> { if emit_fresh.is_some() { if let Some(manifest_path) = &write_manifest { - let content = generated_stage0_files().join("\n"); + let content = GENERATED_STAGE0_FILES.join("\n"); fs::write(manifest_path, content) .map_err(|e| format!("write roster manifest {}: {e}", manifest_path.display()))?; println!( "regen_stage0 --write-manifest: wrote {} file entries to {}", - generated_stage0_files().len(), + GENERATED_STAGE0_FILES.len(), manifest_path.display() ); } @@ -295,7 +379,7 @@ fn run() -> Result<(), String> { stage0_src: &stage0_src, fresh_dir: &fresh_dir, verify_only, - generated_file_count: generated_stage0_files().len(), + generated_file_count: GENERATED_STAGE0_FILES.len(), emitted_file_count: emitted.len(), phases: &mut phases, run_started, @@ -308,7 +392,7 @@ fn run() -> Result<(), String> { manifest_dir: &manifest_dir, verify_only, status: "completed_emit_fresh", - generated_file_count: generated_stage0_files().len(), + generated_file_count: GENERATED_STAGE0_FILES.len(), emitted_file_count: emitted.len(), phases, elapsed_ms: elapsed_ms(run_started), @@ -329,7 +413,7 @@ fn run() -> Result<(), String> { stage0_src: &stage0_src, fresh_dir: &fresh_dir, verify_only, - generated_file_count: generated_stage0_files().len(), + generated_file_count: GENERATED_STAGE0_FILES.len(), emitted_file_count: emitted.len(), phases: &mut phases, run_started, @@ -356,7 +440,7 @@ fn run() -> Result<(), String> { manifest_dir: &manifest_dir, verify_only, status: "completed", - generated_file_count: generated_stage0_files().len(), + generated_file_count: GENERATED_STAGE0_FILES.len(), emitted_file_count: emitted.len(), phases, elapsed_ms: elapsed_ms(run_started), @@ -365,7 +449,7 @@ fn run() -> Result<(), String> { let _ = fs::remove_dir_all(&fresh_dir); println!( "regen_stage0: wrote {} generated stage0 files.", - generated_stage0_files().len() + GENERATED_STAGE0_FILES.len() ); Ok(()) } @@ -518,8 +602,8 @@ fn temp_dir(name: &str) -> PathBuf { } fn assert_registry_is_partitioned() -> Result<(), String> { - for generated in generated_stage0_files() { - if HAND_MAINTAINED_STAGE0_FILES.contains(&generated.as_str()) { + for generated in GENERATED_STAGE0_FILES { + if HAND_MAINTAINED_STAGE0_FILES.contains(generated) { return Err(format!( "`{generated}` appears in both generated and hand-maintained stage0 registries" )); @@ -720,7 +804,7 @@ fn rustfmt_generated_crate(dir: &Path) -> Result<(), String> { // standalone rustfmt so the emitted ARTIFACT is canonically formatted for EVERY comparer — one // normalization authority at production, not a re-normalization patched into each comparer. let src = dir.join("src"); - for file_name in generated_stage0_files() { + for file_name in GENERATED_STAGE0_FILES { let path = src.join(file_name); let raw = fs::read_to_string(&path) .map_err(|e| format!("read emitted {}: {e}", path.display()))?; @@ -741,7 +825,7 @@ fn rustfmt_generated_crate(dir: &Path) -> Result<(), String> { struct HandVerifyReport { /// Emitter produces a candidate byte-identical (after identical rustfmt normalization) /// to the committed hand file: the HAND entry is now a dead scaffold and the file - /// should be flipped into gunbc.stage0_emit_model.generated_stage0_files. + /// should be flipped into GENERATED_STAGE0_FILES. matches: Vec, /// Emitter produces a candidate that differs from committed: either the known emitter /// gap that justifies hand-maintenance, or an unintended hand-edit. Inspect the diff. @@ -849,7 +933,7 @@ fn print_hand_verify_report(report: &HandVerifyReport) { ); if !report.matches.is_empty() { println!( - " MATCH (emitter reproduces these -- flip to gunbc.stage0_emit_model.generated_stage0_files): {}", + " MATCH (emitter reproduces these -- flip to GENERATED_STAGE0_FILES): {}", report.matches.join(", ") ); } @@ -1018,10 +1102,7 @@ fn assert_output_set_matches_registry( committed_src: &Path, fresh_src: &Path, ) -> Result<(), String> { - let registered: BTreeSet<&str> = generated_stage0_files() - .iter() - .map(|s| s.as_str()) - .collect(); + let registered: BTreeSet<&str> = GENERATED_STAGE0_FILES.iter().copied().collect(); let hand_maintained: BTreeSet<&str> = HAND_MAINTAINED_STAGE0_FILES.iter().copied().collect(); let fresh_files = direct_rs_file_names(fresh_src)?; @@ -1035,7 +1116,7 @@ fn assert_output_set_matches_registry( if !unregistered_fresh.is_empty() { return Err(format!( "fresh self-compile emitted unregistered stage0 file(s): {}\n\ - Add generated files to gunbc.stage0_emit_model.generated_stage0_files or mark hand-maintained files explicitly.", + Add generated files to GENERATED_STAGE0_FILES or mark hand-maintained files explicitly.", unregistered_fresh.join(", ") )); } @@ -1047,7 +1128,7 @@ fn assert_output_set_matches_registry( .collect(); if !missing_fresh.is_empty() { return Err(format!( - "generated_stage0_files contains file(s) missing from fresh self-compile: {}", + "GENERATED_STAGE0_FILES contains file(s) missing from fresh self-compile: {}", missing_fresh.join(", ") )); } @@ -1070,7 +1151,7 @@ fn assert_output_set_matches_registry( if !unregistered_committed_generated.is_empty() { return Err(format!( "committed generated stage0 file(s) are not registered: {}\n\ - Add them to gunbc.stage0_emit_model.generated_stage0_files or remove the stale committed outputs.", + Add them to GENERATED_STAGE0_FILES or remove the stale committed outputs.", unregistered_committed_generated.join(", ") )); } @@ -1100,7 +1181,7 @@ fn direct_rs_file_names(dir: &Path) -> Result, String> { fn verify_stage0_matches(committed_src: &Path, fresh_src: &Path) -> Result<(), String> { let mut mismatches = Vec::new(); - for file_name in generated_stage0_files() { + for file_name in GENERATED_STAGE0_FILES { let committed = committed_src.join(file_name); let fresh = fresh_src.join(file_name); let committed_text = fs::read_to_string(&committed) @@ -1111,7 +1192,7 @@ fn verify_stage0_matches(committed_src: &Path, fresh_src: &Path) -> Result<(), S // `rustfmt_generated_crate` (production-side single authority, matching the committed // seed's own fmt normalization), so any surviving difference is genuine content drift. if committed_text != fresh_text { - mismatches.push(file_name.clone()); + mismatches.push((*file_name).to_string()); } } // Structured divergence-count contract for the regen_divergence ratchet (#6352, two-job split): @@ -1168,7 +1249,7 @@ fn changed_registered_outputs( committed_src: &Path, ) -> Result, String> { let mut changed = Vec::new(); - for file_name in generated_stage0_files() { + for file_name in GENERATED_STAGE0_FILES { let fresh = fresh_src.join(file_name); let committed = committed_src.join(file_name); let fresh_text = fs::read_to_string(&fresh) @@ -1176,7 +1257,7 @@ fn changed_registered_outputs( let committed_text = match fs::read_to_string(&committed) { Ok(text) => text, Err(e) if e.kind() == io::ErrorKind::NotFound => { - changed.push(file_name.clone()); + changed.push((*file_name).to_string()); continue; } Err(e) => return Err(format!("read committed {}: {e}", committed.display())), @@ -1184,14 +1265,14 @@ fn changed_registered_outputs( // Plain byte compare: the emitted fresh crate is already per-file normalized at production // (`rustfmt_generated_crate`), so the changed list carries genuine content drift only. if fresh_text != committed_text { - changed.push(file_name.clone()); + changed.push((*file_name).to_string()); } } Ok(changed) } fn write_registered_outputs(fresh_src: &Path, committed_src: &Path) -> Result<(), String> { - for file_name in generated_stage0_files() { + for file_name in GENERATED_STAGE0_FILES { let fresh = fresh_src.join(file_name); let committed = committed_src.join(file_name); fs::copy(&fresh, &committed) @@ -1210,50 +1291,12 @@ mod tests { assert_registry_is_partitioned().expect("stage0 registry partition"); for file_name in HAND_MAINTAINED_STAGE0_FILES { assert!( - !generated_stage0_files().iter().any(|f| f == file_name), + !GENERATED_STAGE0_FILES.contains(file_name), "{file_name} must not be touched by regen_stage0" ); } } - /// Construction close of the #7258 dual-copy fork: regen must read - /// `gunbc.stage0_emit_model.generated_stage0_files` and must not carry a second - /// hand list const. RED: re-introduce the deleted roster const → this fails; - /// drop a known generated basename from the .dag list → the positives fail. - #[test] - fn generated_stage0_files_read_from_dag_authority_not_rust_const() { - let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src/bin/regen_stage0.rs"); - let source = fs::read_to_string(&path).expect("read regen_stage0.rs"); - // Needle assembled so this assertion's own source text is not a false positive. - let banned_const = format!("const {}{}{}", "GENERATED_STAGE0_FILES", ": ", "&[&str]"); - assert!( - !source.contains(&banned_const), - "hand-copied generated_stage0_files Rust const must stay deleted — dual-copy fork is unwritable" - ); - assert!( - source.contains("lens_string_list_data"), - "regen_stage0 must read generated_stage0_files via the host .dag list reader" - ); - let files = generated_stage0_files(); - assert!( - files.len() >= 101, - "authority list too short ({}); expected the post-#7258 generated set", - files.len() - ); - for required in [ - "std_execution_mode.rs", - "v1_compiler_closure_stub_v2_std_integer_rust.rs", - "v1_compiler_closure_stub_v2_std_text_rust.rs", - "lib.rs", - "std_algebra.rs", - ] { - assert!( - files.iter().any(|f| f == required), - "dag authority missing generated file {required}" - ); - } - } - #[test] fn output_set_rejects_unregistered_fresh_file() { let committed = temp_test_dir("committed"); @@ -1301,18 +1344,12 @@ mod tests { // Plain byte compare: only the file whose content genuinely changed is listed. seed_registered_files(&committed, "fn same() {}\n"); seed_registered_files(&fresh, "fn same() {}\n"); - fs::write( - fresh.join(generated_stage0_files()[0].as_str()), - "fn changed() {}\n", - ) - .expect("write changed generated file"); + fs::write(fresh.join(GENERATED_STAGE0_FILES[0]), "fn changed() {}\n") + .expect("write changed generated file"); let changed = changed_registered_outputs(&fresh, &committed).expect("changed output receipt"); - assert_eq!( - changed, - vec![generated_stage0_files()[0].as_str().to_string()] - ); + assert_eq!(changed, vec![GENERATED_STAGE0_FILES[0].to_string()]); let _ = fs::remove_dir_all(committed); let _ = fs::remove_dir_all(fresh); @@ -1434,7 +1471,7 @@ mod tests { fn seed_registered_files(dir: &Path, contents: &str) { fs::create_dir_all(dir).expect("create temp stage0 dir"); - for file_name in generated_stage0_files() { + for file_name in GENERATED_STAGE0_FILES { fs::write(dir.join(file_name), contents).expect("write registered generated file"); } } diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index 4a5b224d19f..ba1902c3cbb 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -13133,11 +13133,9 @@ pub fn discover_floor_witness_roster( discovery_scope_dirs: &[String], ) -> Result, String> { floor_filename_hygiene_refusal_via_producer(source_roots)?; - // U2 orphan enroll-or-refuse is implemented in test_module_hygiene (unit RED live) but - // NOT wired into the naming walk on this PR: the live corpus still has dark helpers that - // the companion sweep PR resolves. Wiring here before that sweep fail-closes the floor - // on ~75 pre-existing orphans. Dissolve-on: #7274 / session/proud-wren-892-sweep-b - // (re-enable check_orphan_helpers_or_err here in the same commit as the src/v2 corpus sweep). + // U2 — orphan plain fns in *_test.dag (enroll-or-refuse). Lives in the naming walk, + // not a new lens (umbrella-dissolution fence). + crate::test_module_hygiene::check_orphan_helpers_or_err(source_roots)?; let mut rows = invoke_floor_discovery_producer(source_roots, scan_dirs, exclude_substrings)?; rows = apply_discovery_scope_dirs_filter(rows, discovery_scope_dirs); let FloorLensImportGraph { @@ -24405,12 +24403,7 @@ pub(crate) fn non_fold_residue_units_from_module_source( ), } } - path = Some(row_path.unwrap_or_else(|| { - panic!( - "nfr frontier reader: `subject` in a `{data_name}` row of \ - {module_rel_path} is `PathSubject` but carries no `path` field" - ) - })); + path = row_path; } _ => panic!( "nfr frontier reader: `subject` in a `{data_name}` row of \ @@ -24997,28 +24990,6 @@ mod nfr_tests { "a row without a `subject` field must refuse loudly (fail-closed)" ); } - - #[test] - fn nfr_frontier_reader_locates_path_subject_without_path() { - let synthetic = "module gunbc.non_fold_residue\n\n\ - data non_fold_residue_frontier: List = [\n\ - FrontierRow { subject: PathSubject { }, reason: \"r\", trigger: TriggerProse { text: \"d\" } }\n\ - ]\n"; - let refusal = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { - super::non_fold_residue_units_from_module_source("synthetic.dag", synthetic) - })) - .expect_err("a PathSubject carrying no `path` field must refuse loudly (fail-closed)"); - let message = refusal - .downcast_ref::() - .cloned() - .or_else(|| refusal.downcast_ref::<&str>().map(|s| s.to_string())) - .unwrap_or_default(); - assert!( - message.contains("`PathSubject` but carries no `path` field"), - "the refusal must LOCATE the missing `path` inside the present PathSubject, not \ - report the row as having no `subject` field; got: {message}" - ); - } } const LANGUAGES_AUTHORITY_REL: &str = "dag/std/languages.dag"; diff --git a/src/v2/extdeps/react/structural_receipts_test.dag b/src/v2/extdeps/react/structural_receipts_test.dag index cf0ebf879df..298e6ea0e24 100644 --- a/src/v2/extdeps/react/structural_receipts_test.dag +++ b/src/v2/extdeps/react/structural_receipts_test.dag @@ -133,47 +133,6 @@ fn react_probe_hook_use_callback() -> ReactHookSite { } } -fn react_probe_hook_use_deferred_value() -> ReactHookSite { - UseDeferredValue { - value_ref: react_probe_cross_decl_ref, - initial_value: ValueAbsent - } -} - -fn react_probe_hook_use_sync_external_store() -> ReactHookSite { - UseSyncExternalStore { - subscribe_ref: react_probe_cross_decl_ref, - get_snapshot_ref: react_probe_cross_decl_ref, - get_server_snapshot: ValueAbsent - } -} - -fn react_probe_hook_use_debug_value() -> ReactHookSite { - UseDebugValue { - value_ref: react_probe_cross_decl_ref, - format: ValueAbsent - } -} - -fn react_probe_hook_use_action_state() -> ReactHookSite { - UseActionState { - action_ref: react_probe_cross_decl_ref, - initial_state_ref: react_probe_cross_decl_ref, - permalink: ValueAbsent - } -} - -fn react_probe_hook_use_optimistic() -> ReactHookSite { - UseOptimistic { - value_ref: react_probe_cross_decl_ref, - reducer: ValueAbsent - } -} - -fn react_probe_hook_custom_hook() -> ReactHookSite { - CustomHook { implementation_ref: react_probe_cross_decl_ref } -} - fn react_probe_host_element() -> ReactHostElement { ReactHostElement { tag_ref: react_probe_cross_decl_ref, @@ -198,10 +157,6 @@ fn react_probe_react_element_host() -> ReactElement { Host { host: react_probe_host_element() } } -fn react_probe_react_element_composite() -> ReactElement { - Composite { composite: react_probe_composite_element() } -} - fn react_probe_react_element_fragment() -> ReactElement { Fragment { key: KeyAbsent, children: Empty } } diff --git a/src/v2/lens/affected_set/edit_locus_resolver_test.dag b/src/v2/lens/affected_set/edit_locus_resolver_test.dag index e6ea3022bdc..37bece7ea9b 100644 --- a/src/v2/lens/affected_set/edit_locus_resolver_test.dag +++ b/src/v2/lens/affected_set/edit_locus_resolver_test.dag @@ -248,7 +248,7 @@ fn edit_locus_root_from_source_locus_holds( } } -fn edit_locus_source_provenance_parse_root_span_holds() -> Bool { +test fn edit_locus_source_provenance_parse_root_span_holds() -> Bool { match source_ir_artifact_provenance( source_read: edit_locus_source_producer_fixture_source_read ) { diff --git a/src/v2/lens/cost/disj_alternative_floor_test.dag b/src/v2/lens/cost/disj_alternative_floor_test.dag index f849a19aed5..0d96a819f87 100644 --- a/src/v2/lens/cost/disj_alternative_floor_test.dag +++ b/src/v2/lens/cost/disj_alternative_floor_test.dag @@ -1,6 +1,5 @@ module v2.test.lens_cost.disj_alternative_floor - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data disj_floor_arm_a: Node = Node { @@ -24,17 +23,14 @@ data disj_floor_input: Node = Node { occurrence_id: SyntheticOccurrence } -fn disj_floor_projects_unit() -> Bool { +test fn disj_floor_projects_unit() -> Bool { match cost_lens(n: disj_floor_input) { Holds { value: actual } => actual == unit_cost() _ => false } } -fn symbolic_max_absorbs_zero() -> Bool { +test fn symbolic_max_absorbs_zero() -> Bool { symbolic_max(a: zero_cost(), b: zero_cost()) == zero_cost() } -test fn disj_alternative_floor_holds() -> Bool { - disj_floor_projects_unit() && symbolic_max_absorbs_zero() -} diff --git a/src/v2/lens/cost/loop_iteration_floor_test.dag b/src/v2/lens/cost/loop_iteration_floor_test.dag index c13e4204483..cf0b948f019 100644 --- a/src/v2/lens/cost/loop_iteration_floor_test.dag +++ b/src/v2/lens/cost/loop_iteration_floor_test.dag @@ -1,6 +1,5 @@ module v2.test.lens_cost.loop_iteration_floor - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data loop_iteration_floor_body: Node = Node { @@ -24,7 +23,7 @@ data loop_iteration_floor_input: Node = Node { occurrence_id: SyntheticOccurrence } -fn loop_iteration_floor_projects_linear() -> Bool { +test fn loop_iteration_floor_projects_linear() -> Bool { match cost_lens(n: loop_iteration_floor_input) { Holds { value: actual } => match actual { @@ -35,13 +34,10 @@ fn loop_iteration_floor_projects_linear() -> Bool { } } -fn symbolic_product_absorbs_zero() -> Bool { +test fn symbolic_product_absorbs_zero() -> Bool { symbolic_product( a: linear_in_node(n: loop_iteration_floor_measure), b: zero_cost() ) == zero_cost() } -test fn loop_iteration_floor_holds() -> Bool { - loop_iteration_floor_projects_linear() && symbolic_product_absorbs_zero() -} diff --git a/src/v2/lens/identical_variant_payload/sg_claims_test.dag b/src/v2/lens/identical_variant_payload/sg_claims_test.dag index 945c962f560..87e2d837413 100644 --- a/src/v2/lens/identical_variant_payload/sg_claims_test.dag +++ b/src/v2/lens/identical_variant_payload/sg_claims_test.dag @@ -1,7 +1,5 @@ module v2.test.lens_identical_variant_payload.sg_claims - - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data ivp_witness_type_node: Node = claim_atom_node(s: ^ivp_witness_type_symbol) data ivp_witness_module: String = "v2.lens.identical_variant_payload" @@ -13,7 +11,7 @@ fn ivp_verdict_is_unrealized(verdict: LensVerdict) -> Bool { } } -fn witness_ivp_unrealized_green_on_fact() -> Bool { +test fn witness_ivp_unrealized_green_on_fact() -> Bool { ivp_verdict_is_unrealized( verdict: identical_variant_payload_fact_for_type(type_node: ivp_witness_type_node).verdict ) @@ -23,14 +21,14 @@ fn ivp_sample_holds() -> LensVerdict { Holds } -fn witness_ivp_unrealized_red_on_holds() -> Bool { +test fn witness_ivp_unrealized_red_on_holds() -> Bool { match ivp_sample_holds() { Unrealized { diagnostic: _ } => false _ => true } } -fn witness_ivp_locus_green_on_fact() -> Bool { +test fn witness_ivp_locus_green_on_fact() -> Bool { match identical_variant_payload_fact_for_type(type_node: ivp_witness_type_node).verdict { Unrealized { diagnostic: d } => lens_verdict_diagnostic_locus_module(d: d) == ivp_witness_module @@ -38,7 +36,7 @@ fn witness_ivp_locus_green_on_fact() -> Bool { } } -fn witness_ivp_locus_red_on_perturbed_module() -> Bool { +test fn witness_ivp_locus_red_on_perturbed_module() -> Bool { let perturbed = lens_verdict_module_unrealized( reason: ^identical_variant_payload_perturbed, module_name: "v2.lens.identical_variant_payload_wrong_module" @@ -50,9 +48,3 @@ fn witness_ivp_locus_red_on_perturbed_module() -> Bool { } } -test fn lens_identical_variant_payload_unrealized_scaffold_holds() -> Bool { - witness_ivp_unrealized_green_on_fact() - && witness_ivp_unrealized_red_on_holds() - && witness_ivp_locus_green_on_fact() - && witness_ivp_locus_red_on_perturbed_module() -} diff --git a/src/v2/lens/table_decision_tree/sg_claims_test.dag b/src/v2/lens/table_decision_tree/sg_claims_test.dag index 255b68dd5c0..1f80996d651 100644 --- a/src/v2/lens/table_decision_tree/sg_claims_test.dag +++ b/src/v2/lens/table_decision_tree/sg_claims_test.dag @@ -1,6 +1,5 @@ module v2.test.lens_table_decision_tree.sg_claims - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data tdt_witness_fn_node: Node = claim_atom_node(s: ^tdt_witness_fn_node_symbol) @@ -13,7 +12,7 @@ fn tdt_verdict_is_unrealized(verdict: LensVerdict) -> Bool { } } -fn witness_tdt_unrealized_green_on_fact() -> Bool { +test fn witness_tdt_unrealized_green_on_fact() -> Bool { tdt_verdict_is_unrealized( verdict: table_decision_tree_fact_for_fn(fn_node: tdt_witness_fn_node).verdict ) @@ -23,14 +22,14 @@ fn tdt_sample_holds() -> LensVerdict { Holds } -fn witness_tdt_unrealized_red_on_holds() -> Bool { +test fn witness_tdt_unrealized_red_on_holds() -> Bool { match tdt_sample_holds() { Unrealized { diagnostic: _ } => false _ => true } } -fn witness_tdt_locus_green_on_fact() -> Bool { +test fn witness_tdt_locus_green_on_fact() -> Bool { match table_decision_tree_fact_for_fn(fn_node: tdt_witness_fn_node).verdict { Unrealized { diagnostic: d } => lens_verdict_diagnostic_locus_module(d: d) == tdt_witness_module @@ -38,7 +37,7 @@ fn witness_tdt_locus_green_on_fact() -> Bool { } } -fn witness_tdt_locus_red_on_perturbed_module() -> Bool { +test fn witness_tdt_locus_red_on_perturbed_module() -> Bool { let perturbed = lens_verdict_module_unrealized( reason: ^table_decision_tree_perturbed, module_name: "v2.lens.table_decision_tree_wrong_module" @@ -50,9 +49,3 @@ fn witness_tdt_locus_red_on_perturbed_module() -> Bool { } } -test fn lens_table_decision_tree_unrealized_scaffold_holds() -> Bool { - witness_tdt_unrealized_green_on_fact() - && witness_tdt_unrealized_red_on_holds() - && witness_tdt_locus_green_on_fact() - && witness_tdt_locus_red_on_perturbed_module() -} diff --git a/src/v2/std/reducible_test.dag b/src/v2/std/reducible_test.dag index b8eeb5f6083..83cd87f6155 100644 --- a/src/v2/std/reducible_test.dag +++ b/src/v2/std/reducible_test.dag @@ -16,14 +16,14 @@ import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -fn classify_leaf_empty_is_unknown() -> Bool { +test fn classify_leaf_empty_is_unknown() -> Bool { verdict_eq( a: classify_leaf(witness: ""), b: Unknown { missing: "witness" } ) } -fn classify_leaf_named_is_irreducible() -> Bool { +test fn classify_leaf_named_is_irreducible() -> Bool { verdict_eq( a: classify_leaf(witness: "grounded-atom"), b: Irreducible { witness: "grounded-atom" } @@ -73,10 +73,6 @@ data witness_reduce_verdicts_located_RED: Bool = verdict_eq( b: Reduced { last_parts: 9 } ) -test fn reducible_classify_leaf_holds() -> Bool { - classify_leaf_empty_is_unknown() && classify_leaf_named_is_irreducible() -} - test fn reducible_verdict_eq_holds() -> Bool { verdict_eq_discriminates_variants() } diff --git a/src/v2/test/claim/affected_set_disposition_both_axes_test.dag b/src/v2/test/claim/affected_set_disposition_both_axes_test.dag index 0efd31dbfc7..4d506c8b7a2 100644 --- a/src/v2/test/claim/affected_set_disposition_both_axes_test.dag +++ b/src/v2/test/claim/affected_set_disposition_both_axes_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.affected_set_disposition_both_axes - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data disposition_fixture_node: Node = Node { @@ -11,7 +10,7 @@ data disposition_fixture_node: Node = Node { data disposition_fixture_changed_path: String = "src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag" -fn disposition_node_frontier_only_skips_holds() -> Bool { +test fn disposition_node_frontier_only_skips_holds() -> Bool { floor_kernel_would_skip( changed_paths: [disposition_fixture_changed_path], frontier_nodes: [disposition_fixture_node], @@ -22,7 +21,7 @@ fn disposition_node_frontier_only_skips_holds() -> Bool { ) } -fn disposition_node_frontier_only_runs_holds() -> Bool { +test fn disposition_node_frontier_only_runs_holds() -> Bool { !floor_kernel_would_skip( changed_paths: [disposition_fixture_changed_path], frontier_nodes: [disposition_fixture_node], @@ -33,7 +32,7 @@ fn disposition_node_frontier_only_runs_holds() -> Bool { ) } -fn disposition_function_edited_only_runs_holds() -> Bool { +test fn disposition_function_edited_only_runs_holds() -> Bool { !floor_kernel_would_skip( changed_paths: [disposition_fixture_changed_path], frontier_nodes: [disposition_fixture_node], @@ -44,7 +43,7 @@ fn disposition_function_edited_only_runs_holds() -> Bool { ) } -fn disposition_both_axes_false_skips_holds() -> Bool { +test fn disposition_both_axes_false_skips_holds() -> Bool { match floor_witness_run_disposition( diff: DiffPathsProduced { changed_paths: [disposition_fixture_changed_path] }, frontier: FrontierProduced { nodes: [disposition_fixture_node] }, @@ -59,7 +58,7 @@ fn disposition_both_axes_false_skips_holds() -> Bool { } } -fn disposition_either_axis_runs_holds() -> Bool { +test fn disposition_either_axis_runs_holds() -> Bool { match floor_witness_run_disposition( diff: DiffPathsProduced { changed_paths: [disposition_fixture_changed_path] }, frontier: FrontierProduced { nodes: [disposition_fixture_node] }, @@ -86,10 +85,3 @@ fn disposition_either_axis_runs_holds() -> Bool { } } -test fn affected_set_disposition_both_axes_witness_holds() -> Bool { - disposition_node_frontier_only_skips_holds() - && disposition_node_frontier_only_runs_holds() - && disposition_function_edited_only_runs_holds() - && disposition_both_axes_false_skips_holds() - && disposition_either_axis_runs_holds() -} diff --git a/src/v2/test/claim/affected_set_witness_a_prove_test.dag b/src/v2/test/claim/affected_set_witness_a_prove_test.dag index 45ef2cfdf33..8668fedebb1 100644 --- a/src/v2/test/claim/affected_set_witness_a_prove_test.dag +++ b/src/v2/test/claim/affected_set_witness_a_prove_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.affected_set_witness_a_prove - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data witness_a_fixture_fn_edit_touch: FloorDiffLineTouch = FloorDiffLineTouch { @@ -37,7 +36,7 @@ data witness_a_fixture_fn_body_edit_touch: FloorDiffLineTouch = FloorDiffLineTou end_line: 78 } -fn witness_a_dag_function_edited_model_holds() -> Bool { +test fn witness_a_dag_function_edited_model_holds() -> Bool { floor_test_fn_declaration_edited( touches: [witness_a_fixture_fn_edit_touch], file_path: "src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag", @@ -46,7 +45,7 @@ fn witness_a_dag_function_edited_model_holds() -> Bool { ) } -fn witness_a_dag_function_edited_body_touch_holds() -> Bool { +test fn witness_a_dag_function_edited_body_touch_holds() -> Bool { floor_test_fn_declaration_edited( touches: [witness_a_fixture_fn_body_edit_touch], file_path: "src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag", @@ -55,7 +54,7 @@ fn witness_a_dag_function_edited_body_touch_holds() -> Bool { ) } -fn witness_a_dag_superset_predicate_holds() -> Bool { +test fn witness_a_dag_superset_predicate_holds() -> Bool { floor_rust_run_implies_dag_run( rust_touches_frontier: true, rust_function_edited: false, @@ -70,13 +69,7 @@ fn witness_a_dag_superset_predicate_holds() -> Bool { ) } -fn witness_a_dag_closure_fires_on_mid_path_holds() -> Bool { +test fn witness_a_dag_closure_fires_on_mid_path_holds() -> Bool { witness_a_dag_affected_includes_mid_for_path(changed: provenance_producer_path_mid) } -test fn affected_set_witness_a_prove_dag_models_holds() -> Bool { - witness_a_dag_function_edited_model_holds() - && witness_a_dag_function_edited_body_touch_holds() - && witness_a_dag_superset_predicate_holds() - && witness_a_dag_closure_fires_on_mid_path_holds() -} diff --git a/src/v2/test/claim/algebra/freemonoid_first_skip_witness_test.dag b/src/v2/test/claim/algebra/freemonoid_first_skip_witness_test.dag index 592832f2e56..8b1d63525fd 100644 --- a/src/v2/test/claim/algebra/freemonoid_first_skip_witness_test.dag +++ b/src/v2/test/claim/algebra/freemonoid_first_skip_witness_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.algebra.freemonoid_first_skip_witness - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn sample_list() -> FreeMonoid { @@ -10,45 +9,38 @@ fn sample_list() -> FreeMonoid { } } -fn witness_first_empty_is_absent() -> Bool { +test fn witness_first_empty_is_absent() -> Bool { match list_head(xs: Empty) { HeadAbsent => true HeadFound { value: _ } => false } } -fn witness_first_returns_head() -> Bool { +test fn witness_first_returns_head() -> Bool { match list_head(xs: sample_list()) { HeadFound { value: v } => v == 1 HeadAbsent => false } } -fn witness_skip_then_first() -> Bool { +test fn witness_skip_then_first() -> Bool { match list_head(xs: skip(xs: sample_list(), n: 1)) { HeadFound { value: v } => v == 2 HeadAbsent => false } } -fn witness_skip_past_length_is_empty() -> Bool { +test fn witness_skip_past_length_is_empty() -> Bool { match list_head(xs: skip(xs: sample_list(), n: 4)) { HeadAbsent => true HeadFound { value: _ } => false } } -fn witness_skip_non_positive_is_identity() -> Bool { +test fn witness_skip_non_positive_is_identity() -> Bool { match list_head(xs: skip(xs: sample_list(), n: 0)) { HeadFound { value: v } => v == 1 HeadAbsent => false } } -test fn freemonoid_first_skip_witnesses() -> Bool { - witness_first_empty_is_absent() - && witness_first_returns_head() - && witness_skip_then_first() - && witness_skip_past_length_is_empty() - && witness_skip_non_positive_is_identity() -} diff --git a/src/v2/test/claim/bash_build_round_trip_test.dag b/src/v2/test/claim/bash_build_round_trip_test.dag index bb3e060ed1a..e097c527dd6 100644 --- a/src/v2/test/claim/bash_build_round_trip_test.dag +++ b/src/v2/test/claim/bash_build_round_trip_test.dag @@ -117,7 +117,7 @@ fn bash_build_round_trip_command_echo_hi_holds() -> Bool { } } -fn bash_build_round_trip_assign_foo_bar_holds() -> Bool { +test fn bash_build_round_trip_assign_foo_bar_holds() -> Bool { let emitted = bash_build_assign_lit(name: "FOO", text: "bar") match bash_build_round_trip_target_for( emitted: emitted, @@ -135,7 +135,7 @@ fn bash_build_round_trip_assign_foo_bar_holds() -> Bool { } } -fn bash_build_round_trip_exit_42_holds() -> Bool { +test fn bash_build_round_trip_exit_42_holds() -> Bool { let emitted = bash_build_exit(code: "42") match bash_build_round_trip_target_for( emitted: emitted, @@ -153,7 +153,7 @@ fn bash_build_round_trip_exit_42_holds() -> Bool { } } -fn bash_build_round_trip_and_then_holds() -> Bool { +test fn bash_build_round_trip_and_then_holds() -> Bool { let emitted = bash_build_and_then( left: bash_fold_cmd_true_emitted, right: bash_fold_cmd_false_emitted @@ -174,7 +174,7 @@ fn bash_build_round_trip_and_then_holds() -> Bool { } } -fn bash_build_round_trip_pipe_holds() -> Bool { +test fn bash_build_round_trip_pipe_holds() -> Bool { let emitted = bash_build_pipe( left: bash_build_command_from_lits(lits: ["echo", "hi"]), right: bash_fold_cmd_wc_minus_c_emitted @@ -199,9 +199,3 @@ test fn bash_build_round_trip_command_tier_holds() -> Bool { bash_build_round_trip_command_echo_hi_holds() } -test fn bash_build_round_trip_stmt_tier_holds() -> Bool { - bash_build_round_trip_assign_foo_bar_holds() - && bash_build_round_trip_exit_42_holds() - && bash_build_round_trip_and_then_holds() - && bash_build_round_trip_pipe_holds() -} diff --git a/src/v2/test/claim/bash_command_fold_test.dag b/src/v2/test/claim/bash_command_fold_test.dag index 6443a5dd8f2..c1443995fe0 100644 --- a/src/v2/test/claim/bash_command_fold_test.dag +++ b/src/v2/test/claim/bash_command_fold_test.dag @@ -185,7 +185,7 @@ fn bash_fold_direct_serialize_matches_golden(emitted: Node, target: TargetModel, } } -fn bash_fold_relation_row_true_witness_holds() -> Bool { +test fn bash_fold_relation_row_true_witness_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_fold_cmd_true_emitted, lhs: ^bash_production_fold_command @@ -195,28 +195,28 @@ fn bash_fold_relation_row_true_witness_holds() -> Bool { } } -fn bash_fold_command_single_lit_true_holds() -> Bool { +test fn bash_fold_command_single_lit_true_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_command_stmt(node: bash_fold_cmd_true_emitted), golden: bash_fold_cmd_true_golden ) } -fn bash_fold_command_multi_lit_echo_hi_holds() -> Bool { +test fn bash_fold_command_multi_lit_echo_hi_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_command_stmt(node: bash_fold_cmd_echo_hi_emitted), golden: bash_fold_cmd_echo_hi_golden ) } -fn bash_fold_command_var_ref_x_holds() -> Bool { +test fn bash_fold_command_var_ref_x_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_command_stmt(node: bash_fold_cmd_var_x_emitted), golden: bash_fold_cmd_var_x_golden ) } -fn bash_fold_command_arbitrary_grep_triple_holds() -> Bool { +test fn bash_fold_command_arbitrary_grep_triple_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_command_stmt( node: bash_build_command_from_lits(lits: ["grep", "-rn", "foo_bar.baz"]) @@ -225,7 +225,7 @@ fn bash_fold_command_arbitrary_grep_triple_holds() -> Bool { ) } -fn bash_fold_command_arbitrary_var_home_holds() -> Bool { +test fn bash_fold_command_arbitrary_var_home_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_command_stmt( node: bash_build_command_from_word_nodes(words: [bash_build_word_var(name: "HOME")]) @@ -234,7 +234,7 @@ fn bash_fold_command_arbitrary_var_home_holds() -> Bool { ) } -fn bash_fold_command_arbitrary_lit_quote_escape_holds() -> Bool { +test fn bash_fold_command_arbitrary_lit_quote_escape_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_command_stmt( node: bash_build_command_from_lits(lits: ["a'b"]) @@ -243,7 +243,7 @@ fn bash_fold_command_arbitrary_lit_quote_escape_holds() -> Bool { ) } -fn bash_fold_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_wrong_production_rejects_oracle_holds() -> Bool { bash_emit_wrong_target_oracle_holds( emitted: bash_fold_cmd_true_emitted, golden: bash_fold_cmd_true_golden, @@ -251,7 +251,7 @@ fn bash_fold_wrong_production_rejects_oracle_holds() -> Bool { ) } -fn bash_fold_direct_serialize_single_lit_true_holds() -> Bool { +test fn bash_fold_direct_serialize_single_lit_true_holds() -> Bool { match bash_fold_target_model_for_emitted_witness( emitted: bash_fold_cmd_true_emitted, source_literal: ^bash_fold_dynamic_source_literal, @@ -269,7 +269,7 @@ fn bash_fold_direct_serialize_single_lit_true_holds() -> Bool { } } -fn bash_fold_direct_serialize_multi_lit_echo_hi_holds() -> Bool { +test fn bash_fold_direct_serialize_multi_lit_echo_hi_holds() -> Bool { match bash_fold_target_model_for_emitted_witness( emitted: bash_fold_cmd_echo_hi_emitted, source_literal: ^bash_fold_dynamic_source_literal, @@ -287,7 +287,7 @@ fn bash_fold_direct_serialize_multi_lit_echo_hi_holds() -> Bool { } } -fn bash_fold_direct_serialize_var_ref_x_holds() -> Bool { +test fn bash_fold_direct_serialize_var_ref_x_holds() -> Bool { match bash_fold_target_model_for_emitted_witness( emitted: bash_fold_cmd_var_x_emitted, source_literal: ^bash_fold_dynamic_source_literal, @@ -305,25 +305,25 @@ fn bash_fold_direct_serialize_var_ref_x_holds() -> Bool { } } -fn bash_fold_emitted_tree_differs_on_wrong_fixture_holds() -> Bool { +test fn bash_fold_emitted_tree_differs_on_wrong_fixture_holds() -> Bool { bash_fold_cmd_true_emitted != bash_fold_cmd_true_wrong_emitted } -fn bash_fold_exit_code_42_holds() -> Bool { +test fn bash_fold_exit_code_42_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_exit_stmt(node: bash_fold_exit_42_emitted), golden: bash_fold_exit_42_golden ) } -fn bash_fold_exit_code_0_holds() -> Bool { +test fn bash_fold_exit_code_0_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_exit_stmt(node: bash_build_exit(code: "0")), golden: bash_fold_exit_0_golden ) } -fn bash_fold_exit_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_exit_wrong_production_rejects_oracle_holds() -> Bool { bash_emit_wrong_target_oracle_holds( emitted: bash_fold_exit_42_emitted, golden: bash_fold_exit_42_golden, @@ -331,14 +331,14 @@ fn bash_fold_exit_wrong_production_rejects_oracle_holds() -> Bool { ) } -fn bash_fold_assign_lit_foo_bar_holds() -> Bool { +test fn bash_fold_assign_lit_foo_bar_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_assign_stmt(node: bash_fold_assign_foo_bar_emitted), golden: bash_fold_assign_foo_golden ) } -fn bash_fold_assign_var_x_home_holds() -> Bool { +test fn bash_fold_assign_var_x_home_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_assign_stmt( node: bash_build_assign_var(name: "X", var_name: "HOME") @@ -347,7 +347,7 @@ fn bash_fold_assign_var_x_home_holds() -> Bool { ) } -fn bash_fold_assign_lit_quote_escape_holds() -> Bool { +test fn bash_fold_assign_lit_quote_escape_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_assign_stmt( node: bash_build_assign_lit(name: "VAR", text: "a'b") @@ -356,7 +356,7 @@ fn bash_fold_assign_lit_quote_escape_holds() -> Bool { ) } -fn bash_fold_assign_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_assign_wrong_production_rejects_oracle_holds() -> Bool { bash_emit_wrong_target_oracle_holds( emitted: bash_fold_assign_foo_bar_emitted, golden: bash_fold_assign_foo_golden, @@ -364,14 +364,14 @@ fn bash_fold_assign_wrong_production_rejects_oracle_holds() -> Bool { ) } -fn bash_fold_and_then_true_false_holds() -> Bool { +test fn bash_fold_and_then_true_false_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_and_then_stmt(node: bash_fold_and_then_true_false_emitted), golden: bash_fold_and_then_golden ) } -fn bash_fold_or_else_true_false_holds() -> Bool { +test fn bash_fold_or_else_true_false_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_or_else_stmt( node: bash_build_or_else( @@ -383,14 +383,14 @@ fn bash_fold_or_else_true_false_holds() -> Bool { ) } -fn bash_fold_pipe_echo_hi_wc_holds() -> Bool { +test fn bash_fold_pipe_echo_hi_wc_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_pipe_stmt(node: bash_fold_pipe_echo_hi_wc_emitted), golden: bash_fold_pipe_golden ) } -fn bash_fold_and_then_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_and_then_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_fold_and_then_true_false_emitted, lhs: ^bash_production_fold_or_else @@ -400,7 +400,7 @@ fn bash_fold_and_then_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_pipe_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_pipe_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_fold_pipe_echo_hi_wc_emitted, lhs: ^bash_production_fold_and_then @@ -410,7 +410,7 @@ fn bash_fold_pipe_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_pipe_and_then_left_holds() -> Bool { +test fn bash_fold_pipe_and_then_left_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_pipe_stmt( node: bash_build_pipe( @@ -422,7 +422,7 @@ fn bash_fold_pipe_and_then_left_holds() -> Bool { ) } -fn bash_fold_pipe_three_stage_holds() -> Bool { +test fn bash_fold_pipe_three_stage_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_pipe_stmt( node: bash_build_pipe( @@ -437,7 +437,7 @@ fn bash_fold_pipe_three_stage_holds() -> Bool { ) } -fn bash_fold_subshell_true_holds() -> Bool { +test fn bash_fold_subshell_true_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_subshell_stmt( node: bash_build_subshell_from_stmts(stmts: [bash_fold_cmd_true_emitted]) @@ -446,7 +446,7 @@ fn bash_fold_subshell_true_holds() -> Bool { ) } -fn bash_fold_subshell_multi_stmt_holds() -> Bool { +test fn bash_fold_subshell_multi_stmt_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_subshell_stmt( node: bash_build_subshell_from_stmts( @@ -460,7 +460,7 @@ fn bash_fold_subshell_multi_stmt_holds() -> Bool { ) } -fn bash_fold_subshell_nested_and_then_holds() -> Bool { +test fn bash_fold_subshell_nested_and_then_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_subshell_stmt( node: bash_build_subshell_from_stmts(stmts: [bash_fold_and_then_true_false_emitted]) @@ -469,7 +469,7 @@ fn bash_fold_subshell_nested_and_then_holds() -> Bool { ) } -fn bash_fold_if_true_then_echo_holds() -> Bool { +test fn bash_fold_if_true_then_echo_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_if_stmt( node: bash_build_if_from_stmts( @@ -481,7 +481,7 @@ fn bash_fold_if_true_then_echo_holds() -> Bool { ) } -fn bash_fold_if_multi_then_holds() -> Bool { +test fn bash_fold_if_multi_then_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_if_stmt( node: bash_build_if_from_stmts( @@ -496,7 +496,7 @@ fn bash_fold_if_multi_then_holds() -> Bool { ) } -fn bash_fold_if_then_pipe_soundness_holds() -> Bool { +test fn bash_fold_if_then_pipe_soundness_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_if_stmt( node: bash_build_if_from_stmts( @@ -508,7 +508,7 @@ fn bash_fold_if_then_pipe_soundness_holds() -> Bool { ) } -fn bash_fold_subshell_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_subshell_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_build_subshell_from_stmts(stmts: [bash_fold_cmd_true_emitted]), lhs: ^bash_production_fold_if @@ -518,7 +518,7 @@ fn bash_fold_subshell_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_if_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_if_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_build_if_from_stmts( cond: bash_fold_cmd_true_emitted, @@ -531,7 +531,7 @@ fn bash_fold_if_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_with_redir_stderr_null_holds() -> Bool { +test fn bash_fold_with_redir_stderr_null_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_with_redir_stmt( node: bash_build_with_redir( @@ -543,7 +543,7 @@ fn bash_fold_with_redir_stderr_null_holds() -> Bool { ) } -fn bash_fold_with_redir_stdout_and_stderr_null_holds() -> Bool { +test fn bash_fold_with_redir_stdout_and_stderr_null_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_with_redir_stmt( node: bash_build_with_redir( @@ -555,7 +555,7 @@ fn bash_fold_with_redir_stdout_and_stderr_null_holds() -> Bool { ) } -fn bash_fold_with_redir_stdout_to_stderr_holds() -> Bool { +test fn bash_fold_with_redir_stdout_to_stderr_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_with_redir_stmt( node: bash_build_with_redir( @@ -567,7 +567,7 @@ fn bash_fold_with_redir_stdout_to_stderr_holds() -> Bool { ) } -fn bash_fold_with_redir_redir_to_file_var_holds() -> Bool { +test fn bash_fold_with_redir_redir_to_file_var_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_with_redir_stmt( node: bash_build_with_redir_to_file( @@ -579,14 +579,14 @@ fn bash_fold_with_redir_redir_to_file_var_holds() -> Bool { ) } -fn bash_fold_heredoc_holds() -> Bool { +test fn bash_fold_heredoc_holds() -> Bool { match bash_emit_heredoc(path_spelling: "'out'", delimiter: "EOF", body: "hello") { Accepted { value: folded, diagnostics: _ } => folded == bash_fold_heredoc_golden Rejected { diagnostics: _ } => false } } -fn bash_fold_with_redir_wrong_spellings_rejects_oracle_holds() -> Bool { +test fn bash_fold_with_redir_wrong_spellings_rejects_oracle_holds() -> Bool { match bash_fold_with_redir_wrong_target_model_witness() { Holds { value: target } => bash_emit_wrong_spelling_oracle_holds( @@ -597,7 +597,7 @@ fn bash_fold_with_redir_wrong_spellings_rejects_oracle_holds() -> Bool { } } -fn bash_fold_heredoc_wrong_spellings_rejects_oracle_holds() -> Bool { +test fn bash_fold_heredoc_wrong_spellings_rejects_oracle_holds() -> Bool { match bash_fold_heredoc_wrong_target_model_witness() { Holds { value: target } => target.authority_source_text != bash_fold_heredoc_golden @@ -605,7 +605,7 @@ fn bash_fold_heredoc_wrong_spellings_rejects_oracle_holds() -> Bool { } } -fn bash_fold_with_redir_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_with_redir_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_stmt_with_redir_emitted, lhs: ^bash_production_fold_command @@ -615,7 +615,7 @@ fn bash_fold_with_redir_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_heredoc_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_heredoc_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_stmt_heredoc_emitted, lhs: ^bash_production_fold_command @@ -625,7 +625,7 @@ fn bash_fold_heredoc_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_with_redir_pipe_soundness_holds() -> Bool { +test fn bash_fold_with_redir_pipe_soundness_holds() -> Bool { bash_emit_matches_golden( stmt: bash_fold_with_redir_stmt( node: bash_build_with_redir( @@ -637,38 +637,38 @@ fn bash_fold_with_redir_pipe_soundness_holds() -> Bool { ) } -fn bash_fold_raw_line_orch_emit_holds() -> Bool { +test fn bash_fold_raw_line_orch_emit_holds() -> Bool { bash_emit_raw_line_matches_golden(text: "! ( foo )", golden: bash_fold_raw_orch_golden) } -fn bash_fold_raw_line_x_eq_holds() -> Bool { +test fn bash_fold_raw_line_x_eq_holds() -> Bool { bash_emit_raw_line_matches_golden(text: "x=y", golden: bash_fold_raw_xeq_golden) } -fn bash_fold_raw_line_cmdsubst_holds() -> Bool { +test fn bash_fold_raw_line_cmdsubst_holds() -> Bool { bash_emit_raw_line_matches_golden(text: "$(a)", golden: bash_fold_raw_cmdsubst_golden) } -fn bash_fold_raw_line_paren_holds() -> Bool { +test fn bash_fold_raw_line_paren_holds() -> Bool { bash_emit_raw_line_matches_golden(text: "a)b", golden: bash_fold_raw_paren_golden) } -fn bash_fold_raw_line_quoted_holds() -> Bool { +test fn bash_fold_raw_line_quoted_holds() -> Bool { bash_emit_raw_line_matches_golden(text: "'q'", golden: bash_fold_raw_quoted_golden) } -fn bash_fold_raw_line_mktemp_holds() -> Bool { +test fn bash_fold_raw_line_mktemp_holds() -> Bool { bash_emit_raw_line_matches_golden( text: "TMPDIR=$('mktemp' '-d')", golden: bash_fold_raw_mktemp_golden ) } -fn bash_fold_raw_line_trailing_nl_holds() -> Bool { +test fn bash_fold_raw_line_trailing_nl_holds() -> Bool { bash_emit_raw_line_matches_golden(text: "ab\n", golden: bash_fold_raw_nl_golden) } -fn bash_fold_raw_line_wrong_spellings_rejects_oracle_holds() -> Bool { +test fn bash_fold_raw_line_wrong_spellings_rejects_oracle_holds() -> Bool { match bash_fold_raw_line_wrong_target_model_witness() { Holds { value: target } => bash_emit_wrong_spelling_oracle_holds( @@ -679,7 +679,7 @@ fn bash_fold_raw_line_wrong_spellings_rejects_oracle_holds() -> Bool { } } -fn bash_fold_raw_line_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_raw_line_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_word_pass_emitted, lhs: ^bash_production_fold_command @@ -689,7 +689,7 @@ fn bash_fold_raw_line_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_negation_subshell_false_holds() -> Bool { +test fn bash_fold_negation_subshell_false_holds() -> Bool { match bash_emit_negation( inner: bash_build_subshell_from_stmts(stmts: [bash_build_command_from_lits(lits: ["false"])]) ) { @@ -698,14 +698,14 @@ fn bash_fold_negation_subshell_false_holds() -> Bool { } } -fn bash_fold_negation_subshell_rawline_holds() -> Bool { +test fn bash_fold_negation_subshell_rawline_holds() -> Bool { match bash_emit_negation_spelling(inner_spelling: "(do_verify\nmore)") { Accepted { value: folded, diagnostics: _ } => folded == bash_fold_negation_raw_golden Rejected { diagnostics: _ } => false } } -fn bash_fold_negation_wrong_spellings_rejects_oracle_holds() -> Bool { +test fn bash_fold_negation_wrong_spellings_rejects_oracle_holds() -> Bool { match bash_fold_negation_wrong_target_model_witness() { Holds { value: target } => bash_emit_wrong_spelling_oracle_holds( @@ -716,7 +716,7 @@ fn bash_fold_negation_wrong_spellings_rejects_oracle_holds() -> Bool { } } -fn bash_fold_negation_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_negation_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_stmt_negation_emitted, lhs: ^bash_production_fold_subshell @@ -726,7 +726,7 @@ fn bash_fold_negation_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_env_prefixed_lit_t_holds() -> Bool { +test fn bash_fold_env_prefixed_lit_t_holds() -> Bool { match bash_emit_env_prefixed( name: "TMPDIR", value_spelling: "'/t'", @@ -737,7 +737,7 @@ fn bash_fold_env_prefixed_lit_t_holds() -> Bool { } } -fn bash_fold_env_prefixed_wrong_spellings_rejects_oracle_holds() -> Bool { +test fn bash_fold_env_prefixed_wrong_spellings_rejects_oracle_holds() -> Bool { match bash_fold_env_prefixed_wrong_target_model_witness() { Holds { value: target } => target.authority_source_text != bash_fold_env_prefixed_golden @@ -745,7 +745,7 @@ fn bash_fold_env_prefixed_wrong_spellings_rejects_oracle_holds() -> Bool { } } -fn bash_fold_env_prefixed_wrong_production_rejects_oracle_holds() -> Bool { +test fn bash_fold_env_prefixed_wrong_production_rejects_oracle_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_stmt_env_prefixed_emitted, lhs: ^bash_production_fold_command @@ -755,7 +755,7 @@ fn bash_fold_env_prefixed_wrong_production_rejects_oracle_holds() -> Bool { } } -fn bash_fold_delegated_bundle_fail_closed_holds() -> Bool { +test fn bash_fold_delegated_bundle_fail_closed_holds() -> Bool { match bash_fold_relation_row_witness( emitted: bash_stmt_heredoc_emitted, lhs: ^bash_production_fold_command @@ -765,90 +765,3 @@ fn bash_fold_delegated_bundle_fail_closed_holds() -> Bool { } } -test fn bash_fold_structural_tier_holds() -> Bool { - bash_fold_relation_row_true_witness_holds() - && bash_fold_emitted_tree_differs_on_wrong_fixture_holds() - && bash_fold_delegated_bundle_fail_closed_holds() -} - -test fn bash_fold_command_tier_holds() -> Bool { - bash_fold_command_single_lit_true_holds() - && bash_fold_command_multi_lit_echo_hi_holds() - && bash_fold_command_var_ref_x_holds() - && bash_fold_command_arbitrary_grep_triple_holds() - && bash_fold_command_arbitrary_var_home_holds() - && bash_fold_command_arbitrary_lit_quote_escape_holds() - && bash_fold_wrong_production_rejects_oracle_holds() -} - -test fn bash_fold_direct_serialize_tier_holds() -> Bool { - bash_fold_direct_serialize_single_lit_true_holds() - && bash_fold_direct_serialize_multi_lit_echo_hi_holds() - && bash_fold_direct_serialize_var_ref_x_holds() -} - -test fn bash_fold_exit_assign_tier_holds() -> Bool { - bash_fold_exit_code_42_holds() - && bash_fold_exit_code_0_holds() - && bash_fold_exit_wrong_production_rejects_oracle_holds() - && bash_fold_assign_lit_foo_bar_holds() - && bash_fold_assign_var_x_home_holds() - && bash_fold_assign_lit_quote_escape_holds() - && bash_fold_assign_wrong_production_rejects_oracle_holds() -} - -test fn bash_fold_andor_pipe_tier_holds() -> Bool { - bash_fold_and_then_true_false_holds() - && bash_fold_or_else_true_false_holds() - && bash_fold_pipe_echo_hi_wc_holds() - && bash_fold_and_then_wrong_production_rejects_oracle_holds() - && bash_fold_pipe_wrong_production_rejects_oracle_holds() - && bash_fold_pipe_and_then_left_holds() - && bash_fold_pipe_three_stage_holds() -} - -test fn bash_fold_subshell_if_tier_holds() -> Bool { - bash_fold_subshell_true_holds() - && bash_fold_subshell_multi_stmt_holds() - && bash_fold_subshell_nested_and_then_holds() - && bash_fold_if_true_then_echo_holds() - && bash_fold_if_multi_then_holds() - && bash_fold_if_then_pipe_soundness_holds() - && bash_fold_subshell_wrong_production_rejects_oracle_holds() - && bash_fold_if_wrong_production_rejects_oracle_holds() -} - -test fn bash_fold_rawline_tier_holds() -> Bool { - bash_fold_raw_line_orch_emit_holds() - && bash_fold_raw_line_x_eq_holds() - && bash_fold_raw_line_cmdsubst_holds() - && bash_fold_raw_line_paren_holds() - && bash_fold_raw_line_quoted_holds() - && bash_fold_raw_line_mktemp_holds() - && bash_fold_raw_line_trailing_nl_holds() - && bash_fold_raw_line_wrong_spellings_rejects_oracle_holds() - && bash_fold_raw_line_wrong_production_rejects_oracle_holds() -} - -test fn bash_fold_redir_heredoc_tier_holds() -> Bool { - bash_fold_with_redir_stderr_null_holds() - && bash_fold_with_redir_stdout_and_stderr_null_holds() - && bash_fold_with_redir_stdout_to_stderr_holds() - && bash_fold_with_redir_redir_to_file_var_holds() - && bash_fold_with_redir_wrong_spellings_rejects_oracle_holds() - && bash_fold_with_redir_wrong_production_rejects_oracle_holds() - && bash_fold_with_redir_pipe_soundness_holds() - && bash_fold_heredoc_holds() - && bash_fold_heredoc_wrong_spellings_rejects_oracle_holds() - && bash_fold_heredoc_wrong_production_rejects_oracle_holds() -} - -test fn bash_fold_negation_env_tier_holds() -> Bool { - bash_fold_negation_subshell_false_holds() - && bash_fold_negation_subshell_rawline_holds() - && bash_fold_negation_wrong_spellings_rejects_oracle_holds() - && bash_fold_negation_wrong_production_rejects_oracle_holds() - && bash_fold_env_prefixed_lit_t_holds() - && bash_fold_env_prefixed_wrong_spellings_rejects_oracle_holds() - && bash_fold_env_prefixed_wrong_production_rejects_oracle_holds() -} diff --git a/src/v2/test/claim/build_artifact_verification_witness_test.dag b/src/v2/test/claim/build_artifact_verification_witness_test.dag index de78e373c34..ad80f035bc2 100644 --- a/src/v2/test/claim/build_artifact_verification_witness_test.dag +++ b/src/v2/test/claim/build_artifact_verification_witness_test.dag @@ -53,16 +53,16 @@ fn stmt_text(s: Node) -> Bool { } } -fn witness_single_artifact_produces_two_checks() -> Bool { +test fn witness_single_artifact_produces_two_checks() -> Bool { let stmts = probe_stmts() stmts.length() == 2 && witness_stmt_is_if(s: stmts.first()) } -fn witness_existence_check_no_mtime() -> Bool { +test fn witness_existence_check_no_mtime() -> Bool { stmt_text(s: probe_stmts().first()) } -fn witness_serialized_conjuncts_and_teeth() -> Bool { +test fn witness_serialized_conjuncts_and_teeth() -> Bool { match verifications_script(produces: [probe_artifact()]) { Accepted { value: script, diagnostics: _ } => string_contains(s: script, pattern: "-x") @@ -74,7 +74,7 @@ fn witness_serialized_conjuncts_and_teeth() -> Bool { } } -fn witness_floor_covers_both_release_bins() -> Bool { +test fn witness_floor_covers_both_release_bins() -> Bool { let script = ci_floor_build_verify_script() string_contains(s: script, pattern: "--verify-build-artifacts") && string_contains(s: script, pattern: "/target/release/claim_executor") @@ -82,9 +82,3 @@ fn witness_floor_covers_both_release_bins() -> Bool { && !string_contains(s: script, pattern: "-newer") } -test fn build_artifact_verification_holds() -> Bool { - witness_single_artifact_produces_two_checks() - && witness_existence_check_no_mtime() - && witness_serialized_conjuncts_and_teeth() - && witness_floor_covers_both_release_bins() -} diff --git a/src/v2/test/claim/c_compilation_unit_witness_test.dag b/src/v2/test/claim/c_compilation_unit_witness_test.dag index 9add5e5c1d4..bf682618d6c 100644 --- a/src/v2/test/claim/c_compilation_unit_witness_test.dag +++ b/src/v2/test/claim/c_compilation_unit_witness_test.dag @@ -295,17 +295,17 @@ fn witness_partition_fold_two_units() -> List { } } -fn witness_r3_header_source_object_paths() -> Bool { +test fn witness_r3_header_source_object_paths() -> Bool { c_unit_header_path(unit_id: witness_unit_one) == "cu-one.h" && c_unit_source_path(unit_id: witness_unit_one) == "cu-one.c" && c_unit_object_path(artifact: compilation_unit_artifact_id(unit_id: witness_unit_one)) == "cu-one.o" } -fn witness_r3_include_directive_per_dep() -> Bool { +test fn witness_r3_include_directive_per_dep() -> Bool { c_include_directive_for_dep(dep_id: witness_unit_two) == "#include \"cu-two.h\"" } -fn witness_r3_spelling_from_partition_fold() -> Bool { +test fn witness_r3_spelling_from_partition_fold() -> Bool { let units = witness_partition_fold_two_units() let point_def = witness_point_struct_conj_body() match partition_unit_by_id(units: units, unit_id: witness_unit_two) { @@ -320,7 +320,7 @@ fn witness_r3_spelling_from_partition_fold() -> Bool { } } -fn witness_r3_unit_one_spelling_paths() -> Bool { +test fn witness_r3_unit_one_spelling_paths() -> Bool { let units = witness_partition_fold_two_units() match partition_unit_by_id(units: units, unit_id: witness_unit_one) { Present { value: unit } => @@ -334,7 +334,7 @@ fn witness_r3_unit_one_spelling_paths() -> Bool { } } -fn witness_r4_accepts_link_cyclic_unit_graph() -> Bool { +test fn witness_r4_accepts_link_cyclic_unit_graph() -> Bool { let dag = witness_link_cyclic_dag() let assignment = witness_link_cyclic_assignment() match c_partition_fold_outcome(module_dag: dag, assignment: assignment) { @@ -352,7 +352,7 @@ fn witness_r4_accepts_link_cyclic_unit_graph() -> Bool { } } -fn witness_r4_accepts_module_scc_split_across_units() -> Bool { +test fn witness_r4_accepts_module_scc_split_across_units() -> Bool { let dag = witness_mutual_recursive_dag() let assignment = witness_module_scc_split_assignment() match c_partition_fold_outcome(module_dag: dag, assignment: assignment) { @@ -371,7 +371,7 @@ fn witness_r4_accepts_module_scc_split_across_units() -> Bool { } } -fn witness_r4_accepts_triangle_module_scc_split() -> Bool { +test fn witness_r4_accepts_triangle_module_scc_split() -> Bool { let dag = witness_triangle_dag() let assignment = witness_two_unit_assignment() match c_partition_fold_outcome(module_dag: dag, assignment: assignment) { @@ -388,7 +388,7 @@ fn witness_r4_accepts_triangle_module_scc_split() -> Bool { } } -fn witness_r4_refuses_by_value_type_cycle_across_units() -> Bool { +test fn witness_r4_refuses_by_value_type_cycle_across_units() -> Bool { let dag = witness_by_value_type_cycle_dag() let assignment = witness_by_value_type_cycle_assignment() match c_partition_fold_outcome(module_dag: dag, assignment: assignment) { @@ -406,7 +406,7 @@ fn witness_r4_refuses_by_value_type_cycle_across_units() -> Bool { } } -fn witness_r4_accepts_pointer_type_cycle_across_units() -> Bool { +test fn witness_r4_accepts_pointer_type_cycle_across_units() -> Bool { let dag = witness_pointer_type_cycle_dag() let assignment = witness_pointer_type_cycle_assignment() match c_partition_fold_outcome(module_dag: dag, assignment: assignment) { @@ -423,7 +423,7 @@ fn witness_r4_accepts_pointer_type_cycle_across_units() -> Bool { } } -fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { +test fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { match partition_fold_outcome_with_closure_fuel( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment(), @@ -436,7 +436,7 @@ fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { } } -fn witness_partition_fold_compat_wrapper_not_receipt_path() -> Bool { +test fn witness_partition_fold_compat_wrapper_not_receipt_path() -> Bool { match partition_fold_outcome( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment() @@ -446,16 +446,3 @@ fn witness_partition_fold_compat_wrapper_not_receipt_path() -> Bool { } } -test fn c_compilation_unit_witnesses() -> Bool { - witness_partition_fold_compat_wrapper_not_receipt_path() - && witness_partition_fold_outcome_refuses_zero_closure_fuel() - && witness_r3_header_source_object_paths() - && witness_r3_include_directive_per_dep() - && witness_r3_unit_one_spelling_paths() - && witness_r3_spelling_from_partition_fold() - && witness_r4_accepts_link_cyclic_unit_graph() - && witness_r4_accepts_module_scc_split_across_units() - && witness_r4_accepts_triangle_module_scc_split() - && witness_r4_refuses_by_value_type_cycle_across_units() - && witness_r4_accepts_pointer_type_cycle_across_units() -} diff --git a/src/v2/test/claim/ci_floor_plan_witness_test.dag b/src/v2/test/claim/ci_floor_plan_witness_test.dag index caa3a37e028..61f0c5f12bd 100644 --- a/src/v2/test/claim/ci_floor_plan_witness_test.dag +++ b/src/v2/test/claim/ci_floor_plan_witness_test.dag @@ -261,15 +261,15 @@ fn discovery_carries_exactly(r: Runnable, expected: ScheduleWitnessEntry) -> Boo } } -fn witness_optin_corpus_carries_exactly_roster_rows() -> Bool { +test fn witness_optin_corpus_carries_exactly_roster_rows() -> Bool { discovery_carries_exactly(r: corpus_runnable_for(spec: optin_spec), expected: synthetic_corpus_row) } -fn witness_optin_execution_partition() -> Bool { +test fn witness_optin_execution_partition() -> Bool { discovery_carries_exactly(r: execution_corpus_runnable_for(spec: optin_spec), expected: synthetic_execution_row) } -fn witness_kind_wins_over_path() -> Bool { +test fn witness_kind_wins_over_path() -> Bool { let spec = ci_spec_with_witness_entries( spec: gunbc_ci_spec, entries: [synthetic_exec_kind_nonexec_path_row] @@ -282,13 +282,13 @@ fn witness_kind_wins_over_path() -> Bool { ) } -fn witness_optin_roster_drives_corpus_presence() -> Bool { +test fn witness_optin_roster_drives_corpus_presence() -> Bool { (schedule_discovery_batch_count(batches: floor_schedule_for(spec: zero_roster_spec, serialize_heavy: true)) == 0) && (schedule_discovery_batch_count(batches: floor_schedule_for(spec: corpus_only_spec, serialize_heavy: true)) == 1) && (schedule_discovery_batch_count(batches: floor_schedule_for(spec: optin_spec, serialize_heavy: true)) == 2) } -fn witness_optin_plan_gates_corpus_after_compile() -> Bool { +test fn witness_optin_plan_gates_corpus_after_compile() -> Bool { let batches = floor_schedule_for(spec: optin_spec, serialize_heavy: true) !list_contains_str(xs: batch_functions(b: batches.first()), target: corpus_sentinel) && (batch_index_of(batches: batches, target: "dag_compile_clean_gate_passes") == 1) && @@ -310,20 +310,20 @@ fn ci_spec_with_source_ingest_gate(spec: CiSpec) -> CiSpec { data source_ingest_ordering_spec: CiSpec = ci_spec_with_source_ingest_gate(spec: optin_spec) -fn witness_optin_source_ingest_serialized_after_corpus() -> Bool { +test fn witness_optin_source_ingest_serialized_after_corpus() -> Bool { let batches = floor_schedule_for(spec: source_ingest_ordering_spec, serialize_heavy: true) let corpus_idx = batch_index_of(batches: batches, target: corpus_sentinel) let ingest_idx = batch_index_of(batches: batches, target: "source_root_ingest_gate_passes") (corpus_idx >= 1) && (ingest_idx > corpus_idx) } -fn witness_optin_exclusion_edges_track_roster() -> Bool { +test fn witness_optin_exclusion_edges_track_roster() -> Bool { witness_floor_corpus_exclusion_edges_exist(spec: optin_spec) && (length(xs: floor_corpus_exclusion_resource_edges(spec: zero_roster_spec)) == 0) && witness_floor_no_corpus_resource_edge_to_compile_anchor(spec: optin_spec) } -fn witness_optin_plan_serializes_heavy_resolves() -> Bool { +test fn witness_optin_plan_serializes_heavy_resolves() -> Bool { floor_plan_serializes_heavy_resolves_for(spec: heavy_pair_spec) && floor_plan_co_runs_heavy_without_serialization_for(spec: heavy_pair_spec) } @@ -334,13 +334,13 @@ fn batch_has_both_emit_and_corpus(b: List) -> Bool { list_contains_str(xs: fns, target: corpus_sentinel) } -fn witness_optin_emit_host_isolated_from_corpus() -> Bool { +test fn witness_optin_emit_host_isolated_from_corpus() -> Bool { fold(floor_schedule_for(spec: optin_spec, serialize_heavy: true), init: true, f: fn(ok, b) { ok && !batch_has_both_emit_and_corpus(b: b) }) } -fn witness_optin_emit_host_co_runs_corpus_without_serialization() -> Bool { +test fn witness_optin_emit_host_co_runs_corpus_without_serialization() -> Bool { fold(floor_schedule_for(spec: optin_spec, serialize_heavy: false), init: false, f: fn(found, b) { found || batch_has_both_emit_and_corpus(b: b) }) @@ -361,15 +361,14 @@ fn witness_hermetic_floor_posture_declared() -> Bool { && discovery_batch_declares_hermetic(r: gunbc_falsifier_batches().first().first()) } -fn witness_emit_host_profile_forbids_corpus_co_residence() -> Bool { +test fn witness_emit_host_profile_forbids_corpus_co_residence() -> Bool { runnable_forbids_corpus_co_residence(r: gate_runnable(g: EmitHostGate)) } -fn witness_light_gate_profile_allows_corpus_co_residence() -> Bool { +test fn witness_light_gate_profile_allows_corpus_co_residence() -> Bool { !runnable_forbids_corpus_co_residence(r: gate_runnable(g: ExtdepsExternalAuthorityGate)) } - fn falsifier_batch_selection(mode: NodeFrontierSelection) -> Bool { match mode { SelectionPredictOnly => true @@ -635,21 +634,6 @@ test fn ci_floor_plan_witnesses() -> Bool { && falsifier_substrate_long_lane_budget_exceeds_fast_lane_holds() } -test fn ci_floor_optin_roster_witnesses() -> Bool { - witness_optin_roster_drives_corpus_presence() && - witness_optin_corpus_carries_exactly_roster_rows() && - witness_optin_execution_partition() && - witness_kind_wins_over_path() && - witness_optin_plan_gates_corpus_after_compile() && - witness_optin_source_ingest_serialized_after_corpus() && - witness_optin_exclusion_edges_track_roster() && - witness_optin_plan_serializes_heavy_resolves() && - witness_optin_emit_host_isolated_from_corpus() && - witness_optin_emit_host_co_runs_corpus_without_serialization() && - witness_emit_host_profile_forbids_corpus_co_residence() && - witness_light_gate_profile_allows_corpus_co_residence() -} - test fn ci_corpus_discovery_flip_witnesses() -> Bool { witness_ci_corpus_discovery_is_live() && witness_ci_corpus_discovery_flip_authored() diff --git a/src/v2/test/claim/ci_spec_witness_test.dag b/src/v2/test/claim/ci_spec_witness_test.dag index b8792250acf..0db6ddd26f7 100644 --- a/src/v2/test/claim/ci_spec_witness_test.dag +++ b/src/v2/test/claim/ci_spec_witness_test.dag @@ -87,7 +87,7 @@ fn symbol_in(syms: List, s: Symbol) -> Bool { fold(syms, init: false, f: fn(acc, x) { acc || (x == s) }) } -fn witness_gate_roster_matches_coproduct_arms() -> Bool { +test fn witness_gate_roster_matches_coproduct_arms() -> Bool { let arm_keys = coproduct_arm_keys(type_name: reflect_gate_type) match coproduct_nullary_inhabitants(type_name: reflect_gate_type) { Accepted { value: inhabitants, diagnostics: _ } => @@ -104,26 +104,26 @@ fn witness_gate_roster_matches_coproduct_arms() -> Bool { } } -fn witness_roots_fold_into_scheduler() -> Bool { +test fn witness_roots_fold_into_scheduler() -> Bool { let script = scheduler_invoke(spec: gunbc_ci_spec) string_contains(s: script, pattern: " --source-root \"$ROOT/src/v2\"") && string_contains(s: script, pattern: " --source-root \"$ROOT/dag\"") } -fn witness_layer_authority_drives_source_flags() -> Bool { +test fn witness_layer_authority_drives_source_flags() -> Bool { let flags = witness_layer_source_flags(roots: witness_layer_roots) (flags != witness_layer_source_flags(roots: alternate_witness_layer_roots)) && string_contains(s: flags, pattern: " --source-root src/v2") && !string_contains(s: flags, pattern: "Z9Z9Z9-witness-root") } -fn witness_scan_subtree_not_in_scheduler_argv() -> Bool { +test fn witness_scan_subtree_not_in_scheduler_argv() -> Bool { let script = scheduler_invoke(spec: gunbc_ci_spec) !string_contains(s: script, pattern: " --scan-dir") && string_contains(s: script, pattern: " --source-root \"$ROOT/src/v2\"") } -fn witness_diff_policy_drives_fetch() -> Bool { +test fn witness_diff_policy_drives_fetch() -> Bool { let fetch = git_fetch_script(policy: gunbc_ci_spec.diff_policy) string_contains(s: fetch, pattern: "git fetch --no-tags origin main") && (git_fetch_script(policy: spec_alternate_notice.diff_policy) != fetch) && @@ -133,7 +133,7 @@ fn witness_diff_policy_drives_fetch() -> Bool { ) } -fn witness_notice_title_from_spec() -> Bool { +test fn witness_notice_title_from_spec() -> Bool { string_contains( s: scheduler_invoke(spec: gunbc_ci_spec), pattern: concat(concat(" --notice-title \"", gunbc_ci_spec.notice_title), "\"") @@ -143,7 +143,7 @@ fn witness_notice_title_from_spec() -> Bool { ) } -fn witness_run_script_invokes_scheduler() -> Bool { +test fn witness_run_script_invokes_scheduler() -> Bool { let script = gunbc_ci_run_script(spec: gunbc_ci_spec) let floor_script = gunbc_ci_floor_only_script(spec: gunbc_ci_spec) string_contains(s: script, pattern: git_fetch_script(policy: gunbc_ci_spec.diff_policy)) && @@ -154,14 +154,14 @@ fn witness_run_script_invokes_scheduler() -> Bool { !string_contains(s: script, pattern: "cargo run -p v1-compiler --release --bin claim_executor") } -fn witness_release_build_unifies_features() -> Bool { +test fn witness_release_build_unifies_features() -> Bool { string_contains( s: ci_release_build_script(), pattern: concat("--features ", ci_release_features) ) } -fn witness_release_build_eagain_cold_retry() -> Bool { +test fn witness_release_build_eagain_cold_retry() -> Bool { let script = ci_release_build_script() string_contains(s: script, pattern: "Resource temporarily unavailable|failed to spawn") && string_contains(s: script, pattern: "CARGO_BUILD_JOBS=1") && @@ -171,7 +171,7 @@ fn witness_release_build_eagain_cold_retry() -> Bool { string_contains(s: script, pattern: "sccache --show-stats") } -fn witness_release_build_eagain_tiers_wrap_build_command() -> Bool { +test fn witness_release_build_eagain_tiers_wrap_build_command() -> Bool { let script = ci_release_build_script() let build_cmd = ci_release_build_line() string_contains(s: script, pattern: concat("if ! (", concat(build_cmd, ") 2>&1"))) @@ -179,18 +179,18 @@ fn witness_release_build_eagain_tiers_wrap_build_command() -> Bool { && !string_contains(s: script, pattern: "env -u RUSTC_WRAPPER") } -fn witness_release_build_verifies_nonempty_artifacts() -> Bool { +test fn witness_release_build_verifies_nonempty_artifacts() -> Bool { let script = ci_release_build_script() string_contains(s: script, pattern: "--verify-build-artifacts") && string_contains(s: script, pattern: "$ROOT/target/release/gunbc") && !string_contains(s: script, pattern: "-newer") } -fn witness_floor_build_verify_script_byte_identical() -> Bool { +test fn witness_floor_build_verify_script_byte_identical() -> Bool { ci_floor_build_verify_script() == golden_floor_build_verify_script } -fn witness_scheduler_uses_release_binary() -> Bool { +test fn witness_scheduler_uses_release_binary() -> Bool { string_contains( s: scheduler_invoke(spec: gunbc_ci_spec), pattern: "$ROOT/target/release/claim_executor" @@ -198,11 +198,11 @@ fn witness_scheduler_uses_release_binary() -> Bool { !string_contains(s: scheduler_invoke(spec: gunbc_ci_spec), pattern: "cargo run") } -fn witness_workflow_run_is_floor_only_script() -> Bool { +test fn witness_workflow_run_is_floor_only_script() -> Bool { gunbc_ci_workflow_run(spec: gunbc_ci_spec) == gunbc_ci_floor_only_script(spec: gunbc_ci_spec) } -fn witness_documentation_only_floor_shortcut_retired() -> Bool { +test fn witness_documentation_only_floor_shortcut_retired() -> Bool { let script = gunbc_ci_floor_only_script(spec: gunbc_ci_spec) string_contains(s: script, pattern: ci_documentation_only_floor_shortcut_retired_note) && string_contains(s: script, pattern: "gunbc#7023") && @@ -213,13 +213,13 @@ fn witness_documentation_only_floor_shortcut_retired() -> Bool { string_contains(s: script, pattern: "--plan-function gunbc_ci_floor_batches") } -fn witness_merge_base_ref_single_authority() -> Bool { +test fn witness_merge_base_ref_single_authority() -> Bool { merge_admission_merge_base_ref == gunbc_ci_spec.diff_policy.base && merge_admission_merge_base_ref == (gunbc_merge_target_ref as String) && (gunbc_merge_target_ref as String) == "origin/main" } -fn witness_repo_identity_single_authority_perturbation() -> Bool { +test fn witness_repo_identity_single_authority_perturbation() -> Bool { let real = git_remote_ref( parts: GitRemoteRefParts { remote: gunbc_default_remote_name, ref_name: gunbc_default_branch_name } ) @@ -231,14 +231,14 @@ fn witness_repo_identity_single_authority_perturbation() -> Bool { && (perturbed as String) == "origin/develop" } -fn witness_documentation_only_gate_skip_prefix_dissolve_on_named() -> Bool { +test fn witness_documentation_only_gate_skip_prefix_dissolve_on_named() -> Bool { string_contains( s: ci_documentation_only_gate_skip_prefix_shell_emit_dissolution_trigger, pattern: "dissolve-on: ci_documentation_only_gate_skip_prefix" ) } -fn witness_documentation_only_gate_skip_emits_dissolve_on_in_runners() -> Bool { +test fn witness_documentation_only_gate_skip_emits_dissolve_on_in_runners() -> Bool { let marker = concat("# ", ci_documentation_only_gate_skip_prefix_shell_emit_dissolution_trigger) string_contains(s: ci_floor_resolve_receipt_gate_script(), pattern: marker) && string_contains(s: ci_floor_materialization_receipt_gate_script(), pattern: marker) @@ -246,19 +246,19 @@ fn witness_documentation_only_gate_skip_emits_dissolve_on_in_runners() -> Bool { && string_contains(s: ci_merge_admission_gate_script(), pattern: marker) } -fn witness_floor_disposition_marker_init_dissolve_on_named() -> Bool { +test fn witness_floor_disposition_marker_init_dissolve_on_named() -> Bool { string_contains( s: ci_floor_disposition_marker_init_shell_emit_dissolution_trigger, pattern: "dissolve-on: ci_floor_disposition_marker_init_script" ) } -fn witness_floor_disposition_marker_init_emits_dissolve_on_in_floor_runner() -> Bool { +test fn witness_floor_disposition_marker_init_emits_dissolve_on_in_floor_runner() -> Bool { let marker = concat("# ", ci_floor_disposition_marker_init_shell_emit_dissolution_trigger) string_contains(s: gunbc_ci_floor_only_script(spec: gunbc_ci_spec), pattern: marker) } -fn witness_floor_disposition_marker_initialized_at_floor_start() -> Bool { +test fn witness_floor_disposition_marker_initialized_at_floor_start() -> Bool { let script = gunbc_ci_floor_only_script(spec: gunbc_ci_spec) let stamp = concat( concat("echo ", merge_admission_floor_disposition_floor_running), @@ -268,35 +268,10 @@ fn witness_floor_disposition_marker_initialized_at_floor_start() -> Bool { string_contains(s: script, pattern: stamp) } -fn witness_collapsed_run_script_is_build_plus_floor() -> Bool { +test fn witness_collapsed_run_script_is_build_plus_floor() -> Bool { gunbc_ci_run_script(spec: gunbc_ci_spec) == concat( concat(ci_release_build_script(), "\n"), gunbc_ci_floor_only_script(spec: gunbc_ci_spec) ) } -test fn ci_spec_witnesses() -> Bool { - witness_roots_fold_into_scheduler() && - witness_layer_authority_drives_source_flags() && - witness_scan_subtree_not_in_scheduler_argv() && - witness_diff_policy_drives_fetch() && - witness_notice_title_from_spec() && - witness_run_script_invokes_scheduler() && - witness_release_build_unifies_features() && - witness_release_build_eagain_cold_retry() && - witness_release_build_eagain_tiers_wrap_build_command() && - witness_release_build_verifies_nonempty_artifacts() && - witness_floor_build_verify_script_byte_identical() && - witness_scheduler_uses_release_binary() && - witness_workflow_run_is_floor_only_script() && - witness_documentation_only_floor_shortcut_retired() && - witness_floor_disposition_marker_initialized_at_floor_start() && - witness_floor_disposition_marker_init_dissolve_on_named() && - witness_floor_disposition_marker_init_emits_dissolve_on_in_floor_runner() && - witness_merge_base_ref_single_authority() && - witness_repo_identity_single_authority_perturbation() && - witness_documentation_only_gate_skip_prefix_dissolve_on_named() && - witness_documentation_only_gate_skip_emits_dissolve_on_in_runners() && - witness_collapsed_run_script_is_build_plus_floor() && - witness_gate_roster_matches_coproduct_arms() -} diff --git a/src/v2/test/claim/compilation_unit_witness_test.dag b/src/v2/test/claim/compilation_unit_witness_test.dag index 901cf34573d..a33568aa2de 100644 --- a/src/v2/test/claim/compilation_unit_witness_test.dag +++ b/src/v2/test/claim/compilation_unit_witness_test.dag @@ -167,7 +167,7 @@ fn witness_partition_fold_two_units() -> List { ) } -fn witness_unit_one_members_and_deps() -> Bool { +test fn witness_unit_one_members_and_deps() -> Bool { let units = witness_partition_fold_two_units() match partition_unit_by_id(units: units, unit_id: witness_unit_one) { Present { value: unit } => @@ -178,7 +178,7 @@ fn witness_unit_one_members_and_deps() -> Bool { } } -fn witness_unit_two_interface_carries_declaration_content() -> Bool { +test fn witness_unit_two_interface_carries_declaration_content() -> Bool { let units = witness_partition_fold_two_units() let export_decl = witness_fn_taking_point_by_value() match partition_unit_by_id(units: units, unit_id: witness_unit_two) { @@ -190,7 +190,7 @@ fn witness_unit_two_interface_carries_declaration_content() -> Bool { } } -fn witness_unit_two_interface_includes_by_value_type_def() -> Bool { +test fn witness_unit_two_interface_includes_by_value_type_def() -> Bool { let units = witness_partition_fold_two_units() let point_def = witness_point_struct_conj_body() match partition_unit_by_id(units: units, unit_id: witness_unit_two) { @@ -201,7 +201,7 @@ fn witness_unit_two_interface_includes_by_value_type_def() -> Bool { } } -fn witness_interface_closure_saturates_on_triangle() -> Bool { +test fn witness_interface_closure_saturates_on_triangle() -> Bool { let dag = witness_triangle_dag() let assignment = witness_two_unit_assignment() let units = partition_fold(module_dag: dag, assignment: assignment) @@ -219,7 +219,7 @@ fn witness_interface_closure_saturates_on_triangle() -> Bool { } } -fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { +test fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { match partition_fold_outcome_with_closure_fuel( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment(), @@ -232,7 +232,7 @@ fn witness_partition_fold_outcome_refuses_zero_closure_fuel() -> Bool { } } -fn witness_single_unit_partition_has_no_cross_unit_deps() -> Bool { +test fn witness_single_unit_partition_has_no_cross_unit_deps() -> Bool { let units = partition_fold( module_dag: witness_triangle_dag(), assignment: witness_single_unit_assignment() @@ -246,7 +246,7 @@ fn witness_single_unit_partition_has_no_cross_unit_deps() -> Bool { } } -fn witness_intra_unit_edges_do_not_become_deps() -> Bool { +test fn witness_intra_unit_edges_do_not_become_deps() -> Bool { let units = partition_fold( module_dag: witness_chain_dag(), assignment: witness_single_unit_assignment() @@ -257,21 +257,21 @@ fn witness_intra_unit_edges_do_not_become_deps() -> Bool { } } -fn witness_fold_deps_match_boundary_edges_two_unit() -> Bool { +test fn witness_fold_deps_match_boundary_edges_two_unit() -> Bool { partition_fold_deps_match_boundary_edges( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment() ) } -fn witness_fold_deps_match_boundary_edges_single_unit() -> Bool { +test fn witness_fold_deps_match_boundary_edges_single_unit() -> Bool { partition_fold_deps_match_boundary_edges( module_dag: witness_triangle_dag(), assignment: witness_single_unit_assignment() ) } -fn witness_misderived_deps_would_fail_receipt() -> Bool { +test fn witness_misderived_deps_would_fail_receipt() -> Bool { let units = witness_partition_fold_two_units() match partition_unit_by_id(units: units, unit_id: witness_unit_one) { Present { value: unit } => @@ -282,7 +282,7 @@ fn witness_misderived_deps_would_fail_receipt() -> Bool { } } -fn witness_provenance_variants_distinct() -> Bool { +test fn witness_provenance_variants_distinct() -> Bool { let explicit = partition_provenance_hand_explicit() let derived = partition_provenance_policy_derived( policy: DeclarationRef { @@ -299,7 +299,7 @@ fn witness_provenance_variants_distinct() -> Bool { } } -fn witness_r4_interface_carriers_only() -> Bool { +test fn witness_r4_interface_carriers_only() -> Bool { let valid_verdict = PartitionR4Valid let refused_verdict = partition_r4_witness_refused_scc_split match valid_verdict { @@ -312,7 +312,7 @@ fn witness_r4_interface_carriers_only() -> Bool { } } -fn witness_partition_fold_outcome_ok_on_triangle() -> Bool { +test fn witness_partition_fold_outcome_ok_on_triangle() -> Bool { match partition_fold_outcome( module_dag: witness_triangle_dag(), assignment: witness_two_unit_assignment() @@ -322,18 +322,3 @@ fn witness_partition_fold_outcome_ok_on_triangle() -> Bool { } } -test fn compilation_unit_witnesses() -> Bool { - witness_unit_one_members_and_deps() - && witness_unit_two_interface_carries_declaration_content() - && witness_unit_two_interface_includes_by_value_type_def() - && witness_interface_closure_saturates_on_triangle() - && witness_partition_fold_outcome_refuses_zero_closure_fuel() - && witness_single_unit_partition_has_no_cross_unit_deps() - && witness_intra_unit_edges_do_not_become_deps() - && witness_fold_deps_match_boundary_edges_two_unit() - && witness_fold_deps_match_boundary_edges_single_unit() - && witness_misderived_deps_would_fail_receipt() - && witness_provenance_variants_distinct() - && witness_r4_interface_carriers_only() - && witness_partition_fold_outcome_ok_on_triangle() -} diff --git a/src/v2/test/claim/compiler/compile_eval_thesis_proof_test.dag b/src/v2/test/claim/compiler/compile_eval_thesis_proof_test.dag index 841ea0f28e2..1b64d4903de 100644 --- a/src/v2/test/claim/compiler/compile_eval_thesis_proof_test.dag +++ b/src/v2/test/claim/compiler/compile_eval_thesis_proof_test.dag @@ -82,7 +82,7 @@ fn compile_eval_thesis_medium_matches_expected(medium: Medium) -> Bool { } } -fn compile_eval_bool_reaches_node_value_holds() -> Bool { +test fn compile_eval_bool_reaches_node_value_holds() -> Bool { match compile_inferred( inferred: compile_eval_thesis_inferred(root: v2_eval_bool_literal_pin), mode: Eval { runtime: v2_eval_bool_literal_pin } @@ -93,7 +93,7 @@ fn compile_eval_bool_reaches_node_value_holds() -> Bool { } } -fn compile_eval_bool_via_compile_entry_holds() -> Bool { +test fn compile_eval_bool_via_compile_entry_holds() -> Bool { match compile( source: v2_eval_bool_literal_pin, mode: Eval { runtime: v2_eval_bool_literal_pin } @@ -104,7 +104,7 @@ fn compile_eval_bool_via_compile_entry_holds() -> Bool { } } -fn compile_eval_unit_unrepresentable_red_holds() -> Bool { +test fn compile_eval_unit_unrepresentable_red_holds() -> Bool { match compile_inferred( inferred: compile_eval_thesis_inferred(root: v2_eval_unit_literal_pin), mode: Eval { runtime: v2_eval_unit_literal_pin } @@ -115,12 +115,6 @@ fn compile_eval_unit_unrepresentable_red_holds() -> Bool { } } -test fn compile_eval_thesis_proof_holds() -> Bool { - compile_eval_bool_reaches_node_value_holds() - && compile_eval_bool_via_compile_entry_holds() - && compile_eval_unit_unrepresentable_red_holds() -} - test fn isolate_t1_holds() -> Bool { compile_eval_bool_reaches_node_value_holds() } diff --git a/src/v2/test/claim/computation_identity_test.dag b/src/v2/test/claim/computation_identity_test.dag index 8eeea4b7e8c..1ec91a04482 100644 --- a/src/v2/test/claim/computation_identity_test.dag +++ b/src/v2/test/claim/computation_identity_test.dag @@ -21,13 +21,13 @@ import v2.std.materialize { import v2.std.logic { Bool } import v2.std.text { String } -fn witness_known_grades_permit_share() -> Bool { +test fn witness_known_grades_permit_share() -> Bool { identity_permits_share(ci: StructurallyIdentical) && identity_permits_share(ci: NormalizedIdentical { normalizer: "alpha-rename" }) && identity_permits_share(ci: ExtensionallyIdentical { bound: "declared-input-domain" }) } -fn witness_unknown_never_permits_share() -> Bool { +test fn witness_unknown_never_permits_share() -> Bool { let unknown = IdentityUnknown { cause: MissingEnforcement { detail: "no lens covers this producer" } } @@ -35,13 +35,13 @@ fn witness_unknown_never_permits_share() -> Bool { && (identity_grade_is_known(ci: unknown) == false) } -fn witness_unknown_cause_arms_construct() -> Bool { +test fn witness_unknown_cause_arms_construct() -> Bool { let a = IdentityUnknown { cause: MissingConcept { detail: "x" } } let b = IdentityUnknown { cause: BoundUnmodeled { detail: "y" } } (identity_grade_is_known(ci: a) == false) && (identity_grade_is_known(ci: b) == false) } -fn witness_materialize_share_is_structural() -> Bool { +test fn witness_materialize_share_is_structural() -> Bool { match materialize_share_identity_grade() { StructurallyIdentical => materialize_share_grade_permits_share() NormalizedIdentical { normalizer: _ } => false @@ -50,14 +50,7 @@ fn witness_materialize_share_is_structural() -> Bool { } } -fn witness_materialize_ungrounded_refuses_share() -> Bool { +test fn witness_materialize_ungrounded_refuses_share() -> Bool { identity_permits_share(ci: materialize_ungrounded_identity(detail: "normalized peer")) == false } -test fn computation_identity_witnesses() -> Bool { - witness_known_grades_permit_share() - && witness_unknown_never_permits_share() - && witness_unknown_cause_arms_construct() - && witness_materialize_share_is_structural() - && witness_materialize_ungrounded_refuses_share() -} diff --git a/src/v2/test/claim/concept_index_enumeration_test.dag b/src/v2/test/claim/concept_index_enumeration_test.dag index ed6c6597cbc..ac98fdd659c 100644 --- a/src/v2/test/claim/concept_index_enumeration_test.dag +++ b/src/v2/test/claim/concept_index_enumeration_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.concept_index_enumeration - data live_tree_disposition: LiveTreeDisposition = ReadsLiveTree type ConceptIndexWitnessRecord { @@ -75,11 +74,11 @@ fn parse_only_concept_matches( }) } -fn witness_enumeration_nonempty() -> Bool { +test fn witness_enumeration_nonempty() -> Bool { idx().length() > 0 } -fn witness_fieldref_self_projection() -> Bool { +test fn witness_fieldref_self_projection() -> Bool { concept_matches( target_qn: "v2.std.concept_index.FieldRef", short_name: "FieldRef", @@ -91,7 +90,7 @@ fn witness_fieldref_self_projection() -> Bool { ) } -fn witness_qualified_concept_self_projection() -> Bool { +test fn witness_qualified_concept_self_projection() -> Bool { concept_matches( target_qn: "v2.std.concept_index.QualifiedConcept", short_name: "QualifiedConcept", @@ -103,7 +102,7 @@ fn witness_qualified_concept_self_projection() -> Bool { ) } -fn witness_local_record_enumerated() -> Bool { +test fn witness_local_record_enumerated() -> Bool { concept_matches( target_qn: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessRecord", short_name: "ConceptIndexWitnessRecord", @@ -115,12 +114,12 @@ fn witness_local_record_enumerated() -> Bool { ) } -fn witness_absent_concept_is_false() -> Bool { +test fn witness_absent_concept_is_false() -> Bool { (idx_has_qn(target: "v2.std.concept_index.NoSuchConceptZZZ") == false) && (idx_has_qn(target: "std.concept_index.FieldRef") == false) } -fn witness_parse_only_extract_reflects_canonical_field_types() -> Bool { +test fn witness_parse_only_extract_reflects_canonical_field_types() -> Bool { parse_only_concept_matches( target_qn: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessRecord", short_name: "ConceptIndexWitnessRecord", @@ -132,7 +131,7 @@ fn witness_parse_only_extract_reflects_canonical_field_types() -> Bool { ) } -fn witness_parse_only_extract_reflects_perturbed_field_type() -> Bool { +test fn witness_parse_only_extract_reflects_perturbed_field_type() -> Bool { parse_only_concept_matches( target_qn: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessRecordPerturb", short_name: "ConceptIndexWitnessRecordPerturb", @@ -144,7 +143,7 @@ fn witness_parse_only_extract_reflects_perturbed_field_type() -> Bool { ) } -fn witness_parse_only_extract_stale_field_type_red_on_canonical() -> Bool { +test fn witness_parse_only_extract_stale_field_type_red_on_canonical() -> Bool { !parse_only_concept_matches( target_qn: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessRecord", short_name: "ConceptIndexWitnessRecord", @@ -155,14 +154,14 @@ fn witness_parse_only_extract_stale_field_type_red_on_canonical() -> Bool { ) } -fn witness_parse_only_extract_nonempty_in_scoped_pool() -> Bool { +test fn witness_parse_only_extract_nonempty_in_scoped_pool() -> Bool { parse_only_idx().length() > 0 && parse_only_idx_has_qn( target: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessRecord" ) } -fn witness_coproduct_arms_live() -> Bool { +test fn witness_coproduct_arms_live() -> Bool { concept_matches( target_qn: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessCoproduct", short_name: "ConceptIndexWitnessCoproduct", @@ -178,7 +177,7 @@ fn witness_coproduct_arms_live() -> Bool { ) } -fn witness_coproduct_arms_parse_only() -> Bool { +test fn witness_coproduct_arms_parse_only() -> Bool { parse_only_concept_matches( target_qn: "v2.test.claim.concept_index_enumeration.ConceptIndexWitnessCoproduct", short_name: "ConceptIndexWitnessCoproduct", @@ -194,16 +193,3 @@ fn witness_coproduct_arms_parse_only() -> Bool { ) } -test fn concept_index_enumeration_witnesses() -> Bool { - witness_enumeration_nonempty() - && witness_fieldref_self_projection() - && witness_qualified_concept_self_projection() - && witness_local_record_enumerated() - && witness_absent_concept_is_false() - && witness_parse_only_extract_nonempty_in_scoped_pool() - && witness_parse_only_extract_reflects_canonical_field_types() - && witness_parse_only_extract_reflects_perturbed_field_type() - && witness_parse_only_extract_stale_field_type_red_on_canonical() - && witness_coproduct_arms_live() - && witness_coproduct_arms_parse_only() -} diff --git a/src/v2/test/claim/cross_tree_import_model_test.dag b/src/v2/test/claim/cross_tree_import_model_test.dag index de69c2a9a01..ddf5b168a90 100644 --- a/src/v2/test/claim/cross_tree_import_model_test.dag +++ b/src/v2/test/claim/cross_tree_import_model_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.cross_tree_import_model - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data both_roots: SourceRootSet = [V2Tree, DagTree] @@ -28,7 +27,7 @@ data v2_workflow_to_dag_std_edge: CrossTreeImport = CrossTreeImport { to_module: "dag.std.types" } -fn witness_dag_std_to_v2_std_more_fundamental_admitted_holds() -> Bool { +test fn witness_dag_std_to_v2_std_more_fundamental_admitted_holds() -> Bool { match cross_tree_import_admitted( edge: dag_std_to_v2_std_edge, roots: both_roots, @@ -39,7 +38,7 @@ fn witness_dag_std_to_v2_std_more_fundamental_admitted_holds() -> Bool { } } -fn witness_dag_std_to_v2_std_co_fundamental_admitted_holds() -> Bool { +test fn witness_dag_std_to_v2_std_co_fundamental_admitted_holds() -> Bool { match cross_tree_import_admitted( edge: dag_std_to_v2_std_edge, roots: both_roots, @@ -50,7 +49,7 @@ fn witness_dag_std_to_v2_std_co_fundamental_admitted_holds() -> Bool { } } -fn witness_v2_workflow_to_dag_std_more_fundamental_admitted_holds() -> Bool { +test fn witness_v2_workflow_to_dag_std_more_fundamental_admitted_holds() -> Bool { match cross_tree_import_admitted( edge: v2_workflow_to_dag_std_edge, roots: both_roots, @@ -61,7 +60,7 @@ fn witness_v2_workflow_to_dag_std_more_fundamental_admitted_holds() -> Bool { } } -fn witness_import_closure_all_admitted_holds() -> Bool { +test fn witness_import_closure_all_admitted_holds() -> Bool { let closure = [dag_std_to_v2_std_edge, v2_workflow_to_dag_std_edge] match cross_tree_import_closure_admitted( closure: closure, @@ -73,7 +72,7 @@ fn witness_import_closure_all_admitted_holds() -> Bool { } } -fn witness_layer_direction_deleted_now_admitted_holds() -> Bool { +test fn witness_layer_direction_deleted_now_admitted_holds() -> Bool { match cross_tree_import_admitted( edge: dag_std_to_v2_compiler_edge, roots: both_roots, @@ -84,7 +83,7 @@ fn witness_layer_direction_deleted_now_admitted_holds() -> Bool { } } -fn witness_fundamentality_unknown_denied_holds() -> Bool { +test fn witness_fundamentality_unknown_denied_holds() -> Bool { match cross_tree_import_admitted( edge: dag_std_to_v2_std_edge, roots: both_roots, @@ -95,7 +94,7 @@ fn witness_fundamentality_unknown_denied_holds() -> Bool { } } -fn witness_missing_root_denied_holds() -> Bool { +test fn witness_missing_root_denied_holds() -> Bool { match cross_tree_import_admitted( edge: dag_std_to_v2_std_edge, roots: dag_only_roots, @@ -106,7 +105,7 @@ fn witness_missing_root_denied_holds() -> Bool { } } -fn witness_less_fundamental_denied_holds() -> Bool { +test fn witness_less_fundamental_denied_holds() -> Bool { match cross_tree_import_admitted( edge: dag_std_to_v2_std_edge, roots: both_roots, @@ -117,7 +116,7 @@ fn witness_less_fundamental_denied_holds() -> Bool { } } -fn witness_closure_denied_on_less_fundamental_holds() -> Bool { +test fn witness_closure_denied_on_less_fundamental_holds() -> Bool { let closure = [dag_std_to_v2_std_edge, dag_std_to_v2_compiler_edge] match cross_tree_import_closure_admitted( closure: closure, @@ -129,14 +128,3 @@ fn witness_closure_denied_on_less_fundamental_holds() -> Bool { } } -test fn cross_tree_import_model_witnesses() -> Bool { - witness_dag_std_to_v2_std_more_fundamental_admitted_holds() - && witness_dag_std_to_v2_std_co_fundamental_admitted_holds() - && witness_v2_workflow_to_dag_std_more_fundamental_admitted_holds() - && witness_import_closure_all_admitted_holds() - && witness_layer_direction_deleted_now_admitted_holds() - && witness_fundamentality_unknown_denied_holds() - && witness_missing_root_denied_holds() - && witness_less_fundamental_denied_holds() - && witness_closure_denied_on_less_fundamental_holds() -} diff --git a/src/v2/test/claim/diagnostic_sequence_outcome_witness_test.dag b/src/v2/test/claim/diagnostic_sequence_outcome_witness_test.dag index 7654dfa2bbd..deee7bd8d9d 100644 --- a/src/v2/test/claim/diagnostic_sequence_outcome_witness_test.dag +++ b/src/v2/test/claim/diagnostic_sequence_outcome_witness_test.dag @@ -39,14 +39,14 @@ fn diagnostic_b() -> Diagnostic { } } -fn witness_sequence_outcome_empty_accepts() -> Bool { +test fn witness_sequence_outcome_empty_accepts() -> Bool { match sequence_outcome(xs: [], policy: short_circuit_policy) { Accepted { value: vs, diagnostics: None } => vs.length() == 0 Rejected { diagnostics: _ } => false } } -fn witness_sequence_outcome_collects_values() -> Bool { +test fn witness_sequence_outcome_collects_values() -> Bool { match sequence_outcome( xs: [outcome_accepted(value: 1), outcome_accepted(value: 2)], policy: short_circuit_policy @@ -57,7 +57,7 @@ fn witness_sequence_outcome_collects_values() -> Bool { } } -fn witness_sequence_outcome_short_circuits_on_reject() -> Bool { +test fn witness_sequence_outcome_short_circuits_on_reject() -> Bool { match sequence_outcome( xs: [ outcome_accepted(value: 1), @@ -71,7 +71,7 @@ fn witness_sequence_outcome_short_circuits_on_reject() -> Bool { } } -fn witness_sequence_outcome_accumulate_collects_both_values() -> Bool { +test fn witness_sequence_outcome_accumulate_collects_both_values() -> Bool { match sequence_outcome( xs: [outcome_accepted(value: 1), outcome_accepted(value: 2)], policy: accumulate_policy @@ -82,7 +82,7 @@ fn witness_sequence_outcome_accumulate_collects_both_values() -> Bool { } } -fn witness_sequence_outcome_accumulate_merges_two_rejections() -> Bool { +test fn witness_sequence_outcome_accumulate_merges_two_rejections() -> Bool { match sequence_outcome( xs: [outcome_rejected(d: diagnostic_a()), outcome_rejected(d: diagnostic_b())], policy: accumulate_policy @@ -92,7 +92,7 @@ fn witness_sequence_outcome_accumulate_merges_two_rejections() -> Bool { } } -fn witness_sequence_outcome_short_circuit_does_not_merge_second_reject() -> Bool { +test fn witness_sequence_outcome_short_circuit_does_not_merge_second_reject() -> Bool { match sequence_outcome( xs: [outcome_rejected(d: diagnostic_a()), outcome_rejected(d: diagnostic_b())], policy: short_circuit_policy @@ -102,11 +102,3 @@ fn witness_sequence_outcome_short_circuit_does_not_merge_second_reject() -> Bool } } -test fn diagnostic_sequence_outcome_witnesses() -> Bool { - witness_sequence_outcome_empty_accepts() - && witness_sequence_outcome_collects_values() - && witness_sequence_outcome_short_circuits_on_reject() - && witness_sequence_outcome_accumulate_collects_both_values() - && witness_sequence_outcome_accumulate_merges_two_rejections() - && witness_sequence_outcome_short_circuit_does_not_merge_second_reject() -} diff --git a/src/v2/test/claim/discovery_enumeration_test.dag b/src/v2/test/claim/discovery_enumeration_test.dag index 28f27bda0bb..0d49d2f802e 100644 --- a/src/v2/test/claim/discovery_enumeration_test.dag +++ b/src/v2/test/claim/discovery_enumeration_test.dag @@ -17,7 +17,7 @@ test fn discovery_enumeration_unified_claim_arm_modules_holds() -> Bool { && unified_claim_arm_node_corpus_module == "v2.std.verification" } -fn corpus_init_round_trips() -> Bool { +test fn corpus_init_round_trips() -> Bool { let init: OwnedDataDeclInitializer = OwnedNodeCorpusInit match init { OwnedNodeCorpusInit => true @@ -25,7 +25,7 @@ fn corpus_init_round_trips() -> Bool { } } -fn bool_witness_init_round_trips() -> Bool { +test fn bool_witness_init_round_trips() -> Bool { let init: OwnedDataDeclInitializer = OwnedBoolWitnessClaimInit { witness_entry: "entry.dag", witness_function: "witness_fn" @@ -37,7 +37,7 @@ fn bool_witness_init_round_trips() -> Bool { } } -fn other_init_round_trips() -> Bool { +test fn other_init_round_trips() -> Bool { let init: OwnedDataDeclInitializer = OwnedOtherInit { resolved: ResolvedDeclRef { module: "v2.example", name: ^sym } } @@ -48,12 +48,6 @@ fn other_init_round_trips() -> Bool { } } -test fn discovery_enumeration_initializer_variants_constructible() -> Bool { - corpus_init_round_trips() - && bool_witness_init_round_trips() - && other_init_round_trips() -} - test fn discovery_enumeration_receipt_zero_default_holds() -> Bool { let receipt = OwnedDataDiscoveryReceipt { unified_claim_arm_count: 0, diff --git a/src/v2/test/claim/emit/c_semantic_decl_routing_test.dag b/src/v2/test/claim/emit/c_semantic_decl_routing_test.dag index cec001af226..dbf2a853ab7 100644 --- a/src/v2/test/claim/emit/c_semantic_decl_routing_test.dag +++ b/src/v2/test/claim/emit/c_semantic_decl_routing_test.dag @@ -177,14 +177,3 @@ test fn c_stage1_type_decl_frontier_deferred_count_holds() -> Bool { c_stage1_type_decl_frontier_deferred_count() == 3 } -test fn c_semantic_decl_routing_all_holds() -> Bool { - c_stage1_type_decl_frontier_deferred_count_holds() - && c_semantic_point_record_routes_to_struct_emit() - && c_semantic_bool_coproduct_routes_to_enum_emit() - && c_semantic_answer_coproduct_routes_to_tagged_union_emit() - && c_semantic_non_int_field_refuses() - && c_semantic_int_field_still_emits() - && c_semantic_generic_struct_refuses() - && c_semantic_generic_tagged_union_refuses() - && c_semantic_unsupported_shape_refuses() -} diff --git a/src/v2/test/claim/emit/decl_emit_consolidated_test.dag b/src/v2/test/claim/emit/decl_emit_consolidated_test.dag index 20b0d6cede9..614ba32b1b2 100644 --- a/src/v2/test/claim/emit/decl_emit_consolidated_test.dag +++ b/src/v2/test/claim/emit/decl_emit_consolidated_test.dag @@ -1,6 +1,5 @@ module v2.test.emit.decl_emit_consolidated - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data dc_bool_golden: String = concat(rust_enum_derives_copy, "\nenum Bool { True, False }") @@ -339,14 +338,14 @@ fn dc_refused_count() -> Int { fold_list(xs: dc_construct_rows, empty: 0, cons: fn(acc, row) { if row.covered { acc } else { acc + 1 } }) } -fn dc_enums_covered_holds() -> Bool { +test fn dc_enums_covered_holds() -> Bool { dc_enum_matches(emitted: dc_bool_emitted(), golden: dc_bool_golden) && dc_enum_matches(emitted: dc_execmode_emitted(), golden: dc_execmode_golden) && dc_enum_matches(emitted: dc_artifactkind_emitted(), golden: dc_artifactkind_golden) && dc_enum_matches(emitted: dc_witness_emitted(), golden: dc_witness_golden) } -fn dc_structs_covered_holds() -> Bool { +test fn dc_structs_covered_holds() -> Bool { dc_struct_matches(emitted: dc_spw_emitted(), golden: dc_spw_golden) && dc_struct_matches(emitted: dc_hw_emitted(), golden: dc_hw_golden) && dc_struct_matches(emitted: dc_artifact_emitted(), golden: dc_artifact_golden) @@ -355,7 +354,7 @@ fn dc_structs_covered_holds() -> Bool { && dc_struct_matches(emitted: dc_pair_emitted(), golden: dc_pair_golden) } -fn dc_golden_discriminates_holds() -> Bool { +test fn dc_golden_discriminates_holds() -> Bool { !dc_enum_matches(emitted: dc_bool_emitted(), golden: dc_execmode_golden) && !dc_enum_matches(emitted: dc_bool_emitted(), golden: concat(rust_enum_derives_copy, "\nenum Bool { True, FALSE }")) && !dc_struct_matches(emitted: dc_spw_emitted(), golden: concat(rust_struct_derives, "\nstruct StructuralPropertyWitness { property: Symbol, evidence: NODE }")) @@ -363,7 +362,7 @@ fn dc_golden_discriminates_holds() -> Bool { && !dc_struct_matches(emitted: dc_spw_emitted(), golden: "struct StructuralPropertyWitness { property: Symbol, evidence: Node }") } -fn dc_gaps_refused_holds() -> Bool { +test fn dc_gaps_refused_holds() -> Bool { dc_struct_refused(emitted: dc_empty_record_emitted()) && dc_enum_refused(emitted: dc_empty_enum_emitted()) && dc_coproduct_derive_binding_rejects_non_disj() @@ -383,16 +382,9 @@ fn dc_enum_non_disj_coproduct_emitted() -> Node { dc_enum_nongeneric(name: "Bad", coproduct: dc_atom_type(t: "NotDisj"), variants: []) } -fn dc_witness_module_fully_emitted_holds() -> Bool { +test fn dc_witness_module_fully_emitted_holds() -> Bool { dc_struct_matches(emitted: dc_spw_emitted(), golden: dc_spw_golden) && dc_struct_matches(emitted: dc_hw_emitted(), golden: dc_hw_golden) && dc_enum_matches(emitted: dc_witness_emitted(), golden: dc_witness_golden) } -test fn decl_emit_consolidated_holds() -> Bool { - dc_enums_covered_holds() - && dc_structs_covered_holds() - && dc_golden_discriminates_holds() - && dc_gaps_refused_holds() - && dc_witness_module_fully_emitted_holds() -} diff --git a/src/v2/test/claim/emit/rust_bind_let_emit_test.dag b/src/v2/test/claim/emit/rust_bind_let_emit_test.dag index 7c7e0b3b444..1680f80c056 100644 --- a/src/v2/test/claim/emit/rust_bind_let_emit_test.dag +++ b/src/v2/test/claim/emit/rust_bind_let_emit_test.dag @@ -141,7 +141,7 @@ fn rust_bind_let_emit_wrong_value_from_producer(target: TargetModel) -> Outcome< ) } -fn rust_bind_let_emit_holds() -> Bool { +test fn rust_bind_let_emit_holds() -> Bool { match rust_bind_let_emit_from_producer(target: rust_bind_let_target_model()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_bind_let_expected_source_text) && (d == None) @@ -149,7 +149,7 @@ fn rust_bind_let_emit_holds() -> Bool { } } -fn rust_bind_let_emit_wrong_value_discriminates() -> Bool { +test fn rust_bind_let_emit_wrong_value_discriminates() -> Bool { match rust_bind_let_emit_from_producer(target: rust_bind_let_target_model()) { Accepted { value: canonical, diagnostics: dc } => match rust_bind_let_emit_wrong_value_from_producer(target: rust_bind_let_target_model()) { @@ -163,6 +163,3 @@ fn rust_bind_let_emit_wrong_value_discriminates() -> Bool { } } -test fn rust_bind_let_emit_keystone_holds() -> Bool { - rust_bind_let_emit_holds() && rust_bind_let_emit_wrong_value_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_call_emit_test.dag b/src/v2/test/claim/emit/rust_call_emit_test.dag index 779aebf7115..4b792a2b010 100644 --- a/src/v2/test/claim/emit/rust_call_emit_test.dag +++ b/src/v2/test/claim/emit/rust_call_emit_test.dag @@ -267,6 +267,3 @@ test fn rust_call_helper_emit_holds() -> Bool { ) } -test fn rust_call_fold_closure_emit_keystone_holds() -> Bool { - rust_call_fold_closure_emit_holds() && rust_call_fold_closure_swap_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_conditional_emit_test.dag b/src/v2/test/claim/emit/rust_conditional_emit_test.dag index 3a79ba2c7ec..8c212d1c4d4 100644 --- a/src/v2/test/claim/emit/rust_conditional_emit_test.dag +++ b/src/v2/test/claim/emit/rust_conditional_emit_test.dag @@ -93,7 +93,7 @@ fn rust_conditional_emit_from_swapped_tree(target: TargetModel) -> Outcome Bool { +test fn rust_conditional_emit_pick_fn_accepts() -> Bool { match rust_conditional_emit_from_tree(target: rust_pick_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_pick_source_text) && (d == None) @@ -101,7 +101,7 @@ fn rust_conditional_emit_pick_fn_accepts() -> Bool { } } -fn rust_conditional_emit_swapped_arms_discriminates() -> Bool { +test fn rust_conditional_emit_swapped_arms_discriminates() -> Bool { match rust_conditional_emit_from_swapped_tree(target: rust_pick_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_conditional_emit_swapped_source_text) && @@ -111,7 +111,3 @@ fn rust_conditional_emit_swapped_arms_discriminates() -> Bool { } } -test fn rust_conditional_emit_holds() -> Bool { - rust_conditional_emit_pick_fn_accepts() - && rust_conditional_emit_swapped_arms_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_field_access_emit_test.dag b/src/v2/test/claim/emit/rust_field_access_emit_test.dag index 613f6e634fc..2bcbfbf3ae9 100644 --- a/src/v2/test/claim/emit/rust_field_access_emit_test.dag +++ b/src/v2/test/claim/emit/rust_field_access_emit_test.dag @@ -96,7 +96,7 @@ fn rust_field_access_emit_from_root(root: Node, target: TargetModel) -> Outcome< emit(tree: rust_field_access_emit_inferred_tree_for(root: root), target: target) } -fn rust_field_access_emit_get_accepts() -> Bool { +test fn rust_field_access_emit_get_accepts() -> Bool { match rust_field_access_emit_from_root( root: rust_field_access_emit_root, target: rust_field_access_target_model_staging() @@ -107,7 +107,7 @@ fn rust_field_access_emit_get_accepts() -> Bool { } } -fn rust_field_access_emit_wrong_field_discriminates() -> Bool { +test fn rust_field_access_emit_wrong_field_discriminates() -> Bool { match rust_field_access_emit_from_root( root: rust_field_access_emit_wrong_field_root(), target: rust_field_access_target_model_staging() @@ -120,6 +120,3 @@ fn rust_field_access_emit_wrong_field_discriminates() -> Bool { } } -test fn rust_field_access_emit_holds() -> Bool { - rust_field_access_emit_get_accepts() && rust_field_access_emit_wrong_field_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_fold_call_closure_emit_test.dag b/src/v2/test/claim/emit/rust_fold_call_closure_emit_test.dag index 92757ce8142..c4f6b6f47cb 100644 --- a/src/v2/test/claim/emit/rust_fold_call_closure_emit_test.dag +++ b/src/v2/test/claim/emit/rust_fold_call_closure_emit_test.dag @@ -64,7 +64,7 @@ fn rust_fold_call_emit_from_root(root: Node, target: TargetModel) -> Outcome Bool { +test fn rust_fold_call_emit_canonical_accepts() -> Bool { match rust_fold_call_emit_from_root( root: fold_fixture_param_canonical_arrow, target: rust_fold_call_target_model_staging() @@ -75,7 +75,7 @@ fn rust_fold_call_emit_canonical_accepts() -> Bool { } } -fn rust_fold_call_emit_swap_discriminates() -> Bool { +test fn rust_fold_call_emit_swap_discriminates() -> Bool { match rust_fold_call_emit_from_root( root: fold_fixture_param_canonical_arrow, target: rust_fold_call_target_model_staging() @@ -100,6 +100,3 @@ fn rust_fold_call_emit_swap_discriminates() -> Bool { } } -test fn rust_fold_call_closure_emit_holds() -> Bool { - rust_fold_call_emit_canonical_accepts() && rust_fold_call_emit_swap_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_literal_bind_emit_test.dag b/src/v2/test/claim/emit/rust_literal_bind_emit_test.dag index b1b5d7970d2..b9c7804c234 100644 --- a/src/v2/test/claim/emit/rust_literal_bind_emit_test.dag +++ b/src/v2/test/claim/emit/rust_literal_bind_emit_test.dag @@ -90,7 +90,7 @@ fn rust_literal_bind_int_wrong_emit_from_producer(target: TargetModel) -> Outcom ) } -fn rust_literal_bind_int_emit_accepts() -> Bool { +test fn rust_literal_bind_int_emit_accepts() -> Bool { match rust_literal_bind_int_emit_from_producer(target: rust_bind_literal_target_model()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_bind_int_literal_source_text) && (d == None) @@ -98,7 +98,7 @@ fn rust_literal_bind_int_emit_accepts() -> Bool { } } -fn rust_literal_bind_int_wrong_value_discriminates() -> Bool { +test fn rust_literal_bind_int_wrong_value_discriminates() -> Bool { match rust_literal_bind_int_emit_from_producer(target: rust_bind_literal_target_model()) { Accepted { value: canonical, diagnostics: dc } => match rust_literal_bind_int_wrong_emit_from_producer(target: rust_bind_literal_target_model()) { @@ -113,7 +113,7 @@ fn rust_literal_bind_int_wrong_value_discriminates() -> Bool { } } -fn rust_literal_bind_bool_emit_accepts() -> Bool { +test fn rust_literal_bind_bool_emit_accepts() -> Bool { match rust_literal_bind_emit_from_root( root: rust_bind_bool_literal_arrow_node(), target: rust_bind_literal_target_model() @@ -124,7 +124,7 @@ fn rust_literal_bind_bool_emit_accepts() -> Bool { } } -fn rust_literal_bind_bool_wrong_value_discriminates() -> Bool { +test fn rust_literal_bind_bool_wrong_value_discriminates() -> Bool { match rust_literal_bind_emit_from_root( root: rust_bind_bool_literal_arrow_node(), target: rust_bind_literal_target_model() @@ -145,7 +145,7 @@ fn rust_literal_bind_bool_wrong_value_discriminates() -> Bool { } } -fn rust_literal_bind_char_emit_accepts() -> Bool { +test fn rust_literal_bind_char_emit_accepts() -> Bool { match rust_literal_bind_emit_from_root( root: rust_bind_char_literal_arrow_node(), target: rust_bind_literal_target_model() @@ -156,7 +156,7 @@ fn rust_literal_bind_char_emit_accepts() -> Bool { } } -fn rust_literal_bind_char_wrong_value_discriminates() -> Bool { +test fn rust_literal_bind_char_wrong_value_discriminates() -> Bool { match rust_literal_bind_emit_from_root( root: rust_bind_char_literal_arrow_node(), target: rust_bind_literal_target_model() @@ -177,7 +177,7 @@ fn rust_literal_bind_char_wrong_value_discriminates() -> Bool { } } -fn rust_literal_bind_string_rope_refusal_is_executed() -> Bool { +test fn rust_literal_bind_string_rope_refusal_is_executed() -> Bool { match target_value_expression_projection_from_target( target: rust_bind_literal_target_model() ) { @@ -203,20 +203,10 @@ fn rust_literal_bind_string_rope_refusal_is_executed() -> Bool { } } -fn rust_literal_bind_string_rope_carrier_is_free_monoid() -> Bool { +test fn rust_literal_bind_string_rope_carrier_is_free_monoid() -> Bool { match free_monoid_type_node(inhabitant: char_kernel_type_node()).kind { TypeNode { connective: Disj } => true _ => false } } -test fn rust_literal_bind_emit_holds() -> Bool { - rust_literal_bind_int_emit_accepts() - && rust_literal_bind_int_wrong_value_discriminates() - && rust_literal_bind_bool_emit_accepts() - && rust_literal_bind_bool_wrong_value_discriminates() - && rust_literal_bind_char_emit_accepts() - && rust_literal_bind_char_wrong_value_discriminates() - && rust_literal_bind_string_rope_refusal_is_executed() - && rust_literal_bind_string_rope_carrier_is_free_monoid() -} diff --git a/src/v2/test/claim/emit/rust_logic_complement_emit_test.dag b/src/v2/test/claim/emit/rust_logic_complement_emit_test.dag index 7f6729f6f5c..e58ed9f291f 100644 --- a/src/v2/test/claim/emit/rust_logic_complement_emit_test.dag +++ b/src/v2/test/claim/emit/rust_logic_complement_emit_test.dag @@ -52,7 +52,7 @@ data rust_logic_complement_emit_inferred_tree: InferredTree = rust_logic_complem data rust_logic_complement_emit_swapped_inferred_tree: InferredTree = rust_logic_complement_emit_inferred_tree_for(root: dag_complement_arrow_with_body_swapped_arms_fixture) -fn rust_logic_complement_emit_accepts() -> Bool { +test fn rust_logic_complement_emit_accepts() -> Bool { match emit( tree: rust_logic_complement_emit_inferred_tree, target: rust_logic_complement_target_model_staging() @@ -63,7 +63,7 @@ fn rust_logic_complement_emit_accepts() -> Bool { } } -fn rust_logic_complement_emit_swapped_discriminates() -> Bool { +test fn rust_logic_complement_emit_swapped_discriminates() -> Bool { match emit( tree: rust_logic_complement_emit_swapped_inferred_tree, target: rust_logic_complement_target_model_staging() @@ -76,7 +76,3 @@ fn rust_logic_complement_emit_swapped_discriminates() -> Bool { } } -test fn rust_logic_complement_emit_holds() -> Bool { - rust_logic_complement_emit_accepts() - && rust_logic_complement_emit_swapped_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_logic_meet_join_emit_test.dag b/src/v2/test/claim/emit/rust_logic_meet_join_emit_test.dag index 460c8a94d5d..df11e8e0a7f 100644 --- a/src/v2/test/claim/emit/rust_logic_meet_join_emit_test.dag +++ b/src/v2/test/claim/emit/rust_logic_meet_join_emit_test.dag @@ -75,7 +75,7 @@ fn meet_join_emit_discriminates( } } -fn rust_logic_meet_emit_holds() -> Bool { +test fn rust_logic_meet_emit_holds() -> Bool { meet_join_emit_source_equals( root: dag_meet_arrow_with_body_fixture, target: rust_logic_meet_target_model_staging(), @@ -89,7 +89,7 @@ fn rust_logic_meet_emit_holds() -> Bool { ) } -fn rust_logic_join_emit_holds() -> Bool { +test fn rust_logic_join_emit_holds() -> Bool { meet_join_emit_source_equals( root: dag_join_arrow_with_body_fixture, target: rust_logic_join_target_model_staging(), @@ -103,6 +103,3 @@ fn rust_logic_join_emit_holds() -> Bool { ) } -test fn rust_logic_meet_join_emit_holds() -> Bool { - rust_logic_meet_emit_holds() && rust_logic_join_emit_holds() -} diff --git a/src/v2/test/claim/emit/rust_loop_emit_test.dag b/src/v2/test/claim/emit/rust_loop_emit_test.dag index d3ec1903aaf..cb427909820 100644 --- a/src/v2/test/claim/emit/rust_loop_emit_test.dag +++ b/src/v2/test/claim/emit/rust_loop_emit_test.dag @@ -92,7 +92,7 @@ fn rust_loop_emit_from_wrong_value_tree(target: TargetModel) -> Outcome Bool { +test fn rust_loop_emit_one_accepts() -> Bool { match rust_loop_emit_from_tree(target: rust_loop_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_loop_source_text) && (d == None) @@ -100,7 +100,7 @@ fn rust_loop_emit_one_accepts() -> Bool { } } -fn rust_loop_emit_wrong_value_discriminates() -> Bool { +test fn rust_loop_emit_wrong_value_discriminates() -> Bool { match rust_loop_emit_from_wrong_value_tree(target: rust_loop_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_loop_wrong_value_source_text) && @@ -110,7 +110,3 @@ fn rust_loop_emit_wrong_value_discriminates() -> Bool { } } -test fn rust_loop_emit_holds() -> Bool { - rust_loop_emit_one_accepts() - && rust_loop_emit_wrong_value_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_match_emit_test.dag b/src/v2/test/claim/emit/rust_match_emit_test.dag index ca235971ae0..3ad6153bbe1 100644 --- a/src/v2/test/claim/emit/rust_match_emit_test.dag +++ b/src/v2/test/claim/emit/rust_match_emit_test.dag @@ -93,7 +93,7 @@ fn rust_match_emit_from_swapped_tree(target: TargetModel) -> Outcome Bool { +test fn rust_match_emit_one_or_two_accepts() -> Bool { match rust_match_emit_from_tree(target: rust_match_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_match_source_text) && (d == None) @@ -101,7 +101,7 @@ fn rust_match_emit_one_or_two_accepts() -> Bool { } } -fn rust_match_emit_swapped_arms_discriminates() -> Bool { +test fn rust_match_emit_swapped_arms_discriminates() -> Bool { match rust_match_emit_from_swapped_tree(target: rust_match_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_match_emit_swapped_source_text) && @@ -111,7 +111,3 @@ fn rust_match_emit_swapped_arms_discriminates() -> Bool { } } -test fn rust_match_emit_holds() -> Bool { - rust_match_emit_one_or_two_accepts() - && rust_match_emit_swapped_arms_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_record_construct_emit_test.dag b/src/v2/test/claim/emit/rust_record_construct_emit_test.dag index c9c0bc1b60e..20d953dc313 100644 --- a/src/v2/test/claim/emit/rust_record_construct_emit_test.dag +++ b/src/v2/test/claim/emit/rust_record_construct_emit_test.dag @@ -53,7 +53,7 @@ fn rust_record_construct_emit_from_tree(target: TargetModel) -> Outcome Bool { +test fn rust_record_construct_emit_mk_accepts() -> Bool { match rust_record_construct_emit_from_tree(target: rust_rec_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_rec_source_text) && (d == None) @@ -61,7 +61,7 @@ fn rust_record_construct_emit_mk_accepts() -> Bool { } } -fn rust_record_construct_emit_wrong_field_discriminates() -> Bool { +test fn rust_record_construct_emit_wrong_field_discriminates() -> Bool { match rust_record_construct_emit_from_tree(target: rust_rec_wrong_field_target_model_staging()) { Accepted { value: source, diagnostics: d } => (source.carried == rust_rec_wrong_value_source_text) && @@ -71,7 +71,3 @@ fn rust_record_construct_emit_wrong_field_discriminates() -> Bool { } } -test fn rust_record_construct_emit_holds() -> Bool { - rust_record_construct_emit_mk_accepts() - && rust_record_construct_emit_wrong_field_discriminates() -} diff --git a/src/v2/test/claim/emit/rust_variant_construct_emit_test.dag b/src/v2/test/claim/emit/rust_variant_construct_emit_test.dag index b8e299fef60..d85acb58544 100644 --- a/src/v2/test/claim/emit/rust_variant_construct_emit_test.dag +++ b/src/v2/test/claim/emit/rust_variant_construct_emit_test.dag @@ -56,7 +56,7 @@ data rust_variant_construct_emit_inferred_tree: InferredTree = rust_variant_cons data rust_variant_construct_emit_wrong_value_inferred_tree: InferredTree = rust_variant_construct_emit_inferred_tree_for(root: dag_variant_construct_arrow_with_body_wrong_value_fixture) -fn rust_variant_construct_emit_holds_accepts() -> Bool { +test fn rust_variant_construct_emit_holds_accepts() -> Bool { match emit( tree: rust_variant_construct_emit_inferred_tree, target: rust_variant_construct_target_model_staging() @@ -67,7 +67,7 @@ fn rust_variant_construct_emit_holds_accepts() -> Bool { } } -fn rust_variant_construct_emit_wrong_value_discriminates() -> Bool { +test fn rust_variant_construct_emit_wrong_value_discriminates() -> Bool { match emit( tree: rust_variant_construct_emit_wrong_value_inferred_tree, target: rust_variant_construct_target_model_staging() @@ -80,7 +80,3 @@ fn rust_variant_construct_emit_wrong_value_discriminates() -> Bool { } } -test fn rust_variant_construct_emit_holds() -> Bool { - rust_variant_construct_emit_holds_accepts() - && rust_variant_construct_emit_wrong_value_discriminates() -} diff --git a/src/v2/test/claim/emit/semantic_decl_routing_generic_test.dag b/src/v2/test/claim/emit/semantic_decl_routing_generic_test.dag index 1dd97e263fa..71131b33da2 100644 --- a/src/v2/test/claim/emit/semantic_decl_routing_generic_test.dag +++ b/src/v2/test/claim/emit/semantic_decl_routing_generic_test.dag @@ -84,7 +84,3 @@ test fn semantic_generic_struct_routes_to_struct_emit() -> Bool { && !semantic_pair_matches(golden: semantic_pair_wrong_golden) } -test fn semantic_decl_routing_generic_all_holds() -> Bool { - semantic_generic_enum_routes_to_enum_emit() - && semantic_generic_struct_routes_to_struct_emit() -} diff --git a/src/v2/test/claim/emit/semantic_decl_routing_test.dag b/src/v2/test/claim/emit/semantic_decl_routing_test.dag index 6962c94a825..302141348a0 100644 --- a/src/v2/test/claim/emit/semantic_decl_routing_test.dag +++ b/src/v2/test/claim/emit/semantic_decl_routing_test.dag @@ -125,8 +125,3 @@ test fn semantic_unsupported_shape_refuses() -> Bool { semantic_arrow_refuses() } -test fn semantic_decl_routing_all_holds() -> Bool { - semantic_bool_coproduct_routes_to_enum_emit() - && semantic_record_routes_to_struct_emit() - && semantic_unsupported_shape_refuses() -} diff --git a/src/v2/test/claim/emit/semantic_decl_serialize_parity_test.dag b/src/v2/test/claim/emit/semantic_decl_serialize_parity_test.dag index 6215eab8099..734aa2b5854 100644 --- a/src/v2/test/claim/emit/semantic_decl_serialize_parity_test.dag +++ b/src/v2/test/claim/emit/semantic_decl_serialize_parity_test.dag @@ -255,7 +255,7 @@ test fn decoded_lex_live_bindings_match_live_target() -> Bool { data semantic_decl_serialize_parity_note: String = "Row-decoded serialize profiles round-trip bundle spellings through concat/from_code_point native String grounding at decode; aggregate golden emit matches live path." -fn decoded_row_profile_matches_golden() -> Bool { +test fn decoded_row_profile_matches_golden() -> Bool { match semantic_decl_emission_from_target(target: rust_target_model()) { Accepted { value: emission, diagnostics: _ } => match semantic_decl_profile_lex_rules(profile: emission.enum_serialize_profile) { @@ -276,7 +276,7 @@ fn decoded_row_profile_matches_golden() -> Bool { } } -fn live_rebuilt_target_matches_golden() -> Bool { +test fn live_rebuilt_target_matches_golden() -> Bool { match bool_text_with_target( target: bool_serialize_target( lex: rust_decl_general_lex(), @@ -288,14 +288,14 @@ fn live_rebuilt_target_matches_golden() -> Bool { } } -fn live_via_bool_serialize_target_matches_golden() -> Bool { +test fn live_via_bool_serialize_target_matches_golden() -> Bool { match bool_text_with_target(target: rust_enum_general_decl_structural_target_model()) { Accepted { value: t, diagnostics: _ } => t == bool_golden Rejected { diagnostics: _ } => false } } -fn generic_row_profile_matches_golden() -> Bool { +test fn generic_row_profile_matches_golden() -> Bool { match semantic_decl_emission_from_target(target: rust_target_model()) { Accepted { value: emission, diagnostics: _ } => match target_semantic_enum_surface_from_coproduct( @@ -326,9 +326,3 @@ fn generic_row_profile_matches_golden() -> Bool { } } -test fn semantic_decl_serialize_parity_all_holds() -> Bool { - decoded_row_profile_matches_golden() - && live_rebuilt_target_matches_golden() - && live_via_bool_serialize_target_matches_golden() - && generic_row_profile_matches_golden() -} diff --git a/src/v2/test/claim/emit/trait_derive_seed_emit_binding_test.dag b/src/v2/test/claim/emit/trait_derive_seed_emit_binding_test.dag index f1845af5223..b6fd8c04d95 100644 --- a/src/v2/test/claim/emit/trait_derive_seed_emit_binding_test.dag +++ b/src/v2/test/claim/emit/trait_derive_seed_emit_binding_test.dag @@ -128,12 +128,3 @@ test fn bool_supplemental_impl_present() -> Bool { target_ok && predicate_ok && supplemental != "" && wrong_module == false && wrong_name == false } -test fn trait_derive_seed_emit_binding_witness_holds() -> Bool { - nullary_coproduct_predicate_satisfied() - && payload_coproduct_predicate_satisfied() - && record_heap_attr_contains_serde() - && ord_carrier_shape_rejects_nullary_copy_traits() - && ord_carrier_attr_differs_from_nullary() - && group_completion_supplemental_impl_present() - && bool_supplemental_impl_present() -} diff --git a/src/v2/test/claim/emit/type_alias_emit_test.dag b/src/v2/test/claim/emit/type_alias_emit_test.dag index 32a724aca97..6b1568ed882 100644 --- a/src/v2/test/claim/emit/type_alias_emit_test.dag +++ b/src/v2/test/claim/emit/type_alias_emit_test.dag @@ -1,6 +1,5 @@ module v2.test.emit.type_alias_emit - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data type_alias_core_node_golden: String = "type CoreNode = Node;" @@ -141,24 +140,19 @@ fn type_alias_refused_count() -> Int { fold_list(xs: type_alias_emit_construct_rows, empty: 0, cons: fn(acc, row) { if row.covered { acc } else { acc + 1 } }) } -fn type_alias_covered_holds() -> Bool { +test fn type_alias_covered_holds() -> Bool { type_alias_emit_matches_golden(emitted: type_alias_core_node_emitted(), golden: type_alias_core_node_golden) && type_alias_emit_matches_golden(emitted: type_alias_generator_id_emitted(), golden: type_alias_generator_id_golden) } -fn type_alias_golden_discriminates_holds() -> Bool { +test fn type_alias_golden_discriminates_holds() -> Bool { !type_alias_emit_matches_golden(emitted: type_alias_core_node_emitted(), golden: "type CoreNode = node;") && !type_alias_emit_matches_golden(emitted: type_alias_core_node_emitted(), golden: type_alias_generator_id_golden) } -fn type_alias_gaps_refused_holds() -> Bool { +test fn type_alias_gaps_refused_holds() -> Bool { type_alias_construct_refused(emitted: type_alias_generic_rhs_decl_emitted()) && (type_alias_refused_count() == 1) && (type_alias_covered_count() == 2) } -test fn type_alias_emit_holds() -> Bool { - type_alias_covered_holds() - && type_alias_golden_discriminates_holds() - && type_alias_gaps_refused_holds() -} diff --git a/src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag b/src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag index d4686c0134e..9b69a4eacf8 100644 --- a/src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/add_arrow_eval_by_execution_test.dag @@ -315,14 +315,14 @@ fn add_arrow_eval_tokenize_source() -> Outcome { tokenize(text: ingested_add_module_source, file: ^add_arrow_eval_source_file, rules: lm.lex) } -fn add_arrow_eval_tokenize_holds() -> Bool { +test fn add_arrow_eval_tokenize_holds() -> Bool { match add_arrow_eval_tokenize_source() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => false } } -fn add_arrow_eval_parse_holds() -> Bool { +test fn add_arrow_eval_parse_holds() -> Bool { match add_arrow_eval_tokenize_source() { Accepted { value: tokens, diagnostics: _ } => match add_arrow_eval_parse_tokens(tokens: tokens) { @@ -333,7 +333,7 @@ fn add_arrow_eval_parse_holds() -> Bool { } } -fn add_arrow_eval_normalize_holds() -> Bool { +test fn add_arrow_eval_normalize_holds() -> Bool { match add_arrow_eval_tokenize_source() { Accepted { value: tokens, diagnostics: _ } => match add_arrow_eval_parse_tokens(tokens: tokens) { @@ -348,7 +348,7 @@ fn add_arrow_eval_normalize_holds() -> Bool { } } -fn add_arrow_eval_resolve_holds() -> Bool { +test fn add_arrow_eval_resolve_holds() -> Bool { let lm = dag_language_model() match add_arrow_eval_tokenize_source() { Accepted { value: tokens, diagnostics: _ } => @@ -629,14 +629,14 @@ fn add_arrow_eval_run_passes(run: Outcome>) -> } } -fn add_arrow_eval_source_pipeline_admits_add_holds() -> Bool { +test fn add_arrow_eval_source_pipeline_admits_add_holds() -> Bool { match add_arrow_source_ingested_add_infers() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => false } } -fn add_arrow_eval_canonical_tree_infers_holds() -> Bool { +test fn add_arrow_eval_canonical_tree_infers_holds() -> Bool { match table_fixture_add_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => match add_arrow_eval_inferred_run_tree( @@ -656,7 +656,7 @@ fn add_arrow_eval_runtime_value_is_n(value: RuntimeValue, n: Int) -> Bool { add_arrow_eval_runtime_int_equals(value: value, n: n) } -fn add_arrow_eval_direct_runtime_holds() -> Bool { +test fn add_arrow_eval_direct_runtime_holds() -> Bool { match table_fixture_add_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => match add_arrow_eval_add_call_optional(callee: arrow, left_lex: "2", right_lex: "3") { @@ -685,7 +685,7 @@ fn add_arrow_eval_direct_runtime_holds() -> Bool { } } -fn add_arrow_eval_source_driven_add_executes_holds() -> Bool { +test fn add_arrow_eval_source_driven_add_executes_holds() -> Bool { match table_fixture_add_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => add_arrow_eval_run_passes( @@ -700,7 +700,7 @@ fn add_arrow_eval_source_driven_add_executes_holds() -> Bool { } } -fn add_arrow_eval_produced_add_body_executes_holds() -> Bool { +test fn add_arrow_eval_produced_add_body_executes_holds() -> Bool { match table_fixture_add_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => add_arrow_eval_run_passes( @@ -715,7 +715,7 @@ fn add_arrow_eval_produced_add_body_executes_holds() -> Bool { } } -fn add_arrow_eval_generality_executes_holds() -> Bool { +test fn add_arrow_eval_generality_executes_holds() -> Bool { match table_fixture_add_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => add_arrow_eval_run_passes( @@ -730,7 +730,7 @@ fn add_arrow_eval_generality_executes_holds() -> Bool { } } -fn add_arrow_eval_swapped_operands_red_holds() -> Bool { +test fn add_arrow_eval_swapped_operands_red_holds() -> Bool { add_arrow_eval_swapped_operands_claim_passes() == false } @@ -745,7 +745,7 @@ fn add_arrow_eval_swapped_operands_claim_passes() -> Bool { ) } -fn add_arrow_eval_wrong_value_red_holds() -> Bool { +test fn add_arrow_eval_wrong_value_red_holds() -> Bool { match table_fixture_add_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => add_arrow_eval_run_passes( @@ -760,7 +760,7 @@ fn add_arrow_eval_wrong_value_red_holds() -> Bool { } } -fn add_arrow_excess_signature_red_holds() -> Bool { +test fn add_arrow_excess_signature_red_holds() -> Bool { add_arrow_eval_run_passes( run: add_arrow_eval_run( callee: add_arrow_excess_signature_arrow(), @@ -771,7 +771,7 @@ fn add_arrow_excess_signature_red_holds() -> Bool { ) == false } -fn add_arrow_excess_body_red_holds() -> Bool { +test fn add_arrow_excess_body_red_holds() -> Bool { add_arrow_eval_run_passes( run: add_arrow_eval_run( callee: add_arrow_excess_body_arrow(), @@ -811,11 +811,11 @@ fn add_arrow_excess_actual_executes_to_five() -> Bool { } } -fn add_arrow_excess_actual_red_holds() -> Bool { +test fn add_arrow_excess_actual_red_holds() -> Bool { add_arrow_excess_actual_executes_to_five() == false } -fn add_arrow_eval_lazy_arm_branch_suppression_holds() -> Bool { +test fn add_arrow_eval_lazy_arm_branch_suppression_holds() -> Bool { let branch = add_arrow_eval_lazy_arm_branch_node() let tree = add_arrow_eval_admitted_tree(root: branch) match eval( @@ -887,7 +887,7 @@ fn add_arrow_eval_loop_admitted_tree(root: Node) -> InferredTree { } } -fn add_arrow_eval_lazy_arm_loop_suppression_holds() -> Bool { +test fn add_arrow_eval_lazy_arm_loop_suppression_holds() -> Bool { let loop_node = add_arrow_eval_lazy_arm_loop_node() let tree = add_arrow_eval_loop_admitted_tree(root: loop_node) match eval( @@ -901,19 +901,3 @@ fn add_arrow_eval_lazy_arm_loop_suppression_holds() -> Bool { } } -test fn add_arrow_eval_by_execution_keystone_holds() -> Bool { - add_arrow_eval_source_driven_add_executes_holds() - && add_arrow_eval_direct_runtime_holds() - && add_arrow_eval_source_pipeline_admits_add_holds() - && add_arrow_eval_generality_executes_holds() - && add_arrow_eval_swapped_operands_red_holds() - && add_arrow_eval_wrong_value_red_holds() - - && add_arrow_excess_signature_red_holds() - && add_arrow_excess_body_red_holds() - && add_arrow_excess_actual_red_holds() - - && add_arrow_eval_lazy_arm_branch_suppression_holds() - - && add_arrow_eval_lazy_arm_loop_suppression_holds() -} diff --git a/src/v2/test/claim/execution/bind_eval_by_execution_test.dag b/src/v2/test/claim/execution/bind_eval_by_execution_test.dag index 13f7baeedd7..3477a7c8c0e 100644 --- a/src/v2/test/claim/execution/bind_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/bind_eval_by_execution_test.dag @@ -361,14 +361,14 @@ fn bind_run_passes(run: Outcome>) -> Bool { } } -fn bind_source_pipeline_admits_holds() -> Bool { +test fn bind_source_pipeline_admits_holds() -> Bool { match table_fixture_bind_arrow_with_body() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => false } } -fn bind_source_driven_executes_holds() -> Bool { +test fn bind_source_driven_executes_holds() -> Bool { match table_fixture_bind_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => bind_run_passes( @@ -381,7 +381,7 @@ fn bind_source_driven_executes_holds() -> Bool { } } -fn bind_direct_runtime_holds() -> Bool { +test fn bind_direct_runtime_holds() -> Bool { match table_fixture_bind_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => { let input = bind_pick_call(callee: arrow) @@ -406,7 +406,7 @@ fn bind_direct_runtime_holds() -> Bool { } } -fn bind_value_perturbation_red_holds() -> Bool { +test fn bind_value_perturbation_red_holds() -> Bool { match table_fixture_bind_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => bind_run_passes( @@ -419,7 +419,7 @@ fn bind_value_perturbation_red_holds() -> Bool { } } -fn bind_fixture_producer_holds() -> Bool { +test fn bind_fixture_producer_holds() -> Bool { match table_fixture_bind_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => bind_run_passes( @@ -432,7 +432,7 @@ fn bind_fixture_producer_holds() -> Bool { } } -fn bind_fixture_wrong_value_red_holds() -> Bool { +test fn bind_fixture_wrong_value_red_holds() -> Bool { match table_fixture_bind_wrong_value_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => bind_run_passes( @@ -445,7 +445,7 @@ fn bind_fixture_wrong_value_red_holds() -> Bool { } } -fn bind_census_ingested_executes_holds() -> Bool { +test fn bind_census_ingested_executes_holds() -> Bool { match ingested_bind_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => bind_run_passes( @@ -458,7 +458,7 @@ fn bind_census_ingested_executes_holds() -> Bool { } } -fn bind_census_ingested_wrong_value_red_holds() -> Bool { +test fn bind_census_ingested_wrong_value_red_holds() -> Bool { match ingested_bind_arrow_with_body_wrong_value() { Accepted { value: arrow, diagnostics: _ } => bind_run_passes( @@ -471,11 +471,3 @@ fn bind_census_ingested_wrong_value_red_holds() -> Bool { } } -test fn bind_eval_by_execution_keystone_holds() -> Bool { - bind_source_driven_executes_holds() - && bind_direct_runtime_holds() - && bind_source_pipeline_admits_holds() - && bind_value_perturbation_red_holds() - && bind_fixture_producer_holds() - && bind_fixture_wrong_value_red_holds() -} diff --git a/src/v2/test/claim/execution/bind_round_trip_test.dag b/src/v2/test/claim/execution/bind_round_trip_test.dag index b3a649e48d6..fbea01be051 100644 --- a/src/v2/test/claim/execution/bind_round_trip_test.dag +++ b/src/v2/test/claim/execution/bind_round_trip_test.dag @@ -184,7 +184,7 @@ fn bind_coercion_quality_is_faithful(q: CoercionQuality) -> Bool { } } -fn bind_emit_matches_serialize_holds() -> Bool { +test fn bind_emit_matches_serialize_holds() -> Bool { match target_serialize_source_from_model( target: bind_target_model, emitted: bind_emitted_root @@ -199,7 +199,7 @@ fn bind_emit_matches_serialize_holds() -> Bool { } } -fn bind_grammar_inverse_holds() -> Bool { +test fn bind_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: bind_target_model, emitted: bind_emitted_root @@ -209,7 +209,7 @@ fn bind_grammar_inverse_holds() -> Bool { } } -fn bind_ingest_via_coerce_matches_canonical() -> Bool { +test fn bind_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: bind_emitted_root, tree: bind_inferred_tree, @@ -223,8 +223,3 @@ fn bind_ingest_via_coerce_matches_canonical() -> Bool { } } -test fn bind_round_trip_keystone_holds() -> Bool { - bind_emit_matches_serialize_holds() - && bind_grammar_inverse_holds() - && bind_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/execution/branch_eval_by_execution_test.dag b/src/v2/test/claim/execution/branch_eval_by_execution_test.dag index 5e10834e5a5..7bfd4b91033 100644 --- a/src/v2/test/claim/execution/branch_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/branch_eval_by_execution_test.dag @@ -433,14 +433,14 @@ fn branch_run_passes(run: Outcome>) -> Bool { } } -fn branch_source_pipeline_admits_holds() -> Bool { +test fn branch_source_pipeline_admits_holds() -> Bool { match table_fixture_pick_if_arrow_with_body() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => false } } -fn branch_source_driven_pick_true_executes_holds() -> Bool { +test fn branch_source_driven_pick_true_executes_holds() -> Bool { match table_fixture_pick_if_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => branch_run_passes( @@ -453,7 +453,7 @@ fn branch_source_driven_pick_true_executes_holds() -> Bool { } } -fn branch_source_driven_pick_false_executes_holds() -> Bool { +test fn branch_source_driven_pick_false_executes_holds() -> Bool { match table_fixture_pick_false_if_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => branch_run_passes( @@ -466,7 +466,7 @@ fn branch_source_driven_pick_false_executes_holds() -> Bool { } } -fn branch_condition_perturbation_red_holds() -> Bool { +test fn branch_condition_perturbation_red_holds() -> Bool { match table_fixture_pick_if_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => branch_run_passes( @@ -479,7 +479,7 @@ fn branch_condition_perturbation_red_holds() -> Bool { } } -fn branch_direct_runtime_true_holds() -> Bool { +test fn branch_direct_runtime_true_holds() -> Bool { match table_fixture_pick_if_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => { let input = branch_pick_call(callee: arrow) @@ -504,7 +504,7 @@ fn branch_direct_runtime_true_holds() -> Bool { } } -fn branch_swapped_arms_red_holds() -> Bool { +test fn branch_swapped_arms_red_holds() -> Bool { match table_fixture_pick_if_arrow_with_body_swapped_arms() { Accepted { value: arrow, diagnostics: _ } => branch_run_passes( @@ -517,7 +517,7 @@ fn branch_swapped_arms_red_holds() -> Bool { } } -fn branch_fixture_producer_holds() -> Bool { +test fn branch_fixture_producer_holds() -> Bool { match table_fixture_pick_if_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => branch_run_passes( @@ -530,12 +530,3 @@ fn branch_fixture_producer_holds() -> Bool { } } -test fn branch_eval_by_execution_keystone_holds() -> Bool { - branch_source_driven_pick_true_executes_holds() - && branch_source_driven_pick_false_executes_holds() - && branch_direct_runtime_true_holds() - && branch_source_pipeline_admits_holds() - && branch_condition_perturbation_red_holds() - && branch_swapped_arms_red_holds() - && branch_fixture_producer_holds() -} diff --git a/src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag b/src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag index b078c67c719..878d4ff6d88 100644 --- a/src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag +++ b/src/v2/test/claim/execution/branch_if_then_else_round_trip_test.dag @@ -175,7 +175,7 @@ fn branch_if_then_else_coercion_quality_is_faithful(q: CoercionQuality) -> Bool } } -fn branch_if_then_else_emit_matches_serialize_holds() -> Bool { +test fn branch_if_then_else_emit_matches_serialize_holds() -> Bool { match target_serialize_source_from_model( target: branch_if_then_else_target_model, emitted: branch_if_then_else_emitted_root @@ -190,7 +190,7 @@ fn branch_if_then_else_emit_matches_serialize_holds() -> Bool { } } -fn branch_if_then_else_grammar_inverse_holds() -> Bool { +test fn branch_if_then_else_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: branch_if_then_else_target_model, emitted: branch_if_then_else_emitted_root @@ -200,7 +200,7 @@ fn branch_if_then_else_grammar_inverse_holds() -> Bool { } } -fn branch_if_then_else_ingest_via_coerce_matches_canonical() -> Bool { +test fn branch_if_then_else_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: branch_if_then_else_emitted_root, tree: branch_if_then_else_inferred_tree, @@ -214,8 +214,3 @@ fn branch_if_then_else_ingest_via_coerce_matches_canonical() -> Bool { } } -test fn branch_if_then_else_round_trip_keystone_holds() -> Bool { - branch_if_then_else_emit_matches_serialize_holds() - && branch_if_then_else_grammar_inverse_holds() - && branch_if_then_else_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/execution/c_add_emit_host_run_test.dag b/src/v2/test/claim/execution/c_add_emit_host_run_test.dag index 41ce0cc5ed9..e94b6862e72 100644 --- a/src/v2/test/claim/execution/c_add_emit_host_run_test.dag +++ b/src/v2/test/claim/execution/c_add_emit_host_run_test.dag @@ -163,9 +163,3 @@ test fn c_add_emit_host_byte_width_mismatch_refuses_holds() -> Bool { } } -test fn c_add_emit_host_run_all_holds() -> Bool { - c_add_emit_host_green_run_holds() - && c_add_emit_host_inject_fault_refuses_holds() - && c_add_emit_host_nonzero_exit_refuses_holds() - && c_add_emit_host_byte_width_mismatch_refuses_holds() -} diff --git a/src/v2/test/claim/execution/c_type_decl_emit_host_run_test.dag b/src/v2/test/claim/execution/c_type_decl_emit_host_run_test.dag index 0ca9c6db023..8bf1be4aab9 100644 --- a/src/v2/test/claim/execution/c_type_decl_emit_host_run_test.dag +++ b/src/v2/test/claim/execution/c_type_decl_emit_host_run_test.dag @@ -142,7 +142,3 @@ test fn c_type_decl_emit_host_inject_fault_refuses_holds() -> Bool { } } -test fn c_type_decl_emit_host_run_all_holds() -> Bool { - c_type_decl_emit_host_green_run_holds() - && c_type_decl_emit_host_inject_fault_refuses_holds() -} diff --git a/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag b/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag index 05e442ef73e..3e5f314d94a 100644 --- a/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag +++ b/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag @@ -174,7 +174,7 @@ test fn dag_add_emit_matches_serialize_holds() -> Bool { } } -fn dag_add_grammar_inverse_holds() -> Bool { +test fn dag_add_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: dag_add_target_model, emitted: dag_add_emitted_root @@ -184,7 +184,7 @@ fn dag_add_grammar_inverse_holds() -> Bool { } } -fn dag_add_ingest_via_coerce_matches_canonical() -> Bool { +test fn dag_add_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: dag_add_emitted_root, tree: dag_add_inferred_tree, @@ -222,19 +222,14 @@ fn dag_add_domain_translate_accepts_holds() -> Bool { } } -fn dag_add_translate_accepts_holds() -> Bool { +test fn dag_add_translate_accepts_holds() -> Bool { match translate_emitted_node(tree: dag_add_inferred_tree, target: dag_add_target_model) { Accepted { value: _, diagnostics: d } => d == None Rejected { diagnostics: _ } => false } } -fn dag_add_emit_add_fn_accepts_holds() -> Bool { +test fn dag_add_emit_add_fn_accepts_holds() -> Bool { dag_add_emit_matches_serialize_holds() } -test fn dag_add_emit_ingest_round_trip_holds() -> Bool { - dag_add_emit_add_fn_accepts_holds() - && dag_add_grammar_inverse_holds() - && dag_add_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/execution/emit_host_add_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_add_equals_eval_test.dag index aa4c2404175..bfe4a68b28b 100644 --- a/src/v2/test/claim/execution/emit_host_add_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_add_equals_eval_test.dag @@ -1,6 +1,5 @@ module v2.test.execution.emit_host_add_equals_eval - import v2.compiler.emit_host { emit_host_octets_byte_string, run_test_claim_emit_vs_eval @@ -98,7 +97,6 @@ import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly - fn emit_eval_oct5_value(n: Int) -> RuntimeValue { RuntimePrimitive { value: RuntimePrimitiveValue { @@ -116,7 +114,6 @@ fn emit_eval_diagnostic(reason: Symbol, node: Node) -> Diagnostic { } } - fn emit_eval_allocate_literal(_node: Node, _env: EvaluationEnvironment) -> Outcome { Accepted { value: emit_eval_oct5_value(n: 2), diagnostics: None } } @@ -201,7 +198,6 @@ fn emit_eval_context(call_primitive: fn(Node, List, EvaluationEnvi ) } - fn emit_eval_generic_facts(node: Node) -> InferredFacts { claim_inferred_facts_from_nodes( resolved: node, @@ -283,6 +279,3 @@ test fn emit_host_add_wrong_oracle_refuses_holds() -> Bool { emit_eval_verdict_is_semantic_mismatch(run: emit_eval_run(call_primitive: emit_eval_call_primitive_six)) } -test fn emit_host_add_equals_eval_all_holds() -> Bool { - emit_host_add_equals_eval_holds() && emit_host_add_wrong_oracle_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_classical_not_ingested_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_classical_not_ingested_equals_eval_test.dag index 2e8dc8dd64c..2cf158a7b33 100644 --- a/src/v2/test/claim/execution/emit_host_classical_not_ingested_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_classical_not_ingested_equals_eval_test.dag @@ -200,20 +200,6 @@ fn ingested_classical_not_eval_subgraph_canonical() -> Node { ) } -fn ingested_classical_not_eval_subgraph_swapped() -> Node { - dag_match_body_from_arms( - scrutinee: dag_type_atom_node(identity: ^dag_token_kw_true), - true_arm: dag_match_arm_node( - pattern_lit: ^dag_token_kw_true, - body_lit: ^dag_token_kw_true - ), - false_arm: dag_match_arm_node( - pattern_lit: ^dag_token_kw_false, - body_lit: ^dag_token_kw_false - ) - ) -} - fn ingested_classical_not_diagnostic(reason: Symbol, node: Node) -> Diagnostic { Diagnostic { reason: reason, @@ -598,18 +584,5 @@ test fn ingested_classical_not_arrow_empty_domain_infer_refuses_holds() -> Bool ) } -test fn emit_host_classical_not_ingested_all_holds() -> Bool { - ingested_classical_not_resolves_holds() - && ingested_classical_not_arrow_has_match_holds() - && emit_host_classical_not_ingested_equals_eval_holds() - && emit_host_classical_not_ingested_swapped_refuses_holds() -} - data ingested_classical_not_emit_mock_shape_note: String = "KERNEL-D TESTING RE-STEER (operator direction, 2026-07-24): per-PR layer-boundary mock proof for the classical_not cutover's emit-to-text half — mocked/synthetically-ingested inferred tree -> assert emitted Rust TEXT (string compare, no compile), the shape src/v2/test/claim/emit/rust_binop_emit_test.dag already uses for direct emit() assertions. Aggregates only the pure parse/normalize/resolve/infer/emit legs (no host build/run, no eval): resolves_holds, arrow_has_match_holds, and the two source-shape assertions already in this module. Deliberately excludes emit_host_classical_not_ingested_equals_eval_holds/_swapped_refuses_holds, which run a real emit-vs-eval agreement leg — those stay off the per-PR enrollment." -test fn ingested_classical_not_emit_mock_shape_all_holds() -> Bool { - ingested_classical_not_resolves_holds() - && ingested_classical_not_arrow_has_match_holds() - && ingested_classical_not_emit_octet_bridge_shape_holds() - && ingested_classical_not_emit_source_arm_shape_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_complement_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_complement_equals_eval_test.dag index 1acdda189bd..243ed9d0626 100644 --- a/src/v2/test/claim/execution/emit_host_complement_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_complement_equals_eval_test.dag @@ -332,6 +332,3 @@ test fn emit_host_complement_wrong_fixture_refuses_holds() -> Bool { ) } -test fn emit_host_complement_equals_eval_all_holds() -> Bool { - emit_host_complement_equals_eval_holds() && emit_host_complement_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_field_access_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_field_access_equals_eval_test.dag index 27945bfb9aa..233a8c2b3a3 100644 --- a/src/v2/test/claim/execution/emit_host_field_access_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_field_access_equals_eval_test.dag @@ -400,6 +400,3 @@ test fn emit_host_field_access_wrong_fixture_refuses_holds() -> Bool { } } -test fn emit_host_field_access_equals_eval_all_holds() -> Bool { - emit_host_field_access_equals_eval_holds() && emit_host_field_access_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_filesystem_read_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_filesystem_read_equals_eval_test.dag index 3ba1c2e41d4..00c82e25515 100644 --- a/src/v2/test/claim/execution/emit_host_filesystem_read_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_filesystem_read_equals_eval_test.dag @@ -73,8 +73,3 @@ test fn emit_host_filesystem_read_wrong_oracle_refuses_holds() -> Bool { filesystem_read_native_run(expected_octet: 1 - filesystem_read_eval_expected_octet()) == false } -test fn emit_host_filesystem_read_equals_eval_all_holds() -> Bool { - filesystem_read_eval_reads_real_bash_argv() - && emit_host_filesystem_read_equals_eval_holds() - && emit_host_filesystem_read_wrong_oracle_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_fold_closure_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_fold_closure_equals_eval_test.dag index 4c671d480f1..902bca02060 100644 --- a/src/v2/test/claim/execution/emit_host_fold_closure_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_fold_closure_equals_eval_test.dag @@ -365,7 +365,3 @@ test fn emit_host_fold_closure_wrong_fixture_refuses_holds() -> Bool { emit_fold_eval_verdict_is_semantic_mismatch(run: emit_fold_eval_run(root: fold_fixture_param_wrong_arrow)) } -test fn emit_host_fold_closure_equals_eval_all_holds() -> Bool { - emit_host_fold_closure_equals_eval_holds() - && emit_host_fold_closure_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_loop_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_loop_equals_eval_test.dag index 075297f5f3a..0475923008f 100644 --- a/src/v2/test/claim/execution/emit_host_loop_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_loop_equals_eval_test.dag @@ -303,6 +303,3 @@ test fn emit_host_loop_wrong_fixture_refuses_holds() -> Bool { } } -test fn emit_host_loop_equals_eval_all_holds() -> Bool { - emit_host_loop_equals_eval_holds() && emit_host_loop_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_match_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_match_equals_eval_test.dag index 149218f7c99..6025f77de09 100644 --- a/src/v2/test/claim/execution/emit_host_match_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_match_equals_eval_test.dag @@ -388,6 +388,3 @@ test fn emit_host_match_emit_only_accepts() -> Bool { } } -test fn emit_host_match_equals_eval_all_holds() -> Bool { - emit_host_match_equals_eval_holds() && emit_host_match_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_meet_join_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_meet_join_equals_eval_test.dag index 308c47af79e..60f2ae03c48 100644 --- a/src/v2/test/claim/execution/emit_host_meet_join_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_meet_join_equals_eval_test.dag @@ -367,9 +367,3 @@ test fn emit_host_join_wrong_fixture_refuses_holds() -> Bool { ) } -test fn emit_host_meet_join_equals_eval_all_holds() -> Bool { - emit_host_meet_equals_eval_holds() - && emit_host_meet_wrong_fixture_refuses_holds() - && emit_host_join_equals_eval_holds() - && emit_host_join_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_module_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_module_equals_eval_test.dag index f73bd059f9d..3a14c4bafa5 100644 --- a/src/v2/test/claim/execution/emit_host_module_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_module_equals_eval_test.dag @@ -1,6 +1,5 @@ module v2.test.execution.emit_host_module_equals_eval - import v2.compiler.emit_host { run_test_claim_module_emit_vs_eval } import v2.compiler.emit_module { emit_module, emit_module_decl_separator } import v2.compiler.eval { TestClaimRun } @@ -85,8 +84,3 @@ test fn emit_module_join_concatenates_two_decls() -> Bool { && !emit_module_two_text_matches(golden: emit_module_expected_single_source()) } -test fn emit_host_module_all_holds() -> Bool { - emit_host_module_add_equals_eval_holds() - && emit_host_module_wrong_oracle_refuses_holds() - && emit_module_join_concatenates_two_decls() -} diff --git a/src/v2/test/claim/execution/emit_host_native_only_verdict_test.dag b/src/v2/test/claim/execution/emit_host_native_only_verdict_test.dag index c69719184ac..58ae3abc098 100644 --- a/src/v2/test/claim/execution/emit_host_native_only_verdict_test.dag +++ b/src/v2/test/claim/execution/emit_host_native_only_verdict_test.dag @@ -70,11 +70,6 @@ test fn emit_host_native_only_classical_not_swapped_mismatch_detected_holds() -> native_only_matches_expected(source: ingested_classical_not_swapped_source, expected_octet: 0) == false } -test fn emit_host_native_only_verdict_all_holds() -> Bool { - emit_host_native_only_classical_not_holds() - && emit_host_native_only_classical_not_swapped_mismatch_detected_holds() -} - test fn emit_host_native_only_verdict_stdout_match_mock_holds() -> Bool { native_only_stdout_matches( stdout: HostRunStdout { bytes: emit_host_octets_byte_string(octets: [0, 0, 0, 0, 0]) }, @@ -89,7 +84,3 @@ test fn emit_host_native_only_verdict_stdout_mismatch_mock_holds() -> Bool { ) == false } -test fn emit_host_native_only_verdict_mock_all_holds() -> Bool { - emit_host_native_only_verdict_stdout_match_mock_holds() - && emit_host_native_only_verdict_stdout_mismatch_mock_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_produced_module_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_produced_module_equals_eval_test.dag index dfeada0b317..e8e6c722bc9 100644 --- a/src/v2/test/claim/execution/emit_host_produced_module_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_produced_module_equals_eval_test.dag @@ -1,6 +1,5 @@ module v2.test.execution.emit_host_produced_module_equals_eval - import v2.compiler.ingested_fixture_arrows { ingested_add_decl_node } import v2.compiler.emit_host { run_test_claim_from_source_emit_vs_eval } import v2.compiler.emit_produced { emit_produced_module_rust } @@ -67,8 +66,3 @@ test fn emit_host_produced_module_wrong_oracle_refuses_holds() -> Bool { emit_eval_verdict_is_semantic_mismatch(run: produced_module_run(cp: emit_eval_call_primitive_six)) } -test fn emit_host_produced_module_all_holds() -> Bool { - produced_module_two_distinct_fns_assemble() - && emit_host_produced_module_add_equals_eval_holds() - && emit_host_produced_module_wrong_oracle_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_shell_exec_run_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_shell_exec_run_equals_eval_test.dag index 6a48a8ef85c..53739c1aae1 100644 --- a/src/v2/test/claim/execution/emit_host_shell_exec_run_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_shell_exec_run_equals_eval_test.dag @@ -79,8 +79,3 @@ test fn emit_host_shell_exec_run_wrong_oracle_refuses_holds() -> Bool { shell_exec_run_native_run(expected_octet: 1 - shell_exec_run_eval_expected_octet()) == false } -test fn emit_host_shell_exec_run_equals_eval_all_holds() -> Bool { - shell_exec_run_eval_argv_is_bash_dash_s() - && emit_host_shell_exec_run_equals_eval_holds() - && emit_host_shell_exec_run_wrong_oracle_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_transport_wire_test.dag b/src/v2/test/claim/execution/emit_host_transport_wire_test.dag index 535d866ed52..aff7e5943a7 100644 --- a/src/v2/test/claim/execution/emit_host_transport_wire_test.dag +++ b/src/v2/test/claim/execution/emit_host_transport_wire_test.dag @@ -179,11 +179,3 @@ test fn emit_host_row_bound_executable_identity_discriminates_holds() -> Bool { } } -test fn emit_host_transport_wire_all_holds() -> Bool { - emit_host_transport_outside_grant_refuses_holds() - && emit_host_transport_green_run_holds() - && emit_host_transport_nonzero_exit_refuses_holds() - && emit_host_transport_byte_width_mismatch_refuses_holds() - && emit_host_row_bound_executable_identity_holds() - && emit_host_row_bound_executable_identity_discriminates_holds() -} diff --git a/src/v2/test/claim/execution/emit_host_variant_construct_equals_eval_test.dag b/src/v2/test/claim/execution/emit_host_variant_construct_equals_eval_test.dag index e24a7503b7c..0902cfccc8e 100644 --- a/src/v2/test/claim/execution/emit_host_variant_construct_equals_eval_test.dag +++ b/src/v2/test/claim/execution/emit_host_variant_construct_equals_eval_test.dag @@ -384,6 +384,3 @@ test fn emit_host_variant_construct_wrong_fixture_refuses_holds() -> Bool { ) } -test fn emit_host_variant_construct_equals_eval_all_holds() -> Bool { - emit_host_variant_construct_equals_eval_holds() && emit_host_variant_construct_wrong_fixture_refuses_holds() -} diff --git a/src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag index f1dd7204889..9b766b98f91 100644 --- a/src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_grammar_relation_round_trip_test.dag @@ -76,7 +76,7 @@ fn emit_ingest_canonical_emitted() -> Node { dag_fixture_emitted_add_fn } -fn emit_backward_selects_canonical_row_holds() -> Bool { +test fn emit_backward_selects_canonical_row_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_shared_rules(), emitted: emit_ingest_canonical_emitted() @@ -87,7 +87,7 @@ fn emit_backward_selects_canonical_row_holds() -> Bool { } } -fn ingest_forward_selects_canonical_emitted_holds() -> Bool { +test fn ingest_forward_selects_canonical_emitted_holds() -> Bool { match grammar_relation_row_token_spine_classes(row: emit_ingest_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -102,7 +102,7 @@ fn ingest_forward_selects_canonical_emitted_holds() -> Bool { } } -fn emit_then_ingest_selector_identity_holds() -> Bool { +test fn emit_then_ingest_selector_identity_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_shared_rules(), emitted: emit_ingest_canonical_emitted() @@ -124,7 +124,7 @@ fn emit_then_ingest_selector_identity_holds() -> Bool { } } -fn ingest_then_emit_selector_identity_holds() -> Bool { +test fn ingest_then_emit_selector_identity_holds() -> Bool { match grammar_relation_row_token_spine_classes(row: emit_ingest_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -165,7 +165,7 @@ fn emit_ingest_parsed_add_tree() -> Outcome { ) } -fn same_grammar_parse_ingest_bridge_holds() -> Bool { +test fn same_grammar_parse_ingest_bridge_holds() -> Bool { match emit_ingest_parsed_add_tree() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_emitted_node( @@ -180,10 +180,3 @@ fn same_grammar_parse_ingest_bridge_holds() -> Bool { } } -test fn emit_ingest_grammar_relation_round_trip_holds() -> Bool { - emit_backward_selects_canonical_row_holds() - && ingest_forward_selects_canonical_emitted_holds() - && emit_then_ingest_selector_identity_holds() - && ingest_then_emit_selector_identity_holds() - && same_grammar_parse_ingest_bridge_holds() -} diff --git a/src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag index 98617c4a373..ad27c81804e 100644 --- a/src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_python_same_language_round_trip_test.dag @@ -1,6 +1,5 @@ module v2.test.execution.emit_ingest_python_same_language_round_trip - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn emit_ingest_python_row_token_spine_classes(row: Node) -> Outcome> { @@ -36,7 +35,7 @@ fn emit_ingest_python_canonical_emitted() -> Node { python_emitted_add_fn_node() } -fn emit_python_backward_selects_canonical_row_holds() -> Bool { +test fn emit_python_backward_selects_canonical_row_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_python_shared_rules(), emitted: emit_ingest_python_canonical_emitted() @@ -47,7 +46,7 @@ fn emit_python_backward_selects_canonical_row_holds() -> Bool { } } -fn ingest_python_forward_selects_canonical_emitted_holds() -> Bool { +test fn ingest_python_forward_selects_canonical_emitted_holds() -> Bool { match emit_ingest_python_row_token_spine_classes(row: emit_ingest_python_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -62,7 +61,7 @@ fn ingest_python_forward_selects_canonical_emitted_holds() -> Bool { } } -fn emit_then_ingest_python_selector_identity_holds() -> Bool { +test fn emit_then_ingest_python_selector_identity_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_python_shared_rules(), emitted: emit_ingest_python_canonical_emitted() @@ -84,7 +83,7 @@ fn emit_then_ingest_python_selector_identity_holds() -> Bool { } } -fn ingest_then_emit_python_selector_identity_holds() -> Bool { +test fn ingest_then_emit_python_selector_identity_holds() -> Bool { match emit_ingest_python_row_token_spine_classes(row: emit_ingest_python_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -106,7 +105,7 @@ fn ingest_then_emit_python_selector_identity_holds() -> Bool { } } -fn emit_ingest_python_perturbed_frontier_fails_closed() -> Bool { +test fn emit_ingest_python_perturbed_frontier_fails_closed() -> Bool { match emit_ingest_python_row_token_spine_classes(row: emit_ingest_python_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -120,11 +119,7 @@ fn emit_ingest_python_perturbed_frontier_fails_closed() -> Bool { } } -fn emit_ingest_python_unperturbed_frontier_accepts() -> Bool { - ingest_python_forward_selects_canonical_emitted_holds() -} - -fn ingest_python_forward_fails_closed_off_frontier_holds() -> Bool { +test fn ingest_python_forward_fails_closed_off_frontier_holds() -> Bool { match grammar_relation_row_forward_selection( frontier: Cons { head: ^emit_ingest_python_perturb_bogus_tok, tail: Empty }, rules: emit_ingest_python_shared_rules() @@ -134,7 +129,7 @@ fn ingest_python_forward_fails_closed_off_frontier_holds() -> Bool { } } -fn emit_python_backward_fails_closed_on_foreign_emitted_holds() -> Bool { +test fn emit_python_backward_fails_closed_on_foreign_emitted_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_python_shared_rules(), emitted: dag_fixture_emitted_add_fn @@ -144,17 +139,7 @@ fn emit_python_backward_fails_closed_on_foreign_emitted_holds() -> Bool { } } -test fn emit_ingest_python_selector_bijectivity_holds() -> Bool { - emit_python_backward_selects_canonical_row_holds() - && ingest_python_forward_selects_canonical_emitted_holds() - && emit_then_ingest_python_selector_identity_holds() - && ingest_then_emit_python_selector_identity_holds() - && emit_ingest_python_perturbed_frontier_fails_closed() - && ingest_python_forward_fails_closed_off_frontier_holds() - && emit_python_backward_fails_closed_on_foreign_emitted_holds() -} - -fn python_same_language_parse_bridge_holds() -> Bool { +test fn python_same_language_parse_bridge_holds() -> Bool { match python_grammar_parse_fixture() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_target_model_bridge( @@ -200,7 +185,7 @@ fn python_same_language_discriminates_on_real_tree() -> Bool { } } -fn emit_ingest_python_same_language_round_trip_holds() -> Bool { +test fn emit_ingest_python_same_language_round_trip_holds() -> Bool { emit_ingest_python_selector_bijectivity_holds() && python_same_language_parse_bridge_holds() && python_same_language_source_emit_round_trip_holds() diff --git a/src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag b/src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag index 7b2e92e5450..d93a483ebb2 100644 --- a/src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag +++ b/src/v2/test/claim/execution/emit_ingest_typescript_same_language_round_trip_test.dag @@ -1,6 +1,5 @@ module v2.test.execution.emit_ingest_typescript_same_language_round_trip - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn emit_ingest_typescript_row_token_spine_classes(row: Node) -> Outcome> { @@ -36,7 +35,7 @@ fn emit_ingest_typescript_canonical_emitted() -> Node { ts_emitted_add_fn_node() } -fn emit_typescript_backward_selects_canonical_row_holds() -> Bool { +test fn emit_typescript_backward_selects_canonical_row_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_typescript_shared_rules(), emitted: emit_ingest_typescript_canonical_emitted() @@ -47,7 +46,7 @@ fn emit_typescript_backward_selects_canonical_row_holds() -> Bool { } } -fn ingest_typescript_forward_selects_canonical_emitted_holds() -> Bool { +test fn ingest_typescript_forward_selects_canonical_emitted_holds() -> Bool { match emit_ingest_typescript_row_token_spine_classes(row: emit_ingest_typescript_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -62,7 +61,7 @@ fn ingest_typescript_forward_selects_canonical_emitted_holds() -> Bool { } } -fn emit_then_ingest_typescript_selector_identity_holds() -> Bool { +test fn emit_then_ingest_typescript_selector_identity_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_typescript_shared_rules(), emitted: emit_ingest_typescript_canonical_emitted() @@ -84,7 +83,7 @@ fn emit_then_ingest_typescript_selector_identity_holds() -> Bool { } } -fn ingest_then_emit_typescript_selector_identity_holds() -> Bool { +test fn ingest_then_emit_typescript_selector_identity_holds() -> Bool { match emit_ingest_typescript_row_token_spine_classes(row: emit_ingest_typescript_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -106,7 +105,7 @@ fn ingest_then_emit_typescript_selector_identity_holds() -> Bool { } } -fn emit_ingest_typescript_perturbed_frontier_fails_closed() -> Bool { +test fn emit_ingest_typescript_perturbed_frontier_fails_closed() -> Bool { match emit_ingest_typescript_row_token_spine_classes(row: emit_ingest_typescript_canonical_row()) { Accepted { value: frontier, diagnostics: _ } => match grammar_relation_row_forward_selection( @@ -120,11 +119,7 @@ fn emit_ingest_typescript_perturbed_frontier_fails_closed() -> Bool { } } -fn emit_ingest_typescript_unperturbed_frontier_accepts() -> Bool { - ingest_typescript_forward_selects_canonical_emitted_holds() -} - -fn ingest_typescript_forward_fails_closed_off_frontier_holds() -> Bool { +test fn ingest_typescript_forward_fails_closed_off_frontier_holds() -> Bool { match grammar_relation_row_forward_selection( frontier: Cons { head: ^emit_ingest_typescript_perturb_bogus_tok, tail: Empty }, rules: emit_ingest_typescript_shared_rules() @@ -134,7 +129,7 @@ fn ingest_typescript_forward_fails_closed_off_frontier_holds() -> Bool { } } -fn emit_typescript_backward_fails_closed_on_foreign_emitted_holds() -> Bool { +test fn emit_typescript_backward_fails_closed_on_foreign_emitted_holds() -> Bool { match grammar_relation_row_for_emitted( rules: emit_ingest_typescript_shared_rules(), emitted: dag_fixture_emitted_add_fn @@ -144,18 +139,7 @@ fn emit_typescript_backward_fails_closed_on_foreign_emitted_holds() -> Bool { } } - -test fn emit_ingest_typescript_selector_bijectivity_holds() -> Bool { - emit_typescript_backward_selects_canonical_row_holds() - && ingest_typescript_forward_selects_canonical_emitted_holds() - && emit_then_ingest_typescript_selector_identity_holds() - && ingest_then_emit_typescript_selector_identity_holds() - && emit_ingest_typescript_perturbed_frontier_fails_closed() - && ingest_typescript_forward_fails_closed_off_frontier_holds() - && emit_typescript_backward_fails_closed_on_foreign_emitted_holds() -} - -fn typescript_same_language_parse_bridge_holds() -> Bool { +test fn typescript_same_language_parse_bridge_holds() -> Bool { match typescript_grammar_parse_fixture() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_target_model_bridge( @@ -201,7 +185,7 @@ fn typescript_same_language_discriminates_on_real_tree() -> Bool { } } -fn emit_ingest_typescript_same_language_round_trip_holds() -> Bool { +test fn emit_ingest_typescript_same_language_round_trip_holds() -> Bool { emit_ingest_typescript_selector_bijectivity_holds() && typescript_same_language_parse_bridge_holds() && typescript_same_language_source_emit_round_trip_holds() diff --git a/src/v2/test/claim/execution/emit_on_demand_classical_not_ingested_family_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_classical_not_ingested_family_witness_test.dag index ba2b6f8b3a1..c75bf303994 100644 --- a/src/v2/test/claim/execution/emit_on_demand_classical_not_ingested_family_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_classical_not_ingested_family_witness_test.dag @@ -340,12 +340,3 @@ test fn emit_on_demand_classical_not_native_one_build_holds() -> Bool { } } -test fn emit_on_demand_classical_not_ingested_family_witnesses() -> Bool { - emit_on_demand_classical_not_grain_keys_differ_holds() - && emit_on_demand_classical_not_materialize_recompute_on_miss_holds() - && emit_on_demand_classical_not_interpreter_roles_bounded_holds() - && emit_on_demand_classical_not_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_classical_not_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_classical_not_native_one_build_holds() - && emit_on_demand_classical_not_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/emit_on_demand_complement_family_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_complement_family_witness_test.dag index 048651ec79d..06d9e1d8eb5 100644 --- a/src/v2/test/claim/execution/emit_on_demand_complement_family_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_complement_family_witness_test.dag @@ -134,11 +134,3 @@ test fn emit_on_demand_complement_materialize_share_on_hit_holds() -> Bool { } } -test fn emit_on_demand_complement_family_witnesses() -> Bool { - emit_on_demand_complement_grain_keys_differ_holds() - && emit_on_demand_complement_materialize_recompute_on_miss_holds() - && emit_on_demand_complement_interpreter_roles_bounded_holds() - && emit_on_demand_complement_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_complement_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_complement_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/emit_on_demand_family_crate_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_family_crate_witness_test.dag index 0b2b7619afc..ff3cafb6d28 100644 --- a/src/v2/test/claim/execution/emit_on_demand_family_crate_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_family_crate_witness_test.dag @@ -494,14 +494,6 @@ test fn family_crate_member_change_cold_rebuild_holds() -> Bool { } } -test fn emit_on_demand_family_crate_witnesses() -> Bool { - family_crate_digest_differs_from_member_digests_holds() - && family_crate_member_change_key_sensitivity_holds() - && family_crate_member_order_key_sensitivity_holds() - && family_crate_one_build_members_warm_holds() - && family_crate_member_change_cold_rebuild_holds() -} - data family_crate_pr_native_note: String = "Per-PR native carrier (routing frontier, 2026-07-22): the NO-EVICT agreement leg — same one-build workspace derivation as the receipts above but under the fixed pr_native test_id and never evicted, so the first CI run on a runner cold-builds once and every later PR run is warm (compile_skipped observed via the cached transport receipts). Assertions are agreement-only (interpreted == native per member), skip-state-agnostic by design: cold and warm runs both green, which is what a per-PR gate needs. Hermetic-clean: no evict intrinsic (which refuses hermetic), and the cached transport runs on the Admitted verdict in every mode." test fn emit_on_demand_family_crate_pr_native_agreement_holds() -> Bool { diff --git a/src/v2/test/claim/execution/emit_on_demand_field_access_family_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_field_access_family_witness_test.dag index d85390170a7..7d6c7011bda 100644 --- a/src/v2/test/claim/execution/emit_on_demand_field_access_family_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_field_access_family_witness_test.dag @@ -331,12 +331,3 @@ test fn emit_on_demand_field_access_materialize_share_on_hit_holds() -> Bool { } } -test fn emit_on_demand_field_access_family_witnesses() -> Bool { - emit_on_demand_field_access_grain_keys_differ_holds() - && emit_on_demand_field_access_materialize_recompute_on_miss_holds() - && emit_on_demand_field_access_interpreter_roles_bounded_holds() - && emit_on_demand_field_access_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_field_access_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_field_access_native_one_build_holds() - && emit_on_demand_field_access_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/emit_on_demand_kernel_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_kernel_witness_test.dag index 052efa72e9e..e883421742e 100644 --- a/src/v2/test/claim/execution/emit_on_demand_kernel_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_kernel_witness_test.dag @@ -206,19 +206,6 @@ fn kernel_cached_run_with_source_for_tree( } } -fn kernel_cached_run_with_source( - workspace: String, - source: Medium, - expect_compile_skipped: Bool -) -> Bool { - kernel_cached_run_with_source_for_tree( - workspace: workspace, - tree: emit_eval_subject_tree(), - source: source, - expect_compile_skipped: expect_compile_skipped - ) -} - fn kernel_cache_root_for(test_id: String) -> String { concat(kernel_cache_root, "/", test_id) } @@ -329,12 +316,3 @@ test fn emit_on_demand_kernel_native_one_build_holds() -> Bool { } } -test fn emit_on_demand_kernel_witnesses() -> Bool { - emit_on_demand_grain_keys_differ_holds() - && emit_on_demand_materialize_recompute_on_miss_holds() - && emit_on_demand_interpreter_roles_bounded_holds() - && emit_on_demand_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_kernel_native_one_build_holds() - && emit_on_demand_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/emit_on_demand_match_loop_fold_family_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_match_loop_fold_family_witness_test.dag index 1b0833f2a17..1a75d2e42c9 100644 --- a/src/v2/test/claim/execution/emit_on_demand_match_loop_fold_family_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_match_loop_fold_family_witness_test.dag @@ -545,11 +545,3 @@ test fn emit_on_demand_match_loop_fold_schedule_refuses_unreadable_budget_holds( } } -test fn emit_on_demand_match_loop_fold_family_witnesses() -> Bool { - emit_on_demand_match_loop_fold_grain_keys_differ_holds() - && emit_on_demand_match_loop_fold_materialize_recompute_on_miss_holds() - && emit_on_demand_match_loop_fold_interpreter_roles_bounded_holds() - && emit_on_demand_match_loop_fold_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_match_loop_fold_family_one_build_holds() - && emit_on_demand_match_loop_fold_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/emit_on_demand_meet_join_family_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_meet_join_family_witness_test.dag index 51c20bd0cba..9d3db59c89a 100644 --- a/src/v2/test/claim/execution/emit_on_demand_meet_join_family_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_meet_join_family_witness_test.dag @@ -150,12 +150,3 @@ test fn emit_on_demand_join_closure_keys_differ_for_distinct_trees_holds() -> Bo key_primary != key_alt } -test fn emit_on_demand_meet_join_family_witnesses() -> Bool { - emit_on_demand_meet_join_grain_keys_differ_holds() - && emit_on_demand_meet_join_materialize_recompute_on_miss_holds() - && emit_on_demand_meet_join_interpreter_roles_bounded_holds() - && emit_on_demand_meet_join_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_meet_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_join_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_meet_join_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/emit_on_demand_variant_construct_family_witness_test.dag b/src/v2/test/claim/execution/emit_on_demand_variant_construct_family_witness_test.dag index 4dd691656a9..66820fc8728 100644 --- a/src/v2/test/claim/execution/emit_on_demand_variant_construct_family_witness_test.dag +++ b/src/v2/test/claim/execution/emit_on_demand_variant_construct_family_witness_test.dag @@ -253,12 +253,3 @@ test fn emit_on_demand_variant_construct_native_one_build_holds() -> Bool { } } -test fn emit_on_demand_variant_construct_family_witnesses() -> Bool { - emit_on_demand_variant_construct_grain_keys_differ_holds() - && emit_on_demand_variant_construct_materialize_recompute_on_miss_holds() - && emit_on_demand_variant_construct_interpreter_roles_bounded_holds() - && emit_on_demand_variant_construct_schedule_refuses_unreadable_budget_holds() - && emit_on_demand_variant_construct_closure_keys_differ_for_distinct_trees_holds() - && emit_on_demand_variant_construct_native_one_build_holds() - && emit_on_demand_variant_construct_materialize_share_on_hit_holds() -} diff --git a/src/v2/test/claim/execution/floor_diff_observe_witness_test.dag b/src/v2/test/claim/execution/floor_diff_observe_witness_test.dag index 3c4e8aaf0a2..ce6d2ad23dc 100644 --- a/src/v2/test/claim/execution/floor_diff_observe_witness_test.dag +++ b/src/v2/test/claim/execution/floor_diff_observe_witness_test.dag @@ -18,37 +18,31 @@ import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -fn witness_ci_policy_observation_succeeds() -> Bool { +test fn witness_ci_policy_observation_succeeds() -> Bool { match floor_observe_git_diff_unified_for_ci() { UnifiedDiffOk { text: _ } => true UnifiedDiffFail { reason: _ } => false } } -fn witness_invalid_base_fails_closed() -> Bool { +test fn witness_invalid_base_fails_closed() -> Bool { match floor_run_git_diff_unified(base: "__gunbc_invalid_diff_base__", head: "HEAD", mode: DiffMergeBase) { UnifiedDiffFail { reason: _ } => true UnifiedDiffOk { text: _ } => false } } -fn witness_ci_policy_name_status_observation_succeeds() -> Bool { +test fn witness_ci_policy_name_status_observation_succeeds() -> Bool { match floor_observe_git_diff_name_status_for_ci() { NameStatusDiffOk { changed_paths: _, departed_paths: _ } => true NameStatusDiffFail { reason: _ } => false } } -fn witness_invalid_base_name_status_fails_closed() -> Bool { +test fn witness_invalid_base_name_status_fails_closed() -> Bool { match floor_run_git_diff_name_status(base: "__gunbc_invalid_diff_base__", head: "HEAD", mode: DiffMergeBase) { NameStatusDiffFail { reason: _ } => true NameStatusDiffOk { changed_paths: _, departed_paths: _ } => false } } -test fn floor_diff_observe_host_effect_apply_holds() -> Bool { - witness_ci_policy_observation_succeeds() - && witness_invalid_base_fails_closed() - && witness_ci_policy_name_status_observation_succeeds() - && witness_invalid_base_name_status_fails_closed() -} diff --git a/src/v2/test/claim/execution/loop_eval_by_execution_test.dag b/src/v2/test/claim/execution/loop_eval_by_execution_test.dag index bee12ea7054..95847cab1ff 100644 --- a/src/v2/test/claim/execution/loop_eval_by_execution_test.dag +++ b/src/v2/test/claim/execution/loop_eval_by_execution_test.dag @@ -399,14 +399,14 @@ fn loop_run_passes(run: Outcome>) -> Bool { } } -fn loop_source_pipeline_admits_holds() -> Bool { +test fn loop_source_pipeline_admits_holds() -> Bool { match table_fixture_loop_arrow_with_body() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => false } } -fn loop_source_driven_executes_holds() -> Bool { +test fn loop_source_driven_executes_holds() -> Bool { match table_fixture_loop_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -419,7 +419,7 @@ fn loop_source_driven_executes_holds() -> Bool { } } -fn loop_source_driven_wrong_value_red_holds() -> Bool { +test fn loop_source_driven_wrong_value_red_holds() -> Bool { match table_fixture_loop_wrong_value_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -432,7 +432,7 @@ fn loop_source_driven_wrong_value_red_holds() -> Bool { } } -fn loop_direct_runtime_holds() -> Bool { +test fn loop_direct_runtime_holds() -> Bool { match table_fixture_loop_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => { let input = loop_pick_call(callee: arrow) @@ -457,7 +457,7 @@ fn loop_direct_runtime_holds() -> Bool { } } -fn loop_value_perturbation_red_holds() -> Bool { +test fn loop_value_perturbation_red_holds() -> Bool { match table_fixture_loop_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -470,7 +470,7 @@ fn loop_value_perturbation_red_holds() -> Bool { } } -fn loop_fixture_producer_holds() -> Bool { +test fn loop_fixture_producer_holds() -> Bool { match table_fixture_loop_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -483,7 +483,7 @@ fn loop_fixture_producer_holds() -> Bool { } } -fn loop_fixture_wrong_value_red_holds() -> Bool { +test fn loop_fixture_wrong_value_red_holds() -> Bool { match table_fixture_loop_wrong_value_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -496,7 +496,7 @@ fn loop_fixture_wrong_value_red_holds() -> Bool { } } -fn loop_census_ingested_executes_holds() -> Bool { +test fn loop_census_ingested_executes_holds() -> Bool { match ingested_loop_arrow_with_body() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -509,7 +509,7 @@ fn loop_census_ingested_executes_holds() -> Bool { } } -fn loop_census_ingested_wrong_value_red_holds() -> Bool { +test fn loop_census_ingested_wrong_value_red_holds() -> Bool { match ingested_loop_arrow_with_body_wrong_value() { Accepted { value: arrow, diagnostics: _ } => loop_run_passes( @@ -522,12 +522,3 @@ fn loop_census_ingested_wrong_value_red_holds() -> Bool { } } -test fn loop_eval_by_execution_keystone_holds() -> Bool { - loop_source_driven_executes_holds() - && loop_source_driven_wrong_value_red_holds() - && loop_direct_runtime_holds() - && loop_source_pipeline_admits_holds() - && loop_value_perturbation_red_holds() - && loop_fixture_producer_holds() - && loop_fixture_wrong_value_red_holds() -} diff --git a/src/v2/test/claim/execution/loop_round_trip_test.dag b/src/v2/test/claim/execution/loop_round_trip_test.dag index 474fb51a80d..6338c30035b 100644 --- a/src/v2/test/claim/execution/loop_round_trip_test.dag +++ b/src/v2/test/claim/execution/loop_round_trip_test.dag @@ -193,7 +193,7 @@ fn loop_coercion_quality_is_faithful(q: CoercionQuality) -> Bool { } } -fn loop_emit_matches_serialize_holds() -> Bool { +test fn loop_emit_matches_serialize_holds() -> Bool { match target_serialize_source_from_model( target: loop_target_model, emitted: loop_emitted_root @@ -208,7 +208,7 @@ fn loop_emit_matches_serialize_holds() -> Bool { } } -fn loop_grammar_inverse_holds() -> Bool { +test fn loop_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: loop_target_model, emitted: loop_emitted_root @@ -218,7 +218,7 @@ fn loop_grammar_inverse_holds() -> Bool { } } -fn loop_ingest_via_coerce_matches_canonical() -> Bool { +test fn loop_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: loop_emitted_root, tree: loop_inferred_tree, @@ -232,8 +232,3 @@ fn loop_ingest_via_coerce_matches_canonical() -> Bool { } } -test fn loop_round_trip_keystone_holds() -> Bool { - loop_emit_matches_serialize_holds() - && loop_grammar_inverse_holds() - && loop_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/execution/match_bool_round_trip_test.dag b/src/v2/test/claim/execution/match_bool_round_trip_test.dag index d77d681fa18..fe716a714c7 100644 --- a/src/v2/test/claim/execution/match_bool_round_trip_test.dag +++ b/src/v2/test/claim/execution/match_bool_round_trip_test.dag @@ -174,7 +174,7 @@ fn match_bool_coercion_quality_is_faithful(q: CoercionQuality) -> Bool { } } -fn match_bool_emit_matches_serialize_holds() -> Bool { +test fn match_bool_emit_matches_serialize_holds() -> Bool { match target_serialize_source_from_model( target: match_bool_target_model, emitted: match_bool_emitted_root @@ -189,7 +189,7 @@ fn match_bool_emit_matches_serialize_holds() -> Bool { } } -fn match_bool_grammar_inverse_holds() -> Bool { +test fn match_bool_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: match_bool_target_model, emitted: match_bool_emitted_root @@ -199,7 +199,7 @@ fn match_bool_grammar_inverse_holds() -> Bool { } } -fn match_bool_ingest_via_coerce_matches_canonical() -> Bool { +test fn match_bool_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: match_bool_emitted_root, tree: match_bool_inferred_tree, @@ -213,8 +213,3 @@ fn match_bool_ingest_via_coerce_matches_canonical() -> Bool { } } -test fn match_bool_round_trip_keystone_holds() -> Bool { - match_bool_emit_matches_serialize_holds() - && match_bool_grammar_inverse_holds() - && match_bool_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/execution/pick_ingested_structural_lowering_test.dag b/src/v2/test/claim/execution/pick_ingested_structural_lowering_test.dag index 52c8510427a..9586ec2e451 100644 --- a/src/v2/test/claim/execution/pick_ingested_structural_lowering_test.dag +++ b/src/v2/test/claim/execution/pick_ingested_structural_lowering_test.dag @@ -457,7 +457,7 @@ fn pick_ingested_pipeline_resolves_holds() -> Bool { } } -fn pick2_ingested_pick_true_executes_holds() -> Bool { +test fn pick2_ingested_pick_true_executes_holds() -> Bool { match pick_ingested_arrow_from_source(source: pick2_ingested_source) { Accepted { value: arrow, diagnostics: _ } => pick_eval_run_passes( @@ -470,7 +470,7 @@ fn pick2_ingested_pick_true_executes_holds() -> Bool { } } -fn pick2_ingested_pick_false_executes_holds() -> Bool { +test fn pick2_ingested_pick_false_executes_holds() -> Bool { match pick_ingested_arrow_from_source(source: pick2_ingested_false_source) { Accepted { value: arrow, diagnostics: _ } => pick_eval_run_passes( @@ -483,7 +483,7 @@ fn pick2_ingested_pick_false_executes_holds() -> Bool { } } -fn pick2_ingested_swapped_arms_red_holds() -> Bool { +test fn pick2_ingested_swapped_arms_red_holds() -> Bool { match pick_ingested_arrow_from_source(source: pick2_ingested_swapped_source) { Accepted { value: arrow, diagnostics: _ } => pick_eval_run_passes( @@ -505,8 +505,3 @@ test fn pick_ingested_equals_eval_keystone_holds() -> Bool { && pick_ingested_swapped_arms_red_holds() } -test fn pick2_ingested_equals_eval_generality_holds() -> Bool { - pick2_ingested_pick_true_executes_holds() - && pick2_ingested_pick_false_executes_holds() - && pick2_ingested_swapped_arms_red_holds() -} diff --git a/src/v2/test/claim/execution/rust_emit_host_call_equals_eval_test.dag b/src/v2/test/claim/execution/rust_emit_host_call_equals_eval_test.dag index 8fcb6b1bf57..d90fc54e70e 100644 --- a/src/v2/test/claim/execution/rust_emit_host_call_equals_eval_test.dag +++ b/src/v2/test/claim/execution/rust_emit_host_call_equals_eval_test.dag @@ -294,6 +294,3 @@ test fn rust_emit_host_call_wrong_oracle_refuses_holds() -> Bool { ) } -test fn rust_emit_host_call_equals_eval_all_holds() -> Bool { - rust_emit_host_call_equals_eval_holds() && rust_emit_host_call_wrong_oracle_refuses_holds() -} diff --git a/src/v2/test/claim/execution/rust_record_construct_emit_host_equals_eval_test.dag b/src/v2/test/claim/execution/rust_record_construct_emit_host_equals_eval_test.dag index 2037913b783..ccdde90305d 100644 --- a/src/v2/test/claim/execution/rust_record_construct_emit_host_equals_eval_test.dag +++ b/src/v2/test/claim/execution/rust_record_construct_emit_host_equals_eval_test.dag @@ -396,7 +396,3 @@ test fn rust_record_construct_emit_host_wrong_field_refuses_holds() -> Bool { ) } -test fn rust_record_construct_emit_host_equals_eval_all_holds() -> Bool { - rust_record_construct_emit_host_equals_eval_holds() - && rust_record_construct_emit_host_wrong_field_refuses_holds() -} diff --git a/src/v2/test/claim/gha_workflow_yaml_fold_serialize_test.dag b/src/v2/test/claim/gha_workflow_yaml_fold_serialize_test.dag index 6a3d8d1cce3..6d9e2cf1b11 100644 --- a/src/v2/test/claim/gha_workflow_yaml_fold_serialize_test.dag +++ b/src/v2/test/claim/gha_workflow_yaml_fold_serialize_test.dag @@ -54,11 +54,11 @@ fn gha_fold_fold_matches_oracle(job: Job) -> Bool { } } -fn gha_fold_pilot_job_byte_identical_holds() -> Bool { +test fn gha_fold_pilot_job_byte_identical_holds() -> Bool { gha_fold_fold_matches_oracle(job: gha_fold_pilot_job) } -fn gha_fold_wrong_production_rejects_oracle_holds() -> Bool { +test fn gha_fold_wrong_production_rejects_oracle_holds() -> Bool { let oracle = gha_fold_oracle_job(job: gha_fold_pilot_job) match gha_fold_job_wrong_production_target_model_witness(source_text: oracle) { Holds { value: target } => @@ -73,7 +73,7 @@ fn gha_fold_wrong_production_rejects_oracle_holds() -> Bool { } } -fn gha_fold_flat_steps_perturbation_rejects_oracle_holds() -> Bool { +test fn gha_fold_flat_steps_perturbation_rejects_oracle_holds() -> Bool { let oracle = gha_fold_oracle_job(job: gha_fold_pilot_job) match gha_fold_flat_steps_wrong_target_model_witness(source_text: oracle) { Holds { value: target } => @@ -88,8 +88,3 @@ fn gha_fold_flat_steps_perturbation_rejects_oracle_holds() -> Bool { } } -test fn gha_fold_serialize_tier_holds() -> Bool { - gha_fold_pilot_job_byte_identical_holds() - && gha_fold_wrong_production_rejects_oracle_holds() - && gha_fold_flat_steps_perturbation_rejects_oracle_holds() -} diff --git a/src/v2/test/claim/grammar/formal_productions_for_lhs_test.dag b/src/v2/test/claim/grammar/formal_productions_for_lhs_test.dag index e58a1116a29..f4a9dbcf5bf 100644 --- a/src/v2/test/claim/grammar/formal_productions_for_lhs_test.dag +++ b/src/v2/test/claim/grammar/formal_productions_for_lhs_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.grammar.formal_productions_for_lhs - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data formal_productions_for_lhs_fixture_a: Symbol = ^formal_productions_for_lhs_fixture_a @@ -46,7 +45,7 @@ fn formal_productions_for_lhs_count(xs: List) -> Int { ) } -fn formal_productions_for_lhs_filters_to_lhs_holds() -> Bool { +test fn formal_productions_for_lhs_filters_to_lhs_holds() -> Bool { let catalog = formal_productions_for_lhs_fixture_catalog() let filtered = formal_productions_for_lhs( productions: catalog, @@ -59,7 +58,7 @@ fn formal_productions_for_lhs_filters_to_lhs_holds() -> Bool { && formal_productions_for_lhs_count(xs: filtered) == 2 } -fn formal_productions_for_lhs_empty_when_missing_holds() -> Bool { +test fn formal_productions_for_lhs_empty_when_missing_holds() -> Bool { let catalog = formal_productions_for_lhs_fixture_catalog() let filtered = formal_productions_for_lhs( productions: catalog, @@ -72,7 +71,3 @@ fn formal_productions_for_lhs_empty_when_missing_holds() -> Bool { ) } -test fn formal_productions_for_lhs_witnesses() -> Bool { - formal_productions_for_lhs_filters_to_lhs_holds() - && formal_productions_for_lhs_empty_when_missing_holds() -} diff --git a/src/v2/test/claim/grammar/validate_grammar_test.dag b/src/v2/test/claim/grammar/validate_grammar_test.dag index de38b03403f..ba97193d441 100644 --- a/src/v2/test/claim/grammar/validate_grammar_test.dag +++ b/src/v2/test/claim/grammar/validate_grammar_test.dag @@ -1,6 +1,5 @@ module v2.test.claim.grammar.validate_grammar - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data validate_grammar_fixture_start: Symbol = ^validate_grammar_fixture_start @@ -78,7 +77,7 @@ fn validate_grammar_fixture_rhs_symbol_not_in_alphabet() -> FormalGrammar { } } -fn witness_validate_grammar_well_formed_accepts_holds() -> Bool { +test fn witness_validate_grammar_well_formed_accepts_holds() -> Bool { match validate_grammar(g: validate_grammar_fixture_well_formed()) { Holds { value: w } => (w.alphabet_enumeration == grammar_alphabet_enumeration_deferred_4766()) @@ -87,30 +86,24 @@ fn witness_validate_grammar_well_formed_accepts_holds() -> Bool { } } -fn witness_validate_grammar_start_not_in_nonterminals_rejects_holds() -> Bool { +test fn witness_validate_grammar_start_not_in_nonterminals_rejects_holds() -> Bool { match validate_grammar(g: validate_grammar_fixture_start_not_in_nonterminals()) { Holds { value: _ } => false Violates { diagnostic: _ } => true } } -fn witness_validate_grammar_lhs_not_in_nonterminals_rejects_holds() -> Bool { +test fn witness_validate_grammar_lhs_not_in_nonterminals_rejects_holds() -> Bool { match validate_grammar(g: validate_grammar_fixture_lhs_not_in_nonterminals()) { Holds { value: _ } => false Violates { diagnostic: _ } => true } } -fn witness_validate_grammar_rhs_symbol_not_in_alphabet_rejects_holds() -> Bool { +test fn witness_validate_grammar_rhs_symbol_not_in_alphabet_rejects_holds() -> Bool { match validate_grammar(g: validate_grammar_fixture_rhs_symbol_not_in_alphabet()) { Holds { value: _ } => false Violates { diagnostic: _ } => true } } -test fn validate_grammar_witnesses() -> Bool { - witness_validate_grammar_well_formed_accepts_holds() - && witness_validate_grammar_start_not_in_nonterminals_rejects_holds() - && witness_validate_grammar_lhs_not_in_nonterminals_rejects_holds() - && witness_validate_grammar_rhs_symbol_not_in_alphabet_rejects_holds() -} diff --git a/src/v2/test/claim/grounding_lens_test.dag b/src/v2/test/claim/grounding_lens_test.dag index d95f758ba8a..1468e37392d 100644 --- a/src/v2/test/claim/grounding_lens_test.dag +++ b/src/v2/test/claim/grounding_lens_test.dag @@ -1,24 +1,20 @@ module v2.test.claim.grounding_lens - - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly - - -fn witness_coincide_caseinsensitive() -> Bool { +test fn witness_coincide_caseinsensitive() -> Bool { name_coincides(field: "URL", concept_name: "url") } -fn witness_coincide_headnoun() -> Bool { +test fn witness_coincide_headnoun() -> Bool { name_coincides(field: "base_url", concept_name: "Url") } -fn witness_coincide_whole() -> Bool { +test fn witness_coincide_whole() -> Bool { name_coincides(field: "content_hash", concept_name: "ContentHash") } -fn witness_coincide_negative() -> Bool { +test fn witness_coincide_negative() -> Bool { !name_coincides(field: "note", concept_name: "Url") } @@ -135,34 +131,34 @@ fn candidate_coincides_with(cands: List, enclosing: Stri }) } -fn witness_decide_flags_nickname() -> Bool { +test fn witness_decide_flags_nickname() -> Bool { has_candidate(cands: candidates_over_decls(decls: fixture_decls()), enclosing: "Endpoint", field: "base_url") } -fn witness_decide_clears_nonbare() -> Bool { +test fn witness_decide_clears_nonbare() -> Bool { !has_candidate(cands: candidates_over_decls(decls: fixture_decls()), enclosing: "Endpoint", field: "timeout") } -fn witness_decide_clears_clean_RED() -> Bool { +test fn witness_decide_clears_clean_RED() -> Bool { !has_candidate(cands: candidates_over_decls(decls: fixture_decls()), enclosing: "Note", field: "body") } -fn witness_role_word_flows_to_judge() -> Bool { +test fn witness_role_word_flows_to_judge() -> Bool { has_candidate(cands: candidates_over_decls(decls: fixture_decls()), enclosing: "Widget", field: "id") } -fn witness_meta_self_coincidence_excluded() -> Bool { +test fn witness_meta_self_coincidence_excluded() -> Bool { compute_layer_excluded( field: "field", matched: qc(qn: "v2.std.Field", nm: "Field", fs: []) ) } -fn witness_layer_excludes_meta_field() -> Bool { +test fn witness_layer_excludes_meta_field() -> Bool { !has_candidate(cands: candidates_over_decls(decls: fixture_decls()), enclosing: "FieldRef", field: "field") } -fn witness_layer_inversion_now_included() -> Bool { +test fn witness_layer_inversion_now_included() -> Bool { has_candidate( cands: candidates_over_decls(decls: layer_inversion_fixture_decls()), enclosing: "Foo", @@ -185,7 +181,7 @@ fn production_layer_inversion_fixture_decls() -> List { ] } -fn witness_production_layer_inversion_now_included() -> Bool { +test fn witness_production_layer_inversion_now_included() -> Bool { has_candidate( cands: candidates_over_decls(decls: production_layer_inversion_fixture_decls()), enclosing: "Foo", @@ -208,7 +204,7 @@ fn product_namespace_fixture_decls() -> List { ] } -fn witness_product_namespace_not_layer_excluded() -> Bool { +test fn witness_product_namespace_not_layer_excluded() -> Bool { has_candidate( cands: candidates_over_decls(decls: product_namespace_fixture_decls()), enclosing: "Endpoint", @@ -216,7 +212,7 @@ fn witness_product_namespace_not_layer_excluded() -> Bool { ) } -fn witness_enrich_target_structure() -> Bool { +test fn witness_enrich_target_structure() -> Bool { let s = candidate_structure( cands: candidates_over_decls(decls: fixture_decls()), enclosing: "Endpoint", @@ -225,7 +221,7 @@ fn witness_enrich_target_structure() -> Bool { s == "scheme: UriScheme, host: NonEmptyStr" } -fn witness_coincides_with_qualified_name() -> Bool { +test fn witness_coincides_with_qualified_name() -> Bool { candidate_coincides_with( cands: candidates_over_decls(decls: fixture_decls()), enclosing: "Endpoint", @@ -233,20 +229,3 @@ fn witness_coincides_with_qualified_name() -> Bool { ) == "v2.test.demo.Url" } -test fn grounding_lens_fixture_witnesses() -> Bool { - witness_coincide_caseinsensitive() - && witness_coincide_headnoun() - && witness_coincide_whole() - && witness_coincide_negative() - && witness_decide_flags_nickname() - && witness_decide_clears_nonbare() - && witness_decide_clears_clean_RED() - && witness_role_word_flows_to_judge() - && witness_meta_self_coincidence_excluded() - && witness_layer_excludes_meta_field() - && witness_layer_inversion_now_included() - && witness_production_layer_inversion_now_included() - && witness_product_namespace_not_layer_excluded() - && witness_enrich_target_structure() - && witness_coincides_with_qualified_name() -} diff --git a/src/v2/test/claim/host_language_transport_script/corpus/facts_readback_verdict_perturb_test.dag b/src/v2/test/claim/host_language_transport_script/corpus/facts_readback_verdict_perturb_test.dag index 6cb11409cde..631f4f28c51 100644 --- a/src/v2/test/claim/host_language_transport_script/corpus/facts_readback_verdict_perturb_test.dag +++ b/src/v2/test/claim/host_language_transport_script/corpus/facts_readback_verdict_perturb_test.dag @@ -1,12 +1,11 @@ module v2.test.host_language_transport_script.corpus.facts_readback_verdict_perturb - data live_tree_disposition: LiveTreeDisposition = ReadsLiveTree data corpus_computed_path: String = "dag/tools/dag_compile_clean_transport.dag" data perturb_literal_path: String = "src/v2/test/fixture/transport_script_scan/bare_string_literal/plant.dag" -fn witness_computed_facts_readback_holds() -> Bool { +test fn witness_computed_facts_readback_holds() -> Bool { let facts = transport_script_position_facts_live(path: corpus_computed_path) transport_script_literal_ban_holds(facts: facts) && match transport_script_lens_verdict(facts: facts) { @@ -17,7 +16,7 @@ fn witness_computed_facts_readback_holds() -> Bool { } } -fn witness_literal_perturb_facts_readback_red() -> Bool { +test fn witness_literal_perturb_facts_readback_red() -> Bool { let facts = transport_script_position_facts_live(path: perturb_literal_path) !transport_script_literal_ban_holds(facts: facts) && transport_script_literal_violation_count(facts: facts) == 1 @@ -29,7 +28,3 @@ fn witness_literal_perturb_facts_readback_red() -> Bool { } } -test fn transport_script_facts_readback_verdict_perturb_witness() -> Bool { - witness_computed_facts_readback_holds() - && witness_literal_perturb_facts_readback_red() -} diff --git a/src/v2/test/claim/host_language_transport_script/lens_unit/transport_script_position_test.dag b/src/v2/test/claim/host_language_transport_script/lens_unit/transport_script_position_test.dag index b5bf3c6c5e7..0992b09afeb 100644 --- a/src/v2/test/claim/host_language_transport_script/lens_unit/transport_script_position_test.dag +++ b/src/v2/test/claim/host_language_transport_script/lens_unit/transport_script_position_test.dag @@ -1,6 +1,5 @@ module v2.test.host_language_transport_script.lens_unit.transport_script_position - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data path_dag: String = "dag/tools/dag_compile_clean_transport.dag" @@ -33,24 +32,24 @@ data fact_interp_literals: TransportScriptPositionFact = TransportScriptPosition shape: StringInterpLiteralsOnly } -fn witness_computed_green() -> Bool { +test fn witness_computed_green() -> Bool { transport_script_literal_ban_holds(facts: [fact_computed]) } -fn witness_bare_literal_red() -> Bool { +test fn witness_bare_literal_red() -> Bool { !transport_script_literal_ban_holds(facts: [fact_bare_literal]) && transport_script_literal_violation_count(facts: [fact_bare_literal]) == 1 } -fn witness_let_bound_red() -> Bool { +test fn witness_let_bound_red() -> Bool { !transport_script_literal_ban_holds(facts: [fact_let_bound]) } -fn witness_interp_literals_red() -> Bool { +test fn witness_interp_literals_red() -> Bool { !transport_script_literal_ban_holds(facts: [fact_interp_literals]) } -fn witness_lens_verdict_holds_on_computed() -> Bool { +test fn witness_lens_verdict_holds_on_computed() -> Bool { match transport_script_lens_verdict(facts: [fact_computed]) { Holds => true Violation { diagnostic: _ } => false @@ -59,7 +58,7 @@ fn witness_lens_verdict_holds_on_computed() -> Bool { } } -fn witness_lens_verdict_violation_on_bare_literal() -> Bool { +test fn witness_lens_verdict_violation_on_bare_literal() -> Bool { match transport_script_lens_verdict(facts: [fact_bare_literal]) { Violation { diagnostic: _ } => true Holds => false @@ -68,11 +67,3 @@ fn witness_lens_verdict_violation_on_bare_literal() -> Bool { } } -test fn transport_script_position_witnesses() -> Bool { - witness_computed_green() - && witness_bare_literal_red() - && witness_let_bound_red() - && witness_interp_literals_red() - && witness_lens_verdict_holds_on_computed() - && witness_lens_verdict_violation_on_bare_literal() -} diff --git a/src/v2/test/claim/impossible_bug/release_demos_test.dag b/src/v2/test/claim/impossible_bug/release_demos_test.dag index f51b1eb6f54..c315f6e59b4 100644 --- a/src/v2/test/claim/impossible_bug/release_demos_test.dag +++ b/src/v2/test/claim/impossible_bug/release_demos_test.dag @@ -90,20 +90,15 @@ fn release_transport_drift_probe_catches() -> Bool { release_transport_wire_contract_drift_catches() } -fn release_complexity_claims_are_class_rejections() -> Bool { +test fn release_complexity_claims_are_class_rejections() -> Bool { release_complexity_claim_catches() } -fn release_idempotency_claims_are_class_rejections() -> Bool { +test fn release_idempotency_claims_are_class_rejections() -> Bool { release_idempotency_claim_catches() } -fn release_transport_claims_are_class_rejections() -> Bool { +test fn release_transport_claims_are_class_rejections() -> Bool { release_transport_drift_probe_catches() } -test fn witness_impossible_bug_release_demos_are_v4_claims_caught() -> Bool { - release_complexity_claims_are_class_rejections() && - release_idempotency_claims_are_class_rejections() && - release_transport_claims_are_class_rejections() -} diff --git a/src/v2/test/claim/locality_affinity_witness_test.dag b/src/v2/test/claim/locality_affinity_witness_test.dag index 0230a0aceec..c58f12d234e 100644 --- a/src/v2/test/claim/locality_affinity_witness_test.dag +++ b/src/v2/test/claim/locality_affinity_witness_test.dag @@ -183,7 +183,7 @@ data locality_conflicting_assignment: List = [ ConsumerBatch { consumer: locality_consumer_b_hash, batch: 0 } ] -fn witness_derive_affinity_claims_smallest_fitting_level() -> Bool { +test fn witness_derive_affinity_claims_smallest_fitting_level() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows, domain: locality_domain) { AffinityClaim { operand: op, level: lvl, footprint: fp, consumers: cs } => op == locality_shared_hash @@ -194,7 +194,7 @@ fn witness_derive_affinity_claims_smallest_fitting_level() -> Bool { } } -fn witness_derive_affinity_refuses_no_fitting_level() -> Bool { +test fn witness_derive_affinity_refuses_no_fitting_level() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows, domain: locality_domain_no_fit) { AffinityRefused { operand: op, cause: AffinityNoFittingLevel { operand: _, footprint: fp } } => op == locality_shared_hash && byte_size_count(b: fp) == 64 @@ -203,7 +203,7 @@ fn witness_derive_affinity_refuses_no_fitting_level() -> Bool { } } -fn witness_derive_affinity_refuses_single_consumer() -> Bool { +test fn witness_derive_affinity_refuses_single_consumer() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: [locality_flow_a], domain: locality_domain) { AffinityRefused { operand: op, cause: AffinityInsufficientConsumers { operand: _ } } => op == locality_shared_hash @@ -212,7 +212,7 @@ fn witness_derive_affinity_refuses_single_consumer() -> Bool { } } -fn witness_derive_affinity_refuses_unresolved_operand_edge() -> Bool { +test fn witness_derive_affinity_refuses_unresolved_operand_edge() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows_with_unresolved, domain: locality_domain) { AffinityRefused { operand: op, cause: AffinityFlowRefused { edge: e, cause: OperandFlowNoOperand { edge: _ } } } => op == locality_shared_hash && e == locality_edge_unresolved @@ -221,7 +221,7 @@ fn witness_derive_affinity_refuses_unresolved_operand_edge() -> Bool { } } -fn witness_derive_affinity_refuses_operand_mismatch() -> Bool { +test fn witness_derive_affinity_refuses_operand_mismatch() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows_with_mismatch, domain: locality_domain) { AffinityRefused { operand: op, cause: AffinityOperandMismatch { expected: expected, found: found } } => op == locality_shared_hash @@ -232,7 +232,7 @@ fn witness_derive_affinity_refuses_operand_mismatch() -> Bool { } } -fn witness_derive_affinity_refuses_footprint_mismatch() -> Bool { +test fn witness_derive_affinity_refuses_footprint_mismatch() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows_with_footprint_mismatch, domain: locality_domain) { AffinityRefused { operand: op, cause: AffinityFootprintMismatch { operand: _, expected: exp, found: fnd } } => op == locality_shared_hash @@ -243,7 +243,7 @@ fn witness_derive_affinity_refuses_footprint_mismatch() -> Bool { } } -fn witness_derive_affinity_dedupes_consumers_from_duplicate_edges() -> Bool { +test fn witness_derive_affinity_dedupes_consumers_from_duplicate_edges() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows_duplicate_edge_two_consumers, domain: locality_domain) { AffinityClaim { operand: op, level: lvl, footprint: fp, consumers: cs } => op == locality_shared_hash @@ -254,7 +254,7 @@ fn witness_derive_affinity_dedupes_consumers_from_duplicate_edges() -> Bool { } } -fn witness_derive_affinity_refuses_when_duplicate_edges_are_one_real_consumer() -> Bool { +test fn witness_derive_affinity_refuses_when_duplicate_edges_are_one_real_consumer() -> Bool { match derive_affinity(operand: locality_shared_hash, flows: locality_flows_duplicate_edge_single_consumer, domain: locality_domain) { AffinityRefused { operand: op, cause: AffinityInsufficientConsumers { operand: _ } } => op == locality_shared_hash @@ -263,7 +263,7 @@ fn witness_derive_affinity_refuses_when_duplicate_edges_are_one_real_consumer() } } -fn witness_co_batch_prices_single_load() -> Bool { +test fn witness_co_batch_prices_single_load() -> Bool { match price_operand_traffic( operand: locality_shared_hash, flows: locality_flows, @@ -278,7 +278,7 @@ fn witness_co_batch_prices_single_load() -> Bool { } } -fn witness_split_batch_prices_double_load() -> Bool { +test fn witness_split_batch_prices_double_load() -> Bool { match price_operand_traffic( operand: locality_shared_hash, flows: locality_flows, @@ -293,7 +293,7 @@ fn witness_split_batch_prices_double_load() -> Bool { } } -fn witness_missing_batch_assignment_refuses_typed() -> Bool { +test fn witness_missing_batch_assignment_refuses_typed() -> Bool { match price_operand_traffic( operand: locality_shared_hash, flows: locality_flows, @@ -307,7 +307,7 @@ fn witness_missing_batch_assignment_refuses_typed() -> Bool { } } -fn witness_conflicting_batch_assignment_refuses_typed() -> Bool { +test fn witness_conflicting_batch_assignment_refuses_typed() -> Bool { match price_operand_traffic( operand: locality_shared_hash, flows: locality_flows, @@ -327,7 +327,7 @@ fn witness_conflicting_batch_assignment_refuses_typed() -> Bool { } } -fn witness_refused_affinity_propagates_typed() -> Bool { +test fn witness_refused_affinity_propagates_typed() -> Bool { match price_operand_traffic( operand: locality_shared_hash, flows: locality_flows, @@ -341,18 +341,3 @@ fn witness_refused_affinity_propagates_typed() -> Bool { } } -test fn locality_affinity_witnesses() -> Bool { - witness_derive_affinity_claims_smallest_fitting_level() - && witness_derive_affinity_refuses_no_fitting_level() - && witness_derive_affinity_refuses_single_consumer() - && witness_derive_affinity_refuses_unresolved_operand_edge() - && witness_derive_affinity_refuses_operand_mismatch() - && witness_derive_affinity_refuses_footprint_mismatch() - && witness_derive_affinity_dedupes_consumers_from_duplicate_edges() - && witness_derive_affinity_refuses_when_duplicate_edges_are_one_real_consumer() - && witness_co_batch_prices_single_load() - && witness_split_batch_prices_double_load() - && witness_missing_batch_assignment_refuses_typed() - && witness_conflicting_batch_assignment_refuses_typed() - && witness_refused_affinity_propagates_typed() -} diff --git a/src/v2/test/claim/long/cross_tree_real_ingest_activation_test.dag b/src/v2/test/claim/long/cross_tree_real_ingest_activation_test.dag index 09f0830f168..109802ab5bc 100644 --- a/src/v2/test/claim/long/cross_tree_real_ingest_activation_test.dag +++ b/src/v2/test/claim/long/cross_tree_real_ingest_activation_test.dag @@ -1,6 +1,5 @@ module v2.test.long.cross_tree_real_ingest_activation - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data ct_real_v2_subject_source: Medium = Medium { @@ -84,7 +83,7 @@ fn ct_real_edge_decision(ingest: SourceRootIngest) -> CrossTreeEdgeDecision { } } -fn cross_tree_real_ingest_v2_to_dag_admitted_holds() -> Bool { +test fn cross_tree_real_ingest_v2_to_dag_admitted_holds() -> Bool { match ct_real_edge_decision(ingest: ct_real_v2_to_dag_ingest) { EdgeCrossAdmitted => true EdgeCrossDenied => false @@ -93,7 +92,7 @@ fn cross_tree_real_ingest_v2_to_dag_admitted_holds() -> Bool { } } -fn cross_tree_real_ingest_dag_to_v2_denied_holds() -> Bool { +test fn cross_tree_real_ingest_dag_to_v2_denied_holds() -> Bool { match ct_real_edge_decision(ingest: ct_real_dag_to_v2_ingest) { EdgeCrossDenied => true EdgeCrossAdmitted => false @@ -102,7 +101,3 @@ fn cross_tree_real_ingest_dag_to_v2_denied_holds() -> Bool { } } -test fn cross_tree_real_ingest_activation_witnesses() -> Bool { - cross_tree_real_ingest_v2_to_dag_admitted_holds() - && cross_tree_real_ingest_dag_to_v2_denied_holds() -} diff --git a/src/v2/test/claim/long/cwc_resolution_probe_test.dag b/src/v2/test/claim/long/cwc_resolution_probe_test.dag index 96b843c9022..0e86f88b41d 100644 --- a/src/v2/test/claim/long/cwc_resolution_probe_test.dag +++ b/src/v2/test/claim/long/cwc_resolution_probe_test.dag @@ -1,6 +1,5 @@ module v2.test.long.cwc_resolution_probe - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data cwc_src_type_two: String = "module probe\ntype T = A | B\n" @@ -101,7 +100,7 @@ test fn cwc_malformed_nary_coproduct_normalize_rejects() -> Bool { cwc_norm_rejects(src: cwc_src_type_malformed_coproduct) } -fn cwc_malformed_nary_coproduct_fail_open_control() -> Bool { +test fn cwc_malformed_nary_coproduct_fail_open_control() -> Bool { !cwc_norm_rejects(src: cwc_src_type_malformed_coproduct) } @@ -139,13 +138,3 @@ test fn cwc_review_disj_has_four_arms() -> Bool { } } -test fn cwc_nary_coproduct_normalize_boundary_holds() -> Bool { - cwc_norm_two_variant_accepts() - && cwc_norm_three_variant_accepts() - && cwc_review_normalized_has_disj() - && cwc_review_disj_has_four_arms() - && cwc_cwc_module_resolve_accepts() - && cwc_non_coproduct_rhs_passes_through() - && cwc_malformed_nary_coproduct_normalize_rejects() - && !cwc_malformed_nary_coproduct_fail_open_control() -} diff --git a/src/v2/test/claim/long/gauntlet_lane_enrollment_witness_test.dag b/src/v2/test/claim/long/gauntlet_lane_enrollment_witness_test.dag index 045ca29656e..ffcdc6ff84b 100644 --- a/src/v2/test/claim/long/gauntlet_lane_enrollment_witness_test.dag +++ b/src/v2/test/claim/long/gauntlet_lane_enrollment_witness_test.dag @@ -69,7 +69,7 @@ fn substrate_long_lane_contains(f: String) -> Bool { any(falsifier_substrate_long_lane_rows, row => row.function == f) } -fn witness_rehomed_rows_are_cadence_enrolled() -> Bool { +test fn witness_rehomed_rows_are_cadence_enrolled() -> Bool { let entries = live_roster_falsifier_witness_entries() substrate_long_lane_contains(f: "wave1_gate1_d_census_subsumption_witness_holds") && falsifier_entries_contain(entries: entries, f: "wave1_gate1_d_ingested_bind_executes_witness_holds") @@ -80,17 +80,12 @@ fn witness_rehomed_rows_are_cadence_enrolled() -> Bool { && falsifier_entries_contain(entries: entries, f: "witness_parse_binding_fidelity_distinct_identifiers_holds") } -fn witness_split_entries_keep_cheap_half_per_pr() -> Bool { +test fn witness_split_entries_keep_cheap_half_per_pr() -> Bool { let cadence = live_roster_falsifier_witness_entries() !falsifier_entries_contain(entries: cadence, f: "lens_affected_set_provenance_producer_git_diff_wire_holds") && !falsifier_entries_contain(entries: cadence, f: "witness_resolve_distinct_param_bindings_holds") } -test fn gauntlet_lane_rehomed_rows_are_cadence_enrolled_holds() -> Bool { - witness_rehomed_rows_are_cadence_enrolled() - && witness_split_entries_keep_cheap_half_per_pr() -} - test fn gauntlet_lane_rehome_is_never_bare_deenrollment_holds() -> Bool { live_roster_has_no_bare_deenrolled_witness() && roster_has_no_bare_deenrolled_witness( diff --git a/src/v2/test/claim/long/parse_table_memo_governed_witness_test.dag b/src/v2/test/claim/long/parse_table_memo_governed_witness_test.dag index 84e0e26e207..f02ab3d047b 100644 --- a/src/v2/test/claim/long/parse_table_memo_governed_witness_test.dag +++ b/src/v2/test/claim/long/parse_table_memo_governed_witness_test.dag @@ -1,6 +1,5 @@ module v2.test.long.parse_table_memo_governed_witness - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data parse_table_memo_governed_witness_note: String = "Governed memo door receipts: Memoize verdict consumed at parse_table_lookup/insert (non-Memoize refuses store); warm==cold content-hash purity on the bisect fixture; RED on bypass insert (Recompute carrier with hand-populated entries). Door fns parse_table_memo_lookup_refuses_store / parse_table_memo_insert_refused are the direct oracle — witnesses call them, not map shape alone. parse_table_memo_door_order_independent composes insert-then-lookup and lookup-then-insert (Case A: seed ParseTableMemo must not serve/populate on non-Memoize — v1_interpreter.rs gated). reconcile-as-lookup-path is the next increment." @@ -47,15 +46,15 @@ fn parse_table_memoize_fixture() -> ParseTable { } } -fn witness_materialization_gate_recompute_denies_store() -> Bool { +test fn witness_materialization_gate_recompute_denies_store() -> Bool { !materialization_allows_memo_store(m: Recompute) } -fn witness_recompute_fixture_carries_recompute_verdict() -> Bool { +test fn witness_recompute_fixture_carries_recompute_verdict() -> Bool { !materialization_allows_memo_store(m: parse_table_recompute_fixture().materialization) } -fn witness_door_insert_refused_for_recompute_table() -> Bool { +test fn witness_door_insert_refused_for_recompute_table() -> Bool { parse_table_memo_insert_refused( table: parse_table_recompute_fixture(), key: governed_witness_probe_key(), @@ -63,7 +62,7 @@ fn witness_door_insert_refused_for_recompute_table() -> Bool { ) } -fn witness_door_lookup_refused_for_recompute_table() -> Bool { +test fn witness_door_lookup_refused_for_recompute_table() -> Bool { parse_table_memo_lookup_refuses_store( table: parse_table_recompute_fixture(), key: governed_witness_probe_key() @@ -123,7 +122,7 @@ fn witness_bypass_store_reds_non_memoize_carrier() -> Bool { !parse_table_memo_store_well_formed_at(table: bypass, key: key) } -fn witness_memoize_carrier_allows_store() -> Bool { +test fn witness_memoize_carrier_allows_store() -> Bool { let table = parse_table_memoize_fixture() let key = governed_witness_probe_key() let after = parse_table_insert( @@ -134,7 +133,7 @@ fn witness_memoize_carrier_allows_store() -> Bool { parse_table_entries_contain_key(table: after, key: key) } -fn witness_content_key_subject_stable() -> Bool { +test fn witness_content_key_subject_stable() -> Bool { let table = parse_table_memoize_fixture() let key = governed_witness_probe_key() let a = parse_table_subject(table: table, key: key) @@ -142,13 +141,6 @@ fn witness_content_key_subject_stable() -> Bool { a == b } -test fn parse_table_memo_governed_store_refused_when_recompute() -> Bool { - witness_materialization_gate_recompute_denies_store() - && witness_recompute_fixture_carries_recompute_verdict() - && witness_door_insert_refused_for_recompute_table() - && witness_door_lookup_refused_for_recompute_table() -} - test fn parse_table_memo_door_order_independent() -> Bool { witness_door_order_independent_for_recompute_table() } @@ -157,11 +149,6 @@ test fn parse_table_memo_bypass_store_reds() -> Bool { witness_bypass_store_reds_non_memoize_carrier() } -test fn parse_table_memo_governed_memoize_allows_store() -> Bool { - witness_memoize_carrier_allows_store() - && witness_content_key_subject_stable() -} - test fn parse_table_memo_warm_equals_cold_content_hash() -> Bool { witness_parse_table_memo_hit_path_content_hash_stable() } diff --git a/src/v2/test/claim/long/parser_completeness_frontier_test.dag b/src/v2/test/claim/long/parser_completeness_frontier_test.dag index 76564fe3971..5ccf926a690 100644 --- a/src/v2/test/claim/long/parser_completeness_frontier_test.dag +++ b/src/v2/test/claim/long/parser_completeness_frontier_test.dag @@ -1,6 +1,5 @@ module v2.test.long.parser_completeness_frontier - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data parser_frontier_module_artifact: Artifact = Artifact { @@ -127,19 +126,3 @@ test fn parser_frontier_logic_untyped_single_param_fn_holds() -> Bool { parser_frontier_assemble_accepts(src: src_logic_untyped_single_param_fn) } -test fn parser_completeness_frontier_all_holds() -> Bool { - parser_frontier_parse_module_header_holds() - && parser_frontier_parse_type_decl_holds() - && parser_frontier_parse_fn_simple_body_holds() - && parser_frontier_parse_single_arm_match_holds() - && parser_frontier_infer_single_arm_module_holds() - && parser_frontier_parse_multi_arm_match_holds() - && parser_frontier_logic_empty_record_type_holds() - && parser_frontier_logic_record_type_fields_holds() - && parser_frontier_logic_data_nested_ctor_holds() - && parser_frontier_logic_let_discard_holds() - && parser_frontier_logic_generic_data_holds() - && parser_frontier_logic_inline_fn_multi_arm_holds() - && parser_frontier_logic_nested_rec_fn_holds() - && parser_frontier_logic_untyped_single_param_fn_holds() -} diff --git a/src/v2/test/claim/long/self_host_module_emit_derisk_test.dag b/src/v2/test/claim/long/self_host_module_emit_derisk_test.dag index 56b9f1a10d6..f40e37754af 100644 --- a/src/v2/test/claim/long/self_host_module_emit_derisk_test.dag +++ b/src/v2/test/claim/long/self_host_module_emit_derisk_test.dag @@ -134,13 +134,3 @@ test fn self_host_frontier_parse_multi_arm_match_holds() -> Bool { && derisk_infer_accepts(src: src_multi_arm_match) } -test fn self_host_module_emit_frontier_all_holds() -> Bool { - self_host_frontier_parse_module_header_holds() - && self_host_frontier_parse_type_decl_holds() - && self_host_frontier_parse_fn_simple_body_holds() - && self_host_frontier_parse_single_arm_match_holds() - && self_host_frontier_infer_single_arm_module_holds() - && self_host_frontier_parse_multi_arm_match_holds() - && self_host_frontier_emit_ownership_miss_accepts() - && self_host_frontier_emit_two_user_types_accepts() -} diff --git a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag index d6b14d1f3d0..e3a1f6b368b 100644 --- a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag +++ b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag @@ -143,63 +143,6 @@ fn bisect_through_parse_production() -> Outcome { ) } -fn bisect_parse_production_terminates() -> Bool { - match bisect_through_parse_production() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => true - } -} - -fn bisect_single_module_parse_expr() -> Bool { - let lm = dag_language_model() - match lm.grammar { - ModeledGrammar { root: root } => - bind_outcome( - o: tokenize( - text: bisect_empty_source.carried, - file: ^compile_ingest_staging_source_file, - rules: lm.lex - ), - f: fn(token_stream) { - match grammar_lookup_production(root: root, name: root.start) { - Holds { value: production } => - match parse_expr( - expr: production.expression, - tokens: token_stream_remaining(stream: token_stream), - all_tokens: token_stream_all(stream: token_stream), - root: root, - table: parse_table_empty(), - prov: parse_prov_initial() - ) { - ParseExprAccepted { remaining: _, captured: _, diagnostics: _, prov: _, table: _ } => - outcome_accepted(value: true) - ParseExprRejected { diagnostics: _, table: _ } => - outcome_accepted(value: true) - } - Violates { diagnostic: _ } => - Rejected { diagnostics: None } - } - } - ) - _ => - Rejected { diagnostics: None } - } -} - -fn bisect_single_module_parse_expr_terminates() -> Bool { - match bisect_single_module_parse_expr() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => true - } -} - -fn bisect_normalize_terminates() -> Bool { - match bisect_through_normalize() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => true - } -} - fn bisect_parse_module_add_parse_accepts() -> Bool { let lm = dag_language_model() match tokenize( @@ -305,72 +248,6 @@ test fn witness_bisect_parse_module_add_correctness_holds() -> Bool { && ((bisect_parse_module_add_parse_accepts() == false) == false) } -fn bisect_through_resolve() -> Outcome { - let lm = dag_language_model() - bind_outcome( - o: tokenize( - text: bisect_empty_source.carried, - file: ^compile_ingest_staging_source_file, - rules: lm.lex - ), - f: fn(token_stream) { - bind_outcome( - o: parse(tokens: token_stream, grammar: lm.grammar), - f: fn(parse_tree) { - bind_outcome( - o: normalize(parse_tree: parse_tree), - f: fn(normalized) { - resolve(tree: normalized, lm: lm) - } - ) - } - ) - } - ) -} - -fn bisect_through_infer() -> Outcome { - bind_outcome( - o: bisect_through_resolve(), - f: fn(resolved) { - infer(tree: resolved) - } - ) -} - -fn bisect_through_lens_subtree() -> Outcome> { - bind_outcome( - o: bisect_through_infer(), - f: fn(inferred) { - run_required_lens_gates_on_subtree( - inferred: inferred, - lenses: always_required_lenses() - ) - } - ) -} - -fn bisect_resolve_terminates() -> Bool { - match bisect_through_resolve() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => true - } -} - -fn bisect_infer_terminates() -> Bool { - match bisect_through_infer() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => true - } -} - -fn bisect_lens_subtree_terminates() -> Bool { - match bisect_through_lens_subtree() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => true - } -} - data bisect_unbound_reference_source: Medium = Medium { carried: "module bisect.add\n\nfn add(x:Int, y:Int) -> Int { x + zzz }", fidelity: Lossless } data bisect_unbound_reference_no_binding_source: Medium = Medium { carried: "module bisect.add\n\nfn add() -> Int { zzz }", fidelity: Lossless } data bisect_unbound_reference_note: String = "Discriminating red controls for resolution vacuity (DESIGN section 5). Before the StampLexeme binding migration, every class-stamped identifier collapsed to ^dag_token_ident, which is grammar-carried and therefore canonical, so resolve accepted ANY body reference - including unbound ones (proven on main: both sources below resolved Accepted). These witnesses pin the non-vacuous behavior: a body reference with no binding (zzz, with and without params in scope) must resolve-reject. They go false if the vacuity ever returns - a canonical-symbol arm widening, a stamp regression, or an over-broad scope harvest." diff --git a/src/v2/test/claim/manual/add_body_emit_python_test.dag b/src/v2/test/claim/manual/add_body_emit_python_test.dag index adb539c32c6..0e5bddf7768 100644 --- a/src/v2/test/claim/manual/add_body_emit_python_test.dag +++ b/src/v2/test/claim/manual/add_body_emit_python_test.dag @@ -64,7 +64,7 @@ fn python_add_emit_from_tree(target: TargetModel) -> Outcome> { emit(tree: python_add_inferred_tree, target: target) } -fn python_add_emit_holds() -> Bool { +test fn python_add_emit_holds() -> Bool { match target_serialize_source_from_model( target: python_target_model(), emitted: python_emitted_add_fn_node() @@ -79,7 +79,7 @@ fn python_add_emit_holds() -> Bool { } } -fn python_add_emit_perturbed_spellings_discriminates() -> Bool { +test fn python_add_emit_perturbed_spellings_discriminates() -> Bool { match python_add_emit_from_tree(target: python_target_model()) { Accepted { value: canonical, diagnostics: dc } => match python_add_emit_from_tree( @@ -96,6 +96,3 @@ fn python_add_emit_perturbed_spellings_discriminates() -> Bool { } } -test fn python_add_emit_keystone_holds() -> Bool { - python_add_emit_holds() && python_add_emit_perturbed_spellings_discriminates() -} diff --git a/src/v2/test/claim/manual/bind_demand_driven_eval_test.dag b/src/v2/test/claim/manual/bind_demand_driven_eval_test.dag index d9d866ec8e2..81e0f61bedb 100644 --- a/src/v2/test/claim/manual/bind_demand_driven_eval_test.dag +++ b/src/v2/test/claim/manual/bind_demand_driven_eval_test.dag @@ -398,7 +398,7 @@ fn bind_eval_run_passes(run: Outcome>) -> Bool } } -fn bind_eval_counted_value_body_holds() -> Bool { +test fn bind_eval_counted_value_body_holds() -> Bool { bind_eval_run_passes( run: bind_eval_run( body: bind_eval_bind_node( @@ -410,7 +410,7 @@ fn bind_eval_counted_value_body_holds() -> Bool { ) } -fn bind_eval_divergent_value_rejects_holds() -> Bool { +test fn bind_eval_divergent_value_rejects_holds() -> Bool { match bind_eval_run( body: bind_eval_bind_node( value: bind_eval_divergent(), @@ -427,10 +427,6 @@ fn bind_eval_divergent_value_rejects_holds() -> Bool { } } -test fn bind_demand_driven_eval_keystone_holds() -> Bool { - bind_eval_counted_value_body_holds() && bind_eval_divergent_value_rejects_holds() -} - fn bind_eval_minted_atom(s: Symbol, id: Int) -> Node { Node { kind: TypeNode { connective: Atom { identity: s } }, @@ -451,7 +447,7 @@ fn bind_eval_bind_node_with_binder(binder: Node, value: Node, body: Node) -> Nod } } -fn bind_eval_bound_reference_reads_value_holds() -> Bool { +test fn bind_eval_bound_reference_reads_value_holds() -> Bool { bind_eval_run_passes( run: bind_eval_run( body: bind_eval_bind_node_with_binder( @@ -464,7 +460,7 @@ fn bind_eval_bound_reference_reads_value_holds() -> Bool { ) } -fn bind_eval_parse_shaped_occurrence_distinct_reference_reads_holds() -> Bool { +test fn bind_eval_parse_shaped_occurrence_distinct_reference_reads_holds() -> Bool { bind_eval_run_passes( run: bind_eval_run( body: bind_eval_bind_node_with_binder( @@ -479,7 +475,7 @@ fn bind_eval_parse_shaped_occurrence_distinct_reference_reads_holds() -> Bool { data bind_eval_occurrence_identity_defect_note: String = "The reference-binding witnesses below pin the FLAG D binding-key protocol (docs/plans/general-body-producer-design.md section 9, signed 2026-07-10). GREEN: a bound body reference reads its value through the environment when binder and reference atoms share binding identity regardless of occurrence (parse-shaped MintedOccurrence 1 vs 2 — exactly what 02_parse stamp_terminal mints for source text). GREEN: occurrence-normalized structural equals still read. Dissolved: FLAG D binding-key re-grounding merged — EnvironmentBindingKey keyed on identity, silent allocate_literal fall-through deleted for non-literals." -fn bind_eval_minted_occurrence_equal_reference_reads_holds() -> Bool { +test fn bind_eval_minted_occurrence_equal_reference_reads_holds() -> Bool { bind_eval_run_passes( run: bind_eval_run( body: bind_eval_bind_node_with_binder( @@ -492,7 +488,7 @@ fn bind_eval_minted_occurrence_equal_reference_reads_holds() -> Bool { ) } -fn bind_eval_unbound_reference_refuses_holds() -> Bool { +test fn bind_eval_unbound_reference_refuses_holds() -> Bool { let ref_node = bind_eval_atom(s: ^bind_eval_unbound_ref_sym) let tree = bind_eval_admitted_tree(root: ref_node) match eval_with_context( @@ -514,7 +510,7 @@ fn bind_eval_default_context() -> EvalContext { ) } -fn bind_eval_unbound_reference_default_algebra_refuses_holds() -> Bool { +test fn bind_eval_unbound_reference_default_algebra_refuses_holds() -> Bool { let ref_node = bind_eval_atom(s: ^bind_eval_unbound_ref_sym) let tree = bind_eval_admitted_tree(root: ref_node) match eval_with_context( @@ -528,10 +524,3 @@ fn bind_eval_unbound_reference_default_algebra_refuses_holds() -> Bool { } } -test fn bind_reference_binding_protocol_witnesses_hold() -> Bool { - bind_eval_bound_reference_reads_value_holds() - && bind_eval_minted_occurrence_equal_reference_reads_holds() - && bind_eval_parse_shaped_occurrence_distinct_reference_reads_holds() - && bind_eval_unbound_reference_refuses_holds() - && bind_eval_unbound_reference_default_algebra_refuses_holds() -} diff --git a/src/v2/test/claim/manual/bind_emit_test.dag b/src/v2/test/claim/manual/bind_emit_test.dag index 672878a1bc1..038fa31e011 100644 --- a/src/v2/test/claim/manual/bind_emit_test.dag +++ b/src/v2/test/claim/manual/bind_emit_test.dag @@ -105,7 +105,7 @@ fn bind_emit_wrong_value_from_producer(target: TargetModel) -> Outcome Bool { +test fn bind_emit_holds() -> Bool { match target_serialize_source_from_model( target: dag_bind_target_model(), emitted: dag_fixture_emitted_bind_fn @@ -120,7 +120,7 @@ fn bind_emit_holds() -> Bool { } } -fn bind_emit_wrong_value_discriminates() -> Bool { +test fn bind_emit_wrong_value_discriminates() -> Bool { match bind_emit_from_producer(target: dag_bind_target_model()) { Accepted { value: canonical, diagnostics: dc } => match bind_emit_wrong_value_from_producer(target: dag_bind_target_model()) { @@ -132,35 +132,3 @@ fn bind_emit_wrong_value_discriminates() -> Bool { } } -test fn bind_emit_keystone_holds() -> Bool { - bind_emit_holds() && bind_emit_wrong_value_discriminates() -} - -fn bind_emit_post_translate_root() -> Outcome { - bind_outcome( - o: bind_emit_producer_tree(), - f: fn(tree) { - translate_emitted_node(tree: tree, target: dag_bind_target_model()) - } - ) -} - -fn bind_emit_diag_bind_gate_on_post_translate_body() -> Bool { - match bind_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - target_value_expr_bind_let_gate(node: body) && (d == None) && (bd == None) - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn bind_emit_diag_emit_eq_authority_text() -> Bool { - match bind_emit_from_producer(target: dag_bind_target_model()) { - Accepted { value: emitted, diagnostics: d } => - (emitted.carried == dag_bind_source_text) && (d == None) - Rejected { diagnostics: _ } => false - } -} diff --git a/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag b/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag index 8ce6057b66d..682a160a20d 100644 --- a/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag +++ b/src/v2/test/claim/manual/branch_if_then_else_emit_test.dag @@ -109,7 +109,7 @@ fn branch_if_then_else_emit_swapped_from_producer(target: TargetModel) -> Outcom ) } -fn branch_if_then_else_emit_holds() -> Bool { +test fn branch_if_then_else_emit_holds() -> Bool { match target_serialize_source_from_model( target: dag_pick_target_model(), emitted: dag_fixture_emitted_pick_fn @@ -124,7 +124,7 @@ fn branch_if_then_else_emit_holds() -> Bool { } } -fn branch_if_then_else_emit_swapped_arms_discriminates() -> Bool { +test fn branch_if_then_else_emit_swapped_arms_discriminates() -> Bool { match branch_if_then_else_emit_from_producer(target: dag_pick_target_model()) { Accepted { value: canonical, diagnostics: dc } => match branch_if_then_else_emit_swapped_from_producer(target: dag_pick_target_model()) { @@ -136,192 +136,4 @@ fn branch_if_then_else_emit_swapped_arms_discriminates() -> Bool { } } -test fn branch_if_then_else_emit_keystone_holds() -> Bool { - branch_if_then_else_emit_holds() && branch_if_then_else_emit_swapped_arms_discriminates() -} - -fn branch_if_then_else_emit_post_translate_root() -> Outcome { - bind_outcome( - o: branch_if_then_else_emit_producer_tree(), - f: fn(tree) { - translate_emitted_node(tree: tree, target: dag_pick_target_model()) - } - ) -} - -fn branch_if_then_else_emit_diag_substrate_eq_post_translate() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - source_authority_node_equal( - left: dag_fixture_emitted_pick_fn, - right: translated - ) && (d == None) - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_serialize_raw_eq_serialize_translated() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: translated, diagnostics: td } => - match target_serialize_source_from_model( - target: dag_pick_target_model(), - emitted: dag_fixture_emitted_pick_fn - ) { - Accepted { value: raw_ser, diagnostics: rd } => - match target_serialize_source_from_model( - target: dag_pick_target_model(), - emitted: translated - ) { - Accepted { value: tr_ser, diagnostics: sd } => - (raw_ser == tr_ser) && (td == None) && (rd == None) && (sd == None) - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_branch_gate_on_post_translate_body() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - target_value_expr_branch_bool_gate(node: body) && (d == None) && (bd == None) - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_node_is_bare_atom(node: Node) -> Bool { - match node.kind { - TypeNode { connective: Atom { identity: _ } } => true - _ => false - } -} - -fn branch_if_then_else_emit_diag_then_arm_bare_atom_on_post_translate() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - match list_at_optional(xs: node_positional_child_targets(node: body), index: 1) { - Present { value: then_arm } => - branch_if_then_else_emit_node_is_bare_atom(node: then_arm) - && (d == None) - && (bd == None) - Absent => false - } - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_cond_bare_kw_true_on_post_translate() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - match list_at_optional(xs: node_positional_child_targets(node: body), index: 0) { - Present { value: cond } => - dag_node_is_kw_true_atom(node: cond) && (d == None) && (bd == None) - Absent => false - } - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_producer_emit_accepts() -> Bool { - match branch_if_then_else_emit_from_producer(target: dag_pick_target_model()) { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_authority_serialize_accepts() -> Bool { - match target_serialize_source_from_model( - target: dag_pick_target_model(), - emitted: dag_fixture_emitted_pick_fn - ) { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_translate_accepts() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} -fn branch_if_then_else_emit_diag_fixture_translate_accepts() -> Bool { - match translate_emitted_node( - tree: branch_if_then_else_inferred_tree, - target: dag_pick_target_model() - ) { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_branch_body_translate_accepts() -> Bool { - match translate_emitted_node( - tree: branch_if_then_else_emit_inferred_tree_for( - root: dag_pick_if_body_fixture - ), - target: dag_pick_target_model() - ) { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_pick_empty_domain_coerce_accepts() -> Bool { - match coerce_grounded_node( - source: dag_pick_arrow_domain_conj_node(), - tree: branch_if_then_else_inferred_tree, - target: dag_pick_target_model() - ) { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_pick_empty_domain_translate_accepts() -> Bool { - match translate_emitted_node( - tree: branch_if_then_else_emit_inferred_tree_for( - root: dag_pick_arrow_domain_conj_node() - ), - target: dag_pick_target_model() - ) { - Accepted { value: _, diagnostics: d } => d == None - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_post_translate_serialize_accepts() -> Bool { - match branch_if_then_else_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match target_serialize_source_from_model( - target: dag_pick_target_model(), - emitted: translated - ) { - Accepted { value: _, diagnostics: sd } => (d == None) && (sd == None) - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn branch_if_then_else_emit_diag_emit_eq_authority_text() -> Bool { - match branch_if_then_else_emit_from_producer(target: dag_pick_target_model()) { - Accepted { value: emitted, diagnostics: d } => - (emitted.carried == dag_pick_source_text) && (d == None) - Rejected { diagnostics: _ } => false - } -} diff --git a/src/v2/test/claim/manual/branch_infer_if_then_else_test.dag b/src/v2/test/claim/manual/branch_infer_if_then_else_test.dag index a8518d2a0de..b24733f4ab2 100644 --- a/src/v2/test/claim/manual/branch_infer_if_then_else_test.dag +++ b/src/v2/test/claim/manual/branch_infer_if_then_else_test.dag @@ -34,21 +34,17 @@ fn branch_infer_arm_mismatch_body() -> Node { ) } -fn branch_infer_bool_cond_accepts_holds() -> Bool { +test fn branch_infer_bool_cond_accepts_holds() -> Bool { match infer(tree: dag_pick_if_body_fixture) { Accepted { value: _, diagnostics: d } => d == None Rejected { diagnostics: _ } => false } } -fn branch_infer_arm_mismatch_red_holds() -> Bool { +test fn branch_infer_arm_mismatch_red_holds() -> Bool { match infer(tree: branch_infer_arm_mismatch_body()) { Accepted { value: _, diagnostics: _ } => false Rejected { diagnostics: d } => d.head.reason == ^infer_branch_arm_type_mismatch } } -test fn branch_infer_keystone_holds() -> Bool { - branch_infer_bool_cond_accepts_holds() - && branch_infer_arm_mismatch_red_holds() -} diff --git a/src/v2/test/claim/manual/branch_infer_test.dag b/src/v2/test/claim/manual/branch_infer_test.dag index ab725497b14..8976a41a282 100644 --- a/src/v2/test/claim/manual/branch_infer_test.dag +++ b/src/v2/test/claim/manual/branch_infer_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.branch_infer - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn branch_infer_atom(s: Symbol) -> Node { @@ -102,7 +101,7 @@ fn branch_infer_branch_result_is_int(tree: InferredTree, body: Node) -> Bool { } } -fn branch_infer_bool_cond_accepts_holds() -> Bool { +test fn branch_infer_bool_cond_accepts_holds() -> Bool { match branch_infer_bool_if_else_body_node() { Accepted { value: body, diagnostics: _ } => let tree = branch_infer_resolved_tree(root: body) @@ -116,7 +115,7 @@ fn branch_infer_bool_cond_accepts_holds() -> Bool { } } -fn branch_infer_arm_mismatch_red_holds() -> Bool { +test fn branch_infer_arm_mismatch_red_holds() -> Bool { match branch_infer_arm_mismatch_body_node() { Accepted { value: body, diagnostics: _ } => match branch_infer_run(tree: branch_infer_resolved_tree(root: body)) { @@ -127,7 +126,7 @@ fn branch_infer_arm_mismatch_red_holds() -> Bool { } } -fn branch_infer_cond_not_bool_red_holds() -> Bool { +test fn branch_infer_cond_not_bool_red_holds() -> Bool { match branch_infer_cond_not_bool_body_node() { Accepted { value: body, diagnostics: _ } => match branch_infer_run(tree: branch_infer_resolved_tree(root: body)) { @@ -138,12 +137,6 @@ fn branch_infer_cond_not_bool_red_holds() -> Bool { } } -test fn branch_infer_keystone_holds() -> Bool { - branch_infer_bool_cond_accepts_holds() - && branch_infer_arm_mismatch_red_holds() - && branch_infer_cond_not_bool_red_holds() -} - fn branch_infer_constraint_satisfaction_grounding_rejected() -> CanonicalGrounding { CanonicalGrounding { node: branch_infer_atom(s: ^branch_infer_constraint_satisfaction_node), diff --git a/src/v2/test/claim/manual/branch_lazy_arm_eval_acceptance_test.dag b/src/v2/test/claim/manual/branch_lazy_arm_eval_acceptance_test.dag index 5c5a4773a99..047330c0b97 100644 --- a/src/v2/test/claim/manual/branch_lazy_arm_eval_acceptance_test.dag +++ b/src/v2/test/claim/manual/branch_lazy_arm_eval_acceptance_test.dag @@ -554,7 +554,7 @@ fn lazy_arm_run_passes(run: Outcome>) -> Bool { } } -fn lazy_arm_true_then_counted_else_divergent_holds() -> Bool { +test fn lazy_arm_true_then_counted_else_divergent_holds() -> Bool { lazy_arm_run_passes( run: lazy_arm_run_branch( body: lazy_arm_branch_body( @@ -567,7 +567,7 @@ fn lazy_arm_true_then_counted_else_divergent_holds() -> Bool { ) } -fn lazy_arm_false_then_divergent_else_counted_holds() -> Bool { +test fn lazy_arm_false_then_divergent_else_counted_holds() -> Bool { lazy_arm_run_passes( run: lazy_arm_run_branch( body: lazy_arm_branch_body( @@ -580,7 +580,7 @@ fn lazy_arm_false_then_divergent_else_counted_holds() -> Bool { ) } -fn lazy_arm_counted_literal_rejects_second_touch_holds() -> Bool { +test fn lazy_arm_counted_literal_rejects_second_touch_holds() -> Bool { let env = empty_evaluation_environment() match lazy_arm_allocate_literal(node: lazy_arm_counted(), env: env) { Accepted { value: v, diagnostics: _ } => @@ -596,8 +596,3 @@ fn lazy_arm_counted_literal_rejects_second_touch_holds() -> Bool { } } -test fn lazy_arm_eval_acceptance_keystone_holds() -> Bool { - lazy_arm_true_then_counted_else_divergent_holds() - && lazy_arm_false_then_divergent_else_counted_holds() - && lazy_arm_counted_literal_rejects_second_touch_holds() -} diff --git a/src/v2/test/claim/manual/c_add_emit_translate_test.dag b/src/v2/test/claim/manual/c_add_emit_translate_test.dag index caba12c029d..1fdc73781b8 100644 --- a/src/v2/test/claim/manual/c_add_emit_translate_test.dag +++ b/src/v2/test/claim/manual/c_add_emit_translate_test.dag @@ -200,9 +200,3 @@ test fn c_add_emit_wrong_node_refuses_holds() -> Bool { } } -test fn c_add_emit_translate_keystone_holds() -> Bool { - c_add_emit_add_fn_accepts_holds() - && c_add_serialize_source_matches_authority_holds() - && c_add_serialize_rejects_missing_translation_rules_holds() - && c_add_emit_wrong_node_refuses_holds() -} diff --git a/src/v2/test/claim/manual/coproduct_reflection_conformance_test.dag b/src/v2/test/claim/manual/coproduct_reflection_conformance_test.dag index 9b78ca87bb5..49447739f05 100644 --- a/src/v2/test/claim/manual/coproduct_reflection_conformance_test.dag +++ b/src/v2/test/claim/manual/coproduct_reflection_conformance_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.coproduct_reflection_conformance - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data reflect_connective_type: Symbol = ^Connective @@ -62,8 +61,3 @@ test fn witness_connective_nullary_inhabitants_fail_closed() -> Bool { } } -test fn coproduct_reflection_conformance_holds() -> Bool { - witness_connective_behavior_arm_sets_are_distinct() - && witness_behavior_nullary_inhabitant_set_matches_arm_keys() - && witness_connective_nullary_inhabitants_fail_closed() -} diff --git a/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag b/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag index 66dd14a7ecb..204b16eff5d 100644 --- a/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag +++ b/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag @@ -160,20 +160,6 @@ fn cross_language_compile_on_real_tree_holds(parse_tree: ParseTree) -> Bool { } } -fn cross_language_chain_discriminates_on_real_tree() -> Bool { - match python_grammar_parse_fixture() { - Accepted { value: python_parse_tree, diagnostics: _ } => - match parse_tree_to_emitted_node( - parse_tree: python_parse_tree, - source_model: ts_target_model() - ) { - Accepted { value: _, diagnostics: _ } => false - Rejected { diagnostics: _ } => true - } - Rejected { diagnostics: _ } => false - } -} - type CrossLanguageEmitCellStatus = ChainProven | ChainFailsClosedAtCheck { check: Symbol } diff --git a/src/v2/test/claim/manual/field_access_emit_test.dag b/src/v2/test/claim/manual/field_access_emit_test.dag index ada395e578a..80756045487 100644 --- a/src/v2/test/claim/manual/field_access_emit_test.dag +++ b/src/v2/test/claim/manual/field_access_emit_test.dag @@ -146,7 +146,7 @@ data field_access_inferred_tree: InferredTree = InferredTree { facts: Map { lookup: field_access_facts_lookup } } -fn field_access_emit_holds() -> Bool { +test fn field_access_emit_holds() -> Bool { match target_serialize_source_from_model( target: field_access_target_model, emitted: field_access_emitted_root @@ -161,7 +161,7 @@ fn field_access_emit_holds() -> Bool { } } -fn field_access_grammar_inverse_holds() -> Bool { +test fn field_access_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: field_access_target_model, emitted: field_access_emitted_root @@ -179,7 +179,7 @@ fn field_access_coercion_quality_is_faithful(q: CoercionQuality) -> Bool { } } -fn field_access_ingest_via_coerce_matches_canonical() -> Bool { +test fn field_access_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: field_access_emitted_root, tree: field_access_inferred_tree, @@ -205,8 +205,3 @@ test fn field_access_ingest_via_coerce_holds_keystone() -> Bool { field_access_ingest_via_coerce_matches_canonical() } -test fn field_access_emit_keystone_holds() -> Bool { - field_access_emit_holds() - && field_access_grammar_inverse_holds() - && field_access_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/manual/find_witness_distinct_node_zip_fold_test.dag b/src/v2/test/claim/manual/find_witness_distinct_node_zip_fold_test.dag index 6a650fc276a..e14d968ef0d 100644 --- a/src/v2/test/claim/manual/find_witness_distinct_node_zip_fold_test.dag +++ b/src/v2/test/claim/manual/find_witness_distinct_node_zip_fold_test.dag @@ -182,7 +182,7 @@ fn distinct_nested_candidate_set() -> CandidateSet { closedness: distinct_closedness() } } -fn distinct_valid_witness() -> StructuralPropertyWitness { +test fn distinct_valid_witness() -> StructuralPropertyWitness { StructuralPropertyWitness { property: ^preservation_rule_exact_structural_equality_zip_fold, evidence: distinct_target_add_node() diff --git a/src/v2/test/claim/manual/find_witness_identity_test.dag b/src/v2/test/claim/manual/find_witness_identity_test.dag index 08b18cde32f..3d9aa9d50e1 100644 --- a/src/v2/test/claim/manual/find_witness_identity_test.dag +++ b/src/v2/test/claim/manual/find_witness_identity_test.dag @@ -116,7 +116,7 @@ fn mismatched_property_witness() -> StructuralPropertyWitness { evidence: identity_source_node() } } -fn mismatched_evidence_witness() -> StructuralPropertyWitness { +test fn mismatched_evidence_witness() -> StructuralPropertyWitness { StructuralPropertyWitness { property: ^preservation_rule_exact_structural_equality_zip_fold, evidence: identity_other_node() diff --git a/src/v2/test/claim/manual/floor_drain_retention_test.dag b/src/v2/test/claim/manual/floor_drain_retention_test.dag index 1a5df112632..30a89576c4f 100644 --- a/src/v2/test/claim/manual/floor_drain_retention_test.dag +++ b/src/v2/test/claim/manual/floor_drain_retention_test.dag @@ -1,18 +1,17 @@ module v2.test.manual.floor_drain_retention - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data floor_drain_retention_note: String = "Width=1 floor drain reuses one in-process typed_module_cache across entry groups (term-3 retention axis). The catalog row cites Never eviction at the mechanism layer; the interim host-budget entry cap in cli_run.rs is the counted runtime backstop until cross-entry-typed-module-memo (PR-beta) lands SpacePacked eviction on the ladder." -fn witness_typed_module_cache_is_in_process_with_never_mechanism() -> Bool { +test fn witness_typed_module_cache_is_in_process_with_never_mechanism() -> Bool { let row = cache_interface_facts_from_catalog(row: typed_module_cache_facts) (row.locality == InProcess) && (typed_module_cache_facts.placement.eviction == Never) && (catalog_key_derivation_classification(kd: typed_module_cache_facts.key_derivation) == NativeInternalHash) } -fn witness_typed_module_cache_projects_scope_exit_not_refused() -> Bool { +test fn witness_typed_module_cache_projects_scope_exit_not_refused() -> Bool { let projection = provider_from_catalog( facts: typed_module_cache_facts, scope: empty_frame_path, @@ -29,7 +28,3 @@ fn witness_typed_module_cache_projects_scope_exit_not_refused() -> Bool { } } -test fn floor_drain_retention_catalog_witnesses() -> Bool { - witness_typed_module_cache_is_in_process_with_never_mechanism() - && witness_typed_module_cache_projects_scope_exit_not_refused() -} diff --git a/src/v2/test/claim/manual/fold_call_closure_emit_test.dag b/src/v2/test/claim/manual/fold_call_closure_emit_test.dag index 0b0a36046da..126f97eb944 100644 --- a/src/v2/test/claim/manual/fold_call_closure_emit_test.dag +++ b/src/v2/test/claim/manual/fold_call_closure_emit_test.dag @@ -255,18 +255,18 @@ fn fold_call_emit_matches(arrow: Node, expected: List) -> B } } -fn fold_call_fixtures_well_formed() -> Bool { +test fn fold_call_fixtures_well_formed() -> Bool { well_formed(n: fold_call_canonical_arrow()) && well_formed(n: fold_call_swapped_arrow()) } -fn fold_call_emit_holds() -> Bool { +test fn fold_call_emit_holds() -> Bool { fold_call_emit_matches( arrow: fold_call_canonical_arrow(), expected: fold_call_expected_canonical_tokens() ) } -fn fold_call_swap_discriminates() -> Bool { +test fn fold_call_swap_discriminates() -> Bool { !fold_call_emit_matches( arrow: fold_call_swapped_arrow(), expected: fold_call_expected_canonical_tokens() @@ -282,8 +282,3 @@ fn fold_call_swap_discriminates() -> Bool { } } -test fn fold_call_closure_emit_keystone_holds() -> Bool { - fold_call_fixtures_well_formed() - && fold_call_emit_holds() - && fold_call_swap_discriminates() -} diff --git a/src/v2/test/claim/manual/ingest_bridge_test.dag b/src/v2/test/claim/manual/ingest_bridge_test.dag index 62180c4ceb3..c21a134851e 100644 --- a/src/v2/test/claim/manual/ingest_bridge_test.dag +++ b/src/v2/test/claim/manual/ingest_bridge_test.dag @@ -172,7 +172,7 @@ fn ingest_fixture_model_ambiguous(emitted: Node, spine_class: Symbol) -> TargetM ingest_fixture_model_from_bundle(bundle: ingest_fixture_bundle_with_rules(rules: rules)) } -fn ingest_recovers_emitted_holds() -> Bool { +test fn ingest_recovers_emitted_holds() -> Bool { match ingest_parse() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_emitted_node( @@ -187,7 +187,7 @@ fn ingest_recovers_emitted_holds() -> Bool { } } -fn ingest_bridge_to_canonical_holds() -> Bool { +test fn ingest_bridge_to_canonical_holds() -> Bool { match ingest_parse() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_target_model_bridge( @@ -202,7 +202,7 @@ fn ingest_bridge_to_canonical_holds() -> Bool { } } -fn ingest_fails_closed_off_frontier_holds() -> Bool { +test fn ingest_fails_closed_off_frontier_holds() -> Bool { match ingest_parse() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_emitted_node( @@ -216,7 +216,7 @@ fn ingest_fails_closed_off_frontier_holds() -> Bool { } } -fn ingest_fails_closed_ambiguous_holds() -> Bool { +test fn ingest_fails_closed_ambiguous_holds() -> Bool { match ingest_parse() { Accepted { value: tree, diagnostics: _ } => match parse_tree_to_emitted_node( @@ -238,7 +238,7 @@ fn ingest_unstamped_node() -> Node { } } -fn ingest_fails_closed_on_unstamped_holds() -> Bool { +test fn ingest_fails_closed_on_unstamped_holds() -> Bool { match parse_tree_to_emitted_node( parse_tree: ingest_unstamped_node(), source_model: ingest_fixture_model(emitted: dag_fixture_emitted_add_fn, spine_class: ^ingest_fixture_tok) @@ -248,7 +248,7 @@ fn ingest_fails_closed_on_unstamped_holds() -> Bool { } } -fn ingest_cross_language_compile_holds() -> Bool { +test fn ingest_cross_language_compile_holds() -> Bool { match ingest_parse() { Accepted { value: tree, diagnostics: _ } => match cross_language_compile( @@ -264,15 +264,6 @@ fn ingest_cross_language_compile_holds() -> Bool { } } -test fn ingest_bridge_realized() -> Bool { - ingest_recovers_emitted_holds() - && ingest_bridge_to_canonical_holds() - && ingest_fails_closed_off_frontier_holds() - && ingest_fails_closed_ambiguous_holds() - && ingest_fails_closed_on_unstamped_holds() - && ingest_cross_language_compile_holds() -} - fn ingest_bridge_realized_input(ok: Bool) -> Symbol { if ok { ^ingest_bridge_realized } else { ^ingest_bridge_not_realized } } diff --git a/src/v2/test/claim/manual/inhabitant_neutralization_test.dag b/src/v2/test/claim/manual/inhabitant_neutralization_test.dag index 00d268d5575..e97fdbefdaf 100644 --- a/src/v2/test/claim/manual/inhabitant_neutralization_test.dag +++ b/src/v2/test/claim/manual/inhabitant_neutralization_test.dag @@ -63,7 +63,7 @@ fn inhabitant_neutralization_ts_target_lookup_holds() -> Bool { } } -fn inhabitant_neutralization_go_int64_std_projection_holds() -> Bool { +test fn inhabitant_neutralization_go_int64_std_projection_holds() -> Bool { match inhabitant_std_projection_symbol( inhabitant: go_int64_additive_numeric_inhabitant_node() ) { @@ -72,7 +72,7 @@ fn inhabitant_neutralization_go_int64_std_projection_holds() -> Bool { } } -fn inhabitant_neutralization_go_int_additive_numeric_std_projection_holds() -> Bool { +test fn inhabitant_neutralization_go_int_additive_numeric_std_projection_holds() -> Bool { match inhabitant_std_projection_symbol( inhabitant: go_int_additive_numeric_inhabitant_node() ) { @@ -81,7 +81,7 @@ fn inhabitant_neutralization_go_int_additive_numeric_std_projection_holds() -> B } } -fn inhabitant_neutralization_go_int_additive_numeric_target_lookup_holds() -> Bool { +test fn inhabitant_neutralization_go_int_additive_numeric_target_lookup_holds() -> Bool { match target_inhabitant_for_std_projection( std_projection: ^std_projection_additive_numeric, target: go_target_model() @@ -91,7 +91,7 @@ fn inhabitant_neutralization_go_int_additive_numeric_target_lookup_holds() -> Bo } } -fn inhabitant_neutralization_go_additive_numeric_lookup_tiebreak_selects_platform_int_holds() -> Bool { +test fn inhabitant_neutralization_go_additive_numeric_lookup_tiebreak_selects_platform_int_holds() -> Bool { match target_inhabitant_for_std_projection( std_projection: ^std_projection_additive_numeric, target: go_target_model() @@ -134,7 +134,7 @@ test fn inhabitant_neutralization_go_unqualified_std_projection_lookup_rejects_h } } -fn inhabitant_neutralization_go_int64_to_ts_emit_holds() -> Bool { +test fn inhabitant_neutralization_go_int64_to_ts_emit_holds() -> Bool { match neutralize_core_for_target( core: go_int64_falsifier_emitted_add_fn_node(), target: ts_target_model() @@ -152,7 +152,7 @@ fn inhabitant_neutralization_go_int64_to_ts_emit_holds() -> Bool { } } -fn inhabitant_neutralization_neutralize_python_to_go_holds() -> Bool { +test fn inhabitant_neutralization_neutralize_python_to_go_holds() -> Bool { match neutralize_core_for_target( core: python_emitted_add_fn_node(), target: go_target_model() @@ -162,15 +162,6 @@ fn inhabitant_neutralization_neutralize_python_to_go_holds() -> Bool { } } -test fn inhabitant_neutralization_third_inhabitant_falsifier_holds() -> Bool { - inhabitant_neutralization_go_int64_std_projection_holds() - && inhabitant_neutralization_go_int_additive_numeric_std_projection_holds() - && inhabitant_neutralization_go_int_additive_numeric_target_lookup_holds() - && inhabitant_neutralization_go_additive_numeric_lookup_tiebreak_selects_platform_int_holds() - && inhabitant_neutralization_neutralize_python_to_go_holds() - && inhabitant_neutralization_go_int64_to_ts_emit_holds() -} - test fn inhabitant_neutralization_emit_after_neutralize_holds() -> Bool { match neutralize_core_for_target( core: python_emitted_add_fn_node(), @@ -189,7 +180,7 @@ test fn inhabitant_neutralization_emit_after_neutralize_holds() -> Bool { } } -fn inhabitant_neutralization_raw_emit_still_fails_closed() -> Bool { +test fn inhabitant_neutralization_raw_emit_still_fails_closed() -> Bool { match infer(tree: python_emitted_add_fn_node()) { Accepted { value: inferred, diagnostics: _ } => match emit(tree: inferred, target: ts_target_model()) { @@ -200,11 +191,11 @@ fn inhabitant_neutralization_raw_emit_still_fails_closed() -> Bool { } } -fn inhabitant_neutralization_same_language_cross_language_compile_unchanged_holds() -> Bool { +test fn inhabitant_neutralization_same_language_cross_language_compile_unchanged_holds() -> Bool { ingest_cross_language_compile_holds() } -fn inhabitant_neutralization_same_flavor_python_emit_holds() -> Bool { +test fn inhabitant_neutralization_same_flavor_python_emit_holds() -> Bool { match neutralize_core_for_target( core: python_emitted_add_fn_node(), target: python_target_model() @@ -222,13 +213,7 @@ fn inhabitant_neutralization_same_flavor_python_emit_holds() -> Bool { } } -test fn inhabitant_neutralization_03_ingest_regression_guard_holds() -> Bool { - inhabitant_neutralization_same_language_cross_language_compile_unchanged_holds() - && inhabitant_neutralization_same_flavor_python_emit_holds() - && inhabitant_neutralization_raw_emit_still_fails_closed() -} - -fn inhabitant_neutralization_python_to_ts_cross_language_compile_e2e_holds() -> Bool { +test fn inhabitant_neutralization_python_to_ts_cross_language_compile_e2e_holds() -> Bool { match python_grammar_parse_fixture() { Accepted { value: python_parse_tree, diagnostics: _ } => match cross_language_compile( @@ -243,7 +228,7 @@ fn inhabitant_neutralization_python_to_ts_cross_language_compile_e2e_holds() -> } } -fn inhabitant_neutralization_python_to_go_cross_language_compile_e2e_holds() -> Bool { +test fn inhabitant_neutralization_python_to_go_cross_language_compile_e2e_holds() -> Bool { match python_grammar_parse_fixture() { Accepted { value: python_parse_tree, diagnostics: _ } => match cross_language_compile( @@ -258,7 +243,7 @@ fn inhabitant_neutralization_python_to_go_cross_language_compile_e2e_holds() -> } } -fn inhabitant_neutralization_python_to_go_discriminates_on_real_tree() -> Bool { +test fn inhabitant_neutralization_python_to_go_discriminates_on_real_tree() -> Bool { match python_grammar_parse_fixture() { Accepted { value: python_parse_tree, diagnostics: _ } => match cross_language_compile( @@ -273,47 +258,6 @@ fn inhabitant_neutralization_python_to_go_discriminates_on_real_tree() -> Bool { } } -fn inhabitant_neutralization_python_to_go_holds() -> Bool { - inhabitant_neutralization_python_to_go_cross_language_compile_e2e_holds() - && inhabitant_neutralization_python_to_go_discriminates_on_real_tree() -} - -fn inhabitant_neutralization_python_to_go_translate_rejects() -> Bool { - match neutralize_core_for_target( - core: python_emitted_add_fn_node(), - target: go_target_model() - ) { - Accepted { value: neutralized, diagnostics: _ } => - match infer(tree: neutralized) { - Accepted { value: inferred, diagnostics: _ } => - match translate(tree: inferred, target: go_target_model()) { - Rejected { diagnostics: _ } => true - Accepted { value: _, diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn inhabitant_neutralization_python_to_go_emit_rejects() -> Bool { - match neutralize_core_for_target( - core: python_emitted_add_fn_node(), - target: go_target_model() - ) { - Accepted { value: neutralized, diagnostics: _ } => - match infer(tree: neutralized) { - Accepted { value: inferred, diagnostics: _ } => - match emit(tree: inferred, target: go_target_model()) { - Rejected { diagnostics: _ } => true - Accepted { value: _, diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - data claim_inhabitant_neutralization_module_compiles: TestClaim = CompilesClaim { label: "manual/inhabitant_neutralization: module compiles", anchor: manual_claim_anchor(anchor: ManualAnchorAbsent), diff --git a/src/v2/test/claim/manual/loop_demand_driven_eval_test.dag b/src/v2/test/claim/manual/loop_demand_driven_eval_test.dag index 07c342a5313..274b712f0f6 100644 --- a/src/v2/test/claim/manual/loop_demand_driven_eval_test.dag +++ b/src/v2/test/claim/manual/loop_demand_driven_eval_test.dag @@ -369,7 +369,7 @@ fn loop_eval_divergent_body_step_loop_holds() -> Bool { ) } -fn loop_eval_lit_one_body_step_loop_holds() -> Bool { +test fn loop_eval_lit_one_body_step_loop_holds() -> Bool { loop_eval_run_passes( run: loop_eval_run( body: loop_eval_loop_node(body: loop_eval_lit_one()), @@ -382,7 +382,7 @@ fn loop_eval_runtime_value_eq(a: RuntimeValue, b: RuntimeValue) -> Bool { a == b } -fn loop_eval_pick_call_direct_holds() -> Bool { +test fn loop_eval_pick_call_direct_holds() -> Bool { let arrow = loop_eval_arrow_with_body( body: loop_eval_loop_node(body: loop_eval_lit_one()) ) @@ -408,7 +408,7 @@ fn loop_eval_pick_call_direct_holds() -> Bool { } } -fn loop_eval_arrow_lit_one_body_holds() -> Bool { +test fn loop_eval_arrow_lit_one_body_holds() -> Bool { loop_eval_run_passes( run: loop_eval_run(body: loop_eval_lit_one(), expected: loop_eval_lit_one()) ) diff --git a/src/v2/test/claim/manual/loop_emit_test.dag b/src/v2/test/claim/manual/loop_emit_test.dag index 586a8beca8f..7259384688c 100644 --- a/src/v2/test/claim/manual/loop_emit_test.dag +++ b/src/v2/test/claim/manual/loop_emit_test.dag @@ -103,7 +103,7 @@ fn loop_emit_wrong_value_from_producer(target: TargetModel) -> Outcome Bool { +test fn loop_emit_holds() -> Bool { match target_serialize_source_from_model( target: dag_loop_target_model(), emitted: dag_fixture_emitted_loop_fn @@ -118,7 +118,7 @@ fn loop_emit_holds() -> Bool { } } -fn loop_emit_wrong_value_discriminates() -> Bool { +test fn loop_emit_wrong_value_discriminates() -> Bool { match loop_emit_from_producer(target: dag_loop_target_model()) { Accepted { value: canonical, diagnostics: dc } => match loop_emit_wrong_value_from_producer(target: dag_loop_target_model()) { @@ -130,35 +130,3 @@ fn loop_emit_wrong_value_discriminates() -> Bool { } } -test fn loop_emit_keystone_holds() -> Bool { - loop_emit_holds() && loop_emit_wrong_value_discriminates() -} - -fn loop_emit_post_translate_root() -> Outcome { - bind_outcome( - o: loop_emit_producer_tree(), - f: fn(tree) { - translate_emitted_node(tree: tree, target: dag_loop_target_model()) - } - ) -} - -fn loop_emit_diag_loop_gate_on_post_translate_body() -> Bool { - match loop_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - target_value_expr_loop_gate(node: body) && (d == None) && (bd == None) - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn loop_emit_diag_emit_eq_authority_text() -> Bool { - match loop_emit_from_producer(target: dag_loop_target_model()) { - Accepted { value: emitted, diagnostics: d } => - (emitted.carried == dag_loop_source_text) && (d == None) - Rejected { diagnostics: _ } => false - } -} diff --git a/src/v2/test/claim/manual/map_lookup_miss_witness_violates_test.dag b/src/v2/test/claim/manual/map_lookup_miss_witness_violates_test.dag index edcf14b8af9..95d18763e97 100644 --- a/src/v2/test/claim/manual/map_lookup_miss_witness_violates_test.dag +++ b/src/v2/test/claim/manual/map_lookup_miss_witness_violates_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.map_lookup_miss_witness_violates - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly type LookupKey { id: Int @@ -16,20 +15,17 @@ fn one_entry_table() -> LookupTable { map_insert(m: empty_map(), key: LookupKey { id: 1 }, value: 100) } -fn map_miss_is_absent() -> Bool { +test fn map_miss_is_absent() -> Bool { match lookup_table(table: one_entry_table(), key: LookupKey { id: 2 }) { Present { value: _ } => false Absent => true } } -fn map_hit_is_present() -> Bool { +test fn map_hit_is_present() -> Bool { match lookup_table(table: one_entry_table(), key: LookupKey { id: 1 }) { Present { value: v } => v == 100 Absent => false } } -test fn map_lookup_miss_absent_and_hit_present() -> Bool { - map_miss_is_absent() && map_hit_is_present() -} diff --git a/src/v2/test/claim/manual/map_structural_key_equality_test.dag b/src/v2/test/claim/manual/map_structural_key_equality_test.dag index 613ad017485..8816c49f9c5 100644 --- a/src/v2/test/claim/manual/map_structural_key_equality_test.dag +++ b/src/v2/test/claim/manual/map_structural_key_equality_test.dag @@ -1,7 +1,5 @@ module v2.test.manual.map_structural_key_equality - - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly type SKey { a: Int @@ -14,26 +12,20 @@ fn one_entry(a: Int, b: Int, v: Int) -> SKeyMap { map_insert(m: empty_map(), key: SKey { a: a, b: b }, value: v) } -fn struct_key_equal_eq() -> Bool { +test fn struct_key_equal_eq() -> Bool { one_entry(a: 1, b: 2, v: 7) == one_entry(a: 1, b: 2, v: 7) } -fn struct_key_distinct_neq() -> Bool { +test fn struct_key_distinct_neq() -> Bool { (one_entry(a: 1, b: 2, v: 7) == one_entry(a: 1, b: 9, v: 7)) == false } -fn struct_key_value_neq() -> Bool { +test fn struct_key_value_neq() -> Bool { (one_entry(a: 1, b: 2, v: 7) == one_entry(a: 1, b: 2, v: 8)) == false } -fn struct_key_shadow_latest_eq() -> Bool { +test fn struct_key_shadow_latest_eq() -> Bool { let shadowed = map_insert(m: one_entry(a: 1, b: 2, v: 7), key: SKey { a: 1, b: 2 }, value: 9) shadowed == one_entry(a: 1, b: 2, v: 9) } -test fn map_structural_key_equality_holds() -> Bool { - struct_key_equal_eq() - && struct_key_distinct_neq() - && struct_key_value_neq() - && struct_key_shadow_latest_eq() -} diff --git a/src/v2/test/claim/manual/match_bool_emit_test.dag b/src/v2/test/claim/manual/match_bool_emit_test.dag index 98703bc00a5..c6b7ac6ec33 100644 --- a/src/v2/test/claim/manual/match_bool_emit_test.dag +++ b/src/v2/test/claim/manual/match_bool_emit_test.dag @@ -112,7 +112,7 @@ fn match_bool_emit_swapped_from_producer(target: TargetModel) -> Outcome Bool { +test fn match_bool_emit_holds() -> Bool { match target_serialize_source_from_model( target: dag_match_target_model(), emitted: dag_fixture_emitted_match_fn @@ -127,7 +127,7 @@ fn match_bool_emit_holds() -> Bool { } } -fn match_bool_emit_swapped_arms_discriminates() -> Bool { +test fn match_bool_emit_swapped_arms_discriminates() -> Bool { match match_bool_emit_from_producer(target: dag_match_target_model()) { Accepted { value: canonical, diagnostics: dc } => match match_bool_emit_swapped_from_producer(target: dag_match_target_model()) { @@ -139,51 +139,3 @@ fn match_bool_emit_swapped_arms_discriminates() -> Bool { } } -test fn match_bool_emit_keystone_holds() -> Bool { - match_bool_emit_holds() && match_bool_emit_swapped_arms_discriminates() -} - -fn match_bool_emit_post_translate_root() -> Outcome { - bind_outcome( - o: match_bool_emit_producer_tree(), - f: fn(tree) { - translate_emitted_node(tree: tree, target: dag_match_target_model()) - } - ) -} - -fn match_bool_emit_diag_match_gate_on_post_translate_body() -> Bool { - match match_bool_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - target_value_expr_match_gate(node: body) && (d == None) && (bd == None) - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn match_bool_emit_diag_scrut_bare_kw_true_on_post_translate() -> Bool { - match match_bool_emit_post_translate_root() { - Accepted { value: translated, diagnostics: d } => - match find_arrow_body_child(root: translated) { - Accepted { value: body, diagnostics: bd } => - match list_at_optional(xs: node_positional_child_targets(node: body), index: 0) { - Present { value: scrut } => - dag_node_is_kw_true_atom(node: scrut) && (d == None) && (bd == None) - Absent => false - } - Rejected { diagnostics: _ } => false - } - Rejected { diagnostics: _ } => false - } -} - -fn match_bool_emit_diag_emit_eq_authority_text() -> Bool { - match match_bool_emit_from_producer(target: dag_match_target_model()) { - Accepted { value: emitted, diagnostics: d } => - (emitted.carried == dag_match_source_text) && (d == None) - Rejected { diagnostics: _ } => false - } -} diff --git a/src/v2/test/claim/manual/match_infer_fail_open_audit_test.dag b/src/v2/test/claim/manual/match_infer_fail_open_audit_test.dag index 29793a710af..e070969282a 100644 --- a/src/v2/test/claim/manual/match_infer_fail_open_audit_test.dag +++ b/src/v2/test/claim/manual/match_infer_fail_open_audit_test.dag @@ -153,7 +153,7 @@ test fn match_infer_fail_open_audit_extra_arm_rejects_holds() -> Bool { } } -fn match_infer_fail_open_audit_literal_arm_accepts_holds() -> Bool { +test fn match_infer_fail_open_audit_literal_arm_accepts_holds() -> Bool { match infer(tree: dag_match_if_body_fixture) { Accepted { value: _, diagnostics: d } => d == None Rejected { diagnostics: _ } => false diff --git a/src/v2/test/claim/manual/medium_node_instantiation_test.dag b/src/v2/test/claim/manual/medium_node_instantiation_test.dag index 5019d307b97..3e1d6fd51e4 100644 --- a/src/v2/test/claim/manual/medium_node_instantiation_test.dag +++ b/src/v2/test/claim/manual/medium_node_instantiation_test.dag @@ -1,32 +1,26 @@ module v2.test.manual.medium_node_instantiation - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn medium_node_lossless() -> Medium { Medium { carried: v2_eval_bool_literal_pin, fidelity: Lossless } } -fn medium_node_carried_is_expected() -> Bool { +test fn medium_node_carried_is_expected() -> Bool { medium_node_lossless().carried == v2_eval_bool_literal_pin } -fn medium_node_fidelity_is_lossless() -> Bool { +test fn medium_node_fidelity_is_lossless() -> Bool { match medium_node_lossless().fidelity { Lossless => true Lossy => false } } -fn medium_node_lossy_tag_not_lossless() -> Bool { +test fn medium_node_lossy_tag_not_lossless() -> Bool { match (Medium { carried: v2_eval_bool_literal_pin, fidelity: Lossy }).fidelity { Lossless => false Lossy => true } } -test fn medium_node_instantiation_holds() -> Bool { - medium_node_carried_is_expected() - && medium_node_fidelity_is_lossless() - && medium_node_lossy_tag_not_lossless() -} diff --git a/src/v2/test/claim/manual/medium_source_serializer_determinism_fidelity_test.dag b/src/v2/test/claim/manual/medium_source_serializer_determinism_fidelity_test.dag index a23214a2f93..3d2907825fa 100644 --- a/src/v2/test/claim/manual/medium_source_serializer_determinism_fidelity_test.dag +++ b/src/v2/test/claim/manual/medium_source_serializer_determinism_fidelity_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.medium_source_serializer_determinism_fidelity - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data serializer_determinism_probe_text: String = "fn add(x:Int, y:Int) -> Int { x + y }" @@ -13,7 +12,7 @@ fn serializer_determinism_lossy_probe() -> Medium { Medium { carried: serializer_determinism_probe_text, fidelity: Lossy } } -fn serializer_determinism_holds_despite_fidelity_mismatch() -> Bool { +test fn serializer_determinism_holds_despite_fidelity_mismatch() -> Bool { match deterministic_dag_source_serializer_witness( first: serializer_determinism_lossless_probe(), second: serializer_determinism_lossy_probe() @@ -25,7 +24,7 @@ fn serializer_determinism_holds_despite_fidelity_mismatch() -> Bool { } } -fn red_naive_medium_equality_rejects_fidelity_mismatch() -> Bool { +test fn red_naive_medium_equality_rejects_fidelity_mismatch() -> Bool { medium_section_equal( left: serializer_determinism_lossless_probe(), right: serializer_determinism_lossy_probe() @@ -33,7 +32,3 @@ fn red_naive_medium_equality_rejects_fidelity_mismatch() -> Bool { && serializer_determinism_lossless_probe() != serializer_determinism_lossy_probe() } -test fn medium_source_serializer_determinism_fidelity_holds() -> Bool { - serializer_determinism_holds_despite_fidelity_mismatch() - && red_naive_medium_equality_rejects_fidelity_mismatch() -} diff --git a/src/v2/test/claim/manual/medium_source_text_instantiation_test.dag b/src/v2/test/claim/manual/medium_source_text_instantiation_test.dag index efd6f0c3164..a805d1c7aa2 100644 --- a/src/v2/test/claim/manual/medium_source_text_instantiation_test.dag +++ b/src/v2/test/claim/manual/medium_source_text_instantiation_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.medium_source_text_instantiation - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data medium_source_fixture_text: String = "module medium.source\nfn add(x:Int, y:Int) -> Int { x + y }" @@ -22,27 +21,22 @@ fn medium_source_read_witness() -> DagSourceReadWitness { } } -fn medium_source_carried_matches_fixture() -> Bool { +test fn medium_source_carried_matches_fixture() -> Bool { let m = medium_source_lossless() m.carried == medium_source_fixture_text } -fn medium_source_fidelity_is_lossless() -> Bool { +test fn medium_source_fidelity_is_lossless() -> Bool { match medium_source_lossless().fidelity { Lossless => true Lossy => false } } -fn witness_source_field_is_medium() -> Bool { +test fn witness_source_field_is_medium() -> Bool { match medium_source_read_witness().source.fidelity { Lossless => medium_source_read_witness().source.carried == medium_source_fixture_text Lossy => false } } -test fn medium_source_text_instantiation_holds() -> Bool { - medium_source_carried_matches_fixture() - && medium_source_fidelity_is_lossless() - && witness_source_field_is_medium() -} diff --git a/src/v2/test/claim/manual/path_y_fidelity_successor_test.dag b/src/v2/test/claim/manual/path_y_fidelity_successor_test.dag index 6b197c782cb..b37e37c8c36 100644 --- a/src/v2/test/claim/manual/path_y_fidelity_successor_test.dag +++ b/src/v2/test/claim/manual/path_y_fidelity_successor_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.path_y_fidelity_successor - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn path_y_core_expr() -> Expression { @@ -77,7 +76,7 @@ fn bmc_lifecycle_inverse_is_lossy_section_not_iso_on_fidelity(fidelity: DecodeFi } } -fn bmc_credentials_rotated_perturb_decodes_lossless() -> Bool { +test fn bmc_credentials_rotated_perturb_decodes_lossless() -> Bool { match decode_fidelity_from_target( target: bmc_lifecycle_inverse_target_model_credentials_modeled_perturb() ) { @@ -90,7 +89,7 @@ fn bmc_credentials_rotated_perturb_decodes_lossless() -> Bool { } } -fn bmc_credentials_rotated_perturb_red_control_still_lossy() -> Bool { +test fn bmc_credentials_rotated_perturb_red_control_still_lossy() -> Bool { match decode_fidelity_from_target( target: bmc_lifecycle_inverse_target_model_credentials_modeled_perturb() ) { @@ -103,7 +102,7 @@ fn bmc_credentials_rotated_perturb_red_control_still_lossy() -> Bool { } } -fn bmc_credentials_rotated_perturb_flips_iso_section_red() -> Bool { +test fn bmc_credentials_rotated_perturb_flips_iso_section_red() -> Bool { match decode_fidelity_from_target( target: bmc_lifecycle_inverse_target_model_credentials_modeled_perturb() ) { @@ -113,12 +112,6 @@ fn bmc_credentials_rotated_perturb_flips_iso_section_red() -> Bool { } } -test fn path_y_bmc_quotient_teeth_perturb_credentials_rotated_flips_lossy() -> Bool { - bmc_credentials_rotated_perturb_decodes_lossless() - && !bmc_credentials_rotated_perturb_red_control_still_lossy() - && bmc_credentials_rotated_perturb_flips_iso_section_red() -} - test fn path_y_fidelity_successor_reads_target_model_quotient() -> Bool { bmc_target_quotient_decodes_lossy() && gha_target_quotient_decodes_lossless() diff --git a/src/v2/test/claim/manual/record_construct_emit_test.dag b/src/v2/test/claim/manual/record_construct_emit_test.dag index 2dc7159abf9..34566e63bca 100644 --- a/src/v2/test/claim/manual/record_construct_emit_test.dag +++ b/src/v2/test/claim/manual/record_construct_emit_test.dag @@ -144,7 +144,7 @@ data record_construct_inferred_tree: InferredTree = InferredTree { facts: Map { lookup: record_construct_facts_lookup } } -fn record_construct_emit_holds() -> Bool { +test fn record_construct_emit_holds() -> Bool { match target_serialize_source_from_model( target: record_construct_target_model, emitted: record_construct_emitted_root @@ -159,7 +159,7 @@ fn record_construct_emit_holds() -> Bool { } } -fn record_construct_grammar_inverse_holds() -> Bool { +test fn record_construct_grammar_inverse_holds() -> Bool { match grammar_inverse_source_validated( target: record_construct_target_model, emitted: record_construct_emitted_root @@ -177,7 +177,7 @@ fn record_construct_coercion_quality_is_faithful(q: CoercionQuality) -> Bool { } } -fn record_construct_ingest_via_coerce_matches_canonical() -> Bool { +test fn record_construct_ingest_via_coerce_matches_canonical() -> Bool { match coerce_grounded_node( source: record_construct_emitted_root, tree: record_construct_inferred_tree, @@ -203,8 +203,3 @@ test fn record_construct_ingest_via_coerce_holds_keystone() -> Bool { record_construct_ingest_via_coerce_matches_canonical() } -test fn record_construct_emit_keystone_holds() -> Bool { - record_construct_emit_holds() - && record_construct_grammar_inverse_holds() - && record_construct_ingest_via_coerce_matches_canonical() -} diff --git a/src/v2/test/claim/manual/runtime_run_test.dag b/src/v2/test/claim/manual/runtime_run_test.dag index bfd69b91e86..658a89729bf 100644 --- a/src/v2/test/claim/manual/runtime_run_test.dag +++ b/src/v2/test/claim/manual/runtime_run_test.dag @@ -204,7 +204,7 @@ fn runtime_run_context() -> EvalContext { ) } -fn runtime_run_step_appends_receipt_holds() -> Bool { +test fn runtime_run_step_appends_receipt_holds() -> Bool { let init = RuntimeRunState { log: runtime_run_log_empty(), scheduled: [] } let frontier = RunnableFrontier { ready: [runtime_run_node_a] } let state = runtime_run_step_from_frontier( @@ -216,7 +216,7 @@ fn runtime_run_step_appends_receipt_holds() -> Bool { length(xs: state.log.entries) == 1 && state.scheduled == [runtime_run_node_a] } -fn runtime_run_completes_both_nodes_holds() -> Bool { +test fn runtime_run_completes_both_nodes_holds() -> Bool { match runtime_run( nodes: runtime_run_nodes, dependencies: runtime_run_dependencies, @@ -229,7 +229,7 @@ fn runtime_run_completes_both_nodes_holds() -> Bool { } } -fn runtime_run_step_is_bounded_to_frontier_holds() -> Bool { +test fn runtime_run_step_is_bounded_to_frontier_holds() -> Bool { let init = RuntimeRunState { log: runtime_run_log_empty(), scheduled: [] } let frontier = RunnableFrontier { ready: [runtime_run_node_a] } let state = runtime_run_step_from_frontier( @@ -242,8 +242,3 @@ fn runtime_run_step_is_bounded_to_frontier_holds() -> Bool { state.scheduled == [runtime_run_node_a] && length(xs: state.log.entries) == 1 } -test fn runtime_run_claims_hold() -> Bool { - runtime_run_step_appends_receipt_holds() - && runtime_run_completes_both_nodes_holds() - && runtime_run_step_is_bounded_to_frontier_holds() -} diff --git a/src/v2/test/claim/manual/target_carriers_fidelity_test.dag b/src/v2/test/claim/manual/target_carriers_fidelity_test.dag index 226b10c5302..dce99dde5cd 100644 --- a/src/v2/test/claim/manual/target_carriers_fidelity_test.dag +++ b/src/v2/test/claim/manual/target_carriers_fidelity_test.dag @@ -1,11 +1,10 @@ module v2.test.manual.target_carriers_fidelity - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data target_carriers_probe_text: String = "fn add(x:Int, y:Int) -> Int { x + y }" -fn dag_target_advertises_declared_loss() -> Bool { +test fn dag_target_advertises_declared_loss() -> Bool { match decode_fidelity_from_target(target: dag_target_model()) { Accepted { value: fidelity, diagnostics: _ } => match fidelity { @@ -16,7 +15,7 @@ fn dag_target_advertises_declared_loss() -> Bool { } } -fn rust_target_advertises_lossless() -> Bool { +test fn rust_target_advertises_lossless() -> Bool { match decode_fidelity_from_target(target: rust_target_model()) { Accepted { value: fidelity, diagnostics: _ } => match fidelity { @@ -27,7 +26,7 @@ fn rust_target_advertises_lossless() -> Bool { } } -fn dag_emit_medium_matches_compose_up() -> Bool { +test fn dag_emit_medium_matches_compose_up() -> Bool { match target_source_medium( text: target_carriers_probe_text, target: dag_target_model() @@ -41,7 +40,7 @@ fn dag_emit_medium_matches_compose_up() -> Bool { } } -fn dag_serialize_source_advertises_declared_loss() -> Bool { +test fn dag_serialize_source_advertises_declared_loss() -> Bool { match target_serialize_source_from_model( target: dag_target_model(), emitted: dag_fixture_emitted_add_fn @@ -55,7 +54,7 @@ fn dag_serialize_source_advertises_declared_loss() -> Bool { } } -fn red_dag_emit_mis_tags_lossless() -> Bool { +test fn red_dag_emit_mis_tags_lossless() -> Bool { match target_serialize_source_from_model( target: dag_target_model(), emitted: dag_fixture_emitted_add_fn @@ -69,7 +68,7 @@ fn red_dag_emit_mis_tags_lossless() -> Bool { } } -fn perturbed_quotient_fidelity_is_lossless() -> Bool { +test fn perturbed_quotient_fidelity_is_lossless() -> Bool { match decode_fidelity_from_target( target: dag_target_model_lossless_fidelity_quotient() ) { @@ -82,7 +81,7 @@ fn perturbed_quotient_fidelity_is_lossless() -> Bool { } } -fn perturbed_quotient_fidelity_red_if_still_lossy() -> Bool { +test fn perturbed_quotient_fidelity_red_if_still_lossy() -> Bool { match decode_fidelity_from_target( target: dag_target_model_lossless_fidelity_quotient() ) { @@ -95,12 +94,3 @@ fn perturbed_quotient_fidelity_red_if_still_lossy() -> Bool { } } -test fn target_carriers_declared_loss_fidelity_holds() -> Bool { - dag_target_advertises_declared_loss() - && rust_target_advertises_lossless() - && dag_emit_medium_matches_compose_up() - && dag_serialize_source_advertises_declared_loss() - && !red_dag_emit_mis_tags_lossless() - && perturbed_quotient_fidelity_is_lossless() - && !perturbed_quotient_fidelity_red_if_still_lossy() -} diff --git a/src/v2/test/claim/manual/typescript_eager_materialize_dedup_cutover_test.dag b/src/v2/test/claim/manual/typescript_eager_materialize_dedup_cutover_test.dag index 941f2119acf..5a074d228e8 100644 --- a/src/v2/test/claim/manual/typescript_eager_materialize_dedup_cutover_test.dag +++ b/src/v2/test/claim/manual/typescript_eager_materialize_dedup_cutover_test.dag @@ -1,6 +1,5 @@ module v2.test.manual.typescript_eager_materialize_dedup_cutover - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn ts_arc1_eager_row_round_trip_holds() -> Bool { @@ -27,7 +26,7 @@ fn ts_arc1_pr3_eager_row_round_trip_holds() -> Bool { } } -fn ts_arc1_exemplar_derive_violates_holds() -> Bool { +test fn ts_arc1_exemplar_derive_violates_holds() -> Bool { match ts_exemplar_emitted_for_lhs(lhs: ^ts_production_fn_add) { Violates { diagnostic: d } => d.reason == ^grammar_relation_emitted_not_conj Holds { value: _ } => false @@ -65,7 +64,7 @@ fn ts_arc1_perturbed_row_derive_red_holds() -> Bool { } } -fn ts_arc1_scaffold_row_present_holds() -> Bool { +test fn ts_arc1_scaffold_row_present_holds() -> Bool { match find_named_child( root: ts_fn_add_scaffold_relation_row_node(), name: ^grammar_relation_field_emitted @@ -84,10 +83,6 @@ test fn ts_arc1_pr3_eager_row_content_hash_round_trip_holds() -> Bool { ts_arc1_pr3_eager_row_round_trip_holds() } -test fn ts_arc1_arrow_exemplar_keeps_scaffold_fallback_holds() -> Bool { - ts_arc1_exemplar_derive_violates_holds() && ts_arc1_scaffold_row_present_holds() -} - test fn ts_arc1_perturbed_eager_emitted_derive_red_holds() -> Bool { ts_arc1_perturbed_row_derive_red_holds() } diff --git a/src/v2/test/claim/module_resolution_plan_witness_test.dag b/src/v2/test/claim/module_resolution_plan_witness_test.dag index 05fa18a08c2..adfd74ea5ee 100644 --- a/src/v2/test/claim/module_resolution_plan_witness_test.dag +++ b/src/v2/test/claim/module_resolution_plan_witness_test.dag @@ -91,7 +91,7 @@ fn module_fixture_diamond_views() -> List { } } -fn witness_dangling_import_is_not_an_edge() -> Bool { +test fn witness_dangling_import_is_not_an_edge() -> Bool { let edges = module_import_edges( imports: module_fixture_diamond_imports, declarations: module_fixture_declarations @@ -99,7 +99,7 @@ fn witness_dangling_import_is_not_an_edge() -> Bool { length(xs: edges) == 4 } -fn witness_diamond_schedules_as_antichain_levels() -> Bool { +test fn witness_diamond_schedules_as_antichain_levels() -> Bool { match module_resolution_schedule( nodes: module_fixture_nodes, dependencies: module_fixture_diamond_views() @@ -129,7 +129,7 @@ data module_fixture_cycle_imports: List = [ ImportResolutionFact { path: "fixture/b.dag", import_module: "fixture.a", target_declared: true } ] -fn witness_cycle_refuses_never_partially_schedules() -> Bool { +test fn witness_cycle_refuses_never_partially_schedules() -> Bool { match module_dependency_views( edges: module_import_edges( imports: module_fixture_cycle_imports, @@ -155,7 +155,7 @@ data module_fixture_bindings_without_d: List = [ ModuleNodeBinding { module: "fixture.c", node: module_fixture_c_node } ] -fn witness_missing_binding_refuses_with_the_module_named() -> Bool { +test fn witness_missing_binding_refuses_with_the_module_named() -> Bool { match module_dependency_views( edges: module_import_edges( imports: module_fixture_diamond_imports, @@ -168,9 +168,3 @@ fn witness_missing_binding_refuses_with_the_module_named() -> Bool { } } -test fn module_resolution_plan_witnesses() -> Bool { - witness_dangling_import_is_not_an_edge() - && witness_diamond_schedules_as_antichain_levels() - && witness_cycle_refuses_never_partially_schedules() - && witness_missing_binding_refuses_with_the_module_named() -} diff --git a/src/v2/test/claim/name_resolve_cross_tree_resolution_test.dag b/src/v2/test/claim/name_resolve_cross_tree_resolution_test.dag index 89ebfaaff3d..949b3d97d1e 100644 --- a/src/v2/test/claim/name_resolve_cross_tree_resolution_test.dag +++ b/src/v2/test/claim/name_resolve_cross_tree_resolution_test.dag @@ -329,7 +329,7 @@ fn ct_dag_to_v2_index() -> SourceRootIndex { ) } -fn witness_dag_same_tree_import_resolves_holds() -> Bool { +test fn witness_dag_same_tree_import_resolves_holds() -> Bool { match resolve_with_admission_policy( lm: dag_language_model_surface_empty_prelude(), roots: ct_dag_same_tree_roots(), @@ -343,7 +343,7 @@ fn witness_dag_same_tree_import_resolves_holds() -> Bool { } } -fn witness_v2_same_tree_import_resolves_holds() -> Bool { +test fn witness_v2_same_tree_import_resolves_holds() -> Bool { match resolve_with_admission_policy( lm: dag_language_model_surface_empty_prelude(), roots: ct_v2_same_tree_roots(), @@ -357,7 +357,7 @@ fn witness_v2_same_tree_import_resolves_holds() -> Bool { } } -fn witness_cross_tree_v2_to_dag_grounded_resolves_holds() -> Bool { +test fn witness_cross_tree_v2_to_dag_grounded_resolves_holds() -> Bool { match resolve_with_admission_policy( lm: dag_language_model_surface_empty_prelude(), roots: ct_cross_tree_roots(), @@ -371,7 +371,7 @@ fn witness_cross_tree_v2_to_dag_grounded_resolves_holds() -> Bool { } } -fn witness_cross_tree_dag_to_v2_grounded_denied_holds() -> Bool { +test fn witness_cross_tree_dag_to_v2_grounded_denied_holds() -> Bool { match resolve_with_admission_policy( lm: dag_language_model_surface_empty_prelude(), roots: ct_dag_to_v2_roots(), @@ -390,9 +390,3 @@ fn witness_cross_tree_dag_to_v2_grounded_denied_holds() -> Bool { } } -test fn name_resolve_cross_tree_resolution_witnesses() -> Bool { - witness_dag_same_tree_import_resolves_holds() - && witness_v2_same_tree_import_resolves_holds() - && witness_cross_tree_v2_to_dag_grounded_resolves_holds() - && witness_cross_tree_dag_to_v2_grounded_denied_holds() -} diff --git a/src/v2/test/claim/native_cache_fusion_test.dag b/src/v2/test/claim/native_cache_fusion_test.dag index b25864cf074..6c39e007c22 100644 --- a/src/v2/test/claim/native_cache_fusion_test.dag +++ b/src/v2/test/claim/native_cache_fusion_test.dag @@ -7,19 +7,19 @@ import v2.workflow.native_cache_fusion { } import v2.std.logic { Bool } -fn witness_warm_marker_agrees_share() -> Bool { +test fn witness_warm_marker_agrees_share() -> Bool { fusion_agreement_holds_for( o: HostWarmObservation { marker_exists: true, cold_control: false } ) } -fn witness_cold_marker_absent_agrees_recompute() -> Bool { +test fn witness_cold_marker_absent_agrees_recompute() -> Bool { fusion_agreement_holds_for( o: HostWarmObservation { marker_exists: false, cold_control: false } ) } -fn witness_cold_control_forces_recompute_agreement() -> Bool { +test fn witness_cold_control_forces_recompute_agreement() -> Bool { let skipped = host_compile_skipped( o: HostWarmObservation { marker_exists: true, cold_control: true } ) @@ -29,8 +29,3 @@ fn witness_cold_control_forces_recompute_agreement() -> Bool { ) } -test fn native_cache_fusion_witnesses() -> Bool { - witness_warm_marker_agrees_share() - && witness_cold_marker_absent_agrees_recompute() - && witness_cold_control_forces_recompute_agreement() -} diff --git a/src/v2/test/claim/operand_flow_witness_test.dag b/src/v2/test/claim/operand_flow_witness_test.dag index e2cecee1e66..3281ebdacb7 100644 --- a/src/v2/test/claim/operand_flow_witness_test.dag +++ b/src/v2/test/claim/operand_flow_witness_test.dag @@ -81,21 +81,21 @@ data operand_flow_missing_row_artifact: NodeKeyedGraphArtifact = NodeKeyedGraphA entries: [] } -fn witness_operand_root_resolves_data_depends_on() -> Bool { +test fn witness_operand_root_resolves_data_depends_on() -> Bool { match operand_root(edge: operand_flow_edge_a) { OperandRoot { root: root } => root == operand_flow_shared_node OperandRootUnresolved { edge: _ } => false } } -fn witness_operand_root_refuses_non_data_kind() -> Bool { +test fn witness_operand_root_refuses_non_data_kind() -> Bool { match operand_root(edge: operand_flow_edge_non_data) { OperandRootUnresolved { edge: edge } => edge == operand_flow_edge_non_data OperandRoot { root: _ } => false } } -fn witness_shared_operand_consumers_agree() -> Bool { +test fn witness_shared_operand_consumers_agree() -> Bool { match operand_flow_for_edge(artifact: operand_flow_settled_artifact, edge: operand_flow_edge_a) { OperandFlow { edge: _, operand: operand_a, footprint: footprint_a } => match operand_flow_for_edge(artifact: operand_flow_settled_artifact, edge: operand_flow_edge_b) { @@ -109,7 +109,7 @@ fn witness_shared_operand_consumers_agree() -> Bool { } } -fn witness_non_data_edge_refuses_typed() -> Bool { +test fn witness_non_data_edge_refuses_typed() -> Bool { match operand_flow_for_edge(artifact: operand_flow_settled_artifact, edge: operand_flow_edge_non_data) { OperandFlowRefused { edge: _, cause: OperandFlowNoOperand { edge: _ } } => true OperandFlowRefused { edge: _, cause: _ } => false @@ -117,7 +117,7 @@ fn witness_non_data_edge_refuses_typed() -> Bool { } } -fn witness_missing_row_refuses_typed() -> Bool { +test fn witness_missing_row_refuses_typed() -> Bool { match operand_flow_for_edge(artifact: operand_flow_missing_row_artifact, edge: operand_flow_edge_a) { OperandFlowRefused { edge: _, cause: OperandFlowFootprintMissingRow { missing: missing } } => missing == operand_flow_shared_hash @@ -126,7 +126,7 @@ fn witness_missing_row_refuses_typed() -> Bool { } } -fn witness_operand_flows_is_total_over_edges() -> Bool { +test fn witness_operand_flows_is_total_over_edges() -> Bool { let rows = operand_flows( artifact: operand_flow_settled_artifact, edges: [operand_flow_edge_a, operand_flow_edge_b, operand_flow_edge_non_data] @@ -134,11 +134,3 @@ fn witness_operand_flows_is_total_over_edges() -> Bool { length(xs: rows) == 3 } -test fn operand_flow_witnesses() -> Bool { - witness_operand_root_resolves_data_depends_on() - && witness_operand_root_refuses_non_data_kind() - && witness_shared_operand_consumers_agree() - && witness_non_data_edge_refuses_typed() - && witness_missing_row_refuses_typed() - && witness_operand_flows_is_total_over_edges() -} diff --git a/src/v2/test/claim/parse/parse_binding_fidelity_test.dag b/src/v2/test/claim/parse/parse_binding_fidelity_test.dag index 1e4dfc4c3bf..1888dfbe6f4 100644 --- a/src/v2/test/claim/parse/parse_binding_fidelity_test.dag +++ b/src/v2/test/claim/parse/parse_binding_fidelity_test.dag @@ -69,166 +69,6 @@ fn pbf_graft_module_root(root: Node) -> Node { } } -fn pbf_tokenize() -> Outcome { - let lm = dag_language_model() - tokenize(text: ingested_add_module_source, file: ^pbf_source_file, rules: lm.lex) -} - -fn pbf_parse_tokens(tokens: TokenStream) -> Outcome { - let lm = dag_language_model() - bind_outcome( - o: parse_module(tokens: tokens, grammar: lm.grammar), - f: fn(artifact) { - outcome_accepted(value: artifact.tree) - } - ) -} - -fn pbf_normalized_add_module() -> Outcome { - match pbf_tokenize() { - Accepted { value: tokens, diagnostics: _ } => - match pbf_parse_tokens(tokens: tokens) { - Accepted { value: parsed, diagnostics: _ } => - normalize(parse_tree: parsed) - Rejected { diagnostics: r } => Rejected { diagnostics: r } - } - Rejected { diagnostics: r } => Rejected { diagnostics: r } - } -} - -fn pbf_normalized_add_arrow() -> Optional { - match pbf_normalized_add_module() { - Accepted { value: tree, diagnostics: _ } => - ingested_find_arrow_in_module(root: tree) - Rejected { diagnostics: _ } => Absent - } -} - -fn pbf_resolved_add_module() -> Outcome { - let lm = dag_language_model() - match pbf_normalized_add_module() { - Accepted { value: normalized, diagnostics: _ } => - resolve(tree: normalized, lm: lm) - Rejected { diagnostics: r } => Rejected { diagnostics: r } - } -} - -fn pbf_resolved_add_arrow() -> Optional { - match pbf_resolved_add_module() { - Accepted { value: tree, diagnostics: _ } => - ingested_find_arrow_in_module(root: tree) - Rejected { diagnostics: _ } => Absent - } -} - -fn pbf_arrow_body_operand_lexeme(arrow: Node, index: Int) -> Optional { - match find_arrow_body_child(root: arrow) { - Accepted { value: body, diagnostics: _ } => - match list_at_optional(xs: body.children, index: index) { - Present { value: e } => - match node_atom_identity_optional(node: e.target) { - Present { value: id } => Present { value: symbol_lexeme(sym: id) } - Absent => Absent - } - Absent => Absent - } - Rejected { diagnostics: _ } => Absent - } -} - -fn pbf_arrow_body_operand_id(arrow: Node, index: Int) -> Optional { - match find_arrow_body_child(root: arrow) { - Accepted { value: body, diagnostics: _ } => - match list_at_optional(xs: body.children, index: index) { - Present { value: e } => node_atom_identity_optional(node: e.target) - Absent => Absent - } - Rejected { diagnostics: _ } => Absent - } -} - -fn pbf_tree_contains_atom_identity(root: Node, wanted: Symbol) -> Bool { - match root.kind { - TypeNode { connective: Atom { identity: id } } => - if id == wanted { - true - } else { - false - } - _ => - fold( - root.children, - init: false, - f: fn(found, edge) { - if found { - true - } else { - pbf_tree_contains_atom_identity(root: edge.target, wanted: wanted) - } - } - ) - } -} - -fn pbf_parse_preserves_param_x_binding() -> Bool { - match pbf_normalized_add_arrow() { - Present { value: arrow } => - match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 1) { - Present { value: lex } => lex == "x" - Absent => false - } - Absent => false - } -} - -fn pbf_parse_preserves_param_y_binding() -> Bool { - match pbf_normalized_add_arrow() { - Present { value: arrow } => - match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 2) { - Present { value: lex } => lex == "y" - Absent => false - } - Absent => false - } -} - -fn pbf_parse_does_not_collapse_to_token_ident() -> Bool { - match pbf_normalized_add_arrow() { - Present { value: arrow } => - match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 1) { - Present { value: left } => - match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 2) { - Present { value: right } => (left == "x") && (right == "y") && (left != right) - Absent => false - } - Absent => false - } - Absent => false - } -} - -fn pbf_resolved_add_accepts() -> Bool { - match pbf_resolved_add_module() { - Accepted { value: _, diagnostics: _ } => true - Rejected { diagnostics: _ } => false - } -} - -fn pbf_resolved_tree_has_distinct_param_bindings() -> Bool { - match pbf_resolved_add_arrow() { - Present { value: arrow } => - match pbf_arrow_body_operand_id(arrow: arrow, index: 1) { - Present { value: left } => - match pbf_arrow_body_operand_id(arrow: arrow, index: 2) { - Present { value: right } => (left != right) && (symbol_lexeme(sym: left) == "x") && (symbol_lexeme(sym: right) == "y") - Absent => false - } - Absent => false - } - Absent => false - } -} - fn pbf_qn_node(seg: Symbol) -> Node { fold_list_node( xs: Cons { head: seg, tail: Empty }, diff --git a/src/v2/test/claim/parse/parse_table_content_key_test.dag b/src/v2/test/claim/parse/parse_table_content_key_test.dag index d8efc1d7dfc..9ba0f586225 100644 --- a/src/v2/test/claim/parse/parse_table_content_key_test.dag +++ b/src/v2/test/claim/parse/parse_table_content_key_test.dag @@ -1,6 +1,5 @@ module v2.test.parse.parse_table_content_key - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn mk_table(grammar: Hash, tokens: Hash) -> ParseTable { @@ -33,40 +32,33 @@ fn key_p0_a() -> ParsePositionKey { ParsePositionKey { position: 0, production: fn key_p1_a() -> ParsePositionKey { ParsePositionKey { position: 1, production: ^ctk_prod_a } } fn key_p0_b() -> ParsePositionKey { ParsePositionKey { position: 0, production: ^ctk_prod_b } } -fn witness_subject_deterministic() -> Bool { +test fn witness_subject_deterministic() -> Bool { let a = parse_table_subject(table: table_g1_t1(), key: key_p0_a()) let b = parse_table_subject(table: mk_table(grammar: grammar_one(), tokens: tokens_one()), key: key_p0_a()) a == b } -fn witness_subject_position_sensitive() -> Bool { +test fn witness_subject_position_sensitive() -> Bool { let a = parse_table_subject(table: table_g1_t1(), key: key_p0_a()) let b = parse_table_subject(table: table_g1_t1(), key: key_p1_a()) a != b } -fn witness_subject_production_sensitive() -> Bool { +test fn witness_subject_production_sensitive() -> Bool { let a = parse_table_subject(table: table_g1_t1(), key: key_p0_a()) let b = parse_table_subject(table: table_g1_t1(), key: key_p0_b()) a != b } -fn witness_subject_grammar_scope_sensitive() -> Bool { +test fn witness_subject_grammar_scope_sensitive() -> Bool { let a = parse_table_subject(table: table_g1_t1(), key: key_p0_a()) let b = parse_table_subject(table: table_g2_t1(), key: key_p0_a()) a != b } -fn witness_subject_token_stream_scope_sensitive() -> Bool { +test fn witness_subject_token_stream_scope_sensitive() -> Bool { let a = parse_table_subject(table: table_g1_t1(), key: key_p0_a()) let b = parse_table_subject(table: table_g1_t2(), key: key_p0_a()) a != b } -test fn parse_table_content_key_witnesses() -> Bool { - witness_subject_deterministic() - && witness_subject_position_sensitive() - && witness_subject_production_sensitive() - && witness_subject_grammar_scope_sensitive() - && witness_subject_token_stream_scope_sensitive() -} diff --git a/src/v2/test/claim/pr_native_batch_test.dag b/src/v2/test/claim/pr_native_batch_test.dag index 2e68c2fe739..b88e654305d 100644 --- a/src/v2/test/claim/pr_native_batch_test.dag +++ b/src/v2/test/claim/pr_native_batch_test.dag @@ -10,17 +10,13 @@ import v2.compiler.self_host.native_routing_frontier { native_routed_rows } import v2.std.algebra { length } import v2.std.logic { Bool } -fn witness_zero_routed_families_enrolled() -> Bool { +test fn witness_zero_routed_families_enrolled() -> Bool { (length(xs: native_routed_rows()) == 0) && !gunbc_pr_native_batch_enrolled() && (length(xs: gunbc_pr_native_entries()) == 0) } -fn witness_floor_batches_unchanged_when_unenrolled() -> Bool { +test fn witness_floor_batches_unchanged_when_unenrolled() -> Bool { length(xs: gunbc_ci_floor_batches()) == length(xs: gunbc_ci_floor_realization_plan().schedule) } -test fn pr_native_batch_witnesses() -> Bool { - witness_zero_routed_families_enrolled() - && witness_floor_batches_unchanged_when_unenrolled() -} diff --git a/src/v2/test/claim/provenance/occurrence_id_model_test.dag b/src/v2/test/claim/provenance/occurrence_id_model_test.dag index 9148d4792ed..3f8c23f3305 100644 --- a/src/v2/test/claim/provenance/occurrence_id_model_test.dag +++ b/src/v2/test/claim/provenance/occurrence_id_model_test.dag @@ -43,7 +43,7 @@ import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -fn occurrence_id_allocator_mints_sequential_distinct_ids() -> Bool { +test fn occurrence_id_allocator_mints_sequential_distinct_ids() -> Bool { let alloc0 = occurrence_id_allocator_initial() let r0 = alloc_occurrence_id(alloc: alloc0) let r1 = alloc_occurrence_id(alloc: r0.alloc) @@ -53,7 +53,7 @@ fn occurrence_id_allocator_mints_sequential_distinct_ids() -> Bool { && !occurrence_id_eq(left: r0.id, right: r2.id) } -fn span_index_from_source_round_trip_holds() -> Bool { +test fn span_index_from_source_round_trip_holds() -> Bool { let alloc0 = occurrence_id_allocator_initial() let minted = alloc_occurrence_id(alloc: alloc0) let id = minted.id @@ -104,7 +104,7 @@ fn span_index_merge_lookup_from_source_holds(index: SpanIndex, id: OccurrenceId) } } -fn span_index_merge_disjoint_entries_holds() -> Bool { +test fn span_index_merge_disjoint_entries_holds() -> Bool { let alloc0 = occurrence_id_allocator_initial() let r0 = alloc_occurrence_id(alloc: alloc0) let r1 = alloc_occurrence_id(alloc: r0.alloc) @@ -131,7 +131,7 @@ fn span_index_merge_disjoint_entries_holds() -> Bool { && span_index_merge_lookup_from_source_holds(index: merged, id: r1.id) } -fn span_index_resolve_derived_chain_holds() -> Bool { +test fn span_index_resolve_derived_chain_holds() -> Bool { let alloc0 = occurrence_id_allocator_initial() let r0 = alloc_occurrence_id(alloc: alloc0) let r1 = alloc_occurrence_id(alloc: r0.alloc) @@ -160,7 +160,7 @@ fn span_index_resolve_derived_chain_holds() -> Bool { } } -fn occurrence_id_root_mint_excluded_from_structural_equality() -> Bool { +test fn occurrence_id_root_mint_excluded_from_structural_equality() -> Bool { let alloc0 = occurrence_id_allocator_initial() let m0 = alloc_occurrence_id(alloc: alloc0) let m1 = alloc_occurrence_id(alloc: m0.alloc) @@ -183,7 +183,7 @@ fn occurrence_id_root_mint_excluded_from_structural_equality() -> Bool { && exact_structural_equality_zip_fold(source_facts: left, candidate: right) } -fn occurrence_id_nested_mint_excluded_from_structural_equality() -> Bool { +test fn occurrence_id_nested_mint_excluded_from_structural_equality() -> Bool { let alloc0 = occurrence_id_allocator_initial() let m0 = alloc_occurrence_id(alloc: alloc0) let m1 = alloc_occurrence_id(alloc: m0.alloc) @@ -211,15 +211,3 @@ fn occurrence_id_nested_mint_excluded_from_structural_equality() -> Bool { && !(node_for_structural_equality(n: left) == node_for_structural_equality(n: right)) } -fn occurrence_id_excluded_from_structural_equality() -> Bool { - occurrence_id_root_mint_excluded_from_structural_equality() - && occurrence_id_nested_mint_excluded_from_structural_equality() -} - -test fn witness_occurrence_id_model_substrate_holds() -> Bool { - occurrence_id_allocator_mints_sequential_distinct_ids() - && span_index_from_source_round_trip_holds() - && span_index_merge_disjoint_entries_holds() - && span_index_resolve_derived_chain_holds() - && occurrence_id_excluded_from_structural_equality() -} diff --git a/src/v2/test/claim/provenance/parse_stamp_span_index_test.dag b/src/v2/test/claim/provenance/parse_stamp_span_index_test.dag index d13c9984972..57016bf714e 100644 --- a/src/v2/test/claim/provenance/parse_stamp_span_index_test.dag +++ b/src/v2/test/claim/provenance/parse_stamp_span_index_test.dag @@ -1,6 +1,5 @@ module v2.test.provenance.parse_stamp_span_index - data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly fn parse_stamp_list_absent_diagnostic() -> Diagnostic { @@ -121,7 +120,7 @@ fn parse_stamp_derived_by_pair_holds( } } -fn parse_stamp_terminal_from_source_holds() -> Bool { +test fn parse_stamp_terminal_from_source_holds() -> Bool { let at = port_locus(port: ^parse_stage_locus_port) match grammar_validate_for_parse(root: parse_stamp_terminal_root(), at: at) { Rejected { diagnostics: _ } => false @@ -157,7 +156,7 @@ fn parse_stamp_terminal_from_source_holds() -> Bool { } } -fn parse_stamp_sequence_derived_by_holds() -> Bool { +test fn parse_stamp_sequence_derived_by_holds() -> Bool { let at = port_locus(port: ^parse_stage_locus_port) match grammar_validate_for_parse(root: parse_stamp_sequence_root(), at: at) { Rejected { diagnostics: _ } => false @@ -227,7 +226,3 @@ fn parse_stamp_sequence_derived_by_holds() -> Bool { } } -test fn witness_parse_stamp_span_index_holds() -> Bool { - parse_stamp_terminal_from_source_holds() - && parse_stamp_sequence_derived_by_holds() -} diff --git a/src/v2/test/claim/realization_runner_witness_test.dag b/src/v2/test/claim/realization_runner_witness_test.dag index cb857f417b7..47be6516a79 100644 --- a/src/v2/test/claim/realization_runner_witness_test.dag +++ b/src/v2/test/claim/realization_runner_witness_test.dag @@ -77,7 +77,7 @@ data runner_test_batches: List = [ runner_test_second_batch ] -fn witness_node_keyed_store_put_and_has() -> Bool { +test fn witness_node_keyed_store_put_and_has() -> Bool { let store = node_keyed_store_put( store: node_keyed_store_empty(), node: runner_test_a_node, @@ -88,7 +88,7 @@ fn witness_node_keyed_store_put_and_has() -> Bool { && (node_keyed_store_node_count(store: store) == 1) } -fn witness_runner_schedule_batch_helpers() -> Bool { +test fn witness_runner_schedule_batch_helpers() -> Bool { match runner_schedule_plan_from_dependencies( nodes: runner_test_nodes, dependencies: runner_test_dependencies, @@ -102,7 +102,7 @@ fn witness_runner_schedule_batch_helpers() -> Bool { } } -fn witness_runner_walk_populates_store_in_dependency_order() -> Bool { +test fn witness_runner_walk_populates_store_in_dependency_order() -> Bool { match runner_walk_batches( batches: runner_test_batches, dependencies: runner_test_dependencies, @@ -116,7 +116,7 @@ fn witness_runner_walk_populates_store_in_dependency_order() -> Bool { } } -fn witness_runner_schedule_matches_executor_batches() -> Bool { +test fn witness_runner_schedule_matches_executor_batches() -> Bool { match runner_schedule_plan_from_dependencies( nodes: runner_test_nodes, dependencies: runner_test_dependencies, @@ -129,7 +129,7 @@ fn witness_runner_schedule_matches_executor_batches() -> Bool { } } -fn witness_runner_blocks_when_prerequisite_missing() -> Bool { +test fn witness_runner_blocks_when_prerequisite_missing() -> Bool { let batch = ExecutorBatch { jobs: [executor_job_for_node(node: runner_test_b_node)] } @@ -196,7 +196,7 @@ data graph_artifact_duplicated: NodeKeyedGraphArtifact = NodeKeyedGraphArtifact entries: [] } -fn witness_graph_artifact_shared_row_counted_once() -> Bool { +test fn witness_graph_artifact_shared_row_counted_once() -> Bool { match node_keyed_graph_transitive_bytes(artifact: graph_artifact_diamond, root: "hash_root") { NodeKeyedGraphTransitiveBytesSettled { bytes: bytes } => byte_size_count(b: bytes) == 25 @@ -205,7 +205,7 @@ fn witness_graph_artifact_shared_row_counted_once() -> Bool { } } -fn witness_graph_artifact_subgraph_bytes() -> Bool { +test fn witness_graph_artifact_subgraph_bytes() -> Bool { match node_keyed_graph_transitive_bytes(artifact: graph_artifact_diamond, root: "hash_a") { NodeKeyedGraphTransitiveBytesSettled { bytes: bytes } => byte_size_count(b: bytes) == 10 @@ -214,11 +214,11 @@ fn witness_graph_artifact_subgraph_bytes() -> Bool { } } -fn witness_graph_artifact_total_matches_fully_reachable_root() -> Bool { +test fn witness_graph_artifact_total_matches_fully_reachable_root() -> Bool { byte_size_count(b: node_keyed_graph_artifact_total_bytes(artifact: graph_artifact_diamond)) == 25 } -fn witness_graph_artifact_entry_binds_value_root() -> Bool { +test fn witness_graph_artifact_entry_binds_value_root() -> Bool { match node_keyed_graph_entry_value_bytes( artifact: graph_artifact_diamond, entry: NodeKeyedGraphArtifactEntry { store_node: "hash_store_node", value_root: "hash_b" } @@ -230,7 +230,7 @@ fn witness_graph_artifact_entry_binds_value_root() -> Bool { } } -fn witness_graph_artifact_missing_child_ref_refuses() -> Bool { +test fn witness_graph_artifact_missing_child_ref_refuses() -> Bool { match node_keyed_graph_transitive_bytes( artifact: graph_artifact_dangling, root: "hash_dangling_root" @@ -242,7 +242,7 @@ fn witness_graph_artifact_missing_child_ref_refuses() -> Bool { } } -fn witness_graph_artifact_missing_root_refuses() -> Bool { +test fn witness_graph_artifact_missing_root_refuses() -> Bool { match node_keyed_graph_transitive_bytes(artifact: graph_artifact_diamond, root: "hash_absent") { NodeKeyedGraphTransitiveBytesMissingRow { missing: missing } => missing == "hash_absent" @@ -251,25 +251,8 @@ fn witness_graph_artifact_missing_root_refuses() -> Bool { } } -fn witness_graph_artifact_interning_check_discriminates() -> Bool { +test fn witness_graph_artifact_interning_check_discriminates() -> Bool { node_keyed_graph_rows_interned(rows: graph_artifact_diamond.rows) && !node_keyed_graph_rows_interned(rows: graph_artifact_duplicated.rows) } -test fn realization_runner_witnesses() -> Bool { - witness_node_keyed_store_put_and_has() - && witness_runner_walk_populates_store_in_dependency_order() - && witness_runner_schedule_matches_executor_batches() - && witness_runner_schedule_batch_helpers() - && witness_runner_blocks_when_prerequisite_missing() -} - -test fn node_keyed_graph_artifact_witnesses() -> Bool { - witness_graph_artifact_shared_row_counted_once() - && witness_graph_artifact_subgraph_bytes() - && witness_graph_artifact_total_matches_fully_reachable_root() - && witness_graph_artifact_entry_binds_value_root() - && witness_graph_artifact_missing_child_ref_refuses() - && witness_graph_artifact_missing_root_refuses() - && witness_graph_artifact_interning_check_discriminates() -} diff --git a/src/v2/test/claim/realize_advisory_soundness_test.dag b/src/v2/test/claim/realize_advisory_soundness_test.dag index e922a098f88..58f806bf697 100644 --- a/src/v2/test/claim/realize_advisory_soundness_test.dag +++ b/src/v2/test/claim/realize_advisory_soundness_test.dag @@ -23,7 +23,7 @@ fn obs(known: Bool, derived: Int, observed: Int) -> AdvisoryObservation { } } -fn witness_sound_bound_carries_margin() -> Bool { +test fn witness_sound_bound_carries_margin() -> Bool { match advisory_soundness_for(o: obs(known: true, derived: 1000, observed: 800)) { BoundSound { margin_bytes: m } => m == 200 BoundUnsound { derived_bytes: _, observed_peak_bytes: _ } => false @@ -31,7 +31,7 @@ fn witness_sound_bound_carries_margin() -> Bool { } } -fn witness_exceedance_is_unsound() -> Bool { +test fn witness_exceedance_is_unsound() -> Bool { match advisory_soundness_for(o: obs(known: true, derived: 1000, observed: 1001)) { BoundUnsound { derived_bytes: d, observed_peak_bytes: p } => d == 1000 && p == 1001 BoundSound { margin_bytes: _ } => false @@ -39,15 +39,15 @@ fn witness_exceedance_is_unsound() -> Bool { } } -fn witness_unknown_bound_is_not_sound() -> Bool { +test fn witness_unknown_bound_is_not_sound() -> Bool { advisory_observation_is_sound(o: obs(known: false, derived: 0, observed: 500)) == false } -fn witness_exact_bound_is_sound() -> Bool { +test fn witness_exact_bound_is_sound() -> Bool { advisory_observation_is_sound(o: obs(known: true, derived: 500, observed: 500)) } -fn witness_window_reds_on_one_unsound() -> Bool { +test fn witness_window_reds_on_one_unsound() -> Bool { let all_sound = advisory_window_all_sound( observations: [ obs(known: true, derived: 1000, observed: 900), @@ -58,7 +58,7 @@ fn witness_window_reds_on_one_unsound() -> Bool { all_sound == false } -fn witness_window_green_when_all_sound() -> Bool { +test fn witness_window_green_when_all_sound() -> Bool { advisory_window_all_sound( observations: [ obs(known: true, derived: 1000, observed: 900), @@ -67,11 +67,3 @@ fn witness_window_green_when_all_sound() -> Bool { ) } -test fn realize_advisory_soundness_witnesses() -> Bool { - witness_sound_bound_carries_margin() - && witness_exceedance_is_unsound() - && witness_unknown_bound_is_not_sound() - && witness_exact_bound_is_sound() - && witness_window_reds_on_one_unsound() - && witness_window_green_when_all_sound() -} diff --git a/src/v2/test/claim/resolve/qualified_module_projection_resolve_test.dag b/src/v2/test/claim/resolve/qualified_module_projection_resolve_test.dag index 35d17464c1c..f72671ab851 100644 --- a/src/v2/test/claim/resolve/qualified_module_projection_resolve_test.dag +++ b/src/v2/test/claim/resolve/qualified_module_projection_resolve_test.dag @@ -100,7 +100,7 @@ fn qmpr_namespace(index: SymbolIndex) -> Namespace { } } -fn witness_qualified_name_node_resolves_holds() -> Bool { +test fn witness_qualified_name_node_resolves_holds() -> Bool { let namespace = qmpr_namespace(index: qmpr_provider_index) match resolve_node( ctx: ResolveContext { @@ -118,7 +118,7 @@ fn witness_qualified_name_node_resolves_holds() -> Bool { } } -fn witness_qualified_name_node_miss_red_holds() -> Bool { +test fn witness_qualified_name_node_miss_red_holds() -> Bool { let namespace = qmpr_namespace(index: empty_symbol_index()) match resolve_node( ctx: ResolveContext { @@ -136,7 +136,3 @@ fn witness_qualified_name_node_miss_red_holds() -> Bool { } } -test fn qualified_module_projection_resolve_witnesses() -> Bool { - witness_qualified_name_node_resolves_holds() - && witness_qualified_name_node_miss_red_holds() -} diff --git a/src/v2/test/claim/rust_crate_partition_witness_test.dag b/src/v2/test/claim/rust_crate_partition_witness_test.dag index 6ef7c7116fd..88ef9630f0f 100644 --- a/src/v2/test/claim/rust_crate_partition_witness_test.dag +++ b/src/v2/test/claim/rust_crate_partition_witness_test.dag @@ -94,7 +94,7 @@ fn witness_forced_scc_split_assignment() -> Map { |> map_insert(witness_mod_c, witness_unit_y) } -fn witness_r4_refuses_forced_scc_split_holds() -> Bool { +test fn witness_r4_refuses_forced_scc_split_holds() -> Bool { let dag = witness_triangle_scc_dag() let assignment = witness_forced_scc_split_assignment() let units = match partition_fold_outcome(module_dag: dag, assignment: assignment) { @@ -144,7 +144,7 @@ fn witness_cyclic_unit_graph() -> List { ] } -fn witness_r4_refuses_unit_graph_cycle_holds() -> Bool { +test fn witness_r4_refuses_unit_graph_cycle_holds() -> Bool { let dag = witness_acyclic_module_dag() let assignment = witness_two_unit_assignment_no_scc_split() let units = witness_cyclic_unit_graph() @@ -157,7 +157,7 @@ fn witness_r4_refuses_unit_graph_cycle_holds() -> Bool { } } -fn witness_partition_perturbation_member_coverage_holds() -> Bool { +test fn witness_partition_perturbation_member_coverage_holds() -> Bool { let coverage_same = stage0_partition_member_coverage_consistent( left: stage0_single_crate_fold_outcome(), right: stage0_partition_receipt_outcome() @@ -168,15 +168,15 @@ fn witness_partition_perturbation_member_coverage_holds() -> Bool { ) } -fn witness_interim_physical_crate_count_holds() -> Bool { +test fn witness_interim_physical_crate_count_holds() -> Bool { stage0_physical_crate_count() == rust_crate_partition_declared_core_target } -fn witness_interim_module_bearing_unit_count_holds() -> Bool { +test fn witness_interim_module_bearing_unit_count_holds() -> Bool { stage0_module_bearing_unit_count() == rust_crate_partition_module_bearing_unit_target } -fn witness_policy_partition_refuses_holds() -> Bool { +test fn witness_policy_partition_refuses_holds() -> Bool { let dag = stage0_module_dag() match resolve_partition_outcome( parameter: PolicyPartitionParam { @@ -189,14 +189,14 @@ fn witness_policy_partition_refuses_holds() -> Bool { } } -fn witness_interim_provenance_is_hand_explicit_holds() -> Bool { +test fn witness_interim_provenance_is_hand_explicit_holds() -> Bool { match stage0_partition_provenance() { HandExplicit => true PolicyDerived { policy: _ } => false } } -fn witness_provenance_distinct_from_policy_derived_holds() -> Bool { +test fn witness_provenance_distinct_from_policy_derived_holds() -> Bool { let explicit = partition_provenance_hand_explicit() let derived = partition_provenance_policy_derived( policy: DeclarationRef { @@ -208,7 +208,7 @@ fn witness_provenance_distinct_from_policy_derived_holds() -> Bool { !partition_provenance_eq(left: explicit, right: derived) } -fn witness_runtime_unit_members_holds() -> Bool { +test fn witness_runtime_unit_members_holds() -> Bool { match stage0_partition_receipt_outcome() { Stage0PartitionReceiptOk { units: units } => match partition_unit_by_id(units: units, unit_id: stage0_unit_runtime) { @@ -221,7 +221,7 @@ fn witness_runtime_unit_members_holds() -> Bool { } } -fn witness_v1_infer_unit_members_holds() -> Bool { +test fn witness_v1_infer_unit_members_holds() -> Bool { match stage0_partition_receipt_outcome() { Stage0PartitionReceiptOk { units: units } => match partition_unit_by_id(units: units, unit_id: stage0_unit_v1_infer) { @@ -234,7 +234,7 @@ fn witness_v1_infer_unit_members_holds() -> Bool { } } -fn witness_v1_artifact_unit_members_holds() -> Bool { +test fn witness_v1_artifact_unit_members_holds() -> Bool { match stage0_partition_receipt_outcome() { Stage0PartitionReceiptOk { units: units } => match partition_unit_by_id(units: units, unit_id: stage0_unit_v1_artifact) { @@ -247,15 +247,15 @@ fn witness_v1_artifact_unit_members_holds() -> Bool { } } -fn witness_partition_fold_unit_count_holds() -> Bool { +test fn witness_partition_fold_unit_count_holds() -> Bool { stage0_partition_fold_ok() } -fn witness_partition_r4_valid_on_interim_holds() -> Bool { +test fn witness_partition_r4_valid_on_interim_holds() -> Bool { stage0_partition_r4_valid() } -fn witness_resolve_partition_explicit_returns_assignment_holds() -> Bool { +test fn witness_resolve_partition_explicit_returns_assignment_holds() -> Bool { let dag = stage0_module_dag() match resolve_partition_outcome(parameter: stage0_partition_parameter(), module_dag: dag) { ResolvePartitionOk { assignment: resolved } => { @@ -266,39 +266,19 @@ fn witness_resolve_partition_explicit_returns_assignment_holds() -> Bool { } } -fn witness_stage0_partition_row_lookups_resolved_holds() -> Bool { +test fn witness_stage0_partition_row_lookups_resolved_holds() -> Bool { stage0_partition_row_lookups_resolved() } -fn witness_dissolve_on_note_present_holds() -> Bool { +test fn witness_dissolve_on_note_present_holds() -> Bool { (rust_crate_partition_dissolve_on |> count) > 0 } -fn witness_stage0_module_dag_interface_grounding_debt_declared_holds() -> Bool { +test fn witness_stage0_module_dag_interface_grounding_debt_declared_holds() -> Bool { stage0_module_dag_interface_grounding_is_debt() } -fn witness_stage0_module_dag_interface_grounding_debt_dissolve_on_present_holds() -> Bool { +test fn witness_stage0_module_dag_interface_grounding_debt_dissolve_on_present_holds() -> Bool { (stage0_module_dag_interface_grounding_debt_dissolve_on |> count) > 0 } -test fn rust_crate_partition_witnesses() -> Bool { - witness_interim_physical_crate_count_holds() - && witness_interim_module_bearing_unit_count_holds() - && witness_policy_partition_refuses_holds() - && witness_interim_provenance_is_hand_explicit_holds() - && witness_provenance_distinct_from_policy_derived_holds() - && witness_runtime_unit_members_holds() - && witness_v1_infer_unit_members_holds() - && witness_v1_artifact_unit_members_holds() - && witness_partition_fold_unit_count_holds() - && witness_partition_r4_valid_on_interim_holds() - && witness_resolve_partition_explicit_returns_assignment_holds() - && witness_r4_refuses_forced_scc_split_holds() - && witness_r4_refuses_unit_graph_cycle_holds() - && witness_partition_perturbation_member_coverage_holds() - && witness_stage0_module_dag_interface_grounding_debt_declared_holds() - && witness_stage0_module_dag_interface_grounding_debt_dissolve_on_present_holds() - && witness_stage0_partition_row_lookups_resolved_holds() - && witness_dissolve_on_note_present_holds() -} diff --git a/src/v2/test/claim/self_host/emit_coverage_frontier_test.dag b/src/v2/test/claim/self_host/emit_coverage_frontier_test.dag index 1a3079bd35e..27bee0d26a4 100644 --- a/src/v2/test/claim/self_host/emit_coverage_frontier_test.dag +++ b/src/v2/test/claim/self_host/emit_coverage_frontier_test.dag @@ -17,11 +17,11 @@ import v2.std.algebra { length } import v2.std.logic { Bool } import v2.std.text { String } -fn witness_roster_total_holds() -> Bool { +test fn witness_roster_total_holds() -> Bool { coverage_frontier_total_holds() } -fn witness_each_subject_has_exactly_one_row() -> Bool { +test fn witness_each_subject_has_exactly_one_row() -> Bool { fold( emit_coverage_frontier_roster, init: true, @@ -31,7 +31,7 @@ fn witness_each_subject_has_exactly_one_row() -> Bool { ) } -fn witness_unlisted_subject_has_no_row() -> Bool { +test fn witness_unlisted_subject_has_no_row() -> Bool { length( xs: coverage_frontier_row_for_subject( subject: coverage_subject( @@ -42,12 +42,12 @@ fn witness_unlisted_subject_has_no_row() -> Bool { ) == 0 } -fn witness_split_matches_expected() -> Bool { +test fn witness_split_matches_expected() -> Bool { (length(xs: self_emitted_native_rows()) == 1) && (length(xs: interpreter_retained_rows()) == 14) } -fn witness_only_classical_not_ingested_is_native() -> Bool { +test fn witness_only_classical_not_ingested_is_native() -> Bool { let natives = self_emitted_native_rows() (length(xs: natives) == 1) && fold( @@ -57,7 +57,7 @@ fn witness_only_classical_not_ingested_is_native() -> Bool { ) } -fn witness_real_native_row_is_backed() -> Bool { +test fn witness_real_native_row_is_backed() -> Bool { fold( self_emitted_native_rows(), init: true, @@ -65,7 +65,7 @@ fn witness_real_native_row_is_backed() -> Bool { ) } -fn witness_all_claims_backed_holds() -> Bool { +test fn witness_all_claims_backed_holds() -> Bool { coverage_frontier_all_native_claims_backed() } @@ -86,18 +86,8 @@ fn synthetic_unbacked_native_row() -> EmitCoverageFrontierRow { } } -fn witness_synthetic_unbacked_claim_reds() -> Bool { +test fn witness_synthetic_unbacked_claim_reds() -> Bool { let probe = synthetic_unbacked_native_row() coverage_row_is_native(row: probe) && !coverage_row_backing_is_enrolled(row: probe) } -test fn emit_coverage_frontier_witnesses() -> Bool { - witness_roster_total_holds() - && witness_each_subject_has_exactly_one_row() - && witness_unlisted_subject_has_no_row() - && witness_split_matches_expected() - && witness_only_classical_not_ingested_is_native() - && witness_real_native_row_is_backed() - && witness_all_claims_backed_holds() - && witness_synthetic_unbacked_claim_reds() -} diff --git a/src/v2/test/claim/self_host/native_agreement_test.dag b/src/v2/test/claim/self_host/native_agreement_test.dag index 5bbb758a617..b18decee281 100644 --- a/src/v2/test/claim/self_host/native_agreement_test.dag +++ b/src/v2/test/claim/self_host/native_agreement_test.dag @@ -34,9 +34,3 @@ test fn native_agreement_octet_display_names_raw_byte_holds() -> Bool { && octet_display(octet: 42) == "42" } -test fn native_agreement_witnesses() -> Bool { - native_agreement_divergence_format_holds() - && native_agreement_failure_receipt_empty_when_clean_holds() - && native_agreement_failure_receipt_names_divergence_holds() - && native_agreement_octet_display_names_raw_byte_holds() -} diff --git a/src/v2/test/claim/self_host/native_routing_frontier_test.dag b/src/v2/test/claim/self_host/native_routing_frontier_test.dag index 6fdd8f97a17..a5402891703 100644 --- a/src/v2/test/claim/self_host/native_routing_frontier_test.dag +++ b/src/v2/test/claim/self_host/native_routing_frontier_test.dag @@ -15,11 +15,11 @@ import v2.std.algebra { length } import v2.std.logic { Bool } import v2.std.text { String } -fn witness_roster_total_holds() -> Bool { +test fn witness_roster_total_holds() -> Bool { routing_frontier_total_holds() } -fn witness_each_subject_has_exactly_one_row() -> Bool { +test fn witness_each_subject_has_exactly_one_row() -> Bool { fold( native_routing_frontier_roster, init: true, @@ -29,7 +29,7 @@ fn witness_each_subject_has_exactly_one_row() -> Bool { ) } -fn witness_unlisted_subject_has_no_row() -> Bool { +test fn witness_unlisted_subject_has_no_row() -> Bool { length( xs: routing_frontier_row_for_subject( subject: family_subject( @@ -40,7 +40,7 @@ fn witness_unlisted_subject_has_no_row() -> Bool { ) == 0 } -fn witness_routed_and_retained_split() -> Bool { +test fn witness_routed_and_retained_split() -> Bool { (length(xs: native_routed_rows()) == 0) && (length(xs: interpreted_retained_rows()) == 11) } @@ -62,14 +62,14 @@ fn family_crate_bound_subject(module_path: String) -> Bool { ) == 1 } -fn witness_flips_cite_parity_evidence() -> Bool { +test fn witness_flips_cite_parity_evidence() -> Bool { parity_flip_permitted(family: "meet_join", receipts: meet_join_local_receipts()) && parity_flip_permitted(family: "complement", receipts: complement_local_receipts()) && family_crate_bound_subject(module_path: "v2.test.execution.emit_host_meet_join_equals_eval") && family_crate_bound_subject(module_path: "v2.test.execution.emit_host_complement_equals_eval") } -fn witness_retained_rows_carry_reason_and_trigger() -> Bool { +test fn witness_retained_rows_carry_reason_and_trigger() -> Bool { fold( interpreted_retained_rows(), init: true, @@ -79,11 +79,3 @@ fn witness_retained_rows_carry_reason_and_trigger() -> Bool { ) } -test fn native_routing_frontier_witnesses() -> Bool { - witness_roster_total_holds() - && witness_each_subject_has_exactly_one_row() - && witness_unlisted_subject_has_no_row() - && witness_routed_and_retained_split() - && witness_flips_cite_parity_evidence() - && witness_retained_rows_carry_reason_and_trigger() -} diff --git a/src/v2/test/claim/self_host/parity_window_test.dag b/src/v2/test/claim/self_host/parity_window_test.dag index 58fdb349d61..80131acbec1 100644 --- a/src/v2/test/claim/self_host/parity_window_test.dag +++ b/src/v2/test/claim/self_host/parity_window_test.dag @@ -41,14 +41,14 @@ fn cold_receipt(id: String) -> ParityWindowReceipt { } } -fn witness_three_greens_permit() -> Bool { +test fn witness_three_greens_permit() -> Bool { parity_flip_permitted( family: "add", receipts: [green_receipt(id: "w1"), green_receipt(id: "w2"), green_receipt(id: "w3")] ) } -fn witness_red_resets_streak() -> Bool { +test fn witness_red_resets_streak() -> Bool { let refused = parity_flip_permitted( family: "add", receipts: [ @@ -61,7 +61,7 @@ fn witness_red_resets_streak() -> Bool { refused == false } -fn witness_cold_divergence_resets_streak() -> Bool { +test fn witness_cold_divergence_resets_streak() -> Bool { let refused = parity_flip_permitted( family: "add", receipts: [ @@ -73,11 +73,11 @@ fn witness_cold_divergence_resets_streak() -> Bool { refused == false } -fn witness_empty_receipts_refuse() -> Bool { +test fn witness_empty_receipts_refuse() -> Bool { parity_flip_permitted(family: "add", receipts: []) == false } -fn witness_refusal_carries_streak_and_required() -> Bool { +test fn witness_refusal_carries_streak_and_required() -> Bool { match parity_verdict_for( family: "add", receipts: [green_receipt(id: "w1"), green_receipt(id: "w2")] @@ -88,7 +88,7 @@ fn witness_refusal_carries_streak_and_required() -> Bool { } } -fn witness_streak_counts_trailing_only() -> Bool { +test fn witness_streak_counts_trailing_only() -> Bool { let streak = trailing_consecutive_green( receipts: [ green_receipt(id: "w1"), @@ -101,11 +101,3 @@ fn witness_streak_counts_trailing_only() -> Bool { streak == 1 } -test fn parity_window_witnesses() -> Bool { - witness_three_greens_permit() - && witness_red_resets_streak() - && witness_cold_divergence_resets_streak() - && witness_empty_receipts_refuse() - && witness_refusal_carries_streak_and_required() - && witness_streak_counts_trailing_only() -} diff --git a/src/v2/test/claim/self_host/wet_receipt_enrollment_witness_test.dag b/src/v2/test/claim/self_host/wet_receipt_enrollment_witness_test.dag index 7fd2437b6a6..b74bd7378e1 100644 --- a/src/v2/test/claim/self_host/wet_receipt_enrollment_witness_test.dag +++ b/src/v2/test/claim/self_host/wet_receipt_enrollment_witness_test.dag @@ -47,97 +47,81 @@ fn sample_self_emitted_row() -> CompilerModuleFrontierRow { } } -fn witness_seed_retained_row_enrolls_no_wet_entry() -> Bool { +test fn witness_seed_retained_row_enrolls_no_wet_entry() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: sample_seed_retained_row())) == 0 } -fn witness_self_emitted_without_binding_enrolls_no_wet_entry() -> Bool { +test fn witness_self_emitted_without_binding_enrolls_no_wet_entry() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: sample_self_emitted_row())) == 0 } -fn witness_parse_engine_hooks_self_emitted_enrolls_no_wet_while_revoked() -> Bool { +test fn witness_parse_engine_hooks_self_emitted_enrolls_no_wet_while_revoked() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: compiler_frontier_row_parse_engine_hooks)) == 0 } -fn witness_use_site_verdict_self_emitted_enrolls_no_wet_while_revoked() -> Bool { +test fn witness_use_site_verdict_self_emitted_enrolls_no_wet_while_revoked() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: compiler_frontier_row_use_site_verdict)) == 0 } -fn witness_discovery_enumeration_self_emitted_enrolls_no_wet_while_revoked() -> Bool { +test fn witness_discovery_enumeration_self_emitted_enrolls_no_wet_while_revoked() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: compiler_frontier_row_discovery_enumeration)) == 0 } -fn witness_target_carriers_self_emitted_enrolls_no_wet_while_revoked() -> Bool { +test fn witness_target_carriers_self_emitted_enrolls_no_wet_while_revoked() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: compiler_frontier_row_07_target_carriers)) == 0 } -fn witness_body_producer_self_emitted_enrolls_no_wet_while_revoked() -> Bool { +test fn witness_body_producer_self_emitted_enrolls_no_wet_while_revoked() -> Bool { length(xs: frontier_row_wet_entries_if_enrolled(row: compiler_frontier_row_03_body_producer)) == 0 } data wet_template_entry_count_note: String = "Eleven template rows: the Gate-4 std/logic per-module self-host receipt, the Gate-1 emit-class import-closure receipt (namespace_import_closure_witness_test), the seven emit-on-demand family aggregates (kernel, field_access, complement, match_loop_fold, meet_join, variant_construct, classical_not_ingested — the 2026-07-21 nightly Wet enrollment; complement + meet_join are pure-receipt residues after the family-grain migration), the family-crate aggregate (emit_on_demand_family_crate_witness_test — the executing consumer for the migrated complement/meet_join native legs, enrolled so the migration cannot orphan them), and the Kernel-D native-only-verdict real compile-and-run witness (emit_host_native_only_verdict_test.dag — KERNEL-D TESTING RE-STEER, 2026-07-24: moved off per-PR CommitCheckEnrollment onto this nightly wet cadence, the same lane as the other module-agnostic rows here). The non-Gate-4 rows are module-agnostic — no frontier row flips to gate them; they enroll as template rows rather than SelfHostWetReceiptBinding rows. See falsifier_self_host_wet_emit_class_note." -fn witness_nightly_enrollment_is_template_only_while_bindings_revoked() -> Bool { +test fn witness_nightly_enrollment_is_template_only_while_bindings_revoked() -> Bool { (length(xs: falsifier_self_host_wet_template_entries) == 11) && (length(xs: falsifier_self_host_wet_frontier_enrolled_entries()) == 0) && (length(xs: falsifier_self_host_wet_entries()) == 11) } -fn witness_parse_engine_hooks_binding_absent_while_revoked() -> Bool { +test fn witness_parse_engine_hooks_binding_absent_while_revoked() -> Bool { match find_wet_receipt_binding(module_path: "src/v2/compiler/parse_engine_hooks.dag") { Absent => true Present { value: _ } => false } } -fn witness_use_site_verdict_binding_absent_while_revoked() -> Bool { +test fn witness_use_site_verdict_binding_absent_while_revoked() -> Bool { match find_wet_receipt_binding(module_path: "src/v2/compiler/use_site_verdict.dag") { Absent => true Present { value: _ } => false } } -fn witness_discovery_enumeration_binding_absent_while_revoked() -> Bool { +test fn witness_discovery_enumeration_binding_absent_while_revoked() -> Bool { match find_wet_receipt_binding(module_path: "src/v2/compiler/discovery_enumeration.dag") { Absent => true Present { value: _ } => false } } -fn witness_target_carriers_binding_absent_while_revoked() -> Bool { +test fn witness_target_carriers_binding_absent_while_revoked() -> Bool { match find_wet_receipt_binding(module_path: "src/v2/compiler/07_target_carriers.dag") { Absent => true Present { value: _ } => false } } -fn witness_body_producer_binding_absent_while_revoked() -> Bool { +test fn witness_body_producer_binding_absent_while_revoked() -> Bool { match find_wet_receipt_binding(module_path: "src/v2/compiler/03_body_producer.dag") { Absent => true Present { value: _ } => false } } -fn witness_unbound_module_path_has_no_binding() -> Bool { +test fn witness_unbound_module_path_has_no_binding() -> Bool { match find_wet_receipt_binding(module_path: "src/v2/compiler/06_translate.dag") { Absent => true Present { value: _ } => false } } -test fn wet_receipt_enrollment_witnesses() -> Bool { - witness_seed_retained_row_enrolls_no_wet_entry() - && witness_self_emitted_without_binding_enrolls_no_wet_entry() - && witness_parse_engine_hooks_self_emitted_enrolls_no_wet_while_revoked() - && witness_use_site_verdict_self_emitted_enrolls_no_wet_while_revoked() - && witness_discovery_enumeration_self_emitted_enrolls_no_wet_while_revoked() - && witness_target_carriers_self_emitted_enrolls_no_wet_while_revoked() - && witness_body_producer_self_emitted_enrolls_no_wet_while_revoked() - && witness_nightly_enrollment_is_template_only_while_bindings_revoked() - && witness_parse_engine_hooks_binding_absent_while_revoked() - && witness_use_site_verdict_binding_absent_while_revoked() - && witness_discovery_enumeration_binding_absent_while_revoked() - && witness_target_carriers_binding_absent_while_revoked() - && witness_body_producer_binding_absent_while_revoked() - && witness_unbound_module_path_has_no_binding() -} diff --git a/src/v2/test/claim/self_host/witness_bulk_routing_test.dag b/src/v2/test/claim/self_host/witness_bulk_routing_test.dag index e56a124f949..1f89a32d5d6 100644 --- a/src/v2/test/claim/self_host/witness_bulk_routing_test.dag +++ b/src/v2/test/claim/self_host/witness_bulk_routing_test.dag @@ -17,11 +17,11 @@ import v2.std.witness_execution_routing { EmitIneligible } -fn witness_sample_roster_total_holds() -> Bool { +test fn witness_sample_roster_total_holds() -> Bool { witness_bulk_routing_total_holds() } -fn witness_each_sample_entry_has_exactly_one_row() -> Bool { +test fn witness_each_sample_entry_has_exactly_one_row() -> Bool { fold( witness_bulk_routing_sample_roster, init: true, @@ -31,15 +31,15 @@ fn witness_each_sample_entry_has_exactly_one_row() -> Bool { ) } -fn witness_unlisted_entry_has_no_row() -> Bool { +test fn witness_unlisted_entry_has_no_row() -> Bool { length(xs: routing_row_for_entry(entry: "dag/test/claim/synthetic_unlisted_entry.dag")) == 0 } -fn witness_zero_native_at_landing_holds() -> Bool { +test fn witness_zero_native_at_landing_holds() -> Bool { witness_bulk_routing_zero_native_at_landing_holds() } -fn witness_retained_rows_carry_typed_reason_and_trigger() -> Bool { +test fn witness_retained_rows_carry_typed_reason_and_trigger() -> Bool { fold( interpreted_retained_entry_rows(), init: true, @@ -52,7 +52,7 @@ fn witness_retained_rows_carry_typed_reason_and_trigger() -> Bool { ) } -fn witness_ineligible_rows_carry_typed_cause() -> Bool { +test fn witness_ineligible_rows_carry_typed_cause() -> Bool { fold( emit_ineligible_entry_rows(), init: true, @@ -65,11 +65,3 @@ fn witness_ineligible_rows_carry_typed_cause() -> Bool { ) } -test fn witness_bulk_routing_witnesses() -> Bool { - witness_sample_roster_total_holds() - && witness_each_sample_entry_has_exactly_one_row() - && witness_unlisted_entry_has_no_row() - && witness_zero_native_at_landing_holds() - && witness_retained_rows_carry_typed_reason_and_trigger() - && witness_ineligible_rows_carry_typed_cause() -} diff --git a/src/v2/test/claim/self_host/witness_entry_eligibility_census_classification_test.dag b/src/v2/test/claim/self_host/witness_entry_eligibility_census_classification_test.dag index e6fec59846b..d021fe51c50 100644 --- a/src/v2/test/claim/self_host/witness_entry_eligibility_census_classification_test.dag +++ b/src/v2/test/claim/self_host/witness_entry_eligibility_census_classification_test.dag @@ -61,11 +61,3 @@ test fn census_emit_host_gate_not_family_grain_holds() -> Bool { census_reason_column_for_entry(entry: "dag/test/claim/emit_host_gate_witness_test.dag") == "BulkFlipPendingCensusIncomplete" } -test fn witness_entry_eligibility_census_classification_witnesses() -> Bool { - census_long_lane_row_holds() - && census_offline_recipe_row_holds() - && census_emit_on_demand_family_crate_leg_holds() - && census_emit_host_execution_family_row_holds() - && census_emit_host_gate_not_family_grain_holds() - && census_bulk_pending_default_holds() -} diff --git a/src/v2/test/claim/sql_create_table_fold_test.dag b/src/v2/test/claim/sql_create_table_fold_test.dag index bfe7188914c..32558609e81 100644 --- a/src/v2/test/claim/sql_create_table_fold_test.dag +++ b/src/v2/test/claim/sql_create_table_fold_test.dag @@ -115,7 +115,7 @@ fn sql_fold_pk_operation() -> SqlSchemaOperation { SqlCreateTable { table: sql_fold_tasks_pk_table } } -fn sql_fold_relation_row_single_col_witness_holds() -> Bool { +test fn sql_fold_relation_row_single_col_witness_holds() -> Bool { let op = sql_fold_single_col_operation() match sql_fold_schema_operation_bundle_witness(op: op) { Holds { value: bundle } => @@ -130,15 +130,15 @@ fn sql_fold_relation_row_single_col_witness_holds() -> Bool { } } -fn sql_fold_create_table_single_col_holds() -> Bool { +test fn sql_fold_create_table_single_col_holds() -> Bool { sql_fold_fold_matches_oracle(op: sql_fold_single_col_operation()) } -fn sql_fold_create_table_two_col_holds() -> Bool { +test fn sql_fold_create_table_two_col_holds() -> Bool { sql_fold_fold_matches_oracle(op: sql_fold_two_col_operation()) } -fn sql_fold_create_table_with_pk_holds() -> Bool { +test fn sql_fold_create_table_with_pk_holds() -> Bool { sql_fold_fold_matches_oracle(op: sql_fold_pk_operation()) } @@ -170,7 +170,7 @@ fn sql_fold_direct_serialize_single_col_holds() -> Bool { } } -fn sql_fold_wrong_production_rejects_oracle_holds() -> Bool { +test fn sql_fold_wrong_production_rejects_oracle_holds() -> Bool { let op = sql_fold_single_col_operation() match sql_fold_schema_operation_bundle_witness(op: op) { Holds { value: bundle } => @@ -185,7 +185,7 @@ fn sql_fold_wrong_production_rejects_oracle_holds() -> Bool { } } -fn sql_fold_emitted_tree_differs_on_two_col_fixture_holds() -> Bool { +test fn sql_fold_emitted_tree_differs_on_two_col_fixture_holds() -> Bool { match sql_fold_operation_emitted_witness(op: sql_fold_single_col_operation()) { Holds { value: single } => match sql_fold_operation_emitted_witness(op: sql_fold_two_col_operation()) { @@ -196,7 +196,7 @@ fn sql_fold_emitted_tree_differs_on_two_col_fixture_holds() -> Bool { } } -fn sql_fold_oracle_rejects_unsupported_drop_table_holds() -> Bool { +test fn sql_fold_oracle_rejects_unsupported_drop_table_holds() -> Bool { match sql_serialize_schema_operation( op: SqlDropTable { table_name: SqlRegularIdentifier { name: "t" } } ) { @@ -205,7 +205,7 @@ fn sql_fold_oracle_rejects_unsupported_drop_table_holds() -> Bool { } } -fn sql_fold_oracle_rejects_parameterized_numeric_type_holds() -> Bool { +test fn sql_fold_oracle_rejects_parameterized_numeric_type_holds() -> Bool { match sql_serialize_data_type( dt: SqlTypeNumeric { precision: NonZeroNat { prev: Zero }, @@ -217,7 +217,7 @@ fn sql_fold_oracle_rejects_parameterized_numeric_type_holds() -> Bool { } } -fn sql_fold_two_col_uses_recursive_list_production_holds() -> Bool { +test fn sql_fold_two_col_uses_recursive_list_production_holds() -> Bool { match sql_fold_column_list_uses_recursive_list_production_witness( cols: sql_fold_tasks_two_col_table.columns ) { @@ -227,7 +227,7 @@ fn sql_fold_two_col_uses_recursive_list_production_holds() -> Bool { } } -fn sql_fold_single_col_uses_leaf_list_production_holds() -> Bool { +test fn sql_fold_single_col_uses_leaf_list_production_holds() -> Bool { match sql_fold_column_list_uses_recursive_list_production_witness( cols: sql_fold_tasks_single_col_table.columns ) { @@ -237,22 +237,6 @@ fn sql_fold_single_col_uses_leaf_list_production_holds() -> Bool { } } -test fn sql_fold_structural_tier_holds() -> Bool { - sql_fold_relation_row_single_col_witness_holds() - && sql_fold_emitted_tree_differs_on_two_col_fixture_holds() - && sql_fold_wrong_production_rejects_oracle_holds() - && sql_fold_oracle_rejects_unsupported_drop_table_holds() - && sql_fold_oracle_rejects_parameterized_numeric_type_holds() - && sql_fold_two_col_uses_recursive_list_production_holds() - && sql_fold_single_col_uses_leaf_list_production_holds() -} - -test fn sql_fold_create_table_tier_holds() -> Bool { - sql_fold_create_table_single_col_holds() - && sql_fold_create_table_two_col_holds() - && sql_fold_create_table_with_pk_holds() -} - test fn sql_fold_direct_serialize_tier_holds() -> Bool { sql_fold_direct_serialize_single_col_holds() } diff --git a/src/v2/test/claim/trait_derive_completeness_predicate_test.dag b/src/v2/test/claim/trait_derive_completeness_predicate_test.dag index 5efcfef23b3..c83142b9a84 100644 --- a/src/v2/test/claim/trait_derive_completeness_predicate_test.dag +++ b/src/v2/test/claim/trait_derive_completeness_predicate_test.dag @@ -226,12 +226,3 @@ test fn tdc_record_surface_binding_heap_vs_copy() -> Bool { ) } -test fn tdc_trait_derive_completeness_predicate_witness_holds() -> Bool { - tdc_string_kernel_satisfies_clone_ord_serde_not_add() - && tdc_int_kernel_satisfies_arith_and_ord() - && tdc_unknown_atom_refuses_ord_completeness() - && tdc_payload_coproduct_shape_and_predicate() - && tdc_nullary_enum_copy_shape_and_binding() - && tdc_symbol_kernel_string_shape() - && tdc_record_surface_binding_heap_vs_copy() -} diff --git a/src/v2/test/claim/witness_admission_test.dag b/src/v2/test/claim/witness_admission_test.dag index a2f48680732..21759de749e 100644 --- a/src/v2/test/claim/witness_admission_test.dag +++ b/src/v2/test/claim/witness_admission_test.dag @@ -28,7 +28,7 @@ data normalize_wet_known_red_admission_note: String = "2026-07-25 review #7199: data synthetic_orphan_entry: String = "dag/test/claim/synthetic_orphan_admission_witness_test.dag" data synthetic_orphan_fn: String = "synthetic_orphan_no_consumer_holds" -fn witness_03_normalize_wet_known_red_consumer_holds() -> Bool { +test fn witness_03_normalize_wet_known_red_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: normalize_entry, function: normalize_fn, @@ -39,11 +39,11 @@ fn witness_03_normalize_wet_known_red_consumer_holds() -> Bool { } } -fn witness_03_normalize_wet_known_red_manifest_covers_holds() -> Bool { +test fn witness_03_normalize_wet_known_red_manifest_covers_holds() -> Bool { witness_admission_manifest_covers_row(entry: normalize_entry, function: normalize_fn) } -fn witness_synthetic_orphan_has_no_consumer_holds() -> Bool { +test fn witness_synthetic_orphan_has_no_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: synthetic_orphan_entry, function: synthetic_orphan_fn, @@ -54,14 +54,14 @@ fn witness_synthetic_orphan_has_no_consumer_holds() -> Bool { } } -fn witness_synthetic_orphan_admission_red_holds() -> Bool { +test fn witness_synthetic_orphan_admission_red_holds() -> Bool { !witness_admission_holds_for_row( entry: synthetic_orphan_entry, function: synthetic_orphan_fn ) } -fn witness_known_red_probe_consumer_holds() -> Bool { +test fn witness_known_red_probe_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "src/v2/test/claim/emit/logic_ground_truth_test.dag", function: "logic_complement_truth_table", @@ -72,10 +72,10 @@ fn witness_known_red_probe_consumer_holds() -> Bool { } } -fn witness_field_access_wet_falsifier_consumer_holds() -> Bool { +test fn witness_field_access_wet_falsifier_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "src/v2/test/claim/execution/emit_on_demand_field_access_family_witness_test.dag", - function: "emit_on_demand_field_access_family_witnesses", + function: "emit_on_demand_field_access_grain_keys_differ_holds", excluded_from_discovery: true ) { OfflineLocalRecipe => true @@ -83,10 +83,10 @@ fn witness_field_access_wet_falsifier_consumer_holds() -> Bool { } } -fn witness_complement_wet_falsifier_consumer_holds() -> Bool { +test fn witness_complement_wet_falsifier_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "src/v2/test/claim/execution/emit_on_demand_complement_family_witness_test.dag", - function: "emit_on_demand_complement_family_witnesses", + function: "emit_on_demand_complement_grain_keys_differ_holds", excluded_from_discovery: true ) { OfflineLocalRecipe => true @@ -94,7 +94,7 @@ fn witness_complement_wet_falsifier_consumer_holds() -> Bool { } } -fn witness_offline_execution_lane_consumer_holds() -> Bool { +test fn witness_offline_execution_lane_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "src/v2/test/claim/execution/synthetic_optin_exec_witness_test.dag", function: "synthetic_optin_exec_witness", @@ -105,7 +105,7 @@ fn witness_offline_execution_lane_consumer_holds() -> Bool { } } -fn witness_discovery_row_consumer_holds() -> Bool { +test fn witness_discovery_row_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "src/v2/test/claim/effect_reach_test.dag", function: "effect_reach_path_data_init_derived_host_reading_holds", @@ -116,7 +116,7 @@ fn witness_discovery_row_consumer_holds() -> Bool { } } -fn witness_rehomed_bin_wet_consumer_holds() -> Bool { +test fn witness_rehomed_bin_wet_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "dag/test/claim/floor_skip_discovery_witness_test.dag", function: "floor_skip_discovery_keystone_holds", @@ -127,14 +127,14 @@ fn witness_rehomed_bin_wet_consumer_holds() -> Bool { } } -fn witness_rehomed_bin_wet_manifest_covers_holds() -> Bool { +test fn witness_rehomed_bin_wet_manifest_covers_holds() -> Bool { witness_admission_manifest_covers_row( entry: "dag/test/claim/floor_skip_discovery_witness_test.dag", function: "floor_skip_discovery_keystone_holds" ) } -fn witness_substrate_long_lane_consumer_holds() -> Bool { +test fn witness_substrate_long_lane_consumer_holds() -> Bool { match witness_consumer_cadence_for_row( entry: "src/v2/test/claim/long/affected_set_provenance_producer_witness_test.dag", function: "lens_affected_set_provenance_producer_single_read_emits_row_holds", @@ -145,30 +145,14 @@ fn witness_substrate_long_lane_consumer_holds() -> Bool { } } -fn witness_substrate_long_lane_manifest_covers_holds() -> Bool { +test fn witness_substrate_long_lane_manifest_covers_holds() -> Bool { witness_admission_manifest_covers_row( entry: "src/v2/test/claim/long/affected_set_provenance_producer_witness_test.dag", function: "lens_affected_set_provenance_producer_single_read_emits_row_holds" ) } -fn witness_explicit_manifest_nonempty_holds() -> Bool { +test fn witness_explicit_manifest_nonempty_holds() -> Bool { length(xs: witness_admission_explicit_consumer_manifest()) > 0 } -test fn witness_admission_invariant_holds() -> Bool { - witness_03_normalize_wet_known_red_consumer_holds() - && witness_03_normalize_wet_known_red_manifest_covers_holds() - && witness_synthetic_orphan_has_no_consumer_holds() - && witness_synthetic_orphan_admission_red_holds() - && witness_known_red_probe_consumer_holds() - && witness_field_access_wet_falsifier_consumer_holds() - && witness_complement_wet_falsifier_consumer_holds() - && witness_offline_execution_lane_consumer_holds() - && witness_discovery_row_consumer_holds() - && witness_rehomed_bin_wet_consumer_holds() - && witness_rehomed_bin_wet_manifest_covers_holds() - && witness_substrate_long_lane_consumer_holds() - && witness_substrate_long_lane_manifest_covers_holds() - && witness_explicit_manifest_nonempty_holds() -} diff --git a/src/v2/test/claim/wrap_decision_predicate_test.dag b/src/v2/test/claim/wrap_decision_predicate_test.dag index fd7eb931dbf..ee0d1b65706 100644 --- a/src/v2/test/claim/wrap_decision_predicate_test.dag +++ b/src/v2/test/claim/wrap_decision_predicate_test.dag @@ -245,17 +245,6 @@ test fn wrap_decision_node_struct_field_is_box() -> Bool { ) } -test fn wrap_decision_predicate_witness_holds() -> Bool { - wrap_decision_diagnostics_return_is_rc() - && wrap_decision_diagnostics_param_is_owned() - && wrap_decision_probe_heap_param_miss_rejects() - && wrap_decision_bundle_absent_inapplicable() - && wrap_decision_bundle_partial_rejects() - && wrap_decision_use_site_verdict_param_is_owned() - && wrap_decision_use_site_verdict_return_is_owned() - && wrap_decision_node_struct_field_is_box() -} - data wrap_decision_composite_note: String = "Discriminates the wrap_decision_predicate caller-side bypass (v1_deletion_plan.dag ^wrap_decision_predicate, RE-OPENED 2026-07-24): translate_apply_use_site_ownership_to_projected_boundary must recurse ownership-wrap into TargetTypeExprInstantiation-kind wires (Option/Rc/List shapes) instead of returning the composite unwrapped via the _ => outcome_accepted(projected) arm." fn wrap_decision_composite_projected_arg() -> Node { diff --git a/src/v2/test/manual/ownership_movable_test.dag b/src/v2/test/manual/ownership_movable_test.dag index 73c689b3480..59fd2ceab54 100644 --- a/src/v2/test/manual/ownership_movable_test.dag +++ b/src/v2/test/manual/ownership_movable_test.dag @@ -24,35 +24,28 @@ fn movable_of(proof: OwnershipProof, name: String) -> Bool { set_contains(build_movable_set(proof: proof, param_names: set_insert(empty_set(), name)), name) } -fn witness_read_then_consume_param_is_movable() -> Bool { +test fn witness_read_then_consume_param_is_movable() -> Bool { let proof = proof_one(name: "acc", consumers: [edge(k: Projected, s: ".seen"), edge(k: Consumed, s: "return")]) movable_of(proof: proof, name: "acc") } -fn witness_double_consume_is_not_movable() -> Bool { +test fn witness_double_consume_is_not_movable() -> Bool { let proof = proof_one(name: "x", consumers: [edge(k: Consumed, s: "a"), edge(k: Consumed, s: "b")]) movable_of(proof: proof, name: "x") == false } -fn witness_zero_consume_is_not_movable() -> Bool { +test fn witness_zero_consume_is_not_movable() -> Bool { let proof = proof_one(name: "r", consumers: [edge(k: Read, s: "a"), edge(k: Projected, s: ".f")]) movable_of(proof: proof, name: "r") == false } -fn witness_whole_read_then_consume_is_not_movable() -> Bool { +test fn witness_whole_read_then_consume_is_not_movable() -> Bool { let proof = proof_one(name: "x", consumers: [edge(k: Read, s: "read"), edge(k: Consumed, s: "return")]) movable_of(proof: proof, name: "x") == false } -fn witness_threaded_then_consume_is_not_movable() -> Bool { +test fn witness_threaded_then_consume_is_not_movable() -> Bool { let proof = proof_one(name: "x", consumers: [edge(k: Threaded, s: "fold_init"), edge(k: Consumed, s: "return")]) movable_of(proof: proof, name: "x") == false } -test fn ownership_movable_witnesses() -> Bool { - witness_read_then_consume_param_is_movable() - && witness_double_consume_is_not_movable() - && witness_zero_consume_is_not_movable() - && witness_whole_read_then_consume_is_not_movable() - && witness_threaded_then_consume_is_not_movable() -} diff --git a/src/v2/workflow/affected_set_ci_runner_test.dag b/src/v2/workflow/affected_set_ci_runner_test.dag index 6afffb3592b..ec2835898f1 100644 --- a/src/v2/workflow/affected_set_ci_runner_test.dag +++ b/src/v2/workflow/affected_set_ci_runner_test.dag @@ -360,17 +360,6 @@ test fn ci_runner_discovered_equals_selected_inner_frontier_holds() -> Bool { ) } -test fn ci_runner_node_frontier_four_phase_discrimination_holds() -> Bool { - ci_runner_narrow_selection_holds() - && ci_runner_fail_closed_superset_holds() - && ci_runner_shape_collision_holds() - && ci_runner_inner_frontier_holds() - && ci_runner_discovered_equals_selected_narrow_holds() - && ci_runner_discovered_equals_roster_on_fail_closed_holds() - && ci_runner_discovered_equals_selected_shape_collision_holds() - && ci_runner_discovered_equals_selected_inner_frontier_holds() -} - fn ci_runner_inner_frontier_rhs() -> Node { if ci_runner_inner_frontier_holds() { ci_runner_touched_node diff --git a/src/v2/workflow/affected_set_floor_runner_test.dag b/src/v2/workflow/affected_set_floor_runner_test.dag index 6072e1b8a91..5a497aa77e2 100644 --- a/src/v2/workflow/affected_set_floor_runner_test.dag +++ b/src/v2/workflow/affected_set_floor_runner_test.dag @@ -510,30 +510,3 @@ test fn floor_test_rust_run_implies_dag_run_superset_holds() -> Bool { ) } -test fn floor_runner_unaffected_assumed_green_skips_holds() -> Bool { - floor_test_untouched_skips_assumed_green_holds() - && floor_test_empty_diff_flows_general_skip_holds() - && floor_test_diff_fail_closed_refuses_holds() -} - -test fn floor_runner_node_frontier_policy_holds() -> Bool { - floor_test_untouched_skips_assumed_green_holds() - && floor_test_touched_runs_holds() - && floor_test_function_edited_runs_holds() - && floor_test_entry_file_touched_runs_holds() - && floor_test_fn_declaration_edited_holds() - && floor_test_rust_run_implies_dag_run_superset_holds() - && floor_test_empty_diff_flows_general_skip_holds() - && floor_test_diff_fail_closed_refuses_holds() - && floor_test_frontier_fail_closed_refuses_holds() - && floor_test_claim_touch_discriminates_holds() - && floor_test_inner_frontier_discriminates_holds() - && floor_test_live_row_never_skips_when_kernel_would_holds() - && floor_test_live_row_runs_when_kernel_runs_holds() - && floor_test_runtime_data_dependency_touched_runs_holds() - && floor_test_precompute_skip_holds() - && floor_test_precompute_live_corpus_never_skips_holds() - && floor_test_eval_nodes_from_claims_holds() - && floor_test_any_claim_touch_holds() - && floor_test_diff_policy_matches_ci_spec_holds() -} diff --git a/src/v2/workflow/ci_floor_peak_emit_test.dag b/src/v2/workflow/ci_floor_peak_emit_test.dag index 5aca1e4d30b..5df1799c1b8 100644 --- a/src/v2/workflow/ci_floor_peak_emit_test.dag +++ b/src/v2/workflow/ci_floor_peak_emit_test.dag @@ -114,10 +114,3 @@ test fn ci_floor_peak_pre_reset_if_has_teeth_holds() -> Bool { } } -test fn ci_floor_peak_emit_band_holds() -> Bool { - ci_floor_peak_locate_emit_matches_golden_holds() - && ci_floor_peak_pre_emit_matches_golden_holds() - && ci_floor_peak_post_emit_matches_golden_holds() - && ci_floor_peak_pre_emit_has_teeth_holds() - && ci_floor_peak_pre_reset_if_has_teeth_holds() -} From 8b2049d2e3fceeedb21840e49adbb3cc4a1b3816 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 04:21:44 +0000 Subject: [PATCH 2/8] WIP: test umbrella dissolution --- dag/gunbc/fleet_show_effective_read.dag | 14 -- dag/gunbc/roster_registry.dag | 4 +- dag/std/roster_frontier.dag | 16 +- ...fleet_show_effective_read_witness_test.dag | 1 - .../claim/stage0_emit_model_witness_test.dag | 7 +- ...-dag-residual-census-and-arc-completion.md | 57 ++++- src/v1/stage0/src/bin/regen_stage0.rs | 235 ++++++++---------- src/v1/stage0/src/cli_run.rs | 29 ++- src/v1/stage0/src/test_module_hygiene.rs | 27 ++ .../react/structural_receipts_test.dag | 39 --- 10 files changed, 218 insertions(+), 211 deletions(-) diff --git a/dag/gunbc/fleet_show_effective_read.dag b/dag/gunbc/fleet_show_effective_read.dag index d8907b6bef6..7d1c55a01ea 100644 --- a/dag/gunbc/fleet_show_effective_read.dag +++ b/dag/gunbc/fleet_show_effective_read.dag @@ -167,20 +167,6 @@ fn per_slot_memory_cap_verdict_from_unit_read( converge_target_live_verdict(read: read, target: target) } -fn fleet_runner_width_count_read_script(instance_glob: NonEmptyStr) -> String { - concat( - concat("systemctl list-units --type=service --state=active --no-legend \"", instance_glob), - "\" 2>/dev/null | wc -l | tr -d ' '" - ) -} - -fn fleet_runner_unit_memory_props_read_script(unit: NonEmptyStr) -> String { - concat( - concat("systemctl show -p MemoryMax -p MemorySwapMax -p MemoryHigh --value \"", unit), - "\" 2>/dev/null" - ) -} - data gunbc_srv1_runner_slice_cap_fixture_row: RunnerSliceCapLiveReadRow = RunnerSliceCapLiveReadRow { slice_unit: "system-actions-runner.slice", memory_max_raw: "infinity", diff --git a/dag/gunbc/roster_registry.dag b/dag/gunbc/roster_registry.dag index 07ef3ce47b1..548741771cf 100644 --- a/dag/gunbc/roster_registry.dag +++ b/dag/gunbc/roster_registry.dag @@ -235,8 +235,8 @@ data roster_registry: List = [ roster: roster_decl(module_path: "gunbc.stage0_emit_model", decl_name: "generated_stage0_files"), unit_kind: "generated stage0 seed file basename", membership: DeclaredFrontier { - reason: "the set of .rs files regen_stage0 emits into the seed, hand-listed. Enrolled 2026-07-25 off a MEASURED LIVE FORK: this .dag list and the Rust const GENERATED_STAGE0_FILES (src/v1/stage0/src/bin/regen_stage0.rs) are two hand copies of one fact, and they had silently drifted — .dag carried 98 entries against Rust's 101, missing std_execution_mode.rs and the two v1_compiler_closure_stub_v2_std_*_rust.rs files, all three of which exist on disk carrying the generated-by-v1-compiler marker. The Rust side declares 'Registry authority: gunbc.stage0_emit_model.generated_stage0_files' while itself holding the longer list, so the declared authority was not the authority. The drift stayed invisible because the only consumer, test.claim.stage0_emit_model_witness, asserted NEGATIVES only (that hand-maintained files are absent), a shape that can never catch a missing entry; the concrete wrong answer was is_generated_stage0_file naming a generated file hand-maintained, which is the exact question asked when diagnosing whether a diff to a seed .rs is regen output or a stale-copy bug", - dissolve_on: "the fork closes by CONSTRUCTION rather than by this row: regen_stage0 reads generated_stage0_files from this .dag through a host reader (the gunbc.non_fold_residue precedent, non_fold_residue_units_from_module_source in cli_run.rs) and the Rust const is deleted, leaving one authority and making drift unwritable; the const's own in-code trigger already names this. Until that lands the two copies are held equal only by review, which is why this row exists and why the list-identity check is named as the open follow-up rather than claimed as done" + reason: "the set of .rs files regen_stage0 emits into the seed, hand-listed in this .dag as the single authority. Enrolled 2026-07-25 off a measured live fork (this list vs a Rust GENERATED_STAGE0_FILES const that had silently drifted 98 vs 101); construction close landed as the #7258 follow-up — regen_stage0 reads this list through lens_string_list_data and the Rust const is deleted, so a second hand copy is unwritable (witness: generated_stage0_files_read_from_dag_authority_not_rust_const). What remains hand-kept is MEMBERSHIP of the emit set itself", + dissolve_on: "membership derives from the stage0 self-compile output set (fresh emit basenames), so an emitted file is enrolled by construction and a missing authority row is a typed refusal at assert_output_set_matches_registry rather than a hand edit; then this literal list and this row delete" } }, RosterRegistration { diff --git a/dag/std/roster_frontier.dag b/dag/std/roster_frontier.dag index a0064e6b170..e7ff017804d 100644 --- a/dag/std/roster_frontier.dag +++ b/dag/std/roster_frontier.dag @@ -108,13 +108,15 @@ fn frontier_rows_well_formed(rows: List) -> Bool { fold(rows, init: true, f: fn(acc, row) { acc && frontier_row_well_formed(row: row) }) } +fn frontier_subject_key(subject: FrontierSubject) -> String { + match subject { + PathSubject { path: p } => p + DeclSubject { ref: r } => concat(r.module_path as String, concat("::", r.decl_name as String)) + } +} + fn frontier_path_subjects(rows: List) -> List { - fold(rows, init: [], f: fn(acc, row) { - match row.subject { - PathSubject { path: p } => concat(acc, [p]) - DeclSubject { ref: r } => concat(acc, [concat(r.module_path as String, concat("::", r.decl_name as String))]) - } - }) + map(rows, row => frontier_subject_key(subject: row.subject)) } fn frontier_units(rows: List) -> List { @@ -122,7 +124,7 @@ fn frontier_units(rows: List) -> List { } fn concat_frontier_row_groups(groups: List>) -> List { - fold(groups, init: [], f: fn(acc, group) { concat(acc, group) }) + flat_map(groups, group => group) } type FrontierExpiryReport { diff --git a/dag/test/claim/fleet_show_effective_read_witness_test.dag b/dag/test/claim/fleet_show_effective_read_witness_test.dag index 963fc91d7e8..df11ec74b87 100644 --- a/dag/test/claim/fleet_show_effective_read_witness_test.dag +++ b/dag/test/claim/fleet_show_effective_read_witness_test.dag @@ -215,7 +215,6 @@ test fn witness_transport_reads_use_show_property_authority() -> Bool { property: MemoryMax, ) && witness_show_property_local_read_holds() - && string_contains(s: fleet_runner_width_count_read_script(instance_glob: "actions-runner@srv1-*.service"), pattern: "list-units") } test fn witness_show_property_injection_metachar_refused() -> Bool { diff --git a/dag/test/claim/stage0_emit_model_witness_test.dag b/dag/test/claim/stage0_emit_model_witness_test.dag index 5d4bfb97f21..21f1c533bdb 100644 --- a/dag/test/claim/stage0_emit_model_witness_test.dag +++ b/dag/test/claim/stage0_emit_model_witness_test.dag @@ -2,6 +2,8 @@ module test.claim.stage0_emit_model_witness data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly +data stage0_emit_model_witness_note: String = "Authority: gunbc.stage0_emit_model.generated_stage0_files. Positives catch a missing generated basename (the #7258 drift class); negatives keep hand-maintained files out of the generated set. Floor: generated_stage0_file_count >= 101 (post-#7258 repaired length) so a silent list shrink reds. Host construction close: regen_stage0 reads this list via lens_string_list_data — Rust unit generated_stage0_files_read_from_dag_authority_not_rust_const refuses a reintroduced GENERATED_STAGE0_FILES const." + test fn w_hand_maintained_not_classified_generated() -> Bool { !is_generated_stage0_file(basename: "cli_run.rs") && !is_generated_stage0_file(basename: "v1_interpreter.rs") && @@ -19,8 +21,11 @@ test fn w_generated_files_classified_generated() -> Bool { is_generated_stage0_file(basename: "std_algebra.rs") } +test fn w_generated_file_count_floor_holds() -> Bool { + generated_stage0_file_count() >= 101 +} + test fn w_emit_naming_rule() -> Bool { stage0_module_emit_basename(module_path: "v1.compiler.emit_rust") == "v1_compiler_emit_rust" && stage0_module_emit_filename(module_path: "gunbc.stage0_emit_model") == "gunbc_stage0_emit_model.rs" } - diff --git a/docs/plans/shell-to-dag-residual-census-and-arc-completion.md b/docs/plans/shell-to-dag-residual-census-and-arc-completion.md index bf5eab16402..5592ad2470f 100644 --- a/docs/plans/shell-to-dag-residual-census-and-arc-completion.md +++ b/docs/plans/shell-to-dag-residual-census-and-arc-completion.md @@ -164,19 +164,31 @@ Keyed on the **construction site (variant/fn name)** and the modeled op it *shou | construction site (file · variant/fn) | builder(s) — `*_script.dag` and/or inline | should call | sub-class | | --- | --- | --- | --- | -| `fleet_show_effective_read.dag` · `SystemdUnitMemoryPropertiesRead`, `SystemdUnitMemoryMaxRead` | `fleet_show_effective_read_script.dag` relocated fns **+ inline** `fleet_runner_unit_property_read_script`, `fleet_runner_width_count_read_script` (`systemctl show`/`list-units`) | `extdeps.os.systemctl.ShowProperty` (exists) + a `list-units` op | **A1** modeled | -| `host_converge_slice1.dag` (via `shell.Exec.Run`) | inline `…_memory_max_read_script`, `…_memory_max_set_script` (`systemctl set-property` concat), `…_enumerate_units_script` (`systemctl list-units` concat) | `systemctl.ShowProperty` / `SetProperty` / new `list-units` op | **A1** modeled | +| ~~`fleet_show_effective_read.dag` · `SystemdUnitMemoryPropertiesRead`, `SystemdUnitMemoryMaxRead`~~ **LANDED** | ~~`fleet_show_effective_read_script.dag`~~ deleted; ~~inline `fleet_runner_width_count_read_script`, `fleet_runner_unit_memory_props_read_script`~~ deleted (census true-up, 2026-07-26) | `systemd.Systemctl.ShowProperty` via `gunbc.systemctl_show_read`; `list-units` via `gunbc.systemctl_list_units` | **A1 DONE** — see the dead-scaffold note below | +| ~~`host_converge_slice1.dag` (via `shell.Exec.Run`)~~ **LANDED** | ~~inline `…_memory_max_read/set_script`, `…_enumerate_units_script`~~ deleted | `systemctl_show_read` + `systemctl_list_units_active_services` (both imported and called; `host_converge_slice1.dag:15,49,287`) | **A1 DONE** — verified 2026-07-26: zero `_script` fns, zero `shell.Exec.Run`, zero `systemctl` concats in the file | | ~~`host_identity_observation.dag` · `HostIdentityShortHostnameRead`~~ **LANDED** | ~~`host_identity_short_hostname_script`~~ deleted | `os.Hostname.ReadShort` · `dag/extdeps/tools/hostname.dag` | **A2 DONE** — realized through `gunbc.hostname_read` (LocalShell → op, SshShell → typed argv) | | ~~`host_effect.dag` · `SetHostnameCas`~~ **LANDED (#7194)** | ~~`host_effect_set_hostname_cas_script`~~ deleted (no such symbol anywhere in tree) | `os.Hostname.Set` · `dag/extdeps/tools/hostname.dag` | **A2 DONE** — `host_effect_realize.dag`'s `SetHostnameCas` arm calls `gunbc.hostname_set` `hostname_set_cas`, whose `hostname_set_local` is `os.Hostname.Set(desired:)`; the SSH arm goes through `typed_argv_exec_over_ssh`, and the CAS read reuses the landed `os.Hostname.ReadShort`. Verified on main 2026-07-25 (bucket A): zero concat builders, zero `shell.Exec` on the path. | | `host_effect.dag` · `ReadEffectivePosixPrincipal`, `SudoNopasswdExecuteProbe` | `host_effect_deploy_access_probe_script.dag` (whoami / `sudo -n` / `sudo -n -l`) | `access.PosixEffectivePrincipal`, `sudo.NopasswdExecuteProbe` (exist) | **A3** OWNED BY C5 #6946 — do not touch | -| `live_deploy/` effect variants | `live_deploy/host_effect_script.dag` (`…apply`/`…retract`/`…ensure_dependency`/`…digest_readback`) | decompose (multi-op) | **A4** decompose | +| ~~`live_deploy/` effect variants~~ **LANDED (D2 #7192)** | ~~`live_deploy/host_effect_script.dag`~~ **file deleted** — no such path in tree | decomposed (multi-op) | **A4 DONE** — verified 2026-07-26: `dag/gunbc/live_deploy/` is `apply · emit · intent · operations · readiness · service_ready · spec` only, and the directory contains **zero** `ShellCommand` occurrences. This closes do-not-miss item 1 below (the #7004/#7006 relocation debt) | | `host_effect_realize.dag` · `ProvisionBuildCache` | `host_build_cache_provision_script.dag` (6 `build_cache_*_body`) | decompose | **A5** srv* deprioritized | | hygiene reaper/liveness | `host_hygiene_reaper_script.dag` (4 `…_body`), `host_hygiene_liveness_script.dag` | decompose | **A5** srv* deprioritized | | `srv3_host_effect_apply.dag` · `Srv3*` variants, `srv3_install_diagnostic_checklist.dag` · `Srv3InstallDiagnosticObserve`, `nbd_proxy_virtual_media_install.dag` · `Srv3NbdProxyServe` | `srv3_host_effect_script.dag` (5 fns), `srv3_install_diagnostic_observe_script.dag` (5 fns) | typed observe/receipt effects | **A5** srv* deprioritized | +**A1 dead-scaffold finding (census true-up, 2026-07-26).** The A1 typed migration (D2 #7192) dissolved the *live* read path onto `ShowProperty`/`ListUnits` but left two `systemctl` concat builders behind in `fleet_show_effective_read.dag`, orphaned: + +- `fleet_runner_unit_memory_props_read_script` — **zero references tree-wide** beyond its own definition. Pure dead code. +- `fleet_runner_width_count_read_script` — **zero production callers**; its only other reference was a witness assertion. + +Both are deleted in this true-up (deletion is the receipt; a row claiming "done" beside a live concat is the relocation pattern this census exists to catch). Two things make this worth recording rather than quietly fixing: + +1. **The file's own note claimed the property the tree did not have.** `fleet_show_effective_read.dag:62` asserts "no per-command HostEffect nicknames, **no concat shell strings**" while two concat shell strings sat 110 lines below it. The note was true of the *live path* and false of the *file* — the §3 tell that a prose claim had drifted from its carrier. +2. **A witness was pinning the dead scaffold as contract.** `fleet_show_effective_read_witness_test.dag` · `witness_transport_reads_use_show_property_authority` — a witness whose *name* asserts reads use the typed authority — carried a third conjunct asserting `fleet_runner_width_count_read_script(...)` contains `"list-units"`. That conjunct (a) is tautological (a `concat` of a literal containing `list-units` always contains `list-units`; it can only fail if someone edits the literal), (b) asserts nearly the **opposite** of the witness's stated purpose — that a shell-concat *bypass* still exists with the right shape, and (c) kept a dead symbol referenced, so it never read as dead code. Removing it leaves the witness asserting exactly what its name claims (typed argv match + local read), which is **stronger**, not weaker. This is the DESIGN §5 "tests *asserting the string* so the degradation was enshrined as the contract" shape, in the small. + ### 4.B — DIRECT `ShellCommand{script}` still constructed in intent -The relocation wave turned most direct construction into nickname variants (4.A), but **two live direct sites remain** on `origin/main` — the multiline form my first-draft single-line P1 missed (review 41467): +**STATUS 2026-07-26 (census true-up): both rows below are DISCHARGED — there are now ZERO direct `ShellCommand{script}` construction sites in `dag/gunbc/live_deploy/`** (verified: `grep -rn ShellCommand dag/gunbc/live_deploy/` returns 0). `live_deploy_unit_diagnosis_command` and `live_deploy_healthz_probe_script_for_port` no longer exist anywhere in tree — D2 #7192 (tree_sync `| tail` + `exit 0` absorbing fallback, converted to a typed `Systemctl.Status` exit-as-data refusal) and D3 #7193 (readiness routed through `gunbc.systemctl_status_read` + `http.Client.Get`) closed them. The table is kept struck-through as the audit trail. + +~~The relocation wave turned most direct construction into nickname variants (4.A), but **two live direct sites remain** on `origin/main` — the multiline form my first-draft single-line P1 missed (review 41467):~~ | site (file · construction) | builder (file · fn) | runs on | dissolve to | | --- | --- | --- | --- | @@ -187,8 +199,9 @@ Residue only (not construction to migrate): | site (file · symbol) | what | action | | --- | --- | --- | -| `host_effect_plan.dag` · `ShellCommand { script: "" }` | empty placeholder | delete with the type | -| `host_effect.dag` · `ShellCommand { script: String }` | the **type variant** itself | delete at arc close (DESIGN §5, escalated) — terminal | +| `host_effect_plan.dag:39` · `ShellCommand { script: "" }` | empty placeholder | delete with the type — **still present** (verified 2026-07-26) | +| `host_effect.dag:28` · `ShellCommand { script: String }` | the **type variant** itself | delete at arc close (DESIGN §5, escalated) — terminal; **still present** | +| `fleet_converge_cli.dag:57` · `ShellCommand { script: _ } => fallback` | a **match arm**, not a construction site — consumes the variant, builds no string | *(row added by the 2026-07-26 true-up; previously uncensused)* dissolves with the type variant above. Listed so the arc-close delete has a complete consumer list — a missed match arm is what turns the terminal delete into a non-exhaustive-match break | *(The first draft mis-grounded on a divergent worktree — `fleet_show`/`host_identity` corrected to 4.A per review 41399 — and then under-scoped P1 to single-line, missing these `readiness.dag` sites per review 41467. Both fixed.)* @@ -205,7 +218,20 @@ Residue only (not construction to migrate): ### 4.D — `ssh.Session.Exec` command-string (vs typed `ExecArgv`) -All in `host_effect_realize.dag`, via `ssh_session_exec(command:)` / `ssh_session_exec_script(script:)`: +**RECLASSIFIED by the 2026-07-26 true-up — read before picking this up.** Every `ssh_session_exec(command:)` site in the table below sits inside an **`srv3_*` function**, i.e. inside the srv\* cluster the operator wound down 2026-07-22 and authorized for retirement 2026-07-24 (§5.D roadmap item). So 4.D is **not** an independently-dispatchable A1 bucket: dissolving these to `ExecArgv` would be typed-argv work on a subgraph slated for deletion — motion, not progress. **4.D inherits A5's deferred status** and should be picked up only as part of the srv3 retirement, or if that retirement is abandoned. + +Exhaustive site list, verified on `origin/main` @ `efe67794cd` (enclosing fn in bold — this is what the original table did not record): + +| line | enclosing fn | verb | disposition | +| --- | --- | --- | --- | +| `:731` | **`srv3_transport_witness_bin_success`** | arbitrary command (`cd … && bin args`) | A5-deferred (srv3) | +| `:742` | **`srv3_transport_test_executable`** | `test -x ` | A5-deferred (srv3) | +| `:752` | **`srv3_apt_tool_present`** | `command -v ` | A5-deferred (srv3) | +| `:775` | **`srv3_tool_bin_path`** | `command -v ` | A5-deferred (srv3) | +| `:821`, `:822` | **`srv3_chown_directory_to_current_user`** | `id -u` / `id -g` | A5-deferred (srv3) | +| `:1169` | **`run_shell_transport`** | `ssh_session_exec_script(script: script.body)` | **NOT srv3** — this is the realization core's `RetainedShellScript` → SSH path, i.e. the §5.E counted frontier's own transport. It dissolves when the frontier empties, not by a per-site migration. Do not edit under a 4.D brief | + +The original table's rows are retained below for provenance: | construction | verb | should call | class | | --- | --- | --- | --- | @@ -247,6 +273,17 @@ These are correct as shell (a GHA runner / cron / git / pre-runtime host only un `live_deploy/emit.dag:448,452` `expected_*_script` (drift-gate oracles), `*_test.dag` fixtures. These are test expectations, not runtime construction; they follow their subject's dissolution. +### Ledger true-up @ 2026-07-26 (§4.A/4.B/4.D, snappy-moth-330) — read this FIRST + +Re-censused §4.A, §4.B and §4.D against `origin/main` @ `efe67794cd` by execution over the tree, not by trusting the rows. Four corrections, in descending order of how badly the stale row would mislead: + +1. **§4.D is not a dispatchable bucket — it is A5-deferred.** Every `ssh_session_exec(command:)` site is inside an **`srv3_*`** fn (the wound-down srv\* cluster), except `:1169` which is the realization core's own `RetainedShellScript` transport. The old table listed the verbs without the enclosing fns, which made it read like an independent typed-argv bucket. It is not; picking it up would be typed-argv work on a subgraph slated for retirement. +2. **§4.A4 and §4.B are DONE.** `live_deploy/host_effect_script.dag` is deleted and `dag/gunbc/live_deploy/` contains zero `ShellCommand`. This closes "do-not-miss" item 1 (the #7004/#7006 relocation debt), which had been the loudest open warning in this doc. +3. **§4.A1 is DONE, but left two dead concat builders behind** — deleted in this true-up, with the witness that was pinning one of them as contract. See the A1 dead-scaffold note in §4.A; the pattern (a file note claiming "no concat shell strings" while two sat below it, plus a tautological witness conjunct asserting the bypass still had the right shape) is the reusable finding. +4. **One uncensused consumer added** — `fleet_converge_cli.dag:57`'s `ShellCommand` **match arm**, so the terminal type delete has a complete consumer list. + +**Net:** with bucket D (§4.E/§4.I) in flight, the non-deferred remainder of this arc is **§4.F wall-green only** (the `host_language_transport_script` lens promotion + meta-exec confinement) — and that is coupled to the node/subtree visibility-grants lane, not independently schedulable here. Everything else open is operator-deferred srv\*. + ### Ledger true-up @ 2026-07-25 (bucket A, calm-pike-837) — read this before the 07-22 snapshot below The 07-22 snapshot is ~7 merges stale. What has landed since, keyed to the rows it discharges: @@ -291,12 +328,12 @@ The state of every PR in this arc, so nothing is missed if work pauses here. **A **Not started — the remaining arc (bounded, fully specified in §5; safe to pause):** - **§5.A** — **COMPLETE.** All four ops landed on #7194 and are verified in tree at their post-#7231 homes: `os.Hostname.ReadShort`/`Set` (`dag/extdeps/tools/hostname.dag`), `systemd.Systemctl.ListUnits` and `.Status` (`dag/extdeps/systemd/systemctl.dag:185,219`), `os.Id.Uid` (`dag/extdeps/tools/id.dag:26`). (`ssh.Session.ExecArgv` landed via C5; `Clock.Now` in `dag/extdeps/clock/clock.dag` already existed and is now the single authority for every `date -Iseconds` site.) **The finite new-op list this whole arc needed is closed** — everything remaining in §5.B is calling ops that now exist. -- **§5.B** — the call-the-op migrations, **UNPAUSED** (the wall landed, #7184). D1/D2/D3 (#7192/#7193/#7194) and this PR's bucket A discharged the hostname, systemctl-read and clock clusters; the srv\* cluster (4.A5) and `live_deploy` (4.A4) remain. +- **§5.B** — the call-the-op migrations, **UNPAUSED** (the wall landed, #7184). D1/D2/D3 (#7192/#7193/#7194) and bucket A discharged the hostname, systemctl-read and clock clusters. **Updated 2026-07-26:** `live_deploy` (4.A4) and the `fleet_show`/`host_converge_slice1` systemctl cluster (4.A1) are **also done** — only the **operator-deferred srv\* cluster (4.A5, and 4.D which is inside it)** remains in §5.B. With bucket D (4.E/4.I foreign-executor emit) in flight, the non-deferred §5.B queue is **empty**. - **§5.E** — the **transport-script construction wall** — **LANDED #7184.** Built as a `RetainedShellScript` RECORD edge + free-minter deletion + counted bridges + lens activation + compile-fail REDs (see §5.E ruling block; "brand `TransportScript`" was found non-walling because the brand is transparent). The 2026-07-24 wall-first ruling that paused §5.A/§5.B is therefore discharged. **⚠ Do-not-miss for wind-down:** -1. **#7004 and #7006 merged as "progress" but are relocations** — the concats were moved, not deleted, so those sites (live_deploy/apply, host_identity) are **not actually bash-free.** #7064 fixes `fleet_show`; the rest still need the proper dissolution. +1. ~~**#7004 and #7006 merged as "progress" but are relocations**~~ — **CLOSED by the 2026-07-26 true-up.** Both relocation sites are now genuinely dissolved: `live_deploy/host_effect_script.dag` is **deleted** (D2 #7192) with zero `ShellCommand` left in the directory, and `host_identity`'s hostname path went typed on D1 #7194. The relocation debt this item tracked no longer exists on main. 2. **Two open PRs to land:** #7065 (census/plan) and #7064 (exemplar). 3. **Nothing is lost by pausing** — §5 is the durable, bounded plan (4 ops + call-existing-op + emit-roster + wall). Resume from §5 whenever. @@ -340,7 +377,7 @@ This punch-list folds into the **`host_language_transport_script` lens going liv | new op | home file | covers verb | consumers | | --- | --- | --- | --- | | `extdeps.os.hostname` · ~~`Read`~~ **LANDED** + `Set` | `dag/extdeps/os/hostname.dag` (created) | ~~`hostname -s`~~ **done**; `hostnamectl set-hostname` remains | **Read done** — `os.Hostname.ReadShort` realized via typed cell `HostnameReadOnHost` + `gunbc.hostname_read` (LocalShell → op, SshShell → typed argv); both read consumers dissolved: `host_identity_observation` (`HostIdentityShortHostnameRead`, the `host_identity_short_hostname_script` concat DELETED) and `ci_deploy_target_host` (runtime-present read; the GHA preflight *block* stays E-emit). **Set** (`host_effect_hostname` `SetHostnameCas`, its own `host_effect_set_hostname_cas_script` concat) still pending — reuses this op file with a `SetHostname` op. | -| `systemd.Systemctl.ListUnits` | **add to** `dag/extdeps/os/systemctl.dag` | `systemctl list-units --state=active` | `host_converge_slice1` (`_enumerate_units_script`), `fleet_show_effective_read` (`fleet_runner_width_count_read_script`) | +| `systemd.Systemctl.ListUnits` | **add to** `dag/extdeps/os/systemctl.dag` | `systemctl list-units --state=active` | `host_converge_slice1` (was `_enumerate_units_script`; now calls `systemctl_list_units_active_services` at `:287`). *The `fleet_show_effective_read` consumer named here — `fleet_runner_width_count_read_script` — was never migrated: it was superseded and left dead, and is deleted by the 2026-07-26 true-up.* | | `extdeps.os.id` · `Read` (uid/gid/user) | **new** `dag/extdeps/os/id.dag` | `id -u`, `id -g`, `id ` | `host_effect_realize` (ssh probes), `fleet_posix_accounts` (`probe_command`) | | `ssh.Session.ExecArgv` | **add to** `dag/extdeps/diagnostic/ssh.dag` | typed argv over ssh (`ssh host -- argv`) | `host_effect_realize` ssh probes — **IN FLIGHT, C5 #6946** | | `systemd.Systemctl.Status` | **add to** `dag/extdeps/os/systemctl.dag` | `systemctl status --no-pager --full ` (models exit-3-for-dead-unit — retires the `\| tail`+`exit 0` absorbing fallback) | `live_deploy/readiness.dag` unit diagnosis | diff --git a/src/v1/stage0/src/bin/regen_stage0.rs b/src/v1/stage0/src/bin/regen_stage0.rs index c5b5c71c5d6..73e7f17b14a 100644 --- a/src/v1/stage0/src/bin/regen_stage0.rs +++ b/src/v1/stage0/src/bin/regen_stage0.rs @@ -6,6 +6,7 @@ use std::io::{self, Write}; use std::path::{Path, PathBuf}; use std::process::{Command, ExitCode, Stdio}; use std::rc::Rc; +use std::sync::OnceLock; use std::time::Instant; use v1_compiler::v1_compiler_artifact::RenderTarget; @@ -24,114 +25,29 @@ const BOOTSTRAP_TIMING_RECEIPT_ENV: &str = "GUNBC_BOOTSTRAP_TIMING_RECEIPT"; const DEFAULT_BOOTSTRAP_TIMING_RECEIPT: &str = "target/bootstrap_timing/v1_regen_stage0_receipt.json"; -// Registry authority: gunbc.stage0_emit_model.generated_stage0_files. -// Hand-maintained registry authority: gunbc.stage0_crate_layout_generated -// (frontier-derived; regen via generated_artifact_gate main_wet). -// Witness: stage0_crate_layout_witness_test.dag + self_host/crate_layout_witness_test.dag. -// Dissolve-on: regen_stage0 reads emitted gunbc_stage0_emit_model.rs roster. -const GENERATED_STAGE0_FILES: &[&str] = &[ - "compiler_tests.rs", - "extdeps_cargo.rs", - "extdeps_cargo_version.rs", - "extdeps_external_authority.rs", - "extdeps_languages_dag_emit.rs", - "extdeps_languages_dag_syntax.rs", - "extdeps_languages_dag_types.rs", - "extdeps_languages_go_emit.rs", - "extdeps_languages_go_syntax.rs", - "extdeps_languages_go_types.rs", - "extdeps_languages_python_emit.rs", - "extdeps_languages_python_syntax.rs", - "extdeps_languages_python_types.rs", - "extdeps_languages_rust_emit.rs", - "extdeps_languages_rust_syntax.rs", - "extdeps_languages_rust_types.rs", - "extdeps_uri.rs", - "extdeps_uri_path.rs", - "extdeps_version.rs", - "extdeps_version_semver.rs", - "gunbc_stage0_crate_layout_generated.rs", - "gunbc_stage0_crate_partition_generated.rs", - "lib.rs", - "std_algebra.rs", - "std_coercion.rs", - "std_computation.rs", - "std_constructors.rs", - "std_content_hash.rs", - "std_currency.rs", - "std_decl_ref.rs", - "std_disposition.rs", - "std_effects.rs", - "std_emit_model.rs", - "std_error_primitives.rs", - "std_execution_mode.rs", - "std_graph.rs", - "std_http_path.rs", - "std_induction.rs", - "std_integer.rs", - "std_interface_summary.rs", - "std_iteration.rs", - "std_logic.rs", - "std_machine_constraints.rs", - "std_magnitude.rs", - "std_measure.rs", - "std_nat.rs", - "std_node.rs", - "std_pareto.rs", - "std_realization_schedule.rs", - "std_serialization.rs", - "std_syntax.rs", - "std_termination.rs", - "std_trait_derive_shape.rs", - "std_types.rs", - "v1_compiler_artifact.rs", - "v1_compiler_coercion.rs", - "v1_compiler_closure_stub_v2_std_integer_rust.rs", - "v1_compiler_closure_stub_v2_std_text_rust.rs", - "v1_compiler_compile.rs", - "v1_compiler_compiler_tests_rust.rs", - "v1_compiler_complexity.rs", - "v1_compiler_dag_collect.rs", - "v1_compiler_dag_collect_support.rs", - "v1_compiler_effect_derivation.rs", - "v1_compiler_emit.rs", - "v1_compiler_emit_core_support.rs", - "v1_compiler_emit_go.rs", - "v1_compiler_emit_python.rs", - "v1_compiler_emit_rust.rs", - "v1_compiler_infer.rs", - "v1_compiler_infer_access.rs", - "v1_compiler_infer_cycle.rs", - "v1_compiler_infer_emit_info.rs", - "v1_compiler_infer_env.rs", - "v1_compiler_infer_items.rs", - "v1_compiler_infer_lookup.rs", - "v1_compiler_infer_method.rs", - "v1_compiler_infer_patterns.rs", - "v1_compiler_infer_resolve.rs", - "v1_compiler_infer_service.rs", - "v1_compiler_infer_sigs.rs", - "v1_compiler_infer_types.rs", - "v1_compiler_languages.rs", - "v1_compiler_normalize.rs", - "v1_compiler_ownership.rs", - "v1_compiler_parse.rs", - "v1_compiler_resolve.rs", - "v1_compiler_runtime_go.rs", - "v1_compiler_runtime_rust.rs", - "v1_compiler_stage0_crates.rs", - "v1_compiler_tokenize.rs", - "v1_compiler_trace.rs", - "v1_compiler_trait_derive_emit.rs", - "v1_compiler_workspace_members.rs", - "v1_probe_emit_interp.rs", - "v1_rt.rs", - "v1_std_core.rs", - "v1_test_non_ascii_perf_fixture.rs", - "wt_a.rs", - "wt_b.rs", - "wt_common.rs", -]; +// Single authority: gunbc.stage0_emit_model.generated_stage0_files +// (dag/gunbc/stage0_emit_model.dag). Hand-maintained registry authority: +// gunbc.stage0_crate_layout_generated (frontier-derived; regen via +// generated_artifact_gate main_wet). Witness: stage0_emit_model_witness_test.dag +// + stage0_crate_layout_witness_test.dag + self_host/crate_layout_witness_test.dag. +// Construction close (#7258 follow-up): the Rust GENERATED_STAGE0_FILES const is +// deleted; regen reads the .dag list through lens_string_list_data so a second +// hand copy cannot drift. +const STAGE0_EMIT_MODEL_AUTHORITY_REL: &str = "dag/gunbc/stage0_emit_model.dag"; +const GENERATED_STAGE0_FILES_DATA_NAME: &str = "generated_stage0_files"; + +fn generated_stage0_files() -> &'static [String] { + static FILES: OnceLock> = OnceLock::new(); + FILES + .get_or_init(|| { + v1_compiler::cli_run::lens_string_list_data( + STAGE0_EMIT_MODEL_AUTHORITY_REL, + GENERATED_STAGE0_FILES_DATA_NAME, + false, + ) + }) + .as_slice() +} fn main() -> ExitCode { match run() { @@ -306,7 +222,7 @@ fn run() -> Result<(), String> { Usage: regen_stage0 [--verify | --emit-fresh [--write-manifest ] [--verify]]\n\ Omit flags to write stage0; pass `--verify` to check without writing;\n\ pass `--emit-fresh ` to assemble the faithful emitted crate into and stop;\n\ - add `--write-manifest ` to also write the GENERATED_STAGE0_FILES roster there;\n\ + add `--write-manifest ` to also write the generated_stage0_files roster there;\n\ combine `--emit-fresh` with `--verify` to leave the assembled crate in place after checking." )); } @@ -362,12 +278,12 @@ fn run() -> Result<(), String> { if emit_fresh.is_some() { if let Some(manifest_path) = &write_manifest { - let content = GENERATED_STAGE0_FILES.join("\n"); + let content = generated_stage0_files().join("\n"); fs::write(manifest_path, content) .map_err(|e| format!("write roster manifest {}: {e}", manifest_path.display()))?; println!( "regen_stage0 --write-manifest: wrote {} file entries to {}", - GENERATED_STAGE0_FILES.len(), + generated_stage0_files().len(), manifest_path.display() ); } @@ -379,7 +295,7 @@ fn run() -> Result<(), String> { stage0_src: &stage0_src, fresh_dir: &fresh_dir, verify_only, - generated_file_count: GENERATED_STAGE0_FILES.len(), + generated_file_count: generated_stage0_files().len(), emitted_file_count: emitted.len(), phases: &mut phases, run_started, @@ -392,7 +308,7 @@ fn run() -> Result<(), String> { manifest_dir: &manifest_dir, verify_only, status: "completed_emit_fresh", - generated_file_count: GENERATED_STAGE0_FILES.len(), + generated_file_count: generated_stage0_files().len(), emitted_file_count: emitted.len(), phases, elapsed_ms: elapsed_ms(run_started), @@ -413,7 +329,7 @@ fn run() -> Result<(), String> { stage0_src: &stage0_src, fresh_dir: &fresh_dir, verify_only, - generated_file_count: GENERATED_STAGE0_FILES.len(), + generated_file_count: generated_stage0_files().len(), emitted_file_count: emitted.len(), phases: &mut phases, run_started, @@ -440,7 +356,7 @@ fn run() -> Result<(), String> { manifest_dir: &manifest_dir, verify_only, status: "completed", - generated_file_count: GENERATED_STAGE0_FILES.len(), + generated_file_count: generated_stage0_files().len(), emitted_file_count: emitted.len(), phases, elapsed_ms: elapsed_ms(run_started), @@ -449,7 +365,7 @@ fn run() -> Result<(), String> { let _ = fs::remove_dir_all(&fresh_dir); println!( "regen_stage0: wrote {} generated stage0 files.", - GENERATED_STAGE0_FILES.len() + generated_stage0_files().len() ); Ok(()) } @@ -602,8 +518,8 @@ fn temp_dir(name: &str) -> PathBuf { } fn assert_registry_is_partitioned() -> Result<(), String> { - for generated in GENERATED_STAGE0_FILES { - if HAND_MAINTAINED_STAGE0_FILES.contains(generated) { + for generated in generated_stage0_files() { + if HAND_MAINTAINED_STAGE0_FILES.contains(&generated.as_str()) { return Err(format!( "`{generated}` appears in both generated and hand-maintained stage0 registries" )); @@ -804,7 +720,7 @@ fn rustfmt_generated_crate(dir: &Path) -> Result<(), String> { // standalone rustfmt so the emitted ARTIFACT is canonically formatted for EVERY comparer — one // normalization authority at production, not a re-normalization patched into each comparer. let src = dir.join("src"); - for file_name in GENERATED_STAGE0_FILES { + for file_name in generated_stage0_files() { let path = src.join(file_name); let raw = fs::read_to_string(&path) .map_err(|e| format!("read emitted {}: {e}", path.display()))?; @@ -825,7 +741,7 @@ fn rustfmt_generated_crate(dir: &Path) -> Result<(), String> { struct HandVerifyReport { /// Emitter produces a candidate byte-identical (after identical rustfmt normalization) /// to the committed hand file: the HAND entry is now a dead scaffold and the file - /// should be flipped into GENERATED_STAGE0_FILES. + /// should be flipped into gunbc.stage0_emit_model.generated_stage0_files. matches: Vec, /// Emitter produces a candidate that differs from committed: either the known emitter /// gap that justifies hand-maintenance, or an unintended hand-edit. Inspect the diff. @@ -933,7 +849,7 @@ fn print_hand_verify_report(report: &HandVerifyReport) { ); if !report.matches.is_empty() { println!( - " MATCH (emitter reproduces these -- flip to GENERATED_STAGE0_FILES): {}", + " MATCH (emitter reproduces these -- flip to gunbc.stage0_emit_model.generated_stage0_files): {}", report.matches.join(", ") ); } @@ -1102,7 +1018,10 @@ fn assert_output_set_matches_registry( committed_src: &Path, fresh_src: &Path, ) -> Result<(), String> { - let registered: BTreeSet<&str> = GENERATED_STAGE0_FILES.iter().copied().collect(); + let registered: BTreeSet<&str> = generated_stage0_files() + .iter() + .map(|s| s.as_str()) + .collect(); let hand_maintained: BTreeSet<&str> = HAND_MAINTAINED_STAGE0_FILES.iter().copied().collect(); let fresh_files = direct_rs_file_names(fresh_src)?; @@ -1116,7 +1035,7 @@ fn assert_output_set_matches_registry( if !unregistered_fresh.is_empty() { return Err(format!( "fresh self-compile emitted unregistered stage0 file(s): {}\n\ - Add generated files to GENERATED_STAGE0_FILES or mark hand-maintained files explicitly.", + Add generated files to gunbc.stage0_emit_model.generated_stage0_files or mark hand-maintained files explicitly.", unregistered_fresh.join(", ") )); } @@ -1128,7 +1047,7 @@ fn assert_output_set_matches_registry( .collect(); if !missing_fresh.is_empty() { return Err(format!( - "GENERATED_STAGE0_FILES contains file(s) missing from fresh self-compile: {}", + "generated_stage0_files contains file(s) missing from fresh self-compile: {}", missing_fresh.join(", ") )); } @@ -1151,7 +1070,7 @@ fn assert_output_set_matches_registry( if !unregistered_committed_generated.is_empty() { return Err(format!( "committed generated stage0 file(s) are not registered: {}\n\ - Add them to GENERATED_STAGE0_FILES or remove the stale committed outputs.", + Add them to gunbc.stage0_emit_model.generated_stage0_files or remove the stale committed outputs.", unregistered_committed_generated.join(", ") )); } @@ -1181,7 +1100,7 @@ fn direct_rs_file_names(dir: &Path) -> Result, String> { fn verify_stage0_matches(committed_src: &Path, fresh_src: &Path) -> Result<(), String> { let mut mismatches = Vec::new(); - for file_name in GENERATED_STAGE0_FILES { + for file_name in generated_stage0_files() { let committed = committed_src.join(file_name); let fresh = fresh_src.join(file_name); let committed_text = fs::read_to_string(&committed) @@ -1192,7 +1111,7 @@ fn verify_stage0_matches(committed_src: &Path, fresh_src: &Path) -> Result<(), S // `rustfmt_generated_crate` (production-side single authority, matching the committed // seed's own fmt normalization), so any surviving difference is genuine content drift. if committed_text != fresh_text { - mismatches.push((*file_name).to_string()); + mismatches.push(file_name.clone()); } } // Structured divergence-count contract for the regen_divergence ratchet (#6352, two-job split): @@ -1249,7 +1168,7 @@ fn changed_registered_outputs( committed_src: &Path, ) -> Result, String> { let mut changed = Vec::new(); - for file_name in GENERATED_STAGE0_FILES { + for file_name in generated_stage0_files() { let fresh = fresh_src.join(file_name); let committed = committed_src.join(file_name); let fresh_text = fs::read_to_string(&fresh) @@ -1257,7 +1176,7 @@ fn changed_registered_outputs( let committed_text = match fs::read_to_string(&committed) { Ok(text) => text, Err(e) if e.kind() == io::ErrorKind::NotFound => { - changed.push((*file_name).to_string()); + changed.push(file_name.clone()); continue; } Err(e) => return Err(format!("read committed {}: {e}", committed.display())), @@ -1265,14 +1184,14 @@ fn changed_registered_outputs( // Plain byte compare: the emitted fresh crate is already per-file normalized at production // (`rustfmt_generated_crate`), so the changed list carries genuine content drift only. if fresh_text != committed_text { - changed.push((*file_name).to_string()); + changed.push(file_name.clone()); } } Ok(changed) } fn write_registered_outputs(fresh_src: &Path, committed_src: &Path) -> Result<(), String> { - for file_name in GENERATED_STAGE0_FILES { + for file_name in generated_stage0_files() { let fresh = fresh_src.join(file_name); let committed = committed_src.join(file_name); fs::copy(&fresh, &committed) @@ -1291,12 +1210,50 @@ mod tests { assert_registry_is_partitioned().expect("stage0 registry partition"); for file_name in HAND_MAINTAINED_STAGE0_FILES { assert!( - !GENERATED_STAGE0_FILES.contains(file_name), + !generated_stage0_files().iter().any(|f| f == file_name), "{file_name} must not be touched by regen_stage0" ); } } + /// Construction close of the #7258 dual-copy fork: regen must read + /// `gunbc.stage0_emit_model.generated_stage0_files` and must not carry a second + /// hand list const. RED: re-introduce the deleted roster const → this fails; + /// drop a known generated basename from the .dag list → the positives fail. + #[test] + fn generated_stage0_files_read_from_dag_authority_not_rust_const() { + let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src/bin/regen_stage0.rs"); + let source = fs::read_to_string(&path).expect("read regen_stage0.rs"); + // Needle assembled so this assertion's own source text is not a false positive. + let banned_const = format!("const {}{}{}", "GENERATED_STAGE0_FILES", ": ", "&[&str]"); + assert!( + !source.contains(&banned_const), + "hand-copied generated_stage0_files Rust const must stay deleted — dual-copy fork is unwritable" + ); + assert!( + source.contains("lens_string_list_data"), + "regen_stage0 must read generated_stage0_files via the host .dag list reader" + ); + let files = generated_stage0_files(); + assert!( + files.len() >= 101, + "authority list too short ({}); expected the post-#7258 generated set", + files.len() + ); + for required in [ + "std_execution_mode.rs", + "v1_compiler_closure_stub_v2_std_integer_rust.rs", + "v1_compiler_closure_stub_v2_std_text_rust.rs", + "lib.rs", + "std_algebra.rs", + ] { + assert!( + files.iter().any(|f| f == required), + "dag authority missing generated file {required}" + ); + } + } + #[test] fn output_set_rejects_unregistered_fresh_file() { let committed = temp_test_dir("committed"); @@ -1344,12 +1301,18 @@ mod tests { // Plain byte compare: only the file whose content genuinely changed is listed. seed_registered_files(&committed, "fn same() {}\n"); seed_registered_files(&fresh, "fn same() {}\n"); - fs::write(fresh.join(GENERATED_STAGE0_FILES[0]), "fn changed() {}\n") - .expect("write changed generated file"); + fs::write( + fresh.join(generated_stage0_files()[0].as_str()), + "fn changed() {}\n", + ) + .expect("write changed generated file"); let changed = changed_registered_outputs(&fresh, &committed).expect("changed output receipt"); - assert_eq!(changed, vec![GENERATED_STAGE0_FILES[0].to_string()]); + assert_eq!( + changed, + vec![generated_stage0_files()[0].as_str().to_string()] + ); let _ = fs::remove_dir_all(committed); let _ = fs::remove_dir_all(fresh); @@ -1471,7 +1434,7 @@ mod tests { fn seed_registered_files(dir: &Path, contents: &str) { fs::create_dir_all(dir).expect("create temp stage0 dir"); - for file_name in GENERATED_STAGE0_FILES { + for file_name in generated_stage0_files() { fs::write(dir.join(file_name), contents).expect("write registered generated file"); } } diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index ba1902c3cbb..6f576bddb8f 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -24403,7 +24403,12 @@ pub(crate) fn non_fold_residue_units_from_module_source( ), } } - path = row_path; + path = Some(row_path.unwrap_or_else(|| { + panic!( + "nfr frontier reader: `subject` in a `{data_name}` row of \ + {module_rel_path} is `PathSubject` but carries no `path` field" + ) + })); } _ => panic!( "nfr frontier reader: `subject` in a `{data_name}` row of \ @@ -24990,6 +24995,28 @@ mod nfr_tests { "a row without a `subject` field must refuse loudly (fail-closed)" ); } + + #[test] + fn nfr_frontier_reader_locates_path_subject_without_path() { + let synthetic = "module gunbc.non_fold_residue\n\n\ + data non_fold_residue_frontier: List = [\n\ + FrontierRow { subject: PathSubject { }, reason: \"r\", trigger: TriggerProse { text: \"d\" } }\n\ + ]\n"; + let refusal = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + super::non_fold_residue_units_from_module_source("synthetic.dag", synthetic) + })) + .expect_err("a PathSubject carrying no `path` field must refuse loudly (fail-closed)"); + let message = refusal + .downcast_ref::() + .cloned() + .or_else(|| refusal.downcast_ref::<&str>().map(|s| s.to_string())) + .unwrap_or_default(); + assert!( + message.contains("`PathSubject` but carries no `path` field"), + "the refusal must LOCATE the missing `path` inside the present PathSubject, not \ + report the row as having no `subject` field; got: {message}" + ); + } } const LANGUAGES_AUTHORITY_REL: &str = "dag/std/languages.dag"; diff --git a/src/v1/stage0/src/test_module_hygiene.rs b/src/v1/stage0/src/test_module_hygiene.rs index ed8b9930454..9caa942898a 100644 --- a/src/v1/stage0/src/test_module_hygiene.rs +++ b/src/v1/stage0/src/test_module_hygiene.rs @@ -510,6 +510,33 @@ test fn live_holds() -> Bool { } #[test] + + + + #[test] + fn corpus_orphan_census_proud_wren() { + let manifest = PathBuf::from(env!("CARGO_MANIFEST_DIR")); + let ws = manifest.join("../../.."); + let roots = vec![ + ws.join("dag").to_string_lossy().into_owned(), + ws.join("src/v2").to_string_lossy().into_owned(), + ]; + // collect_orphan_helpers joins roots onto cwd — chdir to workspace + std::env::set_current_dir(&ws).expect("chdir workspace"); + match collect_orphan_helpers(&["dag".into(), "src/v2".into()]) { + Ok(o) if o.is_empty() => {} + Ok(o) => { + let mut lines: Vec = o + .iter() + .map(|x| format!("{}::{}", x.entry, x.name)) + .collect(); + lines.sort(); + panic!("ORPHANS {}:\n{}", o.len(), lines.join("\n")); + } + Err(e) => panic!("orphan collect err: {e}"), + } + } + fn file_grain_enumerate_yields_two_test_fns() { let dir = tmp_dir(); let file = dir.join("two_fn_file_grain_test.dag"); diff --git a/src/v2/extdeps/react/structural_receipts_test.dag b/src/v2/extdeps/react/structural_receipts_test.dag index 298e6ea0e24..6846ebd260e 100644 --- a/src/v2/extdeps/react/structural_receipts_test.dag +++ b/src/v2/extdeps/react/structural_receipts_test.dag @@ -24,23 +24,16 @@ import v2.extdeps.frameworks.react { Text, UseActionState, UseCallback, - UseContext, UseDebugValue, UseDeferredValue, UseEffect, - UseEffectEvent, UseId, - UseImperativeHandle, UseInsertionEffect, UseLayoutEffect, UseMemo, UseOptimistic, - UseReducer, - UseRef, - UseState, UseSyncExternalStore, UseTransition, - ValueAbsent } import std.algebra { Cons, Empty } import v2.std.algebra { length } @@ -63,34 +56,6 @@ fn react_probe_props_site() -> ReactPropsSite { } } -fn react_probe_hook_use_state() -> ReactHookSite { - UseState { initial_ref: react_probe_cross_decl_ref } -} - -fn react_probe_hook_use_reducer() -> ReactHookSite { - UseReducer { - reducer_ref: react_probe_cross_decl_ref, - initial_arg_ref: react_probe_cross_decl_ref, - init: ValueAbsent - } -} - -fn react_probe_hook_use_context() -> ReactHookSite { - UseContext { context_ref: react_probe_cross_decl_ref } -} - -fn react_probe_hook_use_ref() -> ReactHookSite { - UseRef { initial_ref: react_probe_cross_decl_ref } -} - -fn react_probe_hook_use_imperative_handle() -> ReactHookSite { - UseImperativeHandle { - ref_target: react_probe_cross_decl_ref, - factory_ref: react_probe_cross_decl_ref, - dependencies: DependenciesArgOmitted - } -} - fn react_probe_hook_use_effect() -> ReactHookSite { UseEffect { setup_ref: react_probe_cross_decl_ref, @@ -115,10 +80,6 @@ fn react_probe_hook_use_insertion_effect() -> ReactHookSite { } } -fn react_probe_hook_use_effect_event() -> ReactHookSite { - UseEffectEvent { callback_ref: react_probe_cross_decl_ref } -} - fn react_probe_hook_use_memo() -> ReactHookSite { UseMemo { factory_ref: react_probe_cross_decl_ref, From 7dc0dd9abdd74c99cfd894e8e9ae82f33a62198f Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 04:31:59 +0000 Subject: [PATCH 3/8] WIP: test umbrella dissolution --- dag/test/claim/builtin_get_resolver_test.dag | 6 +++--- dag/test/claim/ci_yaml_serializer_witness_test.dag | 12 ++++++------ .../live_deploy/service_ready_witness_test.dag | 4 ++-- .../shell_dag_census_5a_typed_ops_witness_test.dag | 14 +++++++------- .../claim/string_brace_escape_witness_test.dag | 8 ++++---- src/v1/stage0/src/test_module_hygiene.rs | 10 ++++++++++ .../lens/affected_set/edit_locus_resolver_test.dag | 2 +- src/v2/lens/no_dual_representation_test.dag | 4 ++-- src/v2/lens/wiring_liveness_corpus_test.dag | 11 +++++++++++ src/v2/test/claim/bash_program_fold_test.dag | 4 ++-- .../execution/dag_add_emit_round_trip_test.dag | 4 ++-- .../long/compiler_frontier_probe_entry_test.dag | 2 +- .../long/dag_compile_clean_scope_sigma_test.dag | 2 +- .../long/parse_table_memo_amortization_test.dag | 4 ++-- .../validate_ingest_staging_stage_bisect_test.dag | 6 +++--- .../manual/branch_infer_fail_open_audit_test.dag | 4 ++-- ...ross_language_add_python_to_typescript_test.dag | 6 +++--- .../manual/inhabitant_neutralization_test.dag | 4 ++-- .../manual/typescript_descriptor_node_run_test.dag | 4 ++-- .../floor_skip/node_precise_discriminator_test.dag | 2 +- 20 files changed, 67 insertions(+), 46 deletions(-) diff --git a/dag/test/claim/builtin_get_resolver_test.dag b/dag/test/claim/builtin_get_resolver_test.dag index 89661e23454..2b550354b02 100644 --- a/dag/test/claim/builtin_get_resolver_test.dag +++ b/dag/test/claim/builtin_get_resolver_test.dag @@ -2,21 +2,21 @@ module test.claim.builtin_get_resolver data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -fn witness_get_in_bounds_returns_element() -> Bool { +test fn witness_get_in_bounds_returns_element() -> Bool { match get(xs: [10, 20, 30], index: 1) { Present { value: v } => v == 20 Absent => false } } -fn witness_get_out_of_bounds_is_absent() -> Bool { +test fn witness_get_out_of_bounds_is_absent() -> Bool { match get(xs: [10, 20, 30], index: 7) { Present { value: _ } => false Absent => true } } -fn witness_get_negative_index_is_absent() -> Bool { +test fn witness_get_negative_index_is_absent() -> Bool { match get(xs: [10, 20, 30], index: 0 - 1) { Present { value: _ } => false Absent => true diff --git a/dag/test/claim/ci_yaml_serializer_witness_test.dag b/dag/test/claim/ci_yaml_serializer_witness_test.dag index 515e87cebf5..db55ab03458 100644 --- a/dag/test/claim/ci_yaml_serializer_witness_test.dag +++ b/dag/test/claim/ci_yaml_serializer_witness_test.dag @@ -21,16 +21,16 @@ test fn witness_steps_sequence_elements_are_yaml_values() -> Bool { } } -fn witness_step_sequence_only_serializes() -> Bool { +test fn witness_step_sequence_only_serializes() -> Bool { let step = step_yaml(step: ci_workflow.jobs.first().steps.first()) serialize_yaml(v: yaml_sequence(elements: concat(empty_yaml_values, [step]))) != "" } -fn witness_step_mapping_serializes() -> Bool { +test fn witness_step_mapping_serializes() -> Bool { serialize_yaml(v: step_yaml(step: ci_workflow.jobs.first().steps.first())) != "" } -fn witness_first_step_is_mapping() -> Bool { +test fn witness_first_step_is_mapping() -> Bool { match steps_yaml(steps: ci_workflow.jobs.first().steps) { YamlSequence { elements: els } => match els.first() { @@ -41,20 +41,20 @@ fn witness_first_step_is_mapping() -> Bool { } } -fn witness_one_step_serializes() -> Bool { +test fn witness_one_step_serializes() -> Bool { let first = ci_workflow.jobs.first().steps.first() serialize_yaml(v: yaml_mapping(entries: [ kv(key: "steps", value: yaml_sequence(elements: concat(empty_yaml_values, [step_yaml(step: first)]))) ])) != "" } -fn witness_steps_wrapped_serializes() -> Bool { +test fn witness_steps_wrapped_serializes() -> Bool { serialize_yaml(v: yaml_mapping(entries: [ kv(key: "steps", value: steps_yaml(steps: ci_workflow.jobs.first().steps)) ])) != "" } -fn witness_jobs_yaml_serializes() -> Bool { +test fn witness_jobs_yaml_serializes() -> Bool { serialize_yaml(v: yaml_mapping(entries: [ kv(key: "jobs", value: jobs_yaml(jobs: ci_workflow.jobs)) ])) != "" diff --git a/dag/test/claim/live_deploy/service_ready_witness_test.dag b/dag/test/claim/live_deploy/service_ready_witness_test.dag index 898c6585192..46080670f86 100644 --- a/dag/test/claim/live_deploy/service_ready_witness_test.dag +++ b/dag/test/claim/live_deploy/service_ready_witness_test.dag @@ -57,7 +57,7 @@ test fn witness_readiness_poll_bound_grounded_on_std_measure_second() -> Bool { && second_count(s: live_deploy_readiness_poll_bound_seconds()) == 120 } -fn witness_poll_bound_strictly_exceeds_expected_startup() -> Bool { +test fn witness_poll_bound_strictly_exceeds_expected_startup() -> Bool { let expected = second_count(s: live_deploy_roadmap_unit_expected_startup) let bound = second_count(s: live_deploy_service_ready_poll_bound) bound > expected @@ -65,7 +65,7 @@ fn witness_poll_bound_strictly_exceeds_expected_startup() -> Bool { && bound == expected * live_deploy_service_ready_poll_bound_margin_factor } -fn witness_expected_startup_covers_measured_srv1_observations() -> Bool { +test fn witness_expected_startup_covers_measured_srv1_observations() -> Bool { let expected = second_count(s: live_deploy_roadmap_unit_expected_startup) expected >= 39 } diff --git a/dag/test/claim/shell_dag_census_5a_typed_ops_witness_test.dag b/dag/test/claim/shell_dag_census_5a_typed_ops_witness_test.dag index 53e0aec52ad..1afa8962d68 100644 --- a/dag/test/claim/shell_dag_census_5a_typed_ops_witness_test.dag +++ b/dag/test/claim/shell_dag_census_5a_typed_ops_witness_test.dag @@ -11,36 +11,36 @@ data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly data shell_dag_census_5a_scope_note: String = "Hermetic witnesses for the shell->dag census §5.A finite new-op list: os.Hostname.Set, systemd.Systemctl.ListUnits, systemd.Systemctl.Status, extdeps.tools.id (Uid/Gid/Lookup). Model-before-implement only (D1) — each op's mock_response proves the typed exit{}/output shape realizes hermetically; call-site migration (§5.B) is a separate, later lane. Each op cites its upstream authority in its home file's extdeps_external_authority_anchor." -fn witness_hostname_set_argv_is_typed_not_concat() -> Bool { +test fn witness_hostname_set_argv_is_typed_not_concat() -> Bool { join(hostname_set_argv(desired: "srv9" as DnsLabel), " ") == "hostnamectl set-hostname srv9" } -fn witness_hostname_set_realizes_hermetically() -> Bool { +test fn witness_hostname_set_realizes_hermetically() -> Bool { let r = os.Hostname.Set(desired: "srv9" as DnsLabel) r.success && r.stderr == "" } -fn witness_systemctl_list_units_realizes_hermetically() -> Bool { +test fn witness_systemctl_list_units_realizes_hermetically() -> Bool { let r = systemd.Systemctl.ListUnits(pattern: "demo@*.service" as NonEmptyStr) r.success && r.stdout != "" } -fn witness_systemctl_status_realizes_hermetically() -> Bool { +test fn witness_systemctl_status_realizes_hermetically() -> Bool { let r = systemd.Systemctl.Status(unit: "demo.service" as NonEmptyStr) r.success && r.stdout != "" } -fn witness_os_id_uid_realizes_hermetically() -> Bool { +test fn witness_os_id_uid_realizes_hermetically() -> Bool { let r = os.Id.Uid() r.success && r.value == "1000" } -fn witness_os_id_gid_realizes_hermetically() -> Bool { +test fn witness_os_id_gid_realizes_hermetically() -> Bool { let r = os.Id.Gid() r.success && r.value == "1000" } -fn witness_os_id_lookup_realizes_hermetically() -> Bool { +test fn witness_os_id_lookup_realizes_hermetically() -> Bool { let r = os.Id.Lookup(user: "demo" as NonEmptyStr) r.success && r.stdout != "" } diff --git a/dag/test/claim/string_brace_escape_witness_test.dag b/dag/test/claim/string_brace_escape_witness_test.dag index 7b074f1f7cd..89b653ac363 100644 --- a/dag/test/claim/string_brace_escape_witness_test.dag +++ b/dag/test/claim/string_brace_escape_witness_test.dag @@ -7,18 +7,18 @@ data lone_escaped_brace: String = "\{" data backslash_then_brace: String = "\\\{" data escaped_pair: String = "\{x}" -fn brace_escape_shell_form_length_test() -> Bool { +test fn brace_escape_shell_form_length_test() -> Bool { string_length(s: shell_default_form) == 42 } -fn brace_escape_produces_single_char_test() -> Bool { +test fn brace_escape_produces_single_char_test() -> Bool { string_length(s: lone_escaped_brace) == 1 } -fn brace_escape_after_backslash_is_two_chars_test() -> Bool { +test fn brace_escape_after_backslash_is_two_chars_test() -> Bool { string_length(s: backslash_then_brace) == 2 } -fn brace_escape_pair_stays_literal_test() -> Bool { +test fn brace_escape_pair_stays_literal_test() -> Bool { string_length(s: escaped_pair) == 3 } diff --git a/src/v1/stage0/src/test_module_hygiene.rs b/src/v1/stage0/src/test_module_hygiene.rs index 9caa942898a..9447703664c 100644 --- a/src/v1/stage0/src/test_module_hygiene.rs +++ b/src/v1/stage0/src/test_module_hygiene.rs @@ -266,6 +266,16 @@ fn umbrellas_in_module(entry: &str, module: &ModuleFns) -> Vec { } fn orphans_in_module(entry: &str, module: &ModuleFns) -> Vec { + // U2 enroll-or-refuse is for test modules: plain helpers beside live `test fn`s. + // A `*_test.dag` with zero `test fn`s is a fixture/example library (e.g. + // `extdeps/languages/rust_test.dag` — cross-module consumers, module-local + // reachability cannot see them). Skip rather than false-red every export. + // Dissolve-on: rename fixture libraries off the `_test.dag` suffix, or lift + // reachability to the import graph. + let has_test_fn = module.fns.values().any(|(is_test, _, _)| *is_test); + if !has_test_fn { + return Vec::new(); + } let plain: HashSet = module .fns .iter() diff --git a/src/v2/lens/affected_set/edit_locus_resolver_test.dag b/src/v2/lens/affected_set/edit_locus_resolver_test.dag index 37bece7ea9b..2f4623fd5f5 100644 --- a/src/v2/lens/affected_set/edit_locus_resolver_test.dag +++ b/src/v2/lens/affected_set/edit_locus_resolver_test.dag @@ -172,7 +172,7 @@ fn edit_locus_occurrence_textual_file_eq( } } -fn edit_locus_source_provenance_producer_holds() -> Bool { +test fn edit_locus_source_provenance_producer_holds() -> Bool { match source_ir_artifact_provenance( source_read: edit_locus_source_producer_fixture_source_read ) { diff --git a/src/v2/lens/no_dual_representation_test.dag b/src/v2/lens/no_dual_representation_test.dag index 17ffe774606..c2584a3f3f6 100644 --- a/src/v2/lens/no_dual_representation_test.dag +++ b/src/v2/lens/no_dual_representation_test.dag @@ -59,14 +59,14 @@ fn no_dual_representation_body_partial_frontier_declared() -> Bool { no_dual_representation_body_partial_frontier_note != "" } -fn no_dual_representation_test_coverage_honesty_holds() -> Bool { +test fn no_dual_representation_test_coverage_honesty_holds() -> Bool { dual_rep_coverage_honesty_holds( eq_site_count: no_dual_representation_test_live_eq_site_count(), frontier_declared: no_dual_representation_body_partial_frontier_declared() ) } -fn no_dual_representation_test_clean_holds() -> Bool { +test fn no_dual_representation_test_clean_holds() -> Bool { dual_rep_clean_holds_for_scans(scans: dual_rep_live_module_scans()) } diff --git a/src/v2/lens/wiring_liveness_corpus_test.dag b/src/v2/lens/wiring_liveness_corpus_test.dag index 0b93419e5ef..af13e6935bb 100644 --- a/src/v2/lens/wiring_liveness_corpus_test.dag +++ b/src/v2/lens/wiring_liveness_corpus_test.dag @@ -132,6 +132,17 @@ fn witness_dead_wire_detected() -> Bool { && fold(dead, init: false, f: fn(acc, w) { acc || (w.param == ^wiring_corpus_dead_input) }) } + +test fn wiring_corpus_fixture_surface_holds() -> Bool { + wiring_corpus_probe(alpha: true, beta: true) + && wiring_corpus_helper(seed: true) + && wiring_corpus_probe_live_let(seed: true) + && wiring_corpus_probe_dead_let(seed: true) + && wiring_corpus_probe_dead_let_transitive(seed: true) + && wiring_corpus_probe_inert_let(seed: true) + && wiring_corpus_probe_lambda(flag: true, items: Empty) +} + test fn wiring_liveness_corpus_witnesses() -> Bool { let decls = fn_arrow_decl_facts_live() return witness_dead_wire_detected() diff --git a/src/v2/test/claim/bash_program_fold_test.dag b/src/v2/test/claim/bash_program_fold_test.dag index 95072fd8124..d05482660d4 100644 --- a/src/v2/test/claim/bash_program_fold_test.dag +++ b/src/v2/test/claim/bash_program_fold_test.dag @@ -411,7 +411,7 @@ test fn bash_program_serialize_concat_matches_golden_holds() -> Bool { data bash_program_real_program_probe_note: String = "Real-program golden probes (witness_bin + gunbc_claims shapes) stay manual fns, not enrolled test fns: depth-7 node programs are expensive through bash_emit_program (bash_program_emit_cost_wall_note) and the floor prices witnesses by wall-clock. Goldens remain the oracle; run bash_program_real_witness_matches_golden_holds / bash_program_real_claims_matches_golden_holds locally or via gunbc run --claim-run." -fn bash_program_real_witness_matches_golden_holds() -> Bool { +test fn bash_program_real_witness_matches_golden_holds() -> Bool { bash_emit_program_matches_golden( statements: bash_program_fixture_witness_bin_specials( var_name: "V1_DAG_PARSE", @@ -423,7 +423,7 @@ fn bash_program_real_witness_matches_golden_holds() -> Bool { ) } -fn bash_program_real_claims_matches_golden_holds() -> Bool { +test fn bash_program_real_claims_matches_golden_holds() -> Bool { bash_emit_program_matches_golden( statements: bash_program_fixture_gunbc_claims_specials(), set_e: true, diff --git a/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag b/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag index 3e5f314d94a..a5bb26942d3 100644 --- a/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag +++ b/src/v2/test/claim/execution/dag_add_emit_round_trip_test.dag @@ -198,7 +198,7 @@ test fn dag_add_ingest_via_coerce_matches_canonical() -> Bool { } } -fn dag_add_domain_coerce_accepts_holds() -> Bool { +test fn dag_add_domain_coerce_accepts_holds() -> Bool { match coerce_grounded_node( source: dag_arrow_domain_conj_node(), tree: dag_add_inferred_tree, @@ -209,7 +209,7 @@ fn dag_add_domain_coerce_accepts_holds() -> Bool { } } -fn dag_add_domain_translate_accepts_holds() -> Bool { +test fn dag_add_domain_translate_accepts_holds() -> Bool { match translate_emitted_node( tree: InferredTree { root: dag_arrow_domain_conj_node(), diff --git a/src/v2/test/claim/long/compiler_frontier_probe_entry_test.dag b/src/v2/test/claim/long/compiler_frontier_probe_entry_test.dag index 6b8862caff9..adcabbdf67f 100644 --- a/src/v2/test/claim/long/compiler_frontier_probe_entry_test.dag +++ b/src/v2/test/claim/long/compiler_frontier_probe_entry_test.dag @@ -31,7 +31,7 @@ fn frontier_probe_entry_receipt() -> FrontierProbeReceipt { ) } -fn frontier_probe_entry_blocker_is_emit_surface() -> Bool { +test fn frontier_probe_entry_blocker_is_emit_surface() -> Bool { match frontier_probe_entry_receipt().blocker_class { EmitSurfaceGap => true _ => false diff --git a/src/v2/test/claim/long/dag_compile_clean_scope_sigma_test.dag b/src/v2/test/claim/long/dag_compile_clean_scope_sigma_test.dag index 02f3df31b43..24fde4f07a7 100644 --- a/src/v2/test/claim/long/dag_compile_clean_scope_sigma_test.dag +++ b/src/v2/test/claim/long/dag_compile_clean_scope_sigma_test.dag @@ -23,7 +23,7 @@ fn corpus_subject_trees() -> List { } } -fn corpus_scope_parse_accepted() -> Bool { +test fn corpus_scope_parse_accepted() -> Bool { length(xs: corpus_subject_trees()) == 1 } diff --git a/src/v2/test/claim/long/parse_table_memo_amortization_test.dag b/src/v2/test/claim/long/parse_table_memo_amortization_test.dag index 6e775b5bb1b..d00940eca02 100644 --- a/src/v2/test/claim/long/parse_table_memo_amortization_test.dag +++ b/src/v2/test/claim/long/parse_table_memo_amortization_test.dag @@ -89,7 +89,7 @@ fn memo_amort_single_root_content_hash(ingest: SourceRootIngest) -> Outcome Bool { +test fn memo_amort_parse_one_file_holds() -> Bool { match module_roots_from_source_root_ingest( ingest: memo_amort_ingest_one_file, lm: dag_language_model() @@ -109,7 +109,7 @@ fn memo_amort_parse_two_files_holds() -> Bool { } } -fn memo_amort_parse_two_files_twice_holds() -> Bool { +test fn memo_amort_parse_two_files_twice_holds() -> Bool { memo_amort_parse_two_files_holds() && memo_amort_parse_two_files_holds() } diff --git a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag index e3a1f6b368b..82ae5c60db6 100644 --- a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag +++ b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag @@ -84,14 +84,14 @@ fn bisect_through_normalize() -> Outcome { ) } -fn bisect_tokenize_terminates() -> Bool { +test fn bisect_tokenize_terminates() -> Bool { match bisect_through_tokenize() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => true } } -fn bisect_parse_terminates() -> Bool { +test fn bisect_parse_terminates() -> Bool { match bisect_through_parse() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => true @@ -108,7 +108,7 @@ fn bisect_through_grammar_validate() -> Outcome { } } -fn bisect_grammar_validate_terminates() -> Bool { +test fn bisect_grammar_validate_terminates() -> Bool { match bisect_through_grammar_validate() { Accepted { value: _, diagnostics: _ } => true Rejected { diagnostics: _ } => true diff --git a/src/v2/test/claim/manual/branch_infer_fail_open_audit_test.dag b/src/v2/test/claim/manual/branch_infer_fail_open_audit_test.dag index 42661508566..8f528084f7e 100644 --- a/src/v2/test/claim/manual/branch_infer_fail_open_audit_test.dag +++ b/src/v2/test/claim/manual/branch_infer_fail_open_audit_test.dag @@ -33,14 +33,14 @@ test fn branch_infer_fail_open_audit_rejects_holds() -> Bool { } } -fn branch_infer_fail_open_audit_silent_accept_holds() -> Bool { +test fn branch_infer_fail_open_audit_silent_accept_holds() -> Bool { match infer(tree: branch_infer_fail_open_audit_body()) { Accepted { value: _, diagnostics: d } => d == None Rejected { diagnostics: _ } => false } } -fn branch_infer_fail_open_audit_literal_arm_accepts_holds() -> Bool { +test fn branch_infer_fail_open_audit_literal_arm_accepts_holds() -> Bool { match infer(tree: dag_pick_if_body_fixture) { Accepted { value: _, diagnostics: d } => d == None Rejected { diagnostics: _ } => false diff --git a/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag b/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag index 204b16eff5d..2e59543513f 100644 --- a/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag +++ b/src/v2/test/claim/manual/cross_language_add_python_to_typescript_test.dag @@ -99,7 +99,7 @@ fn parse_tree_to_target_model_bridge_fails_closed() -> Bool { } } -fn cross_language_emit_inhabitant_neutralization_fails_closed() -> Bool { +test fn cross_language_emit_inhabitant_neutralization_fails_closed() -> Bool { match infer(tree: python_emitted_add_fn_node()) { Accepted { value: inferred, diagnostics: _ } => match emit(tree: inferred, target: ts_target_model()) { @@ -110,7 +110,7 @@ fn cross_language_emit_inhabitant_neutralization_fails_closed() -> Bool { } } -fn cross_language_emit_inhabitant_neutralization_holds() -> Bool { +test fn cross_language_emit_inhabitant_neutralization_holds() -> Bool { match neutralize_core_for_target( core: python_emitted_add_fn_node(), target: ts_target_model() @@ -128,7 +128,7 @@ fn cross_language_emit_inhabitant_neutralization_holds() -> Bool { } } -fn cross_language_add_python_to_typescript_chain_status_holds() -> Bool { +test fn cross_language_add_python_to_typescript_chain_status_holds() -> Bool { match python_grammar_parse_fixture() { Accepted { value: python_parse_tree, diagnostics: _ } => diff --git a/src/v2/test/claim/manual/inhabitant_neutralization_test.dag b/src/v2/test/claim/manual/inhabitant_neutralization_test.dag index e97fdbefdaf..d99fe706498 100644 --- a/src/v2/test/claim/manual/inhabitant_neutralization_test.dag +++ b/src/v2/test/claim/manual/inhabitant_neutralization_test.dag @@ -46,14 +46,14 @@ import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly -fn inhabitant_neutralization_python_int_std_projection_holds() -> Bool { +test fn inhabitant_neutralization_python_int_std_projection_holds() -> Bool { match inhabitant_std_projection_symbol(inhabitant: python_int_inhabitant_node()) { Accepted { value: proj, diagnostics: _ } => proj == ^std_projection_additive_numeric Rejected { diagnostics: _ } => false } } -fn inhabitant_neutralization_ts_target_lookup_holds() -> Bool { +test fn inhabitant_neutralization_ts_target_lookup_holds() -> Bool { match target_inhabitant_for_std_projection( std_projection: ^std_projection_additive_numeric, target: ts_target_model() diff --git a/src/v2/test/claim/manual/typescript_descriptor_node_run_test.dag b/src/v2/test/claim/manual/typescript_descriptor_node_run_test.dag index cf043965f45..c69183a34e3 100644 --- a/src/v2/test/claim/manual/typescript_descriptor_node_run_test.dag +++ b/src/v2/test/claim/manual/typescript_descriptor_node_run_test.dag @@ -65,7 +65,7 @@ fn typescript_descriptor_node_host_run_i32(target: TargetModel, source: Medium Bool { +test fn typescript_descriptor_node_ts_node_run_add_holds() -> Bool { match add_body_ts_emit_from_producer_tree(target: ts_target_model()) { Accepted { value: source, diagnostics: None } => match typescript_descriptor_node_host_run_i32(target: ts_target_model(), source: source) { @@ -76,7 +76,7 @@ fn typescript_descriptor_node_ts_node_run_add_holds() -> Bool { } } -fn typescript_descriptor_node_ts_node_run_catalog_minus_discriminates() -> Bool { +test fn typescript_descriptor_node_ts_node_run_catalog_minus_discriminates() -> Bool { match add_body_ts_emit_from_producer_tree(target: add_body_ts_target_model_minus_catalog()) { Accepted { value: source, diagnostics: None } => match typescript_descriptor_node_host_run_i32( diff --git a/src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag b/src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag index 579e9535bd6..1c344e16ac4 100644 --- a/src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag +++ b/src/v2/test/fixture/floor_skip/node_precise_discriminator_test.dag @@ -51,7 +51,7 @@ data floor_disc_helper_conj: Node = Node { occurrence_id: SyntheticOccurrence } -fn floor_disc_helper_fn() -> Bool { +test fn floor_disc_helper_fn() -> Bool { floor_disc_shared_helper() } From f862fe0838625e3cab9300f7124a86543c4b1061 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 04:42:29 +0000 Subject: [PATCH 4/8] WIP: test umbrella dissolution --- src/v1/stage0/src/test_module_hygiene.rs | 37 +++++++----------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/src/v1/stage0/src/test_module_hygiene.rs b/src/v1/stage0/src/test_module_hygiene.rs index 9447703664c..4c583f5d7b7 100644 --- a/src/v1/stage0/src/test_module_hygiene.rs +++ b/src/v1/stage0/src/test_module_hygiene.rs @@ -389,10 +389,19 @@ pub fn collect_umbrella_roster(roots: &[String]) -> Result, /// U2 — orphan plain fns across `*_test.dag` under roots. pub fn collect_orphan_helpers(roots: &[String]) -> Result, String> { + // Relative roots resolve against cwd (floor discovery: workspace root). Absolute + // roots are used as-is — callers must not mutate process cwd to pass a workspace + // (cargo tests are multi-threaded; set_current_dir races). let ws = std::env::current_dir().map_err(|e| format!("cwd: {e}"))?; let mut files = Vec::new(); for root in roots { - collect_dag_files(&ws.join(root), &mut files); + let root_path = Path::new(root); + let abs = if root_path.is_absolute() { + root_path.to_path_buf() + } else { + ws.join(root_path) + }; + collect_dag_files(&abs, &mut files); } files.sort(); let mut out = Vec::new(); @@ -519,34 +528,8 @@ test fn live_holds() -> Bool { let _ = std::fs::remove_dir_all(&dir); } - #[test] - - #[test] - fn corpus_orphan_census_proud_wren() { - let manifest = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let ws = manifest.join("../../.."); - let roots = vec![ - ws.join("dag").to_string_lossy().into_owned(), - ws.join("src/v2").to_string_lossy().into_owned(), - ]; - // collect_orphan_helpers joins roots onto cwd — chdir to workspace - std::env::set_current_dir(&ws).expect("chdir workspace"); - match collect_orphan_helpers(&["dag".into(), "src/v2".into()]) { - Ok(o) if o.is_empty() => {} - Ok(o) => { - let mut lines: Vec = o - .iter() - .map(|x| format!("{}::{}", x.entry, x.name)) - .collect(); - lines.sort(); - panic!("ORPHANS {}:\n{}", o.len(), lines.join("\n")); - } - Err(e) => panic!("orphan collect err: {e}"), - } - } - fn file_grain_enumerate_yields_two_test_fns() { let dir = tmp_dir(); let file = dir.join("two_fn_file_grain_test.dag"); From 7c081b15c6ca68b179da5d919492e6a85992ce0d Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 05:01:11 +0000 Subject: [PATCH 5/8] Hygiene: drop stray blank line between unit tests. Co-authored-by: Cursor --- src/v1/stage0/src/test_module_hygiene.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/v1/stage0/src/test_module_hygiene.rs b/src/v1/stage0/src/test_module_hygiene.rs index 4c583f5d7b7..eafbe667e82 100644 --- a/src/v1/stage0/src/test_module_hygiene.rs +++ b/src/v1/stage0/src/test_module_hygiene.rs @@ -528,7 +528,6 @@ test fn live_holds() -> Bool { let _ = std::fs::remove_dir_all(&dir); } - #[test] fn file_grain_enumerate_yields_two_test_fns() { let dir = tmp_dir(); From 49953dbf08bd9ca6abe98cf8a61a0f26ff49a1bd Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 05:03:09 +0000 Subject: [PATCH 6/8] Restore stale consumer edges broken by orphan/umbrella sweep. Review 43128: move parse-binding shared helpers into a non-*_test support module and repoint long/body_lowering imports; retarget floor_skip discovery roster onto a surviving floor_test_* leaf; restore bisect_normalize_terminates as a test fn for the Rust termination harness. Co-authored-by: Cursor --- .../src/bin/floor_skip_discovery_witness.rs | 6 +- .../fn_body_seam_witness_helpers.dag | 2 +- .../parse_binding_fidelity_witness_test.dag | 2 +- ...idate_ingest_staging_stage_bisect_test.dag | 7 + .../parse/parse_binding_fidelity_support.dag | 226 ++++++++++++++++++ 5 files changed, 238 insertions(+), 5 deletions(-) create mode 100644 src/v2/test/claim/parse/parse_binding_fidelity_support.dag diff --git a/src/v1/stage0/src/bin/floor_skip_discovery_witness.rs b/src/v1/stage0/src/bin/floor_skip_discovery_witness.rs index 717889b2fa4..7888ec2a618 100644 --- a/src/v1/stage0/src/bin/floor_skip_discovery_witness.rs +++ b/src/v1/stage0/src/bin/floor_skip_discovery_witness.rs @@ -33,7 +33,7 @@ fn floor_skip_test_roster() -> (Vec, Vec<(String, String)>) { .join("src/v2/workflow/affected_set_floor_runner_test.dag") .to_string_lossy() .into_owned(); - let function = "floor_runner_node_frontier_policy_holds".to_string(); + let function = "floor_test_untouched_skips_assumed_green_holds".to_string(); (floor_skip_source_roots(), vec![(entry, function)]) } @@ -545,7 +545,7 @@ fn entry_file_helper_fn_edit_scopes_runs_to_touched_entry_only() { ), ( runner_entry, - "floor_runner_node_frontier_policy_holds".to_string(), + "floor_test_untouched_skips_assumed_green_holds".to_string(), ), ]; @@ -585,7 +585,7 @@ fn import_closure_helper_fn_edit_runs_importer_entry_only() { (disc_entry, "floor_disc_witness_a_only_holds".to_string()), ( runner_entry, - "floor_runner_node_frontier_policy_holds".to_string(), + "floor_test_untouched_skips_assumed_green_holds".to_string(), ), ]; diff --git a/src/v2/test/claim/body_lowering/fn_body_seam_witness_helpers.dag b/src/v2/test/claim/body_lowering/fn_body_seam_witness_helpers.dag index 5a4e1f332f3..958871750bd 100644 --- a/src/v2/test/claim/body_lowering/fn_body_seam_witness_helpers.dag +++ b/src/v2/test/claim/body_lowering/fn_body_seam_witness_helpers.dag @@ -34,7 +34,7 @@ import v2.std.node { node_synthetic } import v2.std.node_query { find_arrow_body_child } -import v2.test.parse.parse_binding_fidelity { +import v2.test.parse.parse_binding_fidelity_support { pbf_parse_preserves_param_x_binding, pbf_parse_preserves_param_y_binding } diff --git a/src/v2/test/claim/long/parse_binding_fidelity_witness_test.dag b/src/v2/test/claim/long/parse_binding_fidelity_witness_test.dag index bddc62e8ead..6cd5afd166b 100644 --- a/src/v2/test/claim/long/parse_binding_fidelity_witness_test.dag +++ b/src/v2/test/claim/long/parse_binding_fidelity_witness_test.dag @@ -2,7 +2,7 @@ module v2.test.long.parse_binding_fidelity_witness import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } import v2.std.logic { Bool } -import v2.test.parse.parse_binding_fidelity { +import v2.test.parse.parse_binding_fidelity_support { pbf_parse_does_not_collapse_to_token_ident, pbf_parse_preserves_param_x_binding, pbf_parse_preserves_param_y_binding, diff --git a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag index 82ae5c60db6..ab72a4633e4 100644 --- a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag +++ b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag @@ -98,6 +98,13 @@ test fn bisect_parse_terminates() -> Bool { } } +test fn bisect_normalize_terminates() -> Bool { + match bisect_through_normalize() { + Accepted { value: _, diagnostics: _ } => true + Rejected { diagnostics: _ } => true + } +} + fn bisect_through_grammar_validate() -> Outcome { let lm = dag_language_model() match lm.grammar { diff --git a/src/v2/test/claim/parse/parse_binding_fidelity_support.dag b/src/v2/test/claim/parse/parse_binding_fidelity_support.dag new file mode 100644 index 00000000000..cb754fc1c34 --- /dev/null +++ b/src/v2/test/claim/parse/parse_binding_fidelity_support.dag @@ -0,0 +1,226 @@ +module v2.test.parse.parse_binding_fidelity_support + +import v2.compiler.name_resolve { + Admission, + Import, + ImportVisible, + ResolutionSubject, + resolve_with_admission_policy +} +import v2.compiler.ingested_fixture_arrows { + ingested_add_module_source, + ingested_find_arrow_in_module +} +import v2.compiler.normalize { normalize } +import v2.compiler.parse { parse_module } +import v2.compiler.resolve { resolve } +import v2.compiler.tokenize { tokenize } +import v2.extdeps.languages.dag { + dag_grammar_atom, + dag_language_model_surface_empty_prelude, + dag_language_model, + dag_named_edge +} +import std.algebra { Cons, Empty, FreeMonoid } +import v2.std.algebra { fold_list_node } +import v2.std.collection { + List, + list_at_optional +} +import v2.std.optional { + Absent, + Optional, + Present +} +import v2.std.qualified_name { QualifiedName } +import v2.std.diagnostic { + Accepted, + Outcome, + Rejected, + bind_outcome, + outcome_accepted +} +import v2.std.grammar { ParseTree, node_atom_identity_optional } +import v2.std.compilers.lexing { TokenStream, symbol_lexeme } +import v2.std.logic { Bool } +import v2.std.node { + Atom, + Conj, + Edge, + Named, + Node, + Positional, + Symbol, + TypeNode, + SyntheticOccurrence +} +import v2.std.node_query { find_arrow_body_child } +import v2.std.resolution_policy { ImportScoped } +import v2.std.cross_tree.resolution { SourceRootIndex, source_root_index_empty } +import v2.std.live_tree { LiveTreeDisposition, SubstrateInputsOnly } +import v2.compiler.namespace_graft { module_header_containment_graft } + +data live_tree_disposition: LiveTreeDisposition = SubstrateInputsOnly + +data parse_binding_fidelity_support_note: String = "Shared parse-binding helpers for long-lane + body_lowering consumers. Not a *_test.dag — module-local orphan hygiene would false-red these as dark when only cross-module callers exist (review 43128). Fast-lane tests stay in parse_binding_fidelity_test.dag." + +fn pbf_tokenize() -> Outcome { + let lm = dag_language_model() + tokenize(text: ingested_add_module_source, file: ^pbf_source_file, rules: lm.lex) +} + +fn pbf_parse_tokens(tokens: TokenStream) -> Outcome { + let lm = dag_language_model() + bind_outcome( + o: parse_module(tokens: tokens, grammar: lm.grammar), + f: fn(artifact) { + outcome_accepted(value: artifact.tree) + } + ) +} + +fn pbf_normalized_add_module() -> Outcome { + match pbf_tokenize() { + Accepted { value: tokens, diagnostics: _ } => + match pbf_parse_tokens(tokens: tokens) { + Accepted { value: parsed, diagnostics: _ } => + normalize(parse_tree: parsed) + Rejected { diagnostics: r } => Rejected { diagnostics: r } + } + Rejected { diagnostics: r } => Rejected { diagnostics: r } + } +} + +fn pbf_normalized_add_arrow() -> Optional { + match pbf_normalized_add_module() { + Accepted { value: tree, diagnostics: _ } => + ingested_find_arrow_in_module(root: tree) + Rejected { diagnostics: _ } => Absent + } +} + +fn pbf_resolved_add_module() -> Outcome { + let lm = dag_language_model() + match pbf_normalized_add_module() { + Accepted { value: normalized, diagnostics: _ } => + resolve(tree: normalized, lm: lm) + Rejected { diagnostics: r } => Rejected { diagnostics: r } + } +} + +fn pbf_resolved_add_arrow() -> Optional { + match pbf_resolved_add_module() { + Accepted { value: tree, diagnostics: _ } => + ingested_find_arrow_in_module(root: tree) + Rejected { diagnostics: _ } => Absent + } +} + +fn pbf_arrow_body_operand_lexeme(arrow: Node, index: Int) -> Optional { + match find_arrow_body_child(root: arrow) { + Accepted { value: body, diagnostics: _ } => + match list_at_optional(xs: body.children, index: index) { + Present { value: e } => + match node_atom_identity_optional(node: e.target) { + Present { value: id } => Present { value: symbol_lexeme(sym: id) } + Absent => Absent + } + Absent => Absent + } + Rejected { diagnostics: _ } => Absent + } +} + +fn pbf_arrow_body_operand_id(arrow: Node, index: Int) -> Optional { + match find_arrow_body_child(root: arrow) { + Accepted { value: body, diagnostics: _ } => + match list_at_optional(xs: body.children, index: index) { + Present { value: e } => node_atom_identity_optional(node: e.target) + Absent => Absent + } + Rejected { diagnostics: _ } => Absent + } +} + +fn pbf_tree_contains_atom_identity(root: Node, wanted: Symbol) -> Bool { + match root.kind { + TypeNode { connective: Atom { identity: id } } => + if id == wanted { + true + } else { + false + } + _ => + fold( + root.children, + init: false, + f: fn(found, edge) { + if found { + true + } else { + pbf_tree_contains_atom_identity(root: edge.target, wanted: wanted) + } + } + ) + } +} + +fn pbf_parse_preserves_param_x_binding() -> Bool { + match pbf_normalized_add_arrow() { + Present { value: arrow } => + match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 1) { + Present { value: lex } => lex == "x" + Absent => false + } + Absent => false + } +} + +fn pbf_parse_preserves_param_y_binding() -> Bool { + match pbf_normalized_add_arrow() { + Present { value: arrow } => + match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 2) { + Present { value: lex } => lex == "y" + Absent => false + } + Absent => false + } +} + +fn pbf_parse_does_not_collapse_to_token_ident() -> Bool { + match pbf_normalized_add_arrow() { + Present { value: arrow } => + match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 1) { + Present { value: left } => + match pbf_arrow_body_operand_lexeme(arrow: arrow, index: 2) { + Present { value: right } => (left == "x") && (right == "y") && (left != right) + Absent => false + } + Absent => false + } + Absent => false + } +} + +fn pbf_resolved_add_accepts() -> Bool { + match pbf_resolved_add_module() { + Accepted { value: _, diagnostics: _ } => true + Rejected { diagnostics: _ } => false + } +} + +fn pbf_resolved_tree_has_distinct_param_bindings() -> Bool { + match pbf_resolved_add_arrow() { + Present { value: arrow } => + match pbf_arrow_body_operand_id(arrow: arrow, index: 1) { + Present { value: left } => + match pbf_arrow_body_operand_id(arrow: arrow, index: 2) { + Present { value: right } => (left != right) && (symbol_lexeme(sym: left) == "x") && (symbol_lexeme(sym: right) == "y") + Absent => false + } + Absent => false + } + Absent => false + } +} + From beec58cad0b3caae6dd5ea96a44f934741f28c6e Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 05:16:16 +0000 Subject: [PATCH 7/8] Delete orphan bisect_through_parse_production helper. U2 orphan hygiene is wired on this PR; the helper's only callers (bisect_parse_production_terminates / single_module_parse_expr) were already removed, so discovery would refuse the dark residue. Co-authored-by: Cursor --- ...idate_ingest_staging_stage_bisect_test.dag | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag index ab72a4633e4..594cf2a8061 100644 --- a/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag +++ b/src/v2/test/claim/long/validate_ingest_staging_stage_bisect_test.dag @@ -122,34 +122,6 @@ test fn bisect_grammar_validate_terminates() -> Bool { } } -fn bisect_through_parse_production() -> Outcome { - let lm = dag_language_model() - bind_outcome( - o: tokenize( - text: bisect_empty_source.carried, - file: ^compile_ingest_staging_source_file, - rules: lm.lex - ), - f: fn(token_stream) { - bind_outcome( - o: bisect_through_grammar_validate(), - f: fn(validated) { - match lm.grammar { - ModeledGrammar { root: root } => - parse_production_tree( - tokens: token_stream_remaining(stream: token_stream), - validated: validated, - production_name: root.start - ) - _ => - Rejected { diagnostics: None } - } - } - ) - } - ) -} - fn bisect_parse_module_add_parse_accepts() -> Bool { let lm = dag_language_model() match tokenize( From 40b5c03d6174aaaba1778d31f4763fd50104f72e Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Sun, 26 Jul 2026 05:26:49 +0000 Subject: [PATCH 8/8] Repoint c_compilation_unit Rust harness to a surviving leaf. Umbrella c_compilation_unit_witnesses was dissolved; the green-by-execution harness still called the deleted name. Grep of other src/v1 run_claim string targets found no further stale umbrella callers. Co-authored-by: Cursor --- src/v1/tests/src/c_compilation_unit_witness_test.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/v1/tests/src/c_compilation_unit_witness_test.rs b/src/v1/tests/src/c_compilation_unit_witness_test.rs index 6226ecdbcac..5c7748bd35d 100644 --- a/src/v1/tests/src/c_compilation_unit_witness_test.rs +++ b/src/v1/tests/src/c_compilation_unit_witness_test.rs @@ -3,7 +3,7 @@ use v1_compiler::cli_run::{make_eval_context, resolve_entry_graph, run_claim, Cl use v1_compiler::v1_interpreter::ExecutionMode; #[test] -fn c_compilation_unit_witnesses_green_by_execution() { +fn c_compilation_unit_leaf_witness_green_by_execution() { let roots = vec![ workspace_root() .join("src/v2") @@ -17,10 +17,11 @@ fn c_compilation_unit_witnesses_green_by_execution() { .into_owned(); let (graph, si) = resolve_entry_graph(&roots, &entry).expect("resolve c witness entry"); let ctx = make_eval_context(&graph, si, ExecutionMode::Hermetic); - let outcome = run_claim(&ctx, "c_compilation_unit_witnesses"); + // Umbrella `c_compilation_unit_witnesses` dissolved; pin one surviving leaf. + let outcome = run_claim(&ctx, "witness_r3_header_source_object_paths"); assert!( matches!(outcome, ClaimOutcome::Pass), - "c_compilation_unit_witnesses must pass by execution, got {:?}", + "witness_r3_header_source_object_paths must pass by execution, got {:?}", outcome ); }