Repository navigation
[ci-coach] Fix lint-errors quality threshold (79% -> 80%) - #77458
Conversation
…rors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
🟡 Changes recommended
Several updated validation messages lack tests asserting their new example guidance, leaving the change’s stated error-message contract vulnerable to regression.
4 open issues
What changed in this PR
This PR improves validation error messages across workflow parsing by adding concrete usage examples, bringing make lint-errors back to the 80% quality threshold without changing validation logic.
Changes:
- Added
Example:hints for universal LLM, webhook status-transition, and threat-suppression validation errors. - Added an example to the repository-scope type error while preserving the separately asserted entry-type message.
- The repository-scope example should show the required
tools.githubnesting, and the PR summary should accurately report the number of updated branches.
| File | Description |
|---|---|
| pkg/workflow/webhook_status_transitions.go | Adds examples for malformed status-transition configurations. |
| pkg/workflow/universal_llm_consumer_engine.go | Adds valid provider and model examples to universal engine errors. |
| pkg/workflow/tools_types.go | Adds an allowed-repos example for invalid repository-scope types. |
| pkg/workflow/threat_detection_suppression.go | Adds examples for invalid suppression rules, reasons, and expiration dates. |
Review effort: Lite (dynamic)
| for i, suppression := range suppressions { | ||
| if !threatDetectionSuppressionRulePattern.MatchString(suppression.Rule) { | ||
| return fmt.Errorf("threat-detection-suppress[%d].rule must be a CTR-* identifier", i) | ||
| return fmt.Errorf("threat-detection-suppress[%d].rule must be a CTR-* identifier. Example: rule: CTR-001", i) |
| return result, nil | ||
| default: | ||
| return nil, fmt.Errorf("repository scope must be a string or array of strings, got %T", value) | ||
| return nil, fmt.Errorf("repository scope must be a string or array of strings, got %T. Example: allowed-repos: all", value) |
| model = strings.TrimSpace(model) | ||
| if model == "" { | ||
| return "", errors.New("for universal consumer engines, engine.model is required and must use provider/model format (supported providers: copilot, anthropic, openai, codex)") | ||
| return "", errors.New("for universal consumer engines, engine.model is required and must use provider/model format (supported providers: copilot, anthropic, openai, codex). Example: engine.model: copilot/gpt-5") |
| transitions, ok := raw.([]any) | ||
| if !ok || len(transitions) == 0 { | ||
| return fmt.Errorf("%s must be a non-empty list of from/to status pairs", path) | ||
| return fmt.Errorf("%s must be a non-empty list of from/to status pairs. Example: [{from: Todo, to: Done}]", path) |
|
🎉 This pull request is included in a new release. Release: |

CI Optimization Proposal
Summary
Pre-flight validation showed
make lint-errorsfailing: error-message quality was 79% (4116/5150), below the 80% threshold, which fails the lint step for every contributor.Top 1-3 Optimizations
Restore lint-errors threshold
make lint-errorspasses again (4126/5150, 80%).Example:hints); no logic changes.Example:text to 8 validation errors inuniversal_llm_consumer_engine.go,threat_detection_suppression.go,webhook_status_transitions.go,tools_types.go. Therepository scope entries must be stringsmessage is deliberately unchanged becausetools_types_test.goasserts it exactly.Expected Impact
Unblocks the
lint-errorspre-flight step. No CI time change.Validation Results
go run scripts/lint_error_messages.go: passes (80%)make fmt,go build ./...: passpkg/workflowtests (Threat|Webhook|Universal|Tools|GuardPolicy|Suppress): pass;pkg/parser: passmake lint: not re-run (golangci-lint unavailable locally; pre-flightlintalready passed)Other pre-flight findings (not addressed)
test-unitfailed:pkg/cliandpkg/workflowhit the 3m harness timeout.TestVerifyGitCredentials*,TestCredentialFreePromptEnvironmentandTestBuildDynamicEnclaveExpiry*also fail on the unmodified baseline in this environment, so they are environmental/pre-existing.pkg/clihas environment-sensitive failures (ANSI color, install script tests) when running the full package; the two tests failing in pre-flight pass in isolation.Metrics Baseline
lint-errors: 79% before, 80% after. Avg CI duration over last 60 runs: ~1235s; 17 failures of 60 runs.