Skip to content

Add Hammerhead Karoo provider - #39

Merged
bzimmer merged 10 commits into
mainfrom
claude/hammerhead-provider-integration-gb9es4
Aug 11, 2026
Merged

Add Hammerhead Karoo provider#39
bzimmer merged 10 commits into
mainfrom
claude/hammerhead-provider-integration-gb9es4

Conversation

@bzimmer

@bzimmer bzimmer commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a new hammerhead package implementing a client for the Hammerhead Karoo API
  • Supports OAuth 2.0 authorization code flow with rotating refresh tokens (activity:read scope)
  • Implements the activity.Exporter interface via ActivitiesService: list activities, fetch a single activity, and download the original FIT file
  • Fixes a pre-existing goconst lint failure in strava/encoding.go (repeated "1.1" literal extracted as gpxVersion constant)
  • Bumps go directive from 1.26.2 to 1.26.5 to resolve five stdlib CVEs (GO-2026-4971, GO-2026-4918, GO-2026-5039, GO-2026-5037, GO-2026-5856) reachable via zwift and strava code

New files

  • hammerhead/model.goFault, ActivitySummary, Activity, ActivitiesPage types
  • hammerhead/hammerhead.goClient, Endpoint(), OAuth helpers
  • hammerhead/hammerhead_with.goNewClient and all With* option functions
  • hammerhead/activities.goActivitiesService with Activities, Activity, File, Export

Generated by Claude Code

claude added 5 commits August 4, 2026 16:41
Implements a new provider for the Hammerhead Karoo cycling computer API
(https://api.hammerhead.io/v1/docs). The provider supports OAuth 2.0
authorization code flow with rotating refresh tokens and exposes activity
listing, single activity lookup, and FIT file download via the Exporter
interface.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Resolves goconst lint error for repeated "1.1" string literal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Fixes GO-2026-4971, GO-2026-4918 (go1.26.3), GO-2026-5039, GO-2026-5037
(go1.26.4), and GO-2026-5856 (go1.26.5) reachable via zwift and strava code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.72611% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.57%. Comparing base (897fb10) to head (b9f5e11).

Files with missing lines Patch % Lines
hammerhead/hammerhead.go 94.73% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
+ Coverage   81.94%   83.57%   +1.63%     
==========================================
  Files          35       40       +5     
  Lines        1429     1583     +154     
==========================================
+ Hits         1171     1323     +152     
- Misses        144      145       +1     
- Partials      114      115       +1     
Files with missing lines Coverage Δ
hammerhead/activities.go 100.00% <100.00%> (ø)
hammerhead/auth.go 100.00% <100.00%> (ø)
hammerhead/hammerhead_with.go 100.00% <100.00%> (ø)
hammerhead/model.go 100.00% <100.00%> (ø)
strava/encoding.go 87.34% <100.00%> (ø)
hammerhead/hammerhead.go 94.73% <94.73%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 897fb10...b9f5e11. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

claude and others added 5 commits August 5, 2026 04:35
Add tests for: pagination truncation when spec.Total is exceeded, missing
access token errors on Activity and File, File HTTP transport error, Export
error propagation from File, and url.Parse failure via invalid API URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.53.0 to 0.55.0
- [Commits](golang/net@v0.53.0...v0.55.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.55.0
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
Mirrors the Strava client's Auth.Refresh, allowing callers to exchange
an existing refresh token for a new access/refresh token pair.
Consistent with ActivityTypeEMountainBike — E (electric) prefix
followed by a capitalized noun.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJeFw5WPdEe5Fvtr27Q67f
@bzimmer
bzimmer merged commit e8066cb into main Aug 11, 2026
8 checks passed
@bzimmer
bzimmer deleted the claude/hammerhead-provider-integration-gb9es4 branch August 11, 2026 16:55
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