Virgil
1ec0ea4d28
fix(ratelimit): align module metadata and repo guidance
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-27 04:23:34 +00:00
Virgil
36cc0a4750
refactor(ratelimit): upgrade to core v0.8.0-alpha.1
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 15:41:11 +00:00
Snider
d4d9d7a798
chore(ratelimit): migrate dependencies from forge.lthn.ai to dappco.re
...
Security Scan / security (pull_request) Successful in 7s
Test / test (pull_request) Successful in 2m17s
Update go.mod require lines and .go import paths:
- forge.lthn.ai/core/go-io v0.1.7 → dappco.re/go/core/io v0.2.0
- forge.lthn.ai/core/go-log v0.0.4 → dappco.re/go/core/log v0.1.0
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:34:23 +00:00
Snider
b45262132b
chore: sync dependencies for v0.1.11
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 17:55:05 +00:00
Snider
92fe978b1a
chore: sync dependencies for v0.1.10
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 17:47:34 +00:00
Snider
e6a3ba9810
chore: sync dependencies for v0.1.9
...
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 2m33s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 22:20:29 +00:00
Snider
4bb1cb96d4
refactor(ratelimit): replace all fmt.Errorf with coreerr.E from go-log
...
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 1m7s
Replace all 41 remaining fmt.Errorf calls in production code (ratelimit.go
and sqlite.go) with coreerr.E() from forge.lthn.ai/core/go-log. Promotes
go-log from indirect to direct dependency in go.mod.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 20:38:06 +00:00
Snider
ee6c5aa69d
refactor(ratelimit): replace os.ReadFile/WriteFile/MkdirAll with go-io
...
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 2m24s
Swap all direct os I/O calls for coreio.Local equivalents:
- os.ReadFile → coreio.Local.Read (returns string; []byte cast at call sites)
- os.WriteFile + os.MkdirAll → coreio.Local.Write (creates parent dirs internally)
Affected: Load(), Persist(), MigrateYAMLToSQLite(). go.mod gains
forge.lthn.ai/core/go-io v0.1.2 as a direct dependency.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 18:31:35 +00:00
Snider
b0b686bd3f
chore: sync go.mod dependencies
...
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 2m22s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:36:21 +00:00
Snider
70b611e2a7
chore: refresh go.sum after upstream tag updates
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 06:35:19 +00:00
Claude
6d9075a3f2
chore: sync workspace dependency versions
...
Run go work sync to align dependency versions across workspace.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:41:59 +00:00
Snider
0afcf0fb64
chore: bump go directive to 1.26.0
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 20:33:48 +00:00
Snider
1afb1d636a
feat(persist): Phase 2 — SQLite backend with WAL mode
...
Add multi-process safe SQLite persistence using modernc.org/sqlite (pure
Go, no CGO). Follows the go-store pattern: single connection,
WAL journal mode, 5-second busy timeout.
New files:
- sqlite.go: sqliteStore with schema (quotas, requests, tokens, daily
tables), saveQuotas/loadQuotas, saveState/loadState, close methods
- sqlite_test.go: 25 tests covering basic round-trips, integration,
concurrency (10 goroutines, race-clean), migration, corrupt DB recovery
Wiring:
- Backend field added to Config ("yaml" default, "sqlite" option)
- Persist() and Load() dispatch to correct backend
- NewWithSQLite() and NewWithSQLiteConfig() convenience constructors
- Close() method for cleanup (no-op for YAML)
- MigrateYAMLToSQLite() helper for upgrading existing YAML state
All existing YAML tests pass unchanged (backward compatible).
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 07:50:48 +00:00
Claude
3c63b1022a
feat(ratelimit): generalise beyond Gemini with provider profiles and push coverage to 95%
...
Phase 0: Rewrite test suite with testify (77.1% -> 95.1% coverage).
Add boundary tests, concurrent access tests, benchmarks, error path
coverage for Load/Persist, Reset, Stats, and CountTokens.
Phase 1: Extract hardcoded Gemini quotas into provider-agnostic config.
Add Provider type, DefaultProfiles(), NewWithConfig(), SetQuota(), and
AddProvider(). Pre-configured profiles for Gemini, OpenAI, Anthropic,
and Local. New() retains exact backward compatibility via delegation.
Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 01:07:57 +00:00
Snider
9b53632e3d
fix: add yaml.v3 dependency
...
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 16:10:06 +00:00
Snider
fa1a6fc030
feat: extract go-ratelimit from core/go pkg/ratelimit
...
Token counting, model quotas, sliding window rate limiter.
Zero external dependencies (stdlib only).
Module: forge.lthn.ai/core/go-ratelimit
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 16:09:13 +00:00