-module(lightspeed@ops@developer_tooling_harness). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). -define(FILEPATH, "src/lightspeed/ops/developer_tooling_harness.gleam"). -export([run_scenario/1, run_matrix/0, scenario_label/1, pass_fail_label/1, signature/1, scenario/1, deterministic/1, outcomes/1, failed_scenarios/1, nondeterministic_failures/1, report_signature/1, snapshot_signature/0, snapshot_report_markdown/0]). -export_type([scenario/0, scenario_outcome/0, report/0]). -if(?OTP_RELEASE >= 27). -define(MODULEDOC(Str), -moduledoc(Str)). -define(DOC(Str), -doc(Str)). -else. -define(MODULEDOC(Str), -compile([])). -define(DOC(Str), -compile([])). -endif. ?MODULEDOC(" Deterministic developer-tooling conformance harness for M59.\n"). -type scenario() :: runtime_diagnostics_coverage_without_custom_instrumentation | profiling_hotspot_actionability | generator_refactor_quality_gate_determinism | editor_diagnostics_navigation_contracts | productivity_determinism_gate. -type scenario_outcome() :: {scenario_outcome, scenario(), boolean(), boolean(), binary()}. -type report() :: {report, list(scenario_outcome()), integer(), integer()}. -file("src/lightspeed/ops/developer_tooling_harness.gleam", 379). -spec count_nondeterministic(list(scenario_outcome())) -> integer(). count_nondeterministic(Outcomes) -> case Outcomes of [] -> 0; [Outcome | Rest] -> case erlang:element(4, Outcome) of true -> count_nondeterministic(Rest); false -> 1 + count_nondeterministic(Rest) end end. -file("src/lightspeed/ops/developer_tooling_harness.gleam", 368). -spec count_failed(list(scenario_outcome())) -> integer(). count_failed(Outcomes) -> case Outcomes of [] -> 0; [Outcome | Rest] -> case erlang:element(3, Outcome) of true -> count_failed(Rest); false -> 1 + count_failed(Rest) end end. -file("src/lightspeed/ops/developer_tooling_harness.gleam", 397). -spec join_with(binary(), list(binary())) -> binary(). join_with(Separator, Values) -> case Values of [] -> <<""/utf8>>; [First | Rest] -> gleam@list:fold( Rest, First, fun(Accumulator, Value) -> <<<>/binary, Value/binary>> end ) end. -file("src/lightspeed/ops/developer_tooling_harness.gleam", 311). -spec evaluate_productivity_determinism_gate() -> {boolean(), binary()}. evaluate_productivity_determinism_gate() -> First = lightspeed@tooling@developer_productivity:snapshot_signature(), Second = lightspeed@tooling@developer_productivity:snapshot_signature(), Fixtures = lightspeed@tooling@developer_productivity:fixture_snapshots(), Passed = (First =:= Second) andalso (erlang:length(Fixtures) =:= 3), Entries = gleam@list:map( Fixtures, fun(Entry) -> {Label, Signature} = Entry, <<<