← Back to Pull requests

ci: lint the example module #162

Closed
tthayer closed this pull request without merging on Jul 31, 2026 22:17 UTC
View on GitHub
tthayer tthayer commented on Jul 31, 2026 22:13 UTC
Author

What

Adds example/ to the go-lint CI job and fixes the 27 findings that were hiding there.

example/ is a separate Go module, so the root golangci-lint invocation never reached it — despite it carrying every integration test in the repo, including the only coverage of the partitioned-parent ALTER suppression (SQLSTATE 42809) added in #159/#160.

Findings fixed (27 → 0)

| Fix | Count |
|---|---|
| --fix (whitespace, godot) | 9 |
| revive var-naming: fakeTenantIds→fakeTenantIDs, masterSelectSql→masterSelectSQL, fmtSql→fmtSQL, selectSql→selectSQL, eventIds→eventIDs | 14 |
| forbidigo: dropped a leftover debug fmt.Println() | 1 |
| gosec G115: strconv.ParseInt(s, 2, 64) → ParseUint(s, 2, 8) in bitStringToBytes, so the byte() conversion is structurally bounded rather than merely bounded in practice | 1 |
| revive line-length-limit: hoisted a 201-char query into const updatedPetQuery | 1 |

The one config carve-out

gomoddirectives flags example/go.mod's replace github.com/ductone/protoc-gen-pgdb => ../, which is how the example module consumes the in-repo library and must stay.

Note this is not expressible via the existing replace-allow-list setting — that governs non-local replacements only, and the firing check here is the separate replace-local boolean. Rather than flip replace-local: true (which would disable the check for the root go.mod too), the exclusion is scoped to the single file.

Verified scoped, not blanket: with a local replace temporarily added to the root go.mod, gomoddirectives still fires on it.

Verification

  • golangci-lint run clean in both modules

  • go test ./... passes in both modules (example/ integration tests against PG16 + pgvector)
  • Closes IGA-3723.

    🤖 Generated with Claude Code

    Diff: 94 lines (+50 / -44) across 6 files Reviewer: None requested Review duration: 4m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.50) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 94 lines diff across 6 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 10%
    57%
    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.289
    Diff Size diff_size
    0.272
    No Reviewer Assigned no_reviewer_assigned
    0.120
    Real PR Conversation Timeline
    1 comments
    "Review active on #162"
    general weight: 0.35
    Reviewers
    None requested
    Assignees
    tthayer tthayer
    Labels
    risk: low confidence: 58.0% 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: 49.6% (MEDIUM) · Higher = larger blast radius
    49.6%
    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: 58.0% · Lower = rushed or shallow review
    58.0%
    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: 20.8% · Safe to merge
    20.8%