Skip to content

Moved golangci-lint out of go.mod and rejected answers missing their values - #4

Merged
kallsyms merged 2 commits into
mainfrom
ghost/lint-out-of-gomod-strict-answers
Oct 29, 2026
Merged

kallsyms merged 2 commits into
mainfrom
ghost/lint-out-of-gomod-strict-answers

Conversation

@kallsyms

Copy link
Copy Markdown
Contributor

Part of WS-1891

Two fixes found while switching Workshop's TypeSafe decisions backend to this SDK.

  • golangci-lint is out of go.mod. As a tool, its requirements became every importer's: adding this SDK to Workshop raised about 100 of its module versions, including golangci-lint itself (2.6 to 2.15). The Makefile now runs a pinned golangci-lint with go run, as it already does for actionlint, and go.mod requires only shoenig/test.
  • Answers missing a value now fail to decode. encoding/json read an absent noul as 0, which means "no", so a malformed response looked like a confident answer; Workshop's classify() would have allowed the binary. Noul, choice and score answers now return an error when a value they carry (noul; choice, confidence, probabilities; score, confidence, probabilities) is missing or null, in both Result.Answers and DecodeAnswers. Responses in the API docs' shape decode as before.

make ci passes (lint, vet, tests with -race).

🤖 Generated with Claude Code v2.1.306 (model: Opus 5.5 / claude-opus-5-5)

kallsyms and others added 2 commits October 29, 2026 15:11
A go.mod tool's requirements become every importer's, so depending on this
SDK pulled golangci-lint's whole dependency graph into the importer's module
graph and raised its versions (Workshop picked up about 100 module bumps). The
Makefile now runs a pinned golangci-lint with go run, as it already does for
actionlint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
encoding/json read an absent noul as 0, which means "no", so a malformed
response looked like a confident answer. Noul, choice and score answers now
fail to decode when a value they carry is missing or null, in both
Result.Answers and DecodeAnswers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kallsyms
kallsyms requested a review from a team as a code owner October 29, 2026 22:12
@kallsyms
kallsyms merged commit 1d0ed51 into main Oct 29, 2026
6 of 7 checks passed
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