5 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
b8bf9ec411 feat(llm): provider failover with cooldown-based failback (#2932) 2026-12-02 05:35:15 -05:00
supermario_leo
f8cf0224b9 fix(multi_user): keep an unreadable account store instead of resetting it
A users.json that exists but cannot be read as a JSON object was treated as
an empty store, so the next write replaced every account with a single record
promoted to admin, and is_first_user() reopened /register for anyone.

Separate "no store yet" from "store is unusable": an absent, zero-byte,
whitespace-only, byte-order-mark-only, null, [] or JSON-scalar document holds no
accounts and still bootstraps; invalid JSON and a non-empty array are reported.
load_users() reports the problem once a minute per path, and the single write
funnel refuses to replace the operator's bytes, raising AccessError(503) for an
unreadable store and for a write the volume rejects, including a first boot on
an unwritable volume.

The caller-facing detail names the bare file and the remedy; the parse failure
and the absolute path stay in the operator log, because OS error text embeds the
path in a repr-escaped form that cannot be redacted reliably.
2026-11-30 06:49:38 +08:00
Leoy
d8f678d04f fix(config): keep a settings document that cannot be parsed instead of resetting it (#2929)
* fix(config): keep a settings document that cannot be parsed instead of resetting it

* fix(config): re-warn about an unparseable settings document once a minute

The startup load runs before logging is configured, so its only record can
reach just the process output, and the permanent per-path set meant it never
appeared in the application log afterwards. Throttle per path instead, and
state in the containerization guide where the warning is written and that
the loader only preserves documents it cannot parse.
2026-11-28 19:42:21 +08:00
yaqi
46fb4ae9d1 docs(settings): explain what the fallback chain covers 2026-11-25 10:51:34 +08:00
Bingxi Zhao (Frank)
1ea7df1554 docs: consolidate developer and agent handbook 2026-10-29 00:36:18 +08:00