Rename smartrun to geniusrun throughout the codebase

Updates the Go module path, cmd/smartrund -> cmd/geniusrund, the
smartrun-dev skill, .gitignore, and every reference in docs/CLAUDE.md
to match.
This commit is contained in:
2026-07-24 21:08:07 +02:00
parent 70c6d143e1
commit f9d85e16ef
30 changed files with 108 additions and 108 deletions

View File

@@ -6,7 +6,7 @@ import (
"github.com/go-chi/chi/v5"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/store"
)
// activityListItem is one row of the activities list, enriched with its

View File

@@ -13,16 +13,16 @@ import (
"testing"
"time"
"smartrun/backend/internal/garmin/mock"
"smartrun/backend/internal/store"
appsync "smartrun/backend/internal/sync"
"geniusrun/backend/internal/garmin/mock"
"geniusrun/backend/internal/store"
appsync "geniusrun/backend/internal/sync"
)
func newCtx() context.Context { return context.Background() }
func newTestServer(t *testing.T) (*Server, *store.DB) {
t.Helper()
db, err := store.Open(filepath.Join(t.TempDir(), "smartrun_test.db"))
db, err := store.Open(filepath.Join(t.TempDir(), "geniusrun_test.db"))
if err != nil {
t.Fatalf("store.Open: %v", err)
}

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"
"smartrun/backend/internal/garmin"
"geniusrun/backend/internal/garmin"
)
type authResponse struct {

View File

@@ -3,7 +3,7 @@ package api
import (
"encoding/json"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/store"
)
// activityResponse adds back ActivityName/ActivityType as fields decoded

View File

@@ -8,8 +8,8 @@ import (
"github.com/go-chi/chi/v5"
"smartrun/backend/internal/classify"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/classify"
"geniusrun/backend/internal/store"
)
// workoutKindResponse combines a workout kind's rule/metadata with its pace

View File

@@ -5,7 +5,7 @@ import (
"errors"
"net/http"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/store"
)
// validateProfile checks the HR zones are ascending and gap-free once they

View File

@@ -7,7 +7,7 @@ import (
"github.com/go-chi/chi/v5"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/store"
)
type progressionPoint struct {

View File

@@ -3,7 +3,7 @@ package api
import (
"net/http"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/store"
)
// handleReclassifyAll re-runs the rule engine for every activity except

View File

@@ -8,7 +8,7 @@ import (
"github.com/go-chi/chi/v5"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/store"
)
// defaultReviewQueuePageSize matches the frontend's initial/incremental

View File

@@ -1,4 +1,4 @@
// Package api is smartrun's HTTP layer: REST handlers over internal/store,
// Package api is geniusrun's HTTP layer: REST handlers over internal/store,
// internal/garmin, and internal/sync.
package api
@@ -11,9 +11,9 @@ import (
"github.com/go-chi/chi/v5"
"smartrun/backend/internal/garmin"
"smartrun/backend/internal/store"
appsync "smartrun/backend/internal/sync"
"geniusrun/backend/internal/garmin"
"geniusrun/backend/internal/store"
appsync "geniusrun/backend/internal/sync"
)
// Server wires the HTTP handlers to the app's dependencies.

View File

@@ -1,4 +1,4 @@
// Package classify is smartrun's classification rule engine: it evaluates a
// Package classify is geniusrun's classification rule engine: it evaluates a
// user-editable AND/OR condition tree against a run's metrics to decide
// which "workout kind" (Easy, Tempo, Threshold, ...) it belongs to. Pure
// logic only -- no I/O, no database, no Garmin client -- so it's fully

View File

@@ -1,4 +1,4 @@
// Package config loads smartrund's runtime infrastructure configuration
// Package config loads geniusrund's runtime infrastructure configuration
// from environment variables (paths and process settings that don't belong
// in the user-editable profile). Garmin credentials and every tunable
// analysis-engine parameter live in the profile (internal/store.Profile)
@@ -12,7 +12,7 @@ import (
"time"
)
// Config holds smartrund's process-level configuration.
// Config holds geniusrund's process-level configuration.
type Config struct {
// Addr is the HTTP listen address, e.g. ":8080".
Addr string
@@ -35,13 +35,13 @@ type Config struct {
// for anything optional. Returns an error if a required variable is unset.
func Load() (Config, error) {
cfg := Config{
Addr: getEnvDefault("SMARTRUN_ADDR", ":8080"),
DBPath: getEnvDefault("SMARTRUN_DB_PATH", "smartrun.db"),
Addr: getEnvDefault("GENIUSRUN_ADDR", ":8080"),
DBPath: getEnvDefault("GENIUSRUN_DB_PATH", "geniusrun.db"),
GarminPythonPath: os.Getenv("MCP_GARMIN_PYTHON"),
GarminServerPath: os.Getenv("MCP_GARMIN_SERVER"),
GarminTokenStore: os.Getenv("GARMIN_TOKENSTORE"),
MinConfidence: getEnvFloat("SMARTRUN_MIN_CONFIDENCE", 0.6),
IncrementalSyncEvery: getEnvDuration("SMARTRUN_INCREMENTAL_SYNC_EVERY", 6*time.Hour),
MinConfidence: getEnvFloat("GENIUSRUN_MIN_CONFIDENCE", 0.6),
IncrementalSyncEvery: getEnvDuration("GENIUSRUN_INCREMENTAL_SYNC_EVERY", 6*time.Hour),
}
if cfg.GarminPythonPath == "" {

View File

@@ -1,5 +1,5 @@
// Package garmin wraps the mcp-garmin MCP server as a narrow Go client
// interface, so the rest of smartrun never deals with MCP/JSON-RPC directly.
// interface, so the rest of geniusrun never deals with MCP/JSON-RPC directly.
package garmin
import (
@@ -15,7 +15,7 @@ import (
"github.com/mark3labs/mcp-go/mcp"
)
// Client is the interface the rest of smartrun depends on. The real
// Client is the interface the rest of geniusrun depends on. The real
// implementation drives mcp-garmin over stdio; internal/garmin/mock provides
// a fake for tests and frontend-only development.
type Client interface {
@@ -94,7 +94,7 @@ func (c *mcpClient) ensureStarted(ctx context.Context) error {
initReq := mcp.InitializeRequest{}
initReq.Params.ProtocolVersion = mcp.LATEST_PROTOCOL_VERSION
initReq.Params.ClientInfo = mcp.Implementation{Name: "smartrund", Version: "0.0.1"}
initReq.Params.ClientInfo = mcp.Implementation{Name: "geniusrund", Version: "0.0.1"}
if _, err := inner.Initialize(ctx, initReq); err != nil {
inner.Close()
return fmt.Errorf("mcp initialize handshake: %w", err)

View File

@@ -5,7 +5,7 @@ package mock
import (
"context"
"smartrun/backend/internal/garmin"
"geniusrun/backend/internal/garmin"
)
// Client is a fake garmin.Client returning data supplied by the test/caller.

View File

@@ -6,7 +6,7 @@ import (
"fmt"
)
// Activity is smartrun's persisted view of a Garmin activity. Field mapping
// Activity is geniusrun's persisted view of a Garmin activity. Field mapping
// from the Garmin/MCP response happens in internal/sync, not here, so this
// package stays independent of internal/garmin.
//

View File

@@ -1,4 +1,4 @@
// Package store is smartrun's SQLite persistence layer: activities, laps,
// Package store is geniusrun's SQLite persistence layer: activities, laps,
// per-second samples, workout kind rule config, and classification history.
package store
@@ -15,7 +15,7 @@ import (
//go:embed migrations/*.sql
var migrationsFS embed.FS
// DB wraps a *sql.DB opened against a smartrun SQLite database file, with
// DB wraps a *sql.DB opened against a geniusrun SQLite database file, with
// migrations already applied.
type DB struct {
*sql.DB

View File

@@ -1,5 +1,5 @@
-- Backfill horizon used to be a startup-time env var
-- (SMARTRUN_BACKFILL_HORIZON_DAYS) with no UI at all -- exactly the kind of
-- (GENIUSRUN_BACKFILL_HORIZON_DAYS) with no UI at all -- exactly the kind of
-- "tunable analysis-engine parameter" this profile table exists for.
-- Default matches the old env var's default (3 years) so existing
-- deployments keep their current behavior until the user changes it.

View File

@@ -8,7 +8,7 @@ import (
func openTestDB(t *testing.T) *DB {
t.Helper()
path := filepath.Join(t.TempDir(), "smartrun_test.db")
path := filepath.Join(t.TempDir(), "geniusrun_test.db")
db, err := Open(path)
if err != nil {
t.Fatalf("Open: %v", err)
@@ -20,7 +20,7 @@ func openTestDB(t *testing.T) *DB {
func f(v float64) *float64 { return &v }
func TestMigrateIsIdempotent(t *testing.T) {
path := filepath.Join(t.TempDir(), "smartrun_test.db")
path := filepath.Join(t.TempDir(), "geniusrun_test.db")
db1, err := Open(path)
if err != nil {
t.Fatalf("first Open: %v", err)

View File

@@ -5,9 +5,9 @@ import (
"strings"
"time"
"smartrun/backend/internal/classify"
"smartrun/backend/internal/garmin"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/classify"
"geniusrun/backend/internal/garmin"
"geniusrun/backend/internal/store"
)
// isRunningActivityType reports whether a Garmin activityType.typeKey

View File

@@ -12,9 +12,9 @@ import (
"sync"
"time"
"smartrun/backend/internal/classify"
"smartrun/backend/internal/garmin"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/classify"
"geniusrun/backend/internal/garmin"
"geniusrun/backend/internal/store"
)
// Config tunes sync behavior. Zero values fall back to sensible defaults in

View File

@@ -6,17 +6,17 @@ import (
"testing"
"time"
"smartrun/backend/internal/classify"
"smartrun/backend/internal/garmin"
"smartrun/backend/internal/garmin/mock"
"smartrun/backend/internal/store"
"geniusrun/backend/internal/classify"
"geniusrun/backend/internal/garmin"
"geniusrun/backend/internal/garmin/mock"
"geniusrun/backend/internal/store"
)
func f(v float64) *float64 { return &v }
func openTestDB(t *testing.T) *store.DB {
t.Helper()
db, err := store.Open(filepath.Join(t.TempDir(), "smartrun_test.db"))
db, err := store.Open(filepath.Join(t.TempDir(), "geniusrun_test.db"))
if err != nil {
t.Fatalf("store.Open: %v", err)
}