Repository navigation
fix(setup): audit P2 batch — undo receipt, Ctrl-C note, discover themes, zh keys (#179) - #239
Merged
Merged
Conversation
…ash#179) - L02-1: a fresh install now journals rc_created; the finish screen's undo receipt covers the write itself (remove the generated rc and the .setup-done marker) instead of leaving an unrestorable rc. - L02-2: deduplicate the 'niu plugin source remove <id>' undo receipt when the theme pick and the collection name the same source. - L02-3: Ctrl-C at the niu-git question prints the same cancelled note as every other wizard question instead of exiting silently. - L05-1: 'niu plugin discover' enumerates the theme layer (Themes from trusted sources, with enable hints), matching the wizard's 'sources & themes' promise; empty state explains how themes appear. - L05-2: realign zh keys with the runtime literals (gallery Skip row hyphen, empty-gallery note) and add the missing niu-git recommend line; the zh vocab test now guards the runtime strings. - L05-3 (note): a gutted trusted source still reads ready, but 'niu plugin list' and 'niu plugin discover' now name the repair verb (niu plugin source verify <id>) instead of silently showing no assets. Regression tests: fresh-install undo receipt + journal rc_created, deduped source-removal receipt, discover theme layer (empty + trusted), gutted-source verify hint, zh runtime-literal vocabulary.
caomengxuan666
added a commit
that referenced
this pull request
Oct 10, 2026
…notes draft (#254) - Version 1.3.4 -> 1.4.0 (workspace root + crates/niubash-runtime; Cargo.lock synced; internal niubash-runtime dep requirement aligned 1.2.5 -> 1.4.0). The rubash engine requirement stays 1.3.4: it is semver-open (^1.3.4 admits the engine's 1.4.0), and the committed [patch] resolves it to the local ../rubash worktree, whose Cargo.toml still says 1.3.4 until the engine cuts its own release. - CHANGELOG: the Unreleased section becomes [1.4.0] - 2026-10-10. Also repairs the committed merge damage from #243 (stray conflict marker and the #241 doctor-advice entry glued onto the carapace entry) and folds in the merged cycle: #235 #239 #246 #247 #250 #251 #252 #253 plus a compact rubash 1.4.0 engine summary. #240's P2-batch content stays under [1.3.4] where the file already records it (no dup). - docs/release-notes-1.4.0-draft.md: zh+en draft release notes (Added / Fixed / Performance), winuxcmd #1151/#1154-#1157 marked as in-flight for the coordinator, plus the local verification log: release build PASS (niu.exe 10.6 MB), MSIX packed unsigned with a placeholder identity (5.1 MB), wpm-source main carries all four preinstall packages, and cargo publish --dry-run chain findings (rubash -> niubash-runtime -> niubash, blocked on the engine's crates.io release). No tag, no release workflow trigger, no in-flight PRs merged.
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.
Closes #179
审计 P2 批次逐项处置(工作树 wt82-L02 findings 复核于当前 master,部分项已被 #180/#145 等后续修复顺带改变):
fixed
SetupJournal新增rc_created;首装(无前版 rc 可备份)的收据现在覆盖写入本身——rm ~/.niubashrc(连同守卫块)+rm ~/.niubash/.setup-done,不再留下无法撤销的生成 rc。回归:setup_journal_records_entries_and_undo_commands(fresh-install 分支 + journalrc_created = true断言)。setup_undo_lines按源 id 去重,主题与合集同名源只打印一次niu plugin source remove <id>。回归:同测试的去重计数断言(2 → 1)。ask_niu_git返回None时补print_cancelled_note(),与其他问题路径一致(原 setup_wizard.rs:973 处绕过ask!的旁路已消除;Ctrl+C 交互路径无现成测试钩子,靠同一ask!契约覆盖)。niu plugin discover新增 "Themes (from trusted sources)" 段,逐条列出名称/适配器/源 +niu plugin enable <name>提示;空态给出 add→trust 引导,与向导措辞对齐。回归:plugin_discover_is_read_only_and_lists_available_managers(空态)+ 生命周期测试(信任后列出 robbyrussell 等)。Skip - keep my current theme(连字符)、No external themes installed yet - keeping the default look.(空画廊注记);补缺失键niu installs nothing itself — …。原单测守的死字面量(长破折号 Skip 行、旧空画廊文案)改为断言运行时真值。审计提到的"两行预览"两行(current look unchanged/keep)与rendering preview …、(preview unavailable:在当前 master 键值已匹配,核实无需改动。niu plugin list与niu plugin discover对"目录在、资产为 0"的源现在追提示verify with niu plugin source verify <id>。回归:gutted_trusted_source_names_the_verify_verb。wontfix(无)
(无——六项全部处置;L05-3 以"保持 ready 语义 + 补 verify 提示"方式收口。)
测试:
niubash-runtime --lib392 通过(3 个 distros apply 测试因沙箱 git clone 网络失败,master 上同样失败,非本改动引入);plugin_sources5/5 绿;cargo fmt已跑。