Skip to content

Commit a7db346

Browse files
sgx-labsclaude
andcommitted
chore: upgrade golangci-lint to v2, update changelog, gofmt
- Migrate .golangci.yml to v2 format (version field, formatters section) - Suppress ST1005 for embedding error messages (intentionally capitalized) - Fix lint issues in changed files (fmt.Fprintf, ineffassign, switch style) - Run gofmt on all files flagged by new linter - Update CHANGELOG unreleased section with all v0.11.0 changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8e793bd commit a7db346

6 files changed

Lines changed: 651 additions & 615 deletions

File tree

.golangci.yml

Lines changed: 45 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,58 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
build-tags:
44
- cgo
5-
65
linters:
76
enable:
8-
- errcheck
9-
- govet
10-
- staticcheck
11-
- unused
12-
- ineffassign
13-
- gosimple
14-
- typecheck
157
- misspell
16-
- gofmt
17-
- goimports
188
disable:
199
- depguard
2010
- exhaustive
2111
- wrapcheck
22-
23-
linters-settings:
24-
errcheck:
25-
check-type-assertions: true
26-
exclude-functions:
27-
- fmt.Fprintf
28-
- fmt.Printf
29-
- fmt.Println
30-
- (io.Closer).Close
31-
misspell:
32-
locale: US
33-
goimports:
34-
local-prefixes: github.com/sgx-labs/statelessagent
35-
12+
settings:
13+
errcheck:
14+
check-type-assertions: true
15+
exclude-functions:
16+
- fmt.Fprintf
17+
- fmt.Printf
18+
- fmt.Println
19+
- (io.Closer).Close
20+
misspell:
21+
locale: US
22+
exclusions:
23+
generated: lax
24+
presets:
25+
- comments
26+
- common-false-positives
27+
- legacy
28+
- std-error-handling
29+
rules:
30+
- linters:
31+
- errcheck
32+
path: _test\.go
33+
- linters:
34+
- staticcheck
35+
text: "ST1005:"
36+
path: internal/embedding/
37+
paths:
38+
- third_party$
39+
- builtin$
40+
- examples$
3641
issues:
37-
exclude-rules:
38-
- path: _test\.go
39-
linters:
40-
- errcheck
41-
- path: internal/web/static\.go
42-
linters:
43-
- goimports
4442
max-issues-per-linter: 50
4543
max-same-issues: 10
44+
formatters:
45+
enable:
46+
- gofmt
47+
- goimports
48+
settings:
49+
goimports:
50+
local-prefixes:
51+
- github.com/sgx-labs/statelessagent
52+
exclusions:
53+
generated: lax
54+
paths:
55+
- third_party$
56+
- builtin$
57+
- examples$
58+
- internal/web/static\.go

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,26 @@
44

55
### Added
66

7+
- `same tips` command with vault hygiene, security, and model selection guidance
8+
- `same graph enable` / `same graph disable` commands to toggle graph mode without editing config files
9+
- Automatic container environment detection (Docker, Kubernetes, Codespaces, Gitpod) — surfaces in status and doctor output
10+
- Graceful Ctrl+C cancellation during reindex and init — first press stops cleanly with partial progress, second press force-quits (Mac, Linux, Windows)
11+
- Human-readable error messages for common embedding failures: connection refused, timeout, auth errors, dimension mismatches
12+
- Graph LLM recommendation surfaced across `init`, `demo`, `status`, `doctor`, and `tips` when a capable model is detected but graph mode is off
713
- Thinking model compatibility: `stripThinkingTokens()` utility strips `<think>`, `<reasoning>`, `<reflection>` tags from LLM responses
814
- Graph extraction: `[graph] model` config key and `SAME_GRAPH_MODEL` env var for choosing a non-thinking model
915
- Graph extraction: `--abort-on-error` flag (continue-on-error is now the default)
1016
- Graph extraction: Ollama structured output with JSON schema for more reliable parsing
1117
- Dockerfile: Multi-stage build, non-root user, OCI labels
18+
- Command aliases: `same s` (search), `same st` (status), `same vault ls` (vault list)
19+
- Port-in-use detection for `same web`
20+
- Platform shown in `same version` output
1221

1322
### Fixed
1423

24+
- Windows self-update no longer fails when a stale `.old` backup file is locked from a previous update — uses fallback rename chain
25+
- Migration failure upgrading from v0.9.1 to v0.10.0 — `entry_kind` index no longer created before the column exists
26+
- `same graph stats` now reads from config.toml instead of only checking the environment variable
1527
- Graph LLM extraction now works with thinking/reasoning models (DeepSeek-R1, QwQ, etc.)
1628
- `same ask`, demo, and tutorial commands no longer display thinking tokens
1729
- Ollama and OpenAI response paths strip thinking tags at the transport layer
@@ -20,8 +32,19 @@
2032

2133
### Changed
2234

35+
- Demo rewritten with 5 realistic sample notes and a narrative arc (search, decisions, handoff recall) — transitions into init with a single prompt
36+
- Init onboarding redesigned: detects project language, AI tools, and git state; adds teaching moments during directory creation; suggests seed vaults based on project type
37+
- `install.sh` messaging updated to honestly communicate Ollama's role in semantic search
38+
- Output consistency polish: standardized checkmarks, hint capitalization, footer formatting
2339
- README overhauled: conversion-focused, 270 lines, collapsible reference sections
2440

41+
### Performance
42+
43+
- Batch embedding requests: Ollama switched from `/api/embeddings` to `/api/embed`, OpenAI batching added — 50 chunks per request instead of 1
44+
- SQLite pragmas: 64 MB page cache, 256 MB mmap, temp_store in memory
45+
- Covering index added for incremental reindex hash comparison
46+
- ReindexLite parallelized with 4-worker goroutine pool (was sequential)
47+
2548
## v0.9.1 — Cross-Platform CI and Extraction Reliability
2649

2750
### Fixed

0 commit comments

Comments
 (0)