mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-03 12:29:39 +08:00
#1436 put the right question in `_invalidate_runtime_caches` — did this apply actually change the catalog — but left every caller to answer it. Five endpoints assembled their own `catalog_before`/`catalog_after` pair in four different ways: two full extra `load()` calls at the codex endpoint, `current` before secret restoration at one, `service.load()` after apply at two others. And the kwargs are optional, so the sixth endpoint that forgets them gets the unconditional reset #1421 was about, silently. Whether the catalog changed is a property of the file, not of the caller. `_runtime_catalog_write()` brackets the write and reads both sides itself, so a caller states only what it always knew: this writes the catalog. A write that raises leaves the block without resetting, which is what a failed write should do — there is nothing new for the clients to read. Behaviour is unchanged; the two skip paths #1436 tested still pass untouched. Adds the two it did not: finishing the tour with nothing edited, which is the cold start the report described, and applying one service that already holds the value it is being given. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>