Port: port/pr-38-fix/update-preserve-config-json#12
Conversation
…ostack#37) `update.ts` was unconditionally copying `src/templates/config.json` over every registered project's `.wolf/config.json`. That file is not template content — it carries each project's daemon port, dashboard port, scan intervals, and exclude patterns. Overwriting it across all projects in one shot resets every registered project to the same defaults (`daemon=18790`, `dashboard=18791`), so only the first daemon to start binds and the rest crash-loop on `EADDRINUSE`. Move `config.json` from `ALWAYS_OVERWRITE` to `USER_DATA_FILES`. It is still included in `BACKUP_FILES` via the spread, so `openwolf restore` can still recover it. Reproduced on Linux (PVE 7) and Windows 11. After local apply, ten projects on one host kept their unique ports through a simulated update; pre-patch, all ten fell to defaults inside one second. No behavior change for `OPENWOLF.md` or `reframe-frameworks.md` — those remain protocol-doc overwrites.
|
Now I have everything I need. Here's my review of PR #12: PR #12 Code Review:
|
| # | Severity | Issue |
|---|---|---|
| 1 | Line 177: stale comment still names config.json as a file being updated |
|
| 2 | No "create if missing" seed for config.json on update — older projects won't get the file |
Fix both before merging; neither is a blocker, but #2 will silently break daemon startup for any project that predates the config.json template addition.
|
Autofixer skipped: merge conflicts with main detected. |
- Fix stale comment on line 177: remove config.json reference since it is no longer in ALWAYS_OVERWRITE (now lists OPENWOLF.md and reframe-frameworks.md accurately) - Add "create if missing" seed block for config.json after the template copy loop so older projects that predate the config.json template addition receive the file on their next `openwolf update` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
✅ Autofixer applied. Build and tests passed. Promoting to Ready for Review. |
Ported from upstream cytostack/openwolf. Needs review before merge.