Repository navigation
Refuse to treat an unreadable memory or secrets file as empty - #430
Merged
Merged
Conversation
A memory file or secrets.json that exists but cannot be read used to read back as empty (ENOENT and real errors alike), so the next write would replace it and lose every entry or key in it. Memory: readText and topicNames throw memory/unreadable on non-ENOENT errors, and remember/forget/recall surface that error to the model. The prompt section must not throw, so it reads on its own: an unreadable memory shows '(this memory could not be read: <code>)' and a failed topic listing is omitted; a render with a read failure is neither frozen nor written as the snapshot, so the next render tries again. Secrets: a non-ENOENT read error sets a blocked reason instead of emptying the store; while blocked, loadSecrets reads the file again each time (a busy file may only fail briefly), persist() refuses to write before touching the file, and the deferred noteUsed save is skipped. A file that is not JSON is copied to secrets.json.broken-<time> first, like a broken state.json, and the store goes on empty; when the backup itself fails the store stays blocked. Fixes #409
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
bigbearcool
pushed a commit
to bigbearcool/DeepSeek-Bot
that referenced
this pull request
Oct 22, 2026
Bring in upstream Fei2411#430–Fei2411#440 (unreadable stores, secret card read-only, group relay pause, activity row, editable secret purpose, app search selector, web-search docs, small-viewport/touch/viewport-unit fixes). Resolve activity-row host lookup by using upstream findHost().
bigbearcool
pushed a commit
to bigbearcool/DeepSeek-Bot
that referenced
this pull request
Oct 22, 2026
bigbearcool
pushed a commit
to bigbearcool/DeepSeek-Bot
that referenced
this pull request
Oct 22, 2026
5 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #409
Bug: a memory file (or
secrets.json) that exists but cannot be read was read back as empty, so the next write replaced it and every entry or key in it was lost.What changed / 改了什么
memory/unreadable);remember,forgetandrecallreport it and write nothing. The prompt section does not fail the turn: it says the memory could not be read, and a render with a read failure is not saved as the snapshot.secrets.json.broken-<time>, like a brokenstate.json.Changelog
An unreadable memory or secrets file is no longer overwritten by the next change.
How I checked it / 怎么验证的
npm test(inds-bot/): 841 pass, 0 fail, 1 platform skip; new cases for a file that cannot be read and for broken JSONnode scripts/build-client.mjs --checknpm run lint: 0 errorsdevChecklist / 检查
src/client/changed →npm run buildran andclient.jsis committed. / 改了src/client/就已重新 build 并提交client.js。Co-authored-by. / 没有把 AI 工具写成作者或Co-authored-by。