Skip to content

workstream: complete workstreams/02-golangci-lint-adoption.md#15

Merged
brokenbot merged 2 commits into
mainfrom
02-golangci-lint-adoption
Apr 28, 2026
Merged

workstream: complete workstreams/02-golangci-lint-adoption.md#15
brokenbot merged 2 commits into
mainfrom
02-golangci-lint-adoption

Conversation

@brokenbot

@brokenbot brokenbot commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Completes workstreams/02-golangci-lint-adoption.md and removes legacy user feedback files that were migrated into GitHub issues.

Includes:

  • golangci-lint adoption workstream changes
  • deletion of old files under user_feedback/

Closes #7
Closes #8
Closes #9
Closes #10
Closes #11
Closes #12
Closes #13
Closes #14

Summary by CodeRabbit

  • Chores

    • Added Go linting infrastructure and quality checks to the CI pipeline.
    • Added golangci-lint dependency and baseline configuration system.
  • Documentation

    • Added contributor guide explaining the lint baseline system and burn-down rules.
  • Other

    • Removed archived user story tracking documents.

Dave Sanderson and others added 2 commits April 27, 2026 23:12
- Pin golangci-lint v1.64.8 via go tool directive + tools/tools.go blank-import
- Add .golangci.yml with strict linter config per spec
- Add tools/lint-baseline/ JSON→YAML generator with golden-file tests
- Generate .golangci.baseline.yml (236 rules, all annotated with workstream pointers)
- Add make lint-go target with failure-safe merged-config cleanup
- Add lint-go step to CI workflow
- Add docs/contributing/lint-baseline.md burn-down contract

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 05:14
@brokenbot brokenbot changed the title chore: remove migrated user feedback files workstream: complete workstreams/02-golangci-lint-adoption.md Apr 28, 2026
@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: c4fa793d-d16b-4d0b-868e-caa9571b2fbc

📥 Commits

Reviewing files that changed from the base of the PR and between 56640a9 and 2471719.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • sdk/go.sum is excluded by !**/*.sum
📒 Files selected for processing (21)
  • .github/workflows/ci.yml
  • .gitignore
  • .golangci.baseline.yml
  • .golangci.yml
  • Makefile
  • docs/contributing/lint-baseline.md
  • go.mod
  • tools/lint-baseline/main.go
  • tools/lint-baseline/main_test.go
  • tools/lint-baseline/testdata/golden.yml
  • tools/lint-baseline/testdata/input.json
  • tools/tools.go
  • user_feedback/01-support-file-function-user-story.txt
  • user_feedback/02-align-copilot-permission-kinds-user-story.txt
  • user_feedback/03-stabilize-reviewer-outcome-handling-user-story.txt
  • user_feedback/04-make-for-each-safe-for-multi-step-chains-user-story.txt
  • user_feedback/05-allow-approval-in-local-mode-user-story.txt
  • user_feedback/06-reduce-adapter-process-churn-and-eof-noise-user-story.txt
  • user_feedback/07-improve-standalone-output-readability-user-story.txt
  • user_feedback/08-add-per-step-visit-limit-to-bound-loops-user-story.txt
  • workstreams/02-golangci-lint-adoption.md

📝 Walkthrough

Walkthrough

This PR introduces a comprehensive golangci-lint integration, adding configuration files (.golangci.yml and .golangci.baseline.yml), a baseline-generation tool, CI integration, and documentation for managing Go linting baseline suppressions.

Changes

Cohort / File(s) Summary
CI & Workflow Integration
.github/workflows/ci.yml, Makefile
Adds make lint-go step to CI pipeline and introduces new lint-go and lint targets in Makefile to run golangci-lint across root, sdk, and workflow packages with merged baseline config.
Linting Configuration
.golangci.yml, .golangci.baseline.yml, .gitignore, .golangci.merged.yml
Creates primary golangci-lint config with 5-minute timeout, disabled-by-default linters, per-linter thresholds, and revive/gocritic rules. Baseline config captures 946 exclude-rules from legacy issues. Gitignore prevents committing merged config.
Tool Dependencies
go.mod, tools/tools.go
Adds golangci-lint as direct tool dependency via tool directive. Updates Cobra from v1.8.1 to v1.9.1 and adds indirect dependencies for golangci-lint ecosystem.
Baseline Generation Tool
tools/lint-baseline/main.go, tools/lint-baseline/main_test.go, tools/lint-baseline/testdata/*
New CLI tool that parses golangci-lint JSON reports, deduplicates issues by file/linter/text, generates deterministic .golangci.baseline.yml with workstream annotation. Includes comprehensive tests and golden fixtures.
Documentation & Tracking
docs/contributing/lint-baseline.md, workstreams/02-golangci-lint-adoption.md
Adds contributor guide explaining baseline suppression burn-down rules, merge strategy, regeneration process, and linter-to-workstream mapping. Updates workstream checklist with completion status and implementation notes.
Removed User Stories
user_feedback/01...08-*.txt (8 files)
Deletes eight user story/feedback files covering file() expressions, Copilot permissions, reviewer outcomes, for-each loops, approvals, adapter churn, output readability, and visit limits.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant CI as CI/Makefile
    participant Linter as golangci-lint<br/>(Code Analysis)
    participant Tool as lint-baseline<br/>(Generator)
    participant Config as .golangci.merged.yml<br/>(Merged Config)
    participant Output as Baseline<br/>(.golangci.baseline.yml)

    Dev->>CI: make lint-go
    CI->>Linter: Run golangci-lint<br/>--out-format=json
    Linter->>CI: JSON report with issues
    CI->>Tool: Pipe JSON to stdin
    Tool->>Tool: Parse & deduplicate issues<br/>(file/linter/text)
    Tool->>Tool: Normalize text per linter<br/>(remove metrics/complexity nums)
    Tool->>Tool: Map to workstreams
    Tool->>Tool: Generate YAML<br/>exclude-rules
    Tool->>Output: Write .golangci.baseline.yml
    CI->>Config: Merge .golangci.yml<br/>+ .golangci.baseline.yml
    CI->>Linter: Re-run with merged config
    Linter->>CI: ✓ Pass (issues suppressed)
    CI->>Dev: Lint gate complete
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

🐰 Hops with glee at linting gates!
Baselines born from lint debates—
JSON flows to YAML made,
Merged configs, standards laid.
Code that's clean, deduped with care,
Lint adoption everywhere! 🎉


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@brokenbot brokenbot merged commit f9ac6ab into main Apr 28, 2026
3 of 5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the legacy user_feedback/ user-story text files (migrated to GitHub issues) and, in the same changeset, introduces a full golangci-lint adoption (config, baseline generation tooling, Makefile/CI wiring) across the repo’s Go workspace modules.

Changes:

  • Delete migrated legacy user-feedback files under user_feedback/.
  • Add golangci-lint tooling: pinned tool dependency, .golangci.yml + generated baseline, make lint-go, and CI integration.
  • Add a baseline-generation helper (tools/lint-baseline) with golden-file tests and contributor documentation.

Reviewed changes

Copilot reviewed 20 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
workstreams/02-golangci-lint-adoption.md Updates workstream checklist to completed and adds detailed reviewer notes.
user_feedback/01-support-file-function-user-story.txt Deletes migrated legacy user story file.
user_feedback/02-align-copilot-permission-kinds-user-story.txt Deletes migrated legacy user story file.
user_feedback/03-stabilize-reviewer-outcome-handling-user-story.txt Deletes migrated legacy user story file.
user_feedback/04-make-for-each-safe-for-multi-step-chains-user-story.txt Deletes migrated legacy user story file.
user_feedback/05-allow-approval-in-local-mode-user-story.txt Deletes migrated legacy user story file.
user_feedback/06-reduce-adapter-process-churn-and-eof-noise-user-story.txt Deletes migrated legacy user story file.
user_feedback/07-improve-standalone-output-readability-user-story.txt Deletes migrated legacy user story file.
user_feedback/08-add-per-step-visit-limit-to-bound-loops-user-story.txt Deletes migrated legacy user story file.
tools/tools.go Adds a build-tagged tools package to pin tool deps (golangci-lint).
tools/lint-baseline/main.go Adds generator to convert golangci-lint JSON output into baseline YAML exclude-rules.
tools/lint-baseline/main_test.go Adds unit tests, including golden round-trip verification.
tools/lint-baseline/testdata/input.json Adds JSON fixture input for baseline generation tests.
tools/lint-baseline/testdata/golden.yml Adds expected baseline YAML output fixture.
sdk/go.sum Updates sums (notably adding missing /go.mod hashes).
go.sum Large go.sum expansion due to adding golangci-lint and its transitive deps.
go.mod Adds pinned golangci-lint dependency, bumps cobra, and adds Go tool directive.
docs/contributing/lint-baseline.md Documents baseline “burn-down” contract and regeneration procedure.
Makefile Adds lint-go and wires it into lint/ci targets.
.golangci.yml Adds golangci-lint configuration and permanent exclude-rules scaffolding.
.golangci.baseline.yml Adds generated baseline suppressions file.
.gitignore Ignores ephemeral .golangci.merged.yml.
.github/workflows/ci.yml Adds a CI step to run make lint-go.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod
Comment on lines 9 to 15
github.com/github/copilot-sdk/go v0.3.0
github.com/golangci/golangci-lint v1.64.8
github.com/google/uuid v1.6.0
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/go-plugin v1.7.0
github.com/spf13/cobra v1.8.1
github.com/spf13/cobra v1.9.1
github.com/zclconf/go-cty v1.14.4

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The PR title/description indicate this change is only deleting migrated user_feedback/ files, but this diff also adds golangci-lint tooling (new tool dependency, baseline config approach) and bumps github.com/spf13/cobra (v1.8.1 → v1.9.1). Please either update the PR title/description to reflect the lint adoption scope, or split the lint-related changes into a separate PR so the intent and review surface area are clear.

Copilot uses AI. Check for mistakes.
Comment on lines +332 to +333
clean. The sdk/go.sum was updated with missing `/go.mod` hash entries
during workspace bootstrap — recorded as forward pointer.)

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

This PR deletes the user_feedback/ files, but there are still in-repo references to those paths (e.g. workstreams/07-file-expression-function.md, workstreams/08-for-each-multistep.md, and workstreams/10-phase1-cleanup-gate.md). Deleting the directory will leave broken links; please update those documents to point at the migrated GitHub issues (or otherwise remove/replace the references) in the same PR.

Suggested change
clean. The sdk/go.sum was updated with missing `/go.mod` hash entries
during workspace bootstrap — recorded as forward pointer.)
clean. The `sdk/go.sum` gained missing `/go.mod` hash entries during
workspace bootstrap; that pre-existing workspace-related update is
retained here for completeness.)

Copilot uses AI. Check for mistakes.
Comment thread .golangci.yml
Comment on lines +6 to +12
# Lint all three modules in the workspace.
modules-download-mode: readonly
# Generated proto bindings are excluded via issues.exclude-dirs.

linters:
disable-all: true
enable:

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

The comment says generated proto bindings are excluded via issues.exclude-dirs, but the config currently excludes only bin and tools. Either adjust the comment to match what’s actually excluded, or update exclude-dirs to include the generated directories that should be skipped so future maintainers don’t misinterpret what this section is doing.

Copilot uses AI. Check for mistakes.
Comment thread .golangci.yml
- "sdk/pb/.*"
exclude-dirs:
- bin
- tools

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

issues.exclude-dirs currently excludes the entire tools/ directory, which means changes to helper binaries like tools/import-lint and tools/lint-baseline won’t be linted by make lint-go. If that’s intentional, it would help to document the rationale here; otherwise consider removing tools from exclude-dirs so the lint gate applies consistently to these Go packages too.

Suggested change
- tools

Copilot uses AI. Check for mistakes.
Comment on lines +471 to +475
## Reviewer Notes

### Review 2026-04-27 — changes-requested

#### Summary

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

This document introduces two top-level ## Reviewer Notes sections (one starting around line 379 and another around line 471), which makes anchors and navigation ambiguous. Consider renaming the second section (e.g. to ## Review Log / ## Review History) or merging them so there is a single canonical Reviewer Notes section.

Copilot uses AI. Check for mistakes.
@brokenbot brokenbot deleted the 02-golangci-lint-adoption branch June 5, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment