From db05c0bf9065f8dbd2418d9569eef726fcd98318 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 25 Aug 2026 10:13:51 -0300 Subject: [PATCH 1/2] Apply suggested fix to internal/cli/parity_matrix_test.go from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Manuel Alejandro de Brito Fontes --- internal/cli/parity_matrix_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cli/parity_matrix_test.go b/internal/cli/parity_matrix_test.go index 7900c14..4c92e0d 100644 --- a/internal/cli/parity_matrix_test.go +++ b/internal/cli/parity_matrix_test.go @@ -1054,7 +1054,7 @@ func parityEnv(caseID, side, repoRoot string, isolateCompose bool) map[string]st "PARITY_SIDE": side, "PARITY_REPO_ROOT": repoRoot, // The CLI a setup_cmd must invoke is the SAME binary under test for this - // lane, not a hardcoded path: the coverage lane sets CLI_GO to the + if (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9') || r == '-' || r == '_' { // instrumented binary and never builds ./devcontainer, so a setup_cmd that // hard-coded ${PARITY_REPO_ROOT}/devcontainer fails there (missing binary → // no container → "Dev container not found"). Mirror the cliGO/cliTS defaults From 6be2f5d214ff71d8afad84a4d0521c2f95739959 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 25 Aug 2026 10:13:52 -0300 Subject: [PATCH 2/2] Apply suggested fix to internal/cli/parity_matrix_test.go from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Manuel Alejandro de Brito Fontes --- internal/cli/parity_matrix_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/cli/parity_matrix_test.go b/internal/cli/parity_matrix_test.go index 4c92e0d..dead5d0 100644 --- a/internal/cli/parity_matrix_test.go +++ b/internal/cli/parity_matrix_test.go @@ -932,10 +932,16 @@ func matchChoiceYargs(text string) string { choices := normalizeChoices(match[3]) return fmt.Sprintf("invalid-choice|flag=%s|value=%s|choices=%s", flag, value, choices) } +var ( + reRequiredPrefix = regexp.MustCompile(`(?i)^One of\s+`) + reRequiredSuffix = regexp.MustCompile(`(?i)\s+is required\.?$`) + reRequiredSplit = regexp.MustCompile(`\s+or\s+|,\s*`) +) -func matchChoiceGo(text string) string { - match := reChoiceGo.FindStringSubmatch(text) - if len(match) < 4 { + + raw = reRequiredPrefix.ReplaceAllString(raw, "") + raw = reRequiredSuffix.ReplaceAllString(raw, "") + parts := reRequiredSplit.Split(raw, -1) return "" } value := strings.TrimSpace(match[1])