From 659c6817111ba055ba86b36e3eb4e3f98d1d2aca Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Fri, 7 Aug 2026 02:26:40 +0000 Subject: [PATCH 1/4] Land slice C-a: stable WitnessPurpose taxonomy authority. Declare the five purpose arms plus axis-typed ResourceContract bounds and an honest TerminatingOneShotFrontier deferral, with focused witnesses proving the vocabulary is writable without placement or envelope logic. Co-authored-by: Cursor --- dag/std/witness_purpose.dag | 27 ++++ .../witness_purpose_taxonomy_witness_test.dag | 149 ++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 dag/std/witness_purpose.dag create mode 100644 dag/test/claim/witness_purpose_taxonomy_witness_test.dag diff --git a/dag/std/witness_purpose.dag b/dag/std/witness_purpose.dag new file mode 100644 index 00000000000..d53697dc188 --- /dev/null +++ b/dag/std/witness_purpose.dag @@ -0,0 +1,27 @@ +module std.witness_purpose + +import std.decl_ref { DeclarationRef } +import std.content_hash { ContentHash } +import std.measure { Millisecond, ByteSize } + +type WitnessResourceBound + = EvalWallTimeBound { bound: Millisecond } + | EvalThreadCpuBound { bound: Millisecond } + | PeakMemoryBound { bound: ByteSize } + +data witness_purpose_resource_contract_note: String = "ResourceContract bound is axis-typed: wall/cpu limits are Millisecond; peak memory is ByteSize (std.measure). A single Millisecond field on all axes was state-space conflation — PeakMemory with a millisecond bound was writable. Aligns with discrete_cost derivation section 10 bound: Measure; full Measure coproduct lands when the cost consumer derives bounds." + +data witness_purpose_authority_note: String = "DECLARED witness purpose taxonomy (operator ruling 2026-08-04; DESIGN witness-cost-derives-from-purpose; discrete-cost-derivation section 10). What semantic fact the witness exists to prove — authored, not inferred from implementation. Cost and placement are DERIVED consequences on ScheduledWitnessEnvelope (std.realization_schedule SpanEnrolled), not here. Slice C-a lands only this stable vocabulary; placement and envelope derivation are separate slices." + +data witness_purpose_terminating_one_shot_frontier_note: String = "TerminatingOneShot is NOT a writable WitnessPurpose arm in slice C-a. It demands a pinned subject, a mechanically checkable dissolution trigger, AND a typed deadline after which an undissolved survey REFUSES — without the deadline substrate every permanent witness can claim to be a one-shot. A NonEmptyStr deadline field that always routes to OneShotUnavailable is rung inflation: a named future capability wearing the clothes of a finished arm. TerminatingOneShotFrontier records honest unavailability until std.measure lands typed instant/deadline and completion-receipt carriers; then TerminatingOneShot joins WitnessPurpose and this frontier type deletes." + +type WitnessPurpose + = BehavioralDiscriminator + | BoundaryCrossing { modeled_boundary: DeclarationRef, chosen_input: ContentHash } + | PopulationTotality { population: DeclarationRef } + | ExternalFidelity { effect: DeclarationRef } + | ResourceContract { bound: WitnessResourceBound } + +type TerminatingOneShotFrontier + = TerminatingOneShotUnavailableDeadlineSubstrateAbsent + | TerminatingOneShotUnavailableCompletionSubstrateAbsent diff --git a/dag/test/claim/witness_purpose_taxonomy_witness_test.dag b/dag/test/claim/witness_purpose_taxonomy_witness_test.dag new file mode 100644 index 00000000000..e4add74ab4e --- /dev/null +++ b/dag/test/claim/witness_purpose_taxonomy_witness_test.dag @@ -0,0 +1,149 @@ +module test.claim.witness_purpose_taxonomy_witness + +import std.decl_ref { decl_ref } +import std.content_hash { + ContentHash, + Fnv1a64, + Fnv1a64StructuralDigestHex, + structural_content_hash, +} +import std.measure { millisecond, byte_size, millisecond_count, byte_size_count } +import std.witness_purpose { + WitnessPurpose, + WitnessResourceBound, + BehavioralDiscriminator, + PopulationTotality, + ExternalFidelity, + ResourceContract, + EvalWallTimeBound, + EvalThreadCpuBound, + PeakMemoryBound, + TerminatingOneShotFrontier, + TerminatingOneShotUnavailableDeadlineSubstrateAbsent, + TerminatingOneShotUnavailableCompletionSubstrateAbsent, +} + +data witness_purpose_taxonomy_witness_note: String = "Slice C-a: stable WitnessPurpose vocabulary only — BehavioralDiscriminator, BoundaryCrossing, PopulationTotality, ExternalFidelity, ResourceContract. TerminatingOneShot is NOT a WitnessPurpose arm; TerminatingOneShotFrontier records honest deferral (deadline and completion substrates absent) until typed carriers land. No placement, envelope, or cadence logic — those are C-b/C-c slices." + +fn fixture_subject_hash() -> ContentHash { + Fnv1a64( + structural_content_hash(digest: "deadbeefdeadbeef" as Fnv1a64StructuralDigestHex) + ) +} + +fn fixture_population_ref() -> DeclarationRef { + decl_ref( + module_path: "dag.test.claim.witness_purpose_taxonomy_witness", + decl_name: "witness_purpose_taxonomy_witness_note", + ) +} + +test fn behavioral_discriminator_is_stable_purpose_arm() -> Bool { + let purpose = BehavioralDiscriminator + match purpose { + BehavioralDiscriminator => true + BoundaryCrossing { modeled_boundary: _, chosen_input: _ } => false + PopulationTotality { population: _ } => false + ExternalFidelity { effect: _ } => false + ResourceContract { bound: _ } => false + } +} + +test fn boundary_crossing_carries_modeled_boundary_and_chosen_input() -> Bool { + let purpose = BoundaryCrossing { + modeled_boundary: fixture_population_ref(), + chosen_input: fixture_subject_hash(), + } + match purpose { + BoundaryCrossing { modeled_boundary: boundary, chosen_input: hash } => + boundary == fixture_population_ref() + && hash == fixture_subject_hash() + BehavioralDiscriminator => false + PopulationTotality { population: _ } => false + ExternalFidelity { effect: _ } => false + ResourceContract { bound: _ } => false + } +} + +test fn population_totality_carries_population_ref() -> Bool { + let purpose = PopulationTotality { population: fixture_population_ref() } + match purpose { + PopulationTotality { population: population } => + population == fixture_population_ref() + BehavioralDiscriminator => false + BoundaryCrossing { modeled_boundary: _, chosen_input: _ } => false + ExternalFidelity { effect: _ } => false + ResourceContract { bound: _ } => false + } +} + +test fn external_fidelity_carries_effect_ref() -> Bool { + let purpose = ExternalFidelity { effect: fixture_population_ref() } + match purpose { + ExternalFidelity { effect: effect } => effect == fixture_population_ref() + BehavioralDiscriminator => false + BoundaryCrossing { modeled_boundary: _, chosen_input: _ } => false + PopulationTotality { population: _ } => false + ResourceContract { bound: _ } => false + } +} + +test fn resource_contract_wall_bound_is_millisecond() -> Bool { + let purpose = ResourceContract { + bound: EvalWallTimeBound { bound: millisecond(count: 500) }, + } + match purpose { + ResourceContract { bound: bound } => + match bound { + EvalWallTimeBound { bound: ms } => millisecond_count(m: ms) == 500 + EvalThreadCpuBound { bound: _ } => false + PeakMemoryBound { bound: _ } => false + } + BehavioralDiscriminator => false + BoundaryCrossing { modeled_boundary: _, chosen_input: _ } => false + PopulationTotality { population: _ } => false + ExternalFidelity { effect: _ } => false + } +} + +test fn resource_contract_peak_memory_bound_is_byte_size() -> Bool { + let purpose = ResourceContract { + bound: PeakMemoryBound { bound: byte_size(count: 1073741824) }, + } + match purpose { + ResourceContract { bound: bound } => + match bound { + PeakMemoryBound { bound: bytes } => byte_size_count(b: bytes) == 1073741824 + EvalWallTimeBound { bound: _ } => false + EvalThreadCpuBound { bound: _ } => false + } + BehavioralDiscriminator => false + BoundaryCrossing { modeled_boundary: _, chosen_input: _ } => false + PopulationTotality { population: _ } => false + ExternalFidelity { effect: _ } => false + } +} + +test fn terminating_one_shot_unavailable_records_deadline_substrate_absent() -> Bool { + let frontier = TerminatingOneShotUnavailableDeadlineSubstrateAbsent + match frontier { + TerminatingOneShotUnavailableDeadlineSubstrateAbsent => true + TerminatingOneShotUnavailableCompletionSubstrateAbsent => false + } +} + +test fn witness_purpose_has_five_stable_arms_only() -> Bool { + let purposes = [ + BehavioralDiscriminator, + BoundaryCrossing { + modeled_boundary: fixture_population_ref(), + chosen_input: fixture_subject_hash(), + }, + PopulationTotality { population: fixture_population_ref() }, + ExternalFidelity { effect: fixture_population_ref() }, + ResourceContract { + bound: EvalThreadCpuBound { bound: millisecond(count: 1) }, + }, + ] + length(xs: purposes) == 5 +} From f304ffe5bf1abef3c2a7a7923802dba9b227cf45 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Fri, 7 Aug 2026 02:42:22 +0000 Subject: [PATCH 2/4] Fix missing imports in witness purpose taxonomy witnesses. Add BoundaryCrossing and DeclarationRef to match corpus import conventions and resolve compile-time references used in the witness file. Co-authored-by: Cursor --- dag/test/claim/witness_purpose_taxonomy_witness_test.dag | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dag/test/claim/witness_purpose_taxonomy_witness_test.dag b/dag/test/claim/witness_purpose_taxonomy_witness_test.dag index e4add74ab4e..20d3391b95a 100644 --- a/dag/test/claim/witness_purpose_taxonomy_witness_test.dag +++ b/dag/test/claim/witness_purpose_taxonomy_witness_test.dag @@ -1,6 +1,6 @@ module test.claim.witness_purpose_taxonomy_witness -import std.decl_ref { decl_ref } +import std.decl_ref { decl_ref, DeclarationRef } import std.content_hash { ContentHash, Fnv1a64, @@ -12,6 +12,7 @@ import std.witness_purpose { WitnessPurpose, WitnessResourceBound, BehavioralDiscriminator, + BoundaryCrossing, PopulationTotality, ExternalFidelity, ResourceContract, From 49f3ab466f40d3c2cb00f55e25286cc61519e931 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Fri, 7 Aug 2026 03:41:24 +0000 Subject: [PATCH 3/4] Land slice C-b: typed ScheduledWitnessEnvelope enrollment carrier. Consumer is WitnessConsumerCadence (not per_pr/4h strings); max_staleness is Millisecond alongside wall_budget, closing the 7893 round-trip gap by typing rather than expanding wire spellings. Co-authored-by: Cursor --- dag/gunbc/commit_workflow.dag | 42 +++--- dag/gunbc/merge_admission.dag | 7 +- dag/std/realization_schedule.dag | 29 +++- dag/std/witness_admission.dag | 124 ++++++++++++++++++ .../claim/commit_workflow_witness_test.dag | 11 +- ...s_envelope_typed_consumer_witness_test.dag | 69 ++++++++++ src/v2/workflow/rust_crate_partition.dag | 4 +- 7 files changed, 253 insertions(+), 33 deletions(-) create mode 100644 dag/test/claim/witness_envelope_typed_consumer_witness_test.dag diff --git a/dag/gunbc/commit_workflow.dag b/dag/gunbc/commit_workflow.dag index 45faa8c53b7..2eb325b532e 100644 --- a/dag/gunbc/commit_workflow.dag +++ b/dag/gunbc/commit_workflow.dag @@ -38,13 +38,21 @@ import v2.compiler.source_authority { ProducedByBehavior, } import std.measure { millisecond, millisecond_count, WallClock, clock_basis_eq } +import std.witness_admission { + DiscoverySelection, + FalsifierSelfHostWet, +} import std.realization_schedule { string_list_eq, ScheduleWitnessEntry, WitnessKind, CorpusWitnessKind, ExecutionWitnessKind, witness_kind_eq, WitnessSeam, WitnessSpan, SpanUndeclared, SpanSeams, SpanEnrolled, WitnessCostBasis, MeasuredAtExactSubject, EstimatedFromSiblingClass, - ScheduledWitnessEnvelope + ScheduledWitnessEnvelope, + scheduled_envelope_per_pr_max_staleness, + scheduled_envelope_four_hour_max_staleness, + scheduled_witness_envelope_eq, + scheduled_witness_envelope_wellformed, } import gunbc.ci_layer_roots { frontier_probe_witness_measure_receipt_read_failure, @@ -1495,9 +1503,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_read_failure }, envelope: ScheduledWitnessEnvelope { - cadence: "per_pr", + consumer: DiscoverySelection, wall_budget: millisecond(count: 5000), - max_staleness: "0" + max_staleness: scheduled_envelope_per_pr_max_staleness() } } }, @@ -1521,9 +1529,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_hash_mismatch }, envelope: ScheduledWitnessEnvelope { - cadence: "per_pr", + consumer: DiscoverySelection, wall_budget: millisecond(count: 5000), - max_staleness: "0" + max_staleness: scheduled_envelope_per_pr_max_staleness() } } }, @@ -1547,9 +1555,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_elision_boundary }, envelope: ScheduledWitnessEnvelope { - cadence: "per_pr", + consumer: DiscoverySelection, wall_budget: millisecond(count: 5000), - max_staleness: "0" + max_staleness: scheduled_envelope_per_pr_max_staleness() } } }, @@ -1573,9 +1581,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_below_cap }, envelope: ScheduledWitnessEnvelope { - cadence: "4h", + consumer: FalsifierSelfHostWet, wall_budget: millisecond(count: 900000), - max_staleness: "4h" + max_staleness: scheduled_envelope_four_hour_max_staleness() } } }, @@ -1599,9 +1607,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_second_root }, envelope: ScheduledWitnessEnvelope { - cadence: "4h", + consumer: FalsifierSelfHostWet, wall_budget: millisecond(count: 900000), - max_staleness: "4h" + max_staleness: scheduled_envelope_four_hour_max_staleness() } } }, @@ -1884,12 +1892,6 @@ fn witness_cost_basis_eq(a: WitnessCostBasis, b: WitnessCostBasis) -> Bool { } } -fn scheduled_witness_envelope_eq(a: ScheduledWitnessEnvelope, b: ScheduledWitnessEnvelope) -> Bool { - (a.cadence == b.cadence) - && (millisecond_count(m: a.wall_budget) == millisecond_count(m: b.wall_budget)) - && (a.max_staleness == b.max_staleness) -} - fn witness_cost_basis_wellformed(basis: WitnessCostBasis) -> Bool { match basis { MeasuredAtExactSubject { clock: _, duration, receipt } => @@ -1899,12 +1901,6 @@ fn witness_cost_basis_wellformed(basis: WitnessCostBasis) -> Bool { } } -fn scheduled_witness_envelope_wellformed(envelope: ScheduledWitnessEnvelope) -> Bool { - envelope.cadence != "" - && millisecond_count(m: envelope.wall_budget) > 0 - && envelope.max_staleness != "" -} - fn witness_span_eq(a: WitnessSpan, b: WitnessSpan) -> Bool { match a { SpanUndeclared => match b { diff --git a/dag/gunbc/merge_admission.dag b/dag/gunbc/merge_admission.dag index 3ea6e928a82..dc999e142fb 100644 --- a/dag/gunbc/merge_admission.dag +++ b/dag/gunbc/merge_admission.dag @@ -30,7 +30,8 @@ import gunbc.commit_workflow { CommitCheckEnrollment, CommitCheckKind, CommitSpecGate, CommitWitnessClaim, CommitCargoFmtCheck, } -import std.measure { millisecond_count, ClockBasis, CpuClock, WallClock } +import std.measure { millisecond_count } +import std.witness_admission { witness_consumer_cadence_content_hash_structural } import std.realization_schedule { WitnessKind, CorpusWitnessKind, ExecutionWitnessKind, NativeBundleWitnessKind, WitnessSeam, WitnessSpan, SpanUndeclared, SpanSeams, SpanEnrolled, @@ -194,10 +195,10 @@ fn witness_cost_basis_content_hash_structural(basis: WitnessCostBasis) -> Fnv1a6 fn scheduled_witness_envelope_content_hash_structural(envelope: ScheduledWitnessEnvelope) -> Fnv1a64Structural { content_hash_combine_structural( left: content_hash_combine_structural( - left: content_hash_atom(value: envelope.cadence), + left: witness_consumer_cadence_content_hash_structural(cadence: envelope.consumer), right: content_hash_atom(value: concat("", millisecond_count(m: envelope.wall_budget))) ), - right: content_hash_atom(value: envelope.max_staleness) + right: content_hash_atom(value: concat("", millisecond_count(m: envelope.max_staleness))) ) } diff --git a/dag/std/realization_schedule.dag b/dag/std/realization_schedule.dag index 09999d84b89..e306ee7ee89 100644 --- a/dag/std/realization_schedule.dag +++ b/dag/std/realization_schedule.dag @@ -7,6 +7,7 @@ import std.measure { ClockBasis, CpuClock, WallClock, clock_basis_eq, Measure, Time, ByteSize, Watt, Second, Millisecond, + millisecond, millisecond_count, byte_size, byte_size_count, watt, time_measure, measure_count } import std.pareto { AxisGoal } @@ -20,6 +21,10 @@ import std.content_hash { fnv1a64_structural_hex_digest } import std.algebra { Empty, Cons } +import std.witness_admission { + WitnessConsumerCadence, + witness_consumer_cadence_eq, +} type CostBasis = Predicted @@ -82,10 +87,30 @@ type WitnessCostBasis basis: String } +data scheduled_witness_envelope_authority_note: String = "Slice C-b typed enrollment envelope (operator 7893 recut): consumer is WitnessConsumerCadence — consumer identity, not a schedule period string. max_staleness is Millisecond alongside wall_budget (std.measure), not a wire string — 4h is 14400000 ms, not a cadence spelling. Actual enrollment on SpanEnrolled; desired placement derives separately in slice C-c. Dissolve-on: string cadence/staleness wire decoders delete when no enrollment surface still carries them." + type ScheduledWitnessEnvelope { - cadence: String + consumer: WitnessConsumerCadence wall_budget: Millisecond - max_staleness: String + max_staleness: Millisecond +} + +fn scheduled_envelope_per_pr_max_staleness() -> Millisecond { + millisecond(count: 0) +} + +fn scheduled_envelope_four_hour_max_staleness() -> Millisecond { + millisecond(count: 14400000) +} + +fn scheduled_witness_envelope_wellformed(envelope: ScheduledWitnessEnvelope) -> Bool { + millisecond_count(m: envelope.wall_budget) > 0 +} + +fn scheduled_witness_envelope_eq(a: ScheduledWitnessEnvelope, b: ScheduledWitnessEnvelope) -> Bool { + witness_consumer_cadence_eq(a: a.consumer, b: b.consumer) + && (millisecond_count(m: a.wall_budget) == millisecond_count(m: b.wall_budget)) + && (millisecond_count(m: a.max_staleness) == millisecond_count(m: b.max_staleness)) } type WitnessSpan diff --git a/dag/std/witness_admission.dag b/dag/std/witness_admission.dag index 5550f9a30ad..5826b6d7ed0 100644 --- a/dag/std/witness_admission.dag +++ b/dag/std/witness_admission.dag @@ -1,5 +1,9 @@ module std.witness_admission +import std.content_hash { + Fnv1a64Structural, + content_hash_atom, +} data witness_admission_authority_note: String = "Phase 0(b) admission invariant (docs/plans/module-identity-storage-binding-design.md): every enrolled witness row names an executing consumer — discovery rows run per selection; SelfEmitted receipts run on the falsifier wet cadence; known-red quarantined rows run on a probe cadence expecting red (greening is a counted un-quarantine event); operator-ruled OFFLINE rows carry an explicit local-recipe consumer. Enrolled-with-zero-consumers is a typed refusal, never silent. The prior dissolve-on FIRED 2026-07-22: witness exclusion rows now carry derived consumer classification on this module's WitnessConsumerCadence authority (gunbc.ci_layer_roots.witness_exclusion_frontier; group-of-units ruling, gunbc.roster_registry). Homed in dag/std (std.witness_admission) so dag-tree consumers resolve it in dag-only closures — the authority moved here from src/v2/std 2026-07-23 when gunbc.ci_layer_roots became a consumer. This module remains the cadence vocabulary authority; dissolves into the enforcement-intent registry when that thread lands." @@ -35,3 +39,123 @@ type FrozenBaselineStanding | FrozenBaselineDebtStale { stale_count: Int } data witness_admission_predicate_dissolution_note: String = "witness_consumer_cadence_is_live / witness_admission_refusal_is_holds dissolved per review 39760 — workflow and tests match the coproducts directly (integration 39758 scaffold superseded on this branch)." + +fn witness_consumer_cadence_eq(a: WitnessConsumerCadence, b: WitnessConsumerCadence) -> Bool { + match a { + DiscoverySelection => match b { + DiscoverySelection => true + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => false + } + FalsifierSelfHostWet => match b { + DiscoverySelection => false + FalsifierSelfHostWet => true + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => false + } + FalsifierRehomedBinWet => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => true + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => false + } + FalsifierSubstrateLongLane => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => true + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => false + } + BinWitnessWet => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => true + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => false + } + QuarantineProbeExpectRed => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => true + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => false + } + OfflineLocalRecipe => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => true + FixtureExplicitRoster => false + NoConsumer => false + } + FixtureExplicitRoster => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => true + NoConsumer => false + } + NoConsumer => match b { + DiscoverySelection => false + FalsifierSelfHostWet => false + FalsifierRehomedBinWet => false + FalsifierSubstrateLongLane => false + BinWitnessWet => false + QuarantineProbeExpectRed => false + OfflineLocalRecipe => false + FixtureExplicitRoster => false + NoConsumer => true + } + } +} + +fn witness_consumer_cadence_content_hash_structural( + cadence: WitnessConsumerCadence, +) -> Fnv1a64Structural { + match cadence { + DiscoverySelection => content_hash_atom(value: "DiscoverySelection") + FalsifierSelfHostWet => content_hash_atom(value: "FalsifierSelfHostWet") + FalsifierRehomedBinWet => content_hash_atom(value: "FalsifierRehomedBinWet") + FalsifierSubstrateLongLane => content_hash_atom(value: "FalsifierSubstrateLongLane") + BinWitnessWet => content_hash_atom(value: "BinWitnessWet") + QuarantineProbeExpectRed => content_hash_atom(value: "QuarantineProbeExpectRed") + OfflineLocalRecipe => content_hash_atom(value: "OfflineLocalRecipe") + FixtureExplicitRoster => content_hash_atom(value: "FixtureExplicitRoster") + NoConsumer => content_hash_atom(value: "NoConsumer") + } +} diff --git a/dag/test/claim/commit_workflow_witness_test.dag b/dag/test/claim/commit_workflow_witness_test.dag index a38f20f67fb..3d3e9c13263 100644 --- a/dag/test/claim/commit_workflow_witness_test.dag +++ b/dag/test/claim/commit_workflow_witness_test.dag @@ -16,10 +16,13 @@ import gunbc.commit_workflow { witness_span_wellformed } import std.measure { millisecond, WallClock } +import std.witness_admission { DiscoverySelection, FalsifierSelfHostWet } import std.realization_schedule { WitnessSeam, SpanSeams, SpanUndeclared, SpanEnrolled, WitnessCostBasis, MeasuredAtExactSubject, ScheduledWitnessEnvelope, + scheduled_envelope_per_pr_max_staleness, + scheduled_envelope_four_hour_max_staleness, CorpusWitnessKind, ExecutionWitnessKind, witness_kind_eq } import gunbc.ci_spec { gunbc_ci_floor_gates } @@ -114,9 +117,9 @@ test fn witness_span_enrolled_accepts_measured_envelope() -> Bool { receipt: "target/frontier-probe-survey/matrix_readthrough_claim_batch_receipt.log" }, envelope: ScheduledWitnessEnvelope { - cadence: "per_pr", + consumer: DiscoverySelection, wall_budget: millisecond(count: 5000), - max_staleness: "0" + max_staleness: scheduled_envelope_per_pr_max_staleness() } }) } @@ -132,9 +135,9 @@ test fn witness_span_enrolled_rejects_zero_wall_budget() -> Bool { receipt: "target/example-receipt.log" }, envelope: ScheduledWitnessEnvelope { - cadence: "4h", + consumer: FalsifierSelfHostWet, wall_budget: millisecond(count: 0), - max_staleness: "4h" + max_staleness: scheduled_envelope_four_hour_max_staleness() } }) } diff --git a/dag/test/claim/witness_envelope_typed_consumer_witness_test.dag b/dag/test/claim/witness_envelope_typed_consumer_witness_test.dag new file mode 100644 index 00000000000..9250ad7fb0e --- /dev/null +++ b/dag/test/claim/witness_envelope_typed_consumer_witness_test.dag @@ -0,0 +1,69 @@ +module test.claim.witness_envelope_typed_consumer_witness + +import std.measure { millisecond, millisecond_count } +import std.witness_admission { + WitnessConsumerCadence, + DiscoverySelection, + FalsifierSelfHostWet, + FalsifierRehomedBinWet, + FalsifierSubstrateLongLane, + BinWitnessWet, + QuarantineProbeExpectRed, + OfflineLocalRecipe, + FixtureExplicitRoster, + NoConsumer, + witness_consumer_cadence_eq, +} +import std.realization_schedule { + ScheduledWitnessEnvelope, + scheduled_envelope_per_pr_max_staleness, + scheduled_envelope_four_hour_max_staleness, + scheduled_witness_envelope_wellformed, +} + +data witness_envelope_typed_consumer_witness_note: String = "Slice C-b: ScheduledWitnessEnvelope carries WitnessConsumerCadence consumer and Millisecond max_staleness — no cadence or staleness strings. Every authority arm is writable on the enrollment carrier (the 7893 round-trip gap closed by typing, not by expanding wire spellings). Placement and derivation are slice C-c." + +test fn envelope_per_pr_carries_discovery_selection_consumer() -> Bool { + let envelope = ScheduledWitnessEnvelope { + consumer: DiscoverySelection, + wall_budget: millisecond(count: 5000), + max_staleness: scheduled_envelope_per_pr_max_staleness(), + } + witness_consumer_cadence_eq(a: envelope.consumer, b: DiscoverySelection) + && millisecond_count(m: envelope.max_staleness) == 0 +} + +test fn envelope_scheduled_carries_falsifier_self_host_wet_consumer() -> Bool { + let envelope = ScheduledWitnessEnvelope { + consumer: FalsifierSelfHostWet, + wall_budget: millisecond(count: 900000), + max_staleness: scheduled_envelope_four_hour_max_staleness(), + } + witness_consumer_cadence_eq(a: envelope.consumer, b: FalsifierSelfHostWet) + && millisecond_count(m: envelope.max_staleness) == 14400000 +} + +test fn envelope_rejects_zero_wall_budget() -> Bool { + !scheduled_witness_envelope_wellformed( + envelope: ScheduledWitnessEnvelope { + consumer: DiscoverySelection, + wall_budget: millisecond(count: 0), + max_staleness: scheduled_envelope_per_pr_max_staleness(), + } + ) +} + +test fn every_consumer_cadence_arm_is_envelope_writable() -> Bool { + let cadences = [ + DiscoverySelection, + FalsifierSelfHostWet, + FalsifierRehomedBinWet, + FalsifierSubstrateLongLane, + BinWitnessWet, + QuarantineProbeExpectRed, + OfflineLocalRecipe, + FixtureExplicitRoster, + NoConsumer, + ] + length(xs: cadences) == 9 +} diff --git a/src/v2/workflow/rust_crate_partition.dag b/src/v2/workflow/rust_crate_partition.dag index 0f50359e863..b77a63fbedb 100644 --- a/src/v2/workflow/rust_crate_partition.dag +++ b/src/v2/workflow/rust_crate_partition.dag @@ -233,7 +233,8 @@ fn stage0_std_surface_modules() -> List { "std_interface_summary", "std_pareto", "std_realization_schedule", - "std_trait_derive_shape" + "std_trait_derive_shape", + "std_witness_admission" ] } @@ -376,6 +377,7 @@ fn stage0_cross_unit_import_edges() -> List { stage0_module_dag_edge(from: "std_realization_schedule", to: "std_execution_mode"), stage0_module_dag_edge(from: "std_realization_schedule", to: "std_measure"), stage0_module_dag_edge(from: "std_realization_schedule", to: "std_pareto"), + stage0_module_dag_edge(from: "std_realization_schedule", to: "std_witness_admission"), stage0_module_dag_edge(from: "extdeps_uri", to: "std_unicode_types"), stage0_module_dag_edge(from: "std_unicode_types", to: "std_types"), stage0_module_dag_edge(from: "extdeps_external_authority", to: "extdeps_uri"), From 151f1940a28477ab03c7a80ba49f848a2efcfa05 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Fri, 7 Aug 2026 03:44:02 +0000 Subject: [PATCH 4/4] Revert "Land slice C-b: typed ScheduledWitnessEnvelope enrollment carrier." This reverts commit 49f3ab466f40d3c2cb00f55e25286cc61519e931. --- dag/gunbc/commit_workflow.dag | 42 +++--- dag/gunbc/merge_admission.dag | 7 +- dag/std/realization_schedule.dag | 29 +--- dag/std/witness_admission.dag | 124 ------------------ .../claim/commit_workflow_witness_test.dag | 11 +- ...s_envelope_typed_consumer_witness_test.dag | 69 ---------- src/v2/workflow/rust_crate_partition.dag | 4 +- 7 files changed, 33 insertions(+), 253 deletions(-) delete mode 100644 dag/test/claim/witness_envelope_typed_consumer_witness_test.dag diff --git a/dag/gunbc/commit_workflow.dag b/dag/gunbc/commit_workflow.dag index 2eb325b532e..45faa8c53b7 100644 --- a/dag/gunbc/commit_workflow.dag +++ b/dag/gunbc/commit_workflow.dag @@ -38,21 +38,13 @@ import v2.compiler.source_authority { ProducedByBehavior, } import std.measure { millisecond, millisecond_count, WallClock, clock_basis_eq } -import std.witness_admission { - DiscoverySelection, - FalsifierSelfHostWet, -} import std.realization_schedule { string_list_eq, ScheduleWitnessEntry, WitnessKind, CorpusWitnessKind, ExecutionWitnessKind, witness_kind_eq, WitnessSeam, WitnessSpan, SpanUndeclared, SpanSeams, SpanEnrolled, WitnessCostBasis, MeasuredAtExactSubject, EstimatedFromSiblingClass, - ScheduledWitnessEnvelope, - scheduled_envelope_per_pr_max_staleness, - scheduled_envelope_four_hour_max_staleness, - scheduled_witness_envelope_eq, - scheduled_witness_envelope_wellformed, + ScheduledWitnessEnvelope } import gunbc.ci_layer_roots { frontier_probe_witness_measure_receipt_read_failure, @@ -1503,9 +1495,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_read_failure }, envelope: ScheduledWitnessEnvelope { - consumer: DiscoverySelection, + cadence: "per_pr", wall_budget: millisecond(count: 5000), - max_staleness: scheduled_envelope_per_pr_max_staleness() + max_staleness: "0" } } }, @@ -1529,9 +1521,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_hash_mismatch }, envelope: ScheduledWitnessEnvelope { - consumer: DiscoverySelection, + cadence: "per_pr", wall_budget: millisecond(count: 5000), - max_staleness: scheduled_envelope_per_pr_max_staleness() + max_staleness: "0" } } }, @@ -1555,9 +1547,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_elision_boundary }, envelope: ScheduledWitnessEnvelope { - consumer: DiscoverySelection, + cadence: "per_pr", wall_budget: millisecond(count: 5000), - max_staleness: scheduled_envelope_per_pr_max_staleness() + max_staleness: "0" } } }, @@ -1581,9 +1573,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_below_cap }, envelope: ScheduledWitnessEnvelope { - consumer: FalsifierSelfHostWet, + cadence: "4h", wall_budget: millisecond(count: 900000), - max_staleness: scheduled_envelope_four_hour_max_staleness() + max_staleness: "4h" } } }, @@ -1607,9 +1599,9 @@ data commit_gate_roster: List = [ receipt: frontier_probe_witness_measure_receipt_second_root }, envelope: ScheduledWitnessEnvelope { - consumer: FalsifierSelfHostWet, + cadence: "4h", wall_budget: millisecond(count: 900000), - max_staleness: scheduled_envelope_four_hour_max_staleness() + max_staleness: "4h" } } }, @@ -1892,6 +1884,12 @@ fn witness_cost_basis_eq(a: WitnessCostBasis, b: WitnessCostBasis) -> Bool { } } +fn scheduled_witness_envelope_eq(a: ScheduledWitnessEnvelope, b: ScheduledWitnessEnvelope) -> Bool { + (a.cadence == b.cadence) + && (millisecond_count(m: a.wall_budget) == millisecond_count(m: b.wall_budget)) + && (a.max_staleness == b.max_staleness) +} + fn witness_cost_basis_wellformed(basis: WitnessCostBasis) -> Bool { match basis { MeasuredAtExactSubject { clock: _, duration, receipt } => @@ -1901,6 +1899,12 @@ fn witness_cost_basis_wellformed(basis: WitnessCostBasis) -> Bool { } } +fn scheduled_witness_envelope_wellformed(envelope: ScheduledWitnessEnvelope) -> Bool { + envelope.cadence != "" + && millisecond_count(m: envelope.wall_budget) > 0 + && envelope.max_staleness != "" +} + fn witness_span_eq(a: WitnessSpan, b: WitnessSpan) -> Bool { match a { SpanUndeclared => match b { diff --git a/dag/gunbc/merge_admission.dag b/dag/gunbc/merge_admission.dag index dc999e142fb..3ea6e928a82 100644 --- a/dag/gunbc/merge_admission.dag +++ b/dag/gunbc/merge_admission.dag @@ -30,8 +30,7 @@ import gunbc.commit_workflow { CommitCheckEnrollment, CommitCheckKind, CommitSpecGate, CommitWitnessClaim, CommitCargoFmtCheck, } -import std.measure { millisecond_count } -import std.witness_admission { witness_consumer_cadence_content_hash_structural } +import std.measure { millisecond_count, ClockBasis, CpuClock, WallClock } import std.realization_schedule { WitnessKind, CorpusWitnessKind, ExecutionWitnessKind, NativeBundleWitnessKind, WitnessSeam, WitnessSpan, SpanUndeclared, SpanSeams, SpanEnrolled, @@ -195,10 +194,10 @@ fn witness_cost_basis_content_hash_structural(basis: WitnessCostBasis) -> Fnv1a6 fn scheduled_witness_envelope_content_hash_structural(envelope: ScheduledWitnessEnvelope) -> Fnv1a64Structural { content_hash_combine_structural( left: content_hash_combine_structural( - left: witness_consumer_cadence_content_hash_structural(cadence: envelope.consumer), + left: content_hash_atom(value: envelope.cadence), right: content_hash_atom(value: concat("", millisecond_count(m: envelope.wall_budget))) ), - right: content_hash_atom(value: concat("", millisecond_count(m: envelope.max_staleness))) + right: content_hash_atom(value: envelope.max_staleness) ) } diff --git a/dag/std/realization_schedule.dag b/dag/std/realization_schedule.dag index e306ee7ee89..09999d84b89 100644 --- a/dag/std/realization_schedule.dag +++ b/dag/std/realization_schedule.dag @@ -7,7 +7,6 @@ import std.measure { ClockBasis, CpuClock, WallClock, clock_basis_eq, Measure, Time, ByteSize, Watt, Second, Millisecond, - millisecond, millisecond_count, byte_size, byte_size_count, watt, time_measure, measure_count } import std.pareto { AxisGoal } @@ -21,10 +20,6 @@ import std.content_hash { fnv1a64_structural_hex_digest } import std.algebra { Empty, Cons } -import std.witness_admission { - WitnessConsumerCadence, - witness_consumer_cadence_eq, -} type CostBasis = Predicted @@ -87,30 +82,10 @@ type WitnessCostBasis basis: String } -data scheduled_witness_envelope_authority_note: String = "Slice C-b typed enrollment envelope (operator 7893 recut): consumer is WitnessConsumerCadence — consumer identity, not a schedule period string. max_staleness is Millisecond alongside wall_budget (std.measure), not a wire string — 4h is 14400000 ms, not a cadence spelling. Actual enrollment on SpanEnrolled; desired placement derives separately in slice C-c. Dissolve-on: string cadence/staleness wire decoders delete when no enrollment surface still carries them." - type ScheduledWitnessEnvelope { - consumer: WitnessConsumerCadence + cadence: String wall_budget: Millisecond - max_staleness: Millisecond -} - -fn scheduled_envelope_per_pr_max_staleness() -> Millisecond { - millisecond(count: 0) -} - -fn scheduled_envelope_four_hour_max_staleness() -> Millisecond { - millisecond(count: 14400000) -} - -fn scheduled_witness_envelope_wellformed(envelope: ScheduledWitnessEnvelope) -> Bool { - millisecond_count(m: envelope.wall_budget) > 0 -} - -fn scheduled_witness_envelope_eq(a: ScheduledWitnessEnvelope, b: ScheduledWitnessEnvelope) -> Bool { - witness_consumer_cadence_eq(a: a.consumer, b: b.consumer) - && (millisecond_count(m: a.wall_budget) == millisecond_count(m: b.wall_budget)) - && (millisecond_count(m: a.max_staleness) == millisecond_count(m: b.max_staleness)) + max_staleness: String } type WitnessSpan diff --git a/dag/std/witness_admission.dag b/dag/std/witness_admission.dag index 5826b6d7ed0..5550f9a30ad 100644 --- a/dag/std/witness_admission.dag +++ b/dag/std/witness_admission.dag @@ -1,9 +1,5 @@ module std.witness_admission -import std.content_hash { - Fnv1a64Structural, - content_hash_atom, -} data witness_admission_authority_note: String = "Phase 0(b) admission invariant (docs/plans/module-identity-storage-binding-design.md): every enrolled witness row names an executing consumer — discovery rows run per selection; SelfEmitted receipts run on the falsifier wet cadence; known-red quarantined rows run on a probe cadence expecting red (greening is a counted un-quarantine event); operator-ruled OFFLINE rows carry an explicit local-recipe consumer. Enrolled-with-zero-consumers is a typed refusal, never silent. The prior dissolve-on FIRED 2026-07-22: witness exclusion rows now carry derived consumer classification on this module's WitnessConsumerCadence authority (gunbc.ci_layer_roots.witness_exclusion_frontier; group-of-units ruling, gunbc.roster_registry). Homed in dag/std (std.witness_admission) so dag-tree consumers resolve it in dag-only closures — the authority moved here from src/v2/std 2026-07-23 when gunbc.ci_layer_roots became a consumer. This module remains the cadence vocabulary authority; dissolves into the enforcement-intent registry when that thread lands." @@ -39,123 +35,3 @@ type FrozenBaselineStanding | FrozenBaselineDebtStale { stale_count: Int } data witness_admission_predicate_dissolution_note: String = "witness_consumer_cadence_is_live / witness_admission_refusal_is_holds dissolved per review 39760 — workflow and tests match the coproducts directly (integration 39758 scaffold superseded on this branch)." - -fn witness_consumer_cadence_eq(a: WitnessConsumerCadence, b: WitnessConsumerCadence) -> Bool { - match a { - DiscoverySelection => match b { - DiscoverySelection => true - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => false - } - FalsifierSelfHostWet => match b { - DiscoverySelection => false - FalsifierSelfHostWet => true - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => false - } - FalsifierRehomedBinWet => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => true - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => false - } - FalsifierSubstrateLongLane => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => true - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => false - } - BinWitnessWet => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => true - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => false - } - QuarantineProbeExpectRed => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => true - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => false - } - OfflineLocalRecipe => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => true - FixtureExplicitRoster => false - NoConsumer => false - } - FixtureExplicitRoster => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => true - NoConsumer => false - } - NoConsumer => match b { - DiscoverySelection => false - FalsifierSelfHostWet => false - FalsifierRehomedBinWet => false - FalsifierSubstrateLongLane => false - BinWitnessWet => false - QuarantineProbeExpectRed => false - OfflineLocalRecipe => false - FixtureExplicitRoster => false - NoConsumer => true - } - } -} - -fn witness_consumer_cadence_content_hash_structural( - cadence: WitnessConsumerCadence, -) -> Fnv1a64Structural { - match cadence { - DiscoverySelection => content_hash_atom(value: "DiscoverySelection") - FalsifierSelfHostWet => content_hash_atom(value: "FalsifierSelfHostWet") - FalsifierRehomedBinWet => content_hash_atom(value: "FalsifierRehomedBinWet") - FalsifierSubstrateLongLane => content_hash_atom(value: "FalsifierSubstrateLongLane") - BinWitnessWet => content_hash_atom(value: "BinWitnessWet") - QuarantineProbeExpectRed => content_hash_atom(value: "QuarantineProbeExpectRed") - OfflineLocalRecipe => content_hash_atom(value: "OfflineLocalRecipe") - FixtureExplicitRoster => content_hash_atom(value: "FixtureExplicitRoster") - NoConsumer => content_hash_atom(value: "NoConsumer") - } -} diff --git a/dag/test/claim/commit_workflow_witness_test.dag b/dag/test/claim/commit_workflow_witness_test.dag index 3d3e9c13263..a38f20f67fb 100644 --- a/dag/test/claim/commit_workflow_witness_test.dag +++ b/dag/test/claim/commit_workflow_witness_test.dag @@ -16,13 +16,10 @@ import gunbc.commit_workflow { witness_span_wellformed } import std.measure { millisecond, WallClock } -import std.witness_admission { DiscoverySelection, FalsifierSelfHostWet } import std.realization_schedule { WitnessSeam, SpanSeams, SpanUndeclared, SpanEnrolled, WitnessCostBasis, MeasuredAtExactSubject, ScheduledWitnessEnvelope, - scheduled_envelope_per_pr_max_staleness, - scheduled_envelope_four_hour_max_staleness, CorpusWitnessKind, ExecutionWitnessKind, witness_kind_eq } import gunbc.ci_spec { gunbc_ci_floor_gates } @@ -117,9 +114,9 @@ test fn witness_span_enrolled_accepts_measured_envelope() -> Bool { receipt: "target/frontier-probe-survey/matrix_readthrough_claim_batch_receipt.log" }, envelope: ScheduledWitnessEnvelope { - consumer: DiscoverySelection, + cadence: "per_pr", wall_budget: millisecond(count: 5000), - max_staleness: scheduled_envelope_per_pr_max_staleness() + max_staleness: "0" } }) } @@ -135,9 +132,9 @@ test fn witness_span_enrolled_rejects_zero_wall_budget() -> Bool { receipt: "target/example-receipt.log" }, envelope: ScheduledWitnessEnvelope { - consumer: FalsifierSelfHostWet, + cadence: "4h", wall_budget: millisecond(count: 0), - max_staleness: scheduled_envelope_four_hour_max_staleness() + max_staleness: "4h" } }) } diff --git a/dag/test/claim/witness_envelope_typed_consumer_witness_test.dag b/dag/test/claim/witness_envelope_typed_consumer_witness_test.dag deleted file mode 100644 index 9250ad7fb0e..00000000000 --- a/dag/test/claim/witness_envelope_typed_consumer_witness_test.dag +++ /dev/null @@ -1,69 +0,0 @@ -module test.claim.witness_envelope_typed_consumer_witness - -import std.measure { millisecond, millisecond_count } -import std.witness_admission { - WitnessConsumerCadence, - DiscoverySelection, - FalsifierSelfHostWet, - FalsifierRehomedBinWet, - FalsifierSubstrateLongLane, - BinWitnessWet, - QuarantineProbeExpectRed, - OfflineLocalRecipe, - FixtureExplicitRoster, - NoConsumer, - witness_consumer_cadence_eq, -} -import std.realization_schedule { - ScheduledWitnessEnvelope, - scheduled_envelope_per_pr_max_staleness, - scheduled_envelope_four_hour_max_staleness, - scheduled_witness_envelope_wellformed, -} - -data witness_envelope_typed_consumer_witness_note: String = "Slice C-b: ScheduledWitnessEnvelope carries WitnessConsumerCadence consumer and Millisecond max_staleness — no cadence or staleness strings. Every authority arm is writable on the enrollment carrier (the 7893 round-trip gap closed by typing, not by expanding wire spellings). Placement and derivation are slice C-c." - -test fn envelope_per_pr_carries_discovery_selection_consumer() -> Bool { - let envelope = ScheduledWitnessEnvelope { - consumer: DiscoverySelection, - wall_budget: millisecond(count: 5000), - max_staleness: scheduled_envelope_per_pr_max_staleness(), - } - witness_consumer_cadence_eq(a: envelope.consumer, b: DiscoverySelection) - && millisecond_count(m: envelope.max_staleness) == 0 -} - -test fn envelope_scheduled_carries_falsifier_self_host_wet_consumer() -> Bool { - let envelope = ScheduledWitnessEnvelope { - consumer: FalsifierSelfHostWet, - wall_budget: millisecond(count: 900000), - max_staleness: scheduled_envelope_four_hour_max_staleness(), - } - witness_consumer_cadence_eq(a: envelope.consumer, b: FalsifierSelfHostWet) - && millisecond_count(m: envelope.max_staleness) == 14400000 -} - -test fn envelope_rejects_zero_wall_budget() -> Bool { - !scheduled_witness_envelope_wellformed( - envelope: ScheduledWitnessEnvelope { - consumer: DiscoverySelection, - wall_budget: millisecond(count: 0), - max_staleness: scheduled_envelope_per_pr_max_staleness(), - } - ) -} - -test fn every_consumer_cadence_arm_is_envelope_writable() -> Bool { - let cadences = [ - DiscoverySelection, - FalsifierSelfHostWet, - FalsifierRehomedBinWet, - FalsifierSubstrateLongLane, - BinWitnessWet, - QuarantineProbeExpectRed, - OfflineLocalRecipe, - FixtureExplicitRoster, - NoConsumer, - ] - length(xs: cadences) == 9 -} diff --git a/src/v2/workflow/rust_crate_partition.dag b/src/v2/workflow/rust_crate_partition.dag index b77a63fbedb..0f50359e863 100644 --- a/src/v2/workflow/rust_crate_partition.dag +++ b/src/v2/workflow/rust_crate_partition.dag @@ -233,8 +233,7 @@ fn stage0_std_surface_modules() -> List { "std_interface_summary", "std_pareto", "std_realization_schedule", - "std_trait_derive_shape", - "std_witness_admission" + "std_trait_derive_shape" ] } @@ -377,7 +376,6 @@ fn stage0_cross_unit_import_edges() -> List { stage0_module_dag_edge(from: "std_realization_schedule", to: "std_execution_mode"), stage0_module_dag_edge(from: "std_realization_schedule", to: "std_measure"), stage0_module_dag_edge(from: "std_realization_schedule", to: "std_pareto"), - stage0_module_dag_edge(from: "std_realization_schedule", to: "std_witness_admission"), stage0_module_dag_edge(from: "extdeps_uri", to: "std_unicode_types"), stage0_module_dag_edge(from: "std_unicode_types", to: "std_types"), stage0_module_dag_edge(from: "extdeps_external_authority", to: "extdeps_uri"),