Skip to content

[ci-coach] Fix lint-errors quality threshold (79% -> 80%) - #77458

Merged
pelikhan merged 1 commit into
mainfrom
ci-coach/lint-errors-threshold-fix-63b62825d5997a75
Nov 13, 2026
Merged

pelikhan merged 1 commit into
mainfrom
ci-coach/lint-errors-threshold-fix-63b62825d5997a75

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

CI Optimization Proposal

Summary

Pre-flight validation showed make lint-errors failing: 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

  • Type: Pre-flight repair
  • Impact: make lint-errors passes again (4126/5150, 80%).
  • Risk: Low. Only error message text changes (appended Example: hints); no logic changes.
  • Changes: Added Example: text to 8 validation errors in universal_llm_consumer_engine.go, threat_detection_suppression.go, webhook_status_transitions.go, tools_types.go. The repository scope entries must be strings message is deliberately unchanged because tools_types_test.go asserts it exactly.
  • Rationale: The linter requires validation errors to include an example of correct usage.

Expected Impact

Unblocks the lint-errors pre-flight step. No CI time change.

Validation Results

  • go run scripts/lint_error_messages.go: passes (80%)
  • make fmt, go build ./...: pass
  • Targeted pkg/workflow tests (Threat|Webhook|Universal|Tools|GuardPolicy|Suppress): pass; pkg/parser: pass
  • make lint: not re-run (golangci-lint unavailable locally; pre-flight lint already passed)
Other pre-flight findings (not addressed)
  • test-unit failed: pkg/cli and pkg/workflow hit the 3m harness timeout. TestVerifyGitCredentials*, TestCredentialFreePromptEnvironment and TestBuildDynamicEnclaveExpiry* also fail on the unmodified baseline in this environment, so they are environmental/pre-existing.
  • pkg/cli has environment-sensitive failures (ANSI color, install script tests) when running the full package; the two tests failing in pre-flight pass in isolation.
  • Steering issue [WIP] CI Optimization Coach: work in progress #77452 had no comments.

Metrics Baseline

lint-errors: 79% before, 80% after. Avg CI duration over last 60 runs: ~1235s; 17 failures of 60 runs.

Generated by CI Optimization Coach · copilot · routed: sonnet55 high · ~49 AIC · ⌖ ~2 AIC · ⊞ 10K · ◷

  • expires on Nov 15, 2026, 5:47 AM UTC-08:00

…rors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 13:50
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 13:50
@pelikhan
pelikhan merged commit e4e76a0 into main Nov 13, 2026
2 checks passed
@pelikhan
pelikhan deleted the ci-coach/lint-errors-threshold-fix-63b62825d5997a75 branch November 13, 2026 13:50
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

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.

Generated from PR Specification Reviewer · gpt56 · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #77458

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

Generated by Ponytail Reviewer for #77458

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.github nesting, 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)
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants