Commit graph

39 commits

Author SHA1 Message Date
Snider
345fa26062 feat(store): add Exists, GroupExists, and Workspace.Count methods
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Add public existence-check methods across all store layers (Store,
ScopedStore, StoreTransaction, ScopedStoreTransaction) so callers can
test key/group presence declaratively without Get+error-type checking.
Add Workspace.Count for total entry count. Full test coverage with
Good/Bad/Ugly naming, race-clean.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-05 08:58:26 +01:00
Virgil
cdf3124a40 fix(store): make scoped store nil-safe
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 21:19:59 +00:00
Virgil
fcb178fee1 feat(scope): expose scoped config snapshot
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 20:54:45 +00:00
Virgil
ea3f434082 feat: add scoped store watcher wrappers
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 20:34:25 +00:00
Virgil
d854e1c98e refactor(scope): prefer scoped-store config literals
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 19:53:53 +00:00
Virgil
4c6f2d6047 feat(scope): add scoped on-change helper
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 19:24:47 +00:00
Virgil
731a3ae333 fix(scope): make quota checks non-mutating
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 19:12:24 +00:00
Virgil
aa49cdab4e feat(scope): add scoped pagination helpers
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 17:53:21 +00:00
Virgil
9dc0b9bfcf refactor(scope): make scoped group access explicit
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 16:37:56 +00:00
Virgil
dfbdace985 feat: add scoped store transactions
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 16:09:14 +00:00
Virgil
1fb8295713 feat(store): add scoped store config constructor
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 16:06:43 +00:00
Virgil
cae3c32d51 refactor: add AX config validation helpers
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 15:47:56 +00:00
Virgil
6ba5701955 refactor(config): validate declarative store options
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 10:46:46 +00:00
Virgil
aa83e59b69 fix(scope): enforce quotas in scoped transactions
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 10:36:57 +00:00
Virgil
7874f6eda8 feat(scope): add scoped transaction wrapper
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 10:03:41 +00:00
Virgil
50d368f1ae feat(scope): add declarative scoped constructor
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 09:34:54 +00:00
Virgil
37500c56ae refactor(store): clarify SQLite handle names
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 09:04:56 +00:00
Virgil
bf7b616fe1 feat(store): add paginated group reads
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 08:32:35 +00:00
Virgil
3a8cfcedf9 feat(store): add prefix cleanup helpers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 07:14:22 +00:00
Virgil
c12aba4145 feat(scope): support scoped wildcard watchers
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 07:00:35 +00:00
Virgil
303b75444d feat(scope): add scoped event delegation
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 06:55:37 +00:00
Virgil
bc578265a8 refactor(scope): make scoped helpers explicit
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 05:45:24 +00:00
Virgil
387d1463fb feat(store): add RFC-scoped helpers and callbacks
Add the RFC-named scoped helpers, AllSeq iteration, and group-filtered change callbacks.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 05:13:46 +00:00
Virgil
016e2c3777 refactor(store): remove legacy alias entry points
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 05:05:53 +00:00
Virgil
5c7e243fc0 feat(store): align public API with RFC
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 04:44:45 +00:00
Virgil
d9fad2d6be feat(store): implement RFC workspace and journal surfaces
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:46:43 +00:00
Virgil
134853e6df fix(store): tighten scoped purge and delete events
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 20:03:19 +00:00
Virgil
9cd7b9b1a7 fix(store): stabilise AX iteration behaviour
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 19:39:54 +00:00
Virgil
68e7d1e53a fix(store): tighten AX docs and scoped constructor validation
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 19:29:48 +00:00
Virgil
6813cd0308 feat(scope): add namespace-local helper methods
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 19:14:09 +00:00
Virgil
23f207db3f refactor(store): tighten AX naming and error contexts
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 18:37:07 +00:00
Virgil
f144c5eb01 refactor(test): tighten AX naming in tests
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 1m43s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 18:23:56 +00:00
Virgil
bf3db41d9f test(store): improve AX coverage and error paths
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 1m39s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 18:08:33 +00:00
Virgil
335c6460c9 refactor(store): adopt AX primary names
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 1m35s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 14:22:49 +00:00
Virgil
380f2b9157 fix(store): finish ax v0.8.0 polish
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-29 23:26:44 +00:00
Claude
c3de82b207
feat: upgrade to core v0.8.0-alpha.1, replace banned stdlib imports
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 2m33s
Replace fmt, errors, strings, path/filepath with Core primitives
across 8 files. Keep strings for SplitSeq/FieldsSeq/Builder/Repeat.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:58:50 +00:00
Snider
11f0781d0a fix: harden error handling and SQL wildcard injection
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 1m38s
- Check ALTER TABLE migration errors (ignore duplicate column only)
- Handle background purge failures instead of swallowing errors
- Add escapeLike() to prevent SQL wildcard injection in LIKE queries
- Use errors.Is(ErrNotFound) in quota checks instead of treating all errors as not-found
- Add TestCountAll_Good_WithPrefix_Wildcards

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 08:20:38 +00:00
Snider
3c6b2267a3 refactor: apply go fix modernizers for Go 1.26
Automated fixes: interface{} → any, range-over-int, t.Context(),
wg.Go(), strings.SplitSeq, strings.Builder, slices.Contains,
maps helpers, min/max builtins.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 21:00:17 +00:00
Snider
175fd6bf83 feat(scope): add namespace isolation with quota enforcement
ScopedStore wraps Store and auto-prefixes groups with a namespace to
prevent key collisions across tenants. QuotaConfig enforces per-namespace
MaxKeys and MaxGroups limits (zero = unlimited). Upserts and expired
keys are excluded from quota counts.

New Store methods: CountAll(prefix) and Groups(prefix) for cross-group
queries. All 93 tests pass with race detector, coverage 94.7%.

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:19:11 +00:00