Posts
Shared Memory for Several AI Tools: SQLite Holds the Truth, Qdrant Only Searches
I use SQLite as the canonical store and Qdrant for retrieval through MCP. Sharing AI memory means deciding who may write and how the stores stay in sync.
After RFC 10017, the First Reason for a BFF Is Keeping Tokens Out of the Browser
RFC 10017 ranks the BFF first for browser OAuth security because tokens stay on the server. Settle token storage before working on aggregation.
Unpredictable Game RNG in Production, Replayable in Tests: Separating the Two in Go
Use a Source interface to keep production RNG unpredictable and tests reproducible. Covers HMAC-seeded ChaCha8, recorded draws for disputes and an AES-CTR deadlock.
Millisecond Cursors Repeat Pages: timestamptz Precision and Composite Keyset Pagination
A millisecond cursor over microsecond timestamptz repeats rows; microseconds still skip or repeat rows written in one transaction. A (created_at, id) keyset fixes both, tested on PostgreSQL 18.
What an HMAC Request Signature Should Cover: Method, Path, Query and the Raw Body
Sign only the body and the path or query can be swapped freely; re-serialise JSON before verifying and honest requests fail. Cover the method, path, sorted query and raw body bytes.
Treat Unset as Zero: Hard Caps, Approval Thresholds and Which Way a Kill Switch Fails
Defaults decide what a money system does when a setting is missing or unreadable: reject out-of-range amounts, treat an unset approval threshold as zero, and fail closed on writes only.
The Faster You Mine, the Faster It Tips Over: A Game Economy as a Dynamic System
Sensible prices can still produce runaway wealth once output, upgrades and costs feed back into each other. Difference equations, feedback, delay and Monte Carlo on a mining economy.