← Back to Pull requests

ci: scope lint reports and allow slower analysis #11554

Merged
yyforyongyu merged 3 files (20 lines) on Nov 11, 2026 13:09 UTC
View on GitHub
yyforyongyu yyforyongyu commented on Nov 11, 2026 08:09 UTC
Author

Summary

Keep PR lint failures scoped to changed lines, reduce diff-filter work, and allow slow CI analysis to finish.

Change Description

Use the checked-out merge commit's first parent (HEAD^1) as the reporting base for PR and merge-group lint, including submodules. Nightly keeps its existing baseline. Increase golangci-lint's total-work timeout from 10 to 15 minutes.

Observed diff-filter time dropped from 1.27 s in PR #11551's lint job to 52 ms in this PR's passing lint job, about 25× faster for that stage. These are separate CI runs. Full package analysis still runs, and total root-linter time was 7m32s versus 7m51s, so an end-to-end speedup has not been demonstrated.

Validation:

  • Run golangci-lint v2.15.0 on signed merge-history fixtures with root and nested modules. The legacy baseline reports both an existing warning and a new warning; HEAD^1 reports only the new-line warning and still fails.

  • Check actual Make arguments and recursive submodule invocation: PR/merge-group runs receive the override; nightly retains its baseline and native lint keeps its existing override.

  • Confirm all three unrelated diagnostics from PR #11551 are outside its actual changed lines. Configuration validation, actionlint, and the hosted lint job pass.
  • Diff: 20 lines (+16 / -4) across 3 files Reviewer: ziggie1984 Review duration: 300m
    All Vouch review confidence checks passed
    Residual risk 0.09 = Change Risk (0.24) × (1 − Review Confidence (0.63)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.24 · 20 lines diff across 3 files
    0.24
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.23 · 1 substantive comment(s)
    0.23
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    62%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.268
    Diff Size diff_size
    0.182
    Real PR Conversation Timeline
    4 items
    litbot-9000 litbot-9000 commented on Nov 11, 2026 12:20 UTC
    Reviewer

    /gateway review

    Verdict: LGTM — approve-worthy, no required changes. Posted as COMMENT rather than APPROVE only because outward approvals on this repo belong to the workspace approver; the requester here is not them. @Roasbeef this one is clean from my side.

    Verified

  • Trigger gating is correct. Workflow fires on pull_request, merge_group, and workflow_call only (nightly arrives via nightly.yml with tier: nightly). For PR/merge-group, inputs.tier is empty so LINT_BASE=HEAD^1; for nightly it is empty so the pinned issues.new-from-rev baseline in .golangci.yml stands. There is no push trigger, so no path lints master with the override.

  • HEAD^1 is resolvable in the lint job. The job checks out with fetch-depth: 0; on pull_request the checkout is the PR merge commit whose first parent is the base tip; on merge_group it is the queue ref whose first parent is the prior base. The container gets the full repo incl. .git via the existing -v $(pwd):/build mount.

  • Make plumbing, by dry-run: CI=1 make -n lint-source LINT_BASE=HEAD^1 and make -n lint-module-run ... both expand to custom-gcl run -v --new-from-rev=HEAD^1; without LINT_BASE the flag is absent. lint-native keeps its own --new-from-rev=$(git merge-base HEAD master) override and lint-config-check is untouched — matching the PR description.

  • Executed on the real head. The Lint code job log for 623e0bb1e9 shows --new-from-rev=HEAD^1 in all 13 root+submodule invocations, no resolution errors, diff-filter stage at 51.7 ms (root) and 17–21 ms (modules). The cited PR #11551 log still exists and shows 1.272 s for the same stage, so the ~25× diff-filter claim checks out. diff: 5889/0 in the stats line shows the filter actively suppressing 5,889 pre-existing issues and reporting zero on unchanged lines.

  • Flag semantics, mutation-tested locally with stock golangci-lint v2.15.0 (the version pinned in tools/go.mod) on a scratch repo: commit 1 introduces a govet printf issue, commit 2 adds another. Plain run reports both; --new-from-rev=HEAD^1 reports only the new-line issues; a config of issues.new-from-rev: HEAD alone reports nothing, and adding the CLI flag --new-from-rev=HEAD^1 reports the new issues — i.e., the CLI override wins over the pinned config baseline, which is exactly the mechanism this PR relies on.

  • CI on the head SHA: check-runs bound to 623e0bb1e9 — 15 success, 15 skipped (tier system by design), 0 failures.

  • Scope of the timeout bump: run.timeout 10m→15m is config-only, job has no explicit timeout-minutes (360m default), and the PR's own lint job passed in 15m6s wall.
  • Not verified

  • Local end-to-end make lint (needs Docker, unavailable in my environment) — covered instead by the head's own CI log above.

  • The merge-queue path is not exercised by this PR's own checks (pull_request only); it shares the identical env expression and checkout shape, and the first-parent semantics hold there, so risk is minimal.
  • Required changes

    None.

    — claudell ⚡ (OpenClaw dev agent; this is a COMMENT review posted as litbot-9000 and does not count toward branch protection)

    ziggie1984 ziggie1984 approved these changes on Nov 11, 2026 13:04 UTC
    Approved Reviewer

    Approved these changes.

    litbot-9000 litbot-9000 approved these changes on Nov 11, 2026 13:06 UTC
    Approved Reviewer

    /gateway review

    Approve. The mechanism is right and minimal: --new-from-rev=HEAD^1 scopes reports to changed lines against the merge's first parent for PR and merge-group lint, inputs.tier != 'nightly' leaves the pinned baseline untouched for nightly, and the Makefile guard (ifneq ($(LINT_BASE),)) means local/native lint keeps the configured default. The 10→15m timeout is justified by the package-loading time observed on CI runners.

    This supersedes my earlier COMMENT review on this same head (623e0bb1e9), which verified the trigger gating and HEAD^1 resolvability under fetch-depth: 0 — nothing has changed since, and the diff re-read checks out. Green CI on the current head.

    — claudell ⚡ (OpenClaw dev agent; approval posts as litbot-9000 and does not count toward branch protection)

    Reviewers
    Assignees
    yyforyongyu yyforyongyu
    Labels
    risk: low confidence: 62.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 24.1% (LOW) · Higher = larger blast radius
    24.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 62.7% · Lower = rushed or shallow review
    62.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 9% · Safe to merge
    9%