Repository navigation
chore: enforce errors.AsType and point CLAUDE.md at AGENTS.md - #7521
Merged
Merged
Conversation
Add a forbidigo rule rejecting the standard library errors.As, list it among the linter-enforced bans in AGENTS.md, and migrate the 23 existing errors.As calls.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7521 +/- ##
===========================================
+ Coverage 0 85.16% +85.16%
===========================================
Files 0 633 +633
Lines 0 62917 +62917
===========================================
+ Hits 0 53585 +53585
- Misses 0 9329 +9329
- Partials 0 3 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AGENTS.md holds the guidelines, but nothing pointed Claude Code at it: there was no root CLAUDE.md, and .junie/guidelines.md and init/CLAUDE.md have linked to an .ai-agent/guidelines.md that was never committed. Add a root CLAUDE.md symlink to AGENTS.md, repoint .junie/guidelines.md, and remove init/CLAUDE.md, which Claude Code only reads inside init/.
fracasula
marked this pull request as ready for review
October 22, 2026 12:40
atzoum
approved these changes
Oct 22, 2026
itsmihir
approved these changes
Oct 23, 2026
This was referenced Oct 26, 2026
Closed
Merged
itsmihir
pushed a commit
that referenced
this pull request
Oct 26, 2026
🤖 I have created a release *beep* *boop* --- ## [1.92.0-rc.1](v1.91.0...v1.92.0-rc.1) (2026-10-26) ### Features * **processor:** pyt test-pod deployer sets PYT_MODE=test ([#7506](#7506)) ([a050ed6](a050ed6)) * **processor:** reset the per-workspace pyt client on 421 ([#7494](#7494)) ([83db4d6](83db4d6)) * **router:** re-fetch the cached OAuth token when the control plane holds a newer secret (PRO-5947) ([#7478](#7478)) ([742779d](742779d)) * **router:** tag oauth_action counters with destinationId and count AUTH_STATUS_INACTIVE (PRO-5946) ([#7477](#7477)) ([0e15eb4](0e15eb4)) ### Bug Fixes * flaky TestDrainConfigRoutine failing with "database is closed" ([#7489](#7489)) ([9baa89f](9baa89f)) ### Miscellaneous * block new ginkgo/gomega usage in tests ([#7502](#7502)) ([e1c9d38](e1c9d38)) * bump dependency versions ([#7522](#7522)) ([1067ff4](1067ff4)) * enforce errors.AsType and point CLAUDE.md at AGENTS.md ([#7521](#7521)) ([5c7e088](5c7e088)) * go 1.27.3 ([#7516](#7516)) ([3c240a3](3c240a3)) * migrate debugger, services, async destination and utils tests from ginkgo to testify ([#7503](#7503)) ([1a8c85a](1a8c85a)) * migrate gateway, rsources, reporting, batchrouter and manager tests from ginkgo to testify ([#7507](#7507)) ([ffdd505](ffdd505)) * remove ginkgo and gomega from tests ([#7508](#7508)) ([d3e7e0f](d3e7e0f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir
pushed a commit
that referenced
this pull request
Oct 27, 2026
🤖 I have created a release *beep* *boop* --- ## [1.92.0](v1.91.0...v1.92.0) (2026-10-26) ### Features * **processor:** pyt test-pod deployer sets PYT_MODE=test ([#7506](#7506)) ([a050ed6](a050ed6)) * **processor:** reset the per-workspace pyt client on 421 ([#7494](#7494)) ([83db4d6](83db4d6)) * **router:** re-fetch the cached OAuth token when the control plane holds a newer secret (PRO-5947) ([#7478](#7478)) ([742779d](742779d)) * **router:** tag oauth_action counters with destinationId and count AUTH_STATUS_INACTIVE (PRO-5946) ([#7477](#7477)) ([0e15eb4](0e15eb4)) ### Bug Fixes * flaky TestDrainConfigRoutine failing with "database is closed" ([#7489](#7489)) ([9baa89f](9baa89f)) ### Miscellaneous * block new ginkgo/gomega usage in tests ([#7502](#7502)) ([e1c9d38](e1c9d38)) * bump dependency versions ([#7522](#7522)) ([1067ff4](1067ff4)) * enforce errors.AsType and point CLAUDE.md at AGENTS.md ([#7521](#7521)) ([5c7e088](5c7e088)) * go 1.27.3 ([#7516](#7516)) ([3c240a3](3c240a3)) * migrate debugger, services, async destination and utils tests from ginkgo to testify ([#7503](#7503)) ([1a8c85a](1a8c85a)) * migrate gateway, rsources, reporting, batchrouter and manager tests from ginkgo to testify ([#7507](#7507)) ([ffdd505](ffdd505)) * remove ginkgo and gomega from tests ([#7508](#7508)) ([d3e7e0f](d3e7e0f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enforces
errors.AsType[T](err)(Go 1.26+) overerrors.As, the same rule as rudderlabs/rudder-go-kit#1262 and rudder-ingestion-svc..golangci.yml— aforbidigorule rejects the standard libraryerrors.As.AGENTS.md— a "Never Do" entry next to the other linter-enforced bans, so agents writeerrors.AsTypein the first place.Notes on the less mechanical ones:
switchcases (services/notifier,warehouse/source) —errors.AsTyperuns before theswitch, since acasecan't declare variables; case order is unchanged.errors.As(err, &maxminddb.InvalidDatabaseError{})anderrors.As(err, &invalidDestinationCredErr{})matched the value type, so they becomeerrors.AsType[maxminddb.InvalidDatabaseError]anderrors.AsType[invalidDestinationCredErr]. Both implementerroron the value.jobsdb/jobsdb_test.go— ignored theerrors.Asresult and then dereferencede; it now assertsokfirst, so a non-*pq.Errorfails the test instead of panicking.CLAUDE.mdand.juniepoint atAGENTS.mdAGENTS.mdalready holds the guidelines, but nothing pointed Claude Code at it: there was no rootCLAUDE.md, and since #6066.junie/guidelines.mdandinit/CLAUDE.mdhave been symlinks to an.ai-agent/guidelines.mdthat was never committed. A second commit adds a rootCLAUDE.mdsymlink toAGENTS.md, repoints.junie/guidelines.mdat it, and removesinit/CLAUDE.md, which Claude Code would only read when working insideinit/.Verification
forbidigo-only golangci-lint run flagged all 23 calls, and reports nothing after the migration. That run type-checks every package, tests included.gofumpt -extrareports no changes on the touched files.router(TestRedact*),services/geolocation, and the warehouse transformerutilstimestamp tests.Linear Ticket
None.
Security