Skip to content

fix(ci): unbreak the lint gate - #1

Merged
pequalsnp merged 3 commits into
mainfrom
fix/ci-lint-gate
Jul 31, 2026
Merged

pequalsnp merged 3 commits into
mainfrom
fix/ci-lint-gate

Conversation

@pequalsnp

Copy link
Copy Markdown
Contributor

CI has been red on main since golangci-lint-action v8 stopped supporting the pinned v2.0.0. The lint step errored during install, so the linter never ran on any recent commit.

  • bump the pin to v2.1.0 (oldest still accepted by the action)
  • fix the one finding that surfaced once lint ran again: an unchecked fmt.Sscanf in the mathgen tokenizer, where a failed parse silently became 0 — a wrong-answer path in the engine whose premise is that code, not the model, owns the arithmetic

🤖 Generated with Claude Code

pequalsnp and others added 3 commits July 31, 2026 08:57
golangci-lint-action v8 dropped support for the pinned v2.0.0, so the
lint step has been erroring out on every push since the action was
upgraded — CI was red on main and the linter never actually ran. Bump
to v2.1.0, the oldest version the action still accepts.

With the gate running again it flagged one real issue: the tokenizer
discarded the error from fmt.Sscanf, so a literal it failed to parse
became 0 and produced a confidently wrong answer — precisely what an
engine that computes every drill answer in Go exists to prevent. Use
strconv.ParseFloat, whose only reachable failure here (overflow) still
returns the correctly-signed infinity that Eval already rejects.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2.1.0 installs but is built with Go 1.24, and golangci-lint refuses to
load a config whose targeted Go version (go.mod says 1.26.3) is newer
than its own toolchain. v2.12.2 is built with go1.26 and is the version
this repo's lint has been passing against locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pequalsnp
pequalsnp merged commit a7de0ab into main Jul 31, 2026
1 check passed
@pequalsnp
pequalsnp deleted the fix/ci-lint-gate branch July 31, 2026 13:06
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.

1 participant