From f92c0ad7c24e7dea94283c6fb6643b4ce76865d6 Mon Sep 17 00:00:00 2001 From: Durable Workflow Date: Tue, 1 Sep 2026 15:12:43 +0000 Subject: [PATCH] fix: recognize main in coverage contracts --- resources/v2-unit-coverage-contract.json | 4 ++-- scripts/ci/check-v2-coverage.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/v2-unit-coverage-contract.json b/resources/v2-unit-coverage-contract.json index d02fb5e4..6122f0fb 100644 --- a/resources/v2-unit-coverage-contract.json +++ b/resources/v2-unit-coverage-contract.json @@ -1,6 +1,6 @@ { "schema_version": 1, - "branch": "v2", + "branch": "main", "measurement": { "metric": "line", "test_suite": "unit", @@ -16,6 +16,6 @@ }, "provenance": { "observed_at": "2026-09-01", - "evidence": "The local unit-only command retains the existing 60.00% floor for fast feedback. Public branch qualification uses the combined unit and MySQL feature contract in v2-coverage-contract.json." + "evidence": "The local unit-only command retains the existing 60.00% floor for fast feedback. Public main-branch qualification uses the combined unit and MySQL feature contract in v2-coverage-contract.json." } } diff --git a/scripts/ci/check-v2-coverage.php b/scripts/ci/check-v2-coverage.php index 6d160f88..e190b8c5 100644 --- a/scripts/ci/check-v2-coverage.php +++ b/scripts/ci/check-v2-coverage.php @@ -114,8 +114,8 @@ function summarize_coverage(string $root, array $clovers, array $contract): arra fail('Coverage contract schema_version must be 1.'); } - if ($branch !== 'v2' || $metric !== 'line' || $suffix !== '.php') { - fail('Coverage contract must measure v2 PHP line coverage.'); + if ($branch !== 'main' || $metric !== 'line' || $suffix !== '.php') { + fail('Coverage contract must measure main-branch PHP line coverage.'); } if (! is_array($excludedPaths) || $excludedPaths !== []) { @@ -559,7 +559,7 @@ function self_test(string $root): void $contract = [ 'schema_version' => 1, - 'branch' => 'v2', + 'branch' => 'main', 'measurement' => [ 'metric' => 'line', 'test_suite' => 'unit',