Business config switches to JSONC (// / /* */ comments + trailing commas). Loader: in-repo strip then stdlib json.loads (no new deps).
Default path prefers config.jsonc, falls back to legacy config.json. Explicit --config unchanged.
Credentials move to sibling secrets.json (pure JSON). auth only atomically writes secrets (+ .bak); JSONC comments are never wiped.
Examples renamed to .jsonc with real comments; secrets.example.json added; compose/Docker/docs/favsort/tools share the same loader. Dual-read for migration (monolithic config.json still loads; secrets overlay wins when present).
Out of scope (Phase A)
No DB migration for hot-read tunables. Future work can move analytics/discover/notify-style settings into DB for in-memory refresh without restart; schedule times / secrets / storage paths stay in files.
Test plan
tests/test_jsonc.py + test_config.py + test_auth.py + full offline suite (35 files) green
Deploy: copy config.example.jsonc → config.jsonc, secrets.example.json → secrets.json; migrate cookies out of old config.json if needed
## Summary
- Business config switches to **JSONC** (`//` / `/* */` comments + trailing commas). Loader: in-repo strip then stdlib `json.loads` (no new deps).
- Default path prefers `config.jsonc`, falls back to legacy `config.json`. Explicit `--config` unchanged.
- Credentials move to sibling **`secrets.json`** (pure JSON). `auth` only atomically writes secrets (+ `.bak`); JSONC comments are never wiped.
- Examples renamed to `.jsonc` with real comments; `secrets.example.json` added; compose/Docker/docs/favsort/tools share the same loader. Dual-read for migration (monolithic `config.json` still loads; secrets overlay wins when present).
## Out of scope (Phase A)
No DB migration for hot-read tunables. Future work can move analytics/discover/notify-style settings into DB for in-memory refresh without restart; schedule times / secrets / storage paths stay in files.
## Test plan
- [x] `tests/test_jsonc.py` + `test_config.py` + `test_auth.py` + full offline suite (35 files) green
- [ ] Deploy: copy `config.example.jsonc` → `config.jsonc`, `secrets.example.json` → `secrets.json`; migrate cookies out of old `config.json` if needed
- [ ] `python app.py auth --account read` updates only `secrets.json`, leaves JSONC comments intact
Load business config as JSONC (comments + trailing commas) via an
in-repo stripper then stdlib json — no new deps. Default path prefers
config.jsonc, falls back to legacy config.json. Auth write-back targets
only sibling secrets.json so JSONC comments are never wiped; secrets
overlay merges on load. Examples, compose, Docker, docs, favsort and
tools all share the same loader. Phase A only — no DB settings migration.
kairee
merged commit 8e7ead1669 into main2026-11-02 13:21:08 +08:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
////* */comments + trailing commas). Loader: in-repo strip then stdlibjson.loads(no new deps).config.jsonc, falls back to legacyconfig.json. Explicit--configunchanged.secrets.json(pure JSON).authonly atomically writes secrets (+.bak); JSONC comments are never wiped..jsoncwith real comments;secrets.example.jsonadded; compose/Docker/docs/favsort/tools share the same loader. Dual-read for migration (monolithicconfig.jsonstill loads; secrets overlay wins when present).Out of scope (Phase A)
No DB migration for hot-read tunables. Future work can move analytics/discover/notify-style settings into DB for in-memory refresh without restart; schedule times / secrets / storage paths stay in files.
Test plan
tests/test_jsonc.py+test_config.py+test_auth.py+ full offline suite (35 files) greenconfig.example.jsonc→config.jsonc,secrets.example.json→secrets.json; migrate cookies out of oldconfig.jsonif neededpython app.py auth --account readupdates onlysecrets.json, leaves JSONC comments intact