Skip to content

Fix a store start-up race and report service limit sources - #134

Merged
kcosr merged 8 commits into
mainfrom
chore/broker-housekeeping
Nov 30, 2026
Merged

kcosr merged 8 commits into
mainfrom
chore/broker-housekeeping

Conversation

@kcosr

@kcosr kcosr commented Nov 30, 2026

Copy link
Copy Markdown
Owner

What

Four small, unrelated changes.

  • Store start-up race (fix). Two managed-store initialisers starting at the same moment could fail with "database is locked": switching the database to write-ahead mode upgrades a lock in a way SQLite does not wait on. The switch is now retried within the existing five-second budget. Nothing else about the store changes.
  • Service limit sources (breaking for administrator clients). On the administrator service-limit routes, the Boolean overridden is replaced by source: principal for an account override, service for a service-specific limit, default otherwise. The portal's Limits tab labels them Override, Service and Default; it used to label a service-specific limit "Default". A caller's own limits (/v1/me, service detail, CLI and MCP describe) are unchanged and still do not say where a value comes from.
  • AGENTS.md. The invocation-limit precedence is stated correctly: an imported managed rate replaces the configured service rate, and a principal override wins over either.
  • Resolution examples. tests/fixtures/access-key-resolution/ is documented as the official set of examples for the access-key resolution contract. No example data changes; one note in index.json is reworded.

Validation

  • The store test failed 5 of 300 runs before the fix and 0 of 300 after, unchanged
  • Full Rust suite (5,471 passed), doctests, strict clippy, public API check (unchanged), catalog and OpenAPI tests, changelog and documentation checks, sample configuration
  • Portal unit tests (812) and the Limits browser tests
  • Tests guard both caller-side shapes against any source marker
  • Independent review in two rounds; final review clean

🤖 Generated with Claude Code

@kcosr
kcosr merged commit 7c8d8c9 into main Nov 30, 2026
2 checks passed
@kcosr
kcosr deleted the chore/broker-housekeeping branch November 30, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant