Repository navigation
Backups: readable history, one entry per reset, scoped settings reset, visible retention (D5–D7) - #536
Draft
raiseCatError wants to merge 2 commits into
Draft
Backups: readable history, one entry per reset, scoped settings reset, visible retention (D5–D7)#536raiseCatError wants to merge 2 commits into
raiseCatError wants to merge 2 commits into
Conversation
raiseCatError
force-pushed
the
fix/backup-ui-reset-20261029
branch
from
October 29, 2026 02:33
5247081 to
86f76f6
Compare
…, visible retention - /changes rows name the application, file, action and status, grouped by local day; the writer's label moves to the details. A file rewritten by a newer NMSh entry reads "changed later by NMSh", not "edited since". - A single-area reset records one entry (no duplicate checkpoint); a multi-area reset keeps a checkpoint plus linked stages, and marks a failed run partial. Steps that only advance say so; the typed word still gates. - Settings reset is scoped: preferences, first-run state and update policy are separate areas with key-level before -> after values. Preferences never touch onboarding or the update policy (so no surprise automatic updates); themes, presets and unknown fields are always kept; repeated resets are no-ops. - Originals lost to capacity pressure are recorded and shown as a retention warning; the guarantees are documented.
…ive kept values From independent review: - A multi-area reset whose files change right after its checkpoint is recorded marks the checkpoint reverted instead of leaving it unfinished. - A preferences reset writes out absent update-policy and first-run keys as their current effective values, so a sparse or legacy settings file cannot change its update policy or onboarding state indirectly. - The retention warning counts each file once; the guarantees text matches the pruner.
raiseCatError
force-pushed
the
fix/backup-ui-reset-20261029
branch
from
October 29, 2026 02:51
86f76f6 to
8b9be6f
Compare
This branch has not been deployed
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.
Stacked on #535 (D2–D4). Fixes D5–D7 from #534 and re-audits retention. Notes:
BACKUPS_AND_RESET.md→ "History, reset and retention"; QA steps added toQA_CHECKLIST.md.D5 — vague history. Rows now read · ". "changed later by NMSh ()" is distinguished from "edited since".
HH:MM <application> · <file> [+N more] · <created|changed|removed|checkpoint> · <status>, grouped by local day; details show~/paths, local time and "Recorded as:D6 — duplicate reset entries, misleading footer. Cause:
applyResetrecorded a global checkpoint and one transaction per area with the same before-images. A single-area reset is now one entry; multi-area keeps "Reset checkpoint" plus "Reset stage i/n" entries linked bygroup(each stage has its own before-images), and a failed or raced run is marked partial/reverted. Steps that only advance say "next: backup", "next: type reset", "restore now", "next: confirm overwrite"; the typed word still gates the write.D7 — settings reset changed unrelated preferences. Cause: the settings area wrote
DEFAULT_PROMPT_CONFIGURATIONwholesale (onboarding flags,updateMode: automatic, theme library, unknown fields). Now three areas: preferences / first-run state / update policy, planned together as one exact change, withkey: before → afterand "Kept: …" lines. Themes,customTheme, welcome presets, agent profiles and unknown fields are never reset; absent kept keys are written as their current effective value; a missing file is "nothing to reset", malformed JSON is refused, repeats are no-ops; undo via/changesis byte-exact (tested).Retention. Never pruned: unfinished entries, newest per source+file, 20 newest reset/restore/manual. Originals go only when nothing else can, and each loss is recorded and shown as a retention warning. NMSh does not claim permanent recoverability; files changed before the journal existed have no pre-NMSh copy.
Tests: new
tests/backupsResetScope.test.ts(9; the original 8 fail on the D2–D4 head, pass here) incl. 260-write burst and a 3-entry cap. Focused backups + Theme Bridge 91/91; 97 consumer files 985/987 (1 skipped;keepAwakeForegroundtimed out under load and passes alone).tscand build clean.Limits: legacy
{prompt:{…}}wrappers are reset at the root only. Physical terminal QA NOT RUN.Exact-head CI: run 40808813420 on 8b9be6f: success. Installed locally as builds/8b9be6f4 (rollback to 1c01d3f tested).