Skip to content

Harden LocaleSmith 1.2.0 packaging, state isolation, and release evidence - #12

Merged
DZXH-TX merged 5 commits into
mainfrom
codex/community-auth-archive-store
Aug 24, 2026
Merged

Harden LocaleSmith 1.2.0 packaging, state isolation, and release evidence#12
DZXH-TX merged 5 commits into
mainfrom
codex/community-auth-archive-store

Conversation

@DZXH-TX

@DZXH-TX DZXH-TX commented Aug 24, 2026

Copy link
Copy Markdown
Owner

概要 本 PR 完成 LocaleSmith 1.2.0 源码整合与发布前收尾。联合功能基线 02c34a4 已先进入 main;本分支上的五个后续提交补齐 Dashboard 竞态、Dev/Store 状态隔离、MSIX 门禁、自动评审反馈,以及可公开审阅的中英文文档和最终验证证据。 ## 功能与修复范围 - Dashboard 与助手共享真实 TaskId/JobId 状态;retry 新建任务卡并保留旧失败记录,完成、失败、取消无需再次调用模型。 - 模型源切换失败时停止入队并保留错误;一次失败不会永久锁死后续手动重试。 - 合法展开目录继续走不可变 ZIP snapshot;含多个 JAR/ZIP 的 mods 容器会在入队前给出明确提示,不扩大 MCP 主机路径权限。 - 模型源支持显式 /models 刷新、单次输出 Token 预算与大型模组分批字符目标;16 MiB HTTP 响应字节上限不可关闭。 - DeepSeek、Xiaomi MiMo、智谱 GLM、Kimi 私下回放 reasoning_content;MiniMax 使用 reasoning_split 与结构化 reasoning_details,私有推理不进入 UI 或跨 Provider。 - 精确字节码外部化改为集合级 constant-pool 容量规划;窄 ldc 无法安全容纳的候选降级跳过,不再拖垮普通语言资源翻译。 - App/MSIX 版本统一为 1.2.0.0;独立 MCP Host 为 0.1.1。 - WAP 默认 PackageFlavor=DevelopmentCRTech.LocaleSmith.Dev;正式 Store Identity 只在显式 PackageFlavor=Store 时使用。 - Store/unpackaged/Dev 的配置、Credential prefix、日志、Sandbox、translation memory、audit 与安全锁隔离;Dev 不读取 legacy/production secrets。 - 新增 CI WAP Rebuild、MSIX 解包、未签名状态、makepri dump、13 个 XBF 与全项目 payload SHA-256 门禁。 - 修正文档中的 Provider 会话保留、签名 JAR 自动生成未签名副本、Dev Publisher 与隐私边界。 - 更新中英文 README、贡献指南、架构、路线图、威胁模型、MSIX 指南与验证记录;按当前约定不接入新截图。 ## 验证 - dotnet format LocaleSmith.slnx --verify-no-changes --no-restore:通过。 - dotnet build LocaleSmith.slnx -c Release --no-restore:0 warnings / 0 errors。 - dotnet test LocaleSmith.slnx -c Release --no-build --no-restore -m:1:855 / 855。 - NuGet --vulnerable --include-transitive:18 个源码/测试项目未发现当前源已知漏洞包。 - Rust:fmt --checkclippy -D warnings、28 / 28 tests、Release DLL 均通过。 - 五语言资源:zh-CN / en-US / ja-JP / fr-FR / ru-RU 各 676 keys,集合一致。 - MCP 0.1.1:20 / 20 tests;本地 pack、tool install、initialize/tools smoke 通过,仅暴露 system.contextcli.propose。本地 nupkg 为 433,456 bytes,SHA-256 7DCFCA13D53CDB0382437057496F6B8C9C3B32237B38684D0D0C553679069346。 - PowerGrid 纯内存演练:1,037 classes、52 个安全候选、23 个容量候选跳过、0 次重写失败。 ## 未签名 MSIX 证据 二进制源码提交:2d087426fc5c9c31206bb0de0798800ce298c22e。 | Flavor | Identity | Bytes | SHA-256 | | --- | --- | ---: | --- | | Development | CRTech.LocaleSmith.Dev | 104,041,801 | FEB127CAC070C25063E113B14357DCE6728CB0BF08A2A6CD4B00C6D82EA476B2 | | Store candidate | CRTech.LocaleSmith | 104,041,820 | 6BDAB472D853031AB347F90003501BF377DE7BAFC42649C9A0CB4C4E8BEB4AA0 | 两种包均通过 Identity/Publisher/version/x64、NotSigned、PRI/XBF、图标、Windows App Runtime/VCLibs 依赖及全部 LocaleSmith payload 哈希检查。最终 Development MSIX 从独立解包目录完成 loose registration 与 AppsFolder 启动:窗口“译匠”响应正常,ProductVersion 为 1.2.0+2d087426…,production settings 的时间戳与 SHA-256 前后不变。 ## 未覆盖与发布边界 - 1.2.0 尚未正式发布;未签名 MSIX 不能描述为 Microsoft Store 成品。 - 尚未完成 Store 签名/时间戳、干净机安装升级卸载、真实购买恢复、真实 Provider 和 Minecraft/Loader 运行矩阵。 - CRTech.LocaleSmith.Dev 无 Store 关联,不能验证真实订阅。 - MCP 0.1.1 已由 mcp-v0.1.11f3f3d9a)触发发布;workflow 32784059982 成功,GitHub Packages 页面已确认 0.1.1 为“最新”。详细 artifact 哈希由后续文档 PR #13 补记。 ## AI 辅助说明 本次分析、实现草拟、测试设计和文档整理使用了 AI 辅助;所有变更均经过源码复审与上述自动化验证,最终责任仍由维护者承担。

Copilot AI lite review requested due to automatic review settings August 24, 2026 21:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Dashboard enqueue path now ignores a failed model-selection result and can enqueue with a previous source while clearing the failure message, which is a user-visible correctness regression.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR finalizes LocaleSmith 1.2.0 hardening work around packaging/release evidence, state isolation between Store vs Dev/unpackaged identities, and improved documentation of security boundaries and verification.

Changes:

  • Adjusts Dashboard enqueue flow to synchronize with pending model-source selection before creating translation jobs.
  • Switches app storage-scope detection to use an unredirected LocalAppData root and adds a regression test for unpackaged behavior.
  • Adds/updates packaging + verification + security/architecture/roadmap documentation and updates .gitignore to keep docs tracked.
File summaries
File Description
tests/LocaleSmith.App.Tests/ApplicationStorageScopeTests.cs Adds regression test asserting unpackaged scope uses the unredirected development root.
src/LocaleSmith.Presentation/ViewModels/DashboardViewModel.cs Changes enqueue behavior around awaiting model selection completion.
src/LocaleSmith.App/Services/ApplicationStorageScope.cs Uses unredirected LocalAppData to resolve the storage scope.
README.md Adds “Known limitations” and updates packaging/state-isolation messaging (CN).
README.en.md Adds “Known limitations” and updates packaging/state-isolation messaging (EN).
packaging/README.md New MSIX/WAP packaging contract and audit procedure documentation.
docs/verification.md New verification record and evidence summary for 1.2.0.0 unsigned MSIX + automation baseline.
docs/security-threat-model.md New STRIDE-oriented threat model and explicit security boundary statements.
docs/implementation-roadmap.md New roadmap/status document describing implemented vs pending gates.
docs/architecture.md New architecture overview and trust-boundary documentation.
.gitignore Stops ignoring documentation under docs/ and packaging/README.md.
.github/CONTRIBUTING.md Updates contributor expectations for MSIX verification evidence and isolation constraints.
Review details
  • Files reviewed: 11/12 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/LocaleSmith.Presentation/ViewModels/DashboardViewModel.cs
Comment thread docs/implementation-roadmap.md Outdated
Comment thread docs/architecture.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9ccfdaaab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/LocaleSmith.Presentation/ViewModels/DashboardViewModel.cs Outdated
Comment thread docs/architecture.md Outdated
Comment thread docs/security-threat-model.md Outdated
Comment thread docs/security-threat-model.md Outdated
Copilot AI review requested due to automatic review settings August 24, 2026 22:08
@DZXH-TX

DZXH-TX commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

已处理并逐条回复全部 7 个评审线程,远端 HEAD 为 876b251。关键修复包括:模型选择失败时停止入队并保留错误、清理公开文档中的个人证书信息、校正文档中的 Dev Publisher、Provider 会话保留和签名归档处理事实。最终本地门禁为 855/855 .NET tests、28/28 Rust tests、两种未签名 MSIX 解包审计与 Development 实际启动 smoke。

@copilot review
@codex review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The MSIX size/SHA evidence in docs/verification.md conflicts with the PR description’s evidence table, making the release verification record ambiguous until reconciled.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

docs/verification.md:76

  • The MSIX byte counts/SHA-256 values in this verification table do not match the MSIX evidence table in the PR description, which makes the release evidence ambiguous for reviewers. Please reconcile them so the PR description and this record reference the same build outputs (or explicitly document that they come from different runs and why).
| Flavor | Identity | Bytes | SHA-256 |
| --- | --- | ---: | --- |
| Development | `CRTech.LocaleSmith.Dev` | 104,041,801 | `FEB127CAC070C25063E113B14357DCE6728CB0BF08A2A6CD4B00C6D82EA476B2` |
| Store candidate | `CRTech.LocaleSmith` | 104,041,820 | `6BDAB472D853031AB347F90003501BF377DE7BAFC42649C9A0CB4C4E8BEB4AA0` |
  • Files reviewed: 12/13 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

已处理并逐条回复全部 7 个评审线程,远端 HEAD 为 876b251。关键修复包括:模型选择失败时停止入队并保留错误、清理公开文档中的个人证书信息、校�...

Reviewed commit 2d08742. All previously flagged issues are resolved:

  • DashboardViewModel enqueue regressionEnqueuePackagesAsync now captures and awaits the Task<bool> from _modelSelectionTask; on a false result it returns immediately, preserving ErrorMessage and never proceeding to enqueue. The ErrorMessage = null reset only executes on the success path.
  • Personal certificate info in docs — Both docs/architecture.md:200 and docs/implementation-roadmap.md:169 now document only the public publisher string CN=LocaleSmith Development and the subject-matching rule; no email address, thumbprint, or private key material remains.

@DZXH-TX

DZXH-TX commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

当前远端 HEAD 876b251 的 PR 描述与 docs/verification.md 已一致;上次复审似乎读取了更新前的描述缓存。两处当前都记录:

  • Development: 104,041,801 bytes / FEB127CAC070C25063E113B14357DCE6728CB0BF08A2A6CD4B00C6D82EA476B2
  • Store candidate: 104,041,820 bytes / 6BDAB472D853031AB347F90003501BF377DE7BAFC42649C9A0CB4C4E8BEB4AA0

请基于当前描述与 876b251 复核。

@copilot review

Copilot AI commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

当前远端 HEAD 876b251 的 PR 描述与 docs/verification.md 已一致;上次复审似乎读取了更新前的描述缓存。两处当前都记录:

  • Development: 104,041,801 bytes / `FEB1...

Confirmed. At 876b251, docs/verification.md lines 75–76 match the PR description exactly:

  • Development: 104,041,801 bytes / FEB127CAC070C25063E113B14357DCE6728CB0BF08A2A6CD4B00C6D82EA476B2
  • Store candidate: 104,041,820 bytes / 6BDAB472D853031AB347F90003501BF377DE7BAFC42649C9A0CB4C4E8BEB4AA0

No conflict exists in the current state. The prior review flag was a stale-cache artifact.

@DZXH-TX
DZXH-TX merged commit 1f3f3d9 into main Aug 24, 2026
9 checks passed
@DZXH-TX
DZXH-TX deleted the codex/community-auth-archive-store branch August 24, 2026 22:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 876b251ea2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


模型 source base URI 必须是绝对 HTTP(S),不得包含 userinfo/query/fragment;非 loopback HTTP 被拒绝。HTTP handler 禁用自动 redirect,限制连接/响应头/响应体,provider 解析器限制 JSON 深度和 tool arguments。

助手会话把安全化机器上下文和配置的 SandboxPath 标为不可信数据注入 system prompt。选择云 source 意味着这些内容及当前会话会发到该 endpoint。模型源切换会先取消当前请求并清空对话,防止把旧 provider 的会话历史发送到新 provider;选择只影响后续新会话。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Describe retained provider sessions consistently

When a user switches back to a previous provider, AssistantViewModel.ActivateSelectedSession restores the conversation keyed by ProjectId + ModelSourceId; it does not clear it. The fresh evidence after the prior thread is that this detailed model-security section still promises that switching clears the conversation (and T13 repeats the claim), despite T05 having been corrected, so security reviewers still receive a false retention guarantee.

Useful? React with 👍 / 👎.

Comment thread docs/architecture.md
| 关键 metadata | 保留并重新解析验证 |
| formal/informal | 每个作业只提交所选风格的一个产物;不同风格由独立作业生成,缓存变体不互相覆盖 |
| ZIP 原压缩流、extra fields、注释、条目顺序和整个文件字节 | **不保证相同**;重压缩可能改变它们 |
| 原 JAR 签名 | 修改后必然失效;默认阻断或显式 unsigned copy;当前不重签 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge State the application's automatic unsigned-copy policy

For signed archives submitted through the application, PipelineTranslationQueueService always sets SignedArchiveHandling.CreateUnsignedCopy; users are not offered a default block/explicit opt-in choice. The fresh evidence after the prior signing-policy thread is that this architecture guarantee still describes blocking as the default and unsigned output as explicit, so readers assessing the product flow are told about a confirmation boundary that does not exist.

Useful? React with 👍 / 👎.


### 4.2 已实现 CLI 控制

- 动态 executable allowlist;默认只发现 Program Files 下无 reparse point 的 `dotnet.exe`。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct the documented default CLI allowlist

On every normal app launch, App.xaml.cs initializes SafeCliCommandPolicy from TrustedCliExecutableDiscovery.FindInstalled(), but that method deliberately returns an empty list because dotnet is a command multiplexer affected by writable global.json files. Thus the claimed implemented default discovery of Program Files dotnet.exe never occurs, misleading both users evaluating CLI functionality and reviewers evaluating the execution boundary; document the empty default instead.

Useful? React with 👍 / 👎.

Comment thread docs/architecture.md

输出路径不是进程启动时冻结的常量。`DefaultOutputPathStrategy` 在每个新作业调用时重新加载加密配置,把结果放在最新 `<WorkspacePath>/LocaleSmith.Output` 中,并为同源同语言的并发/重复任务预留不覆盖的递增文件名;磁盘/共享根、reparse hierarchy、逃逸路径及目录源的后代路径仍被拒绝。

增量缓存使用 `localesmith.translation-memory/v2` 命名空间,键覆盖原始包身份、目标语言、作业开始时捕获的 `ModelSourceId` 和单风格翻译契约版本 `minecraft-java-localization-json/v2-single-style`。相同原文哈希的不同风格在独立作业间合并复用;旧契约或旧两段式缓存不会被误复用,而是安全 miss。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the active translation-memory namespace

The current cache key uses localesmith.translation-memory/v3 and the prompt contract is minecraft-java-localization-json/v4-content-profiles-glossaries; the key also includes ContentKind. Describing the active values as v2 and v2-single-style gives maintainers and security reviewers the wrong compatibility boundary when deciding whether prompt/content-profile changes can reuse old translations, so this should reflect the constants in TranslationMemoryModels.cs.

Useful? React with 👍 / 👎.

Comment thread packaging/README.md
- 断言 `AppxSignature.p7x` 不存在且签名状态为 `NotSigned`;
- 使用 `makepri dump` 回读根 `resources.pri`,确认 App、MainWindow、Pages、Controls、Dialog 与 Theme XBF;
- 核对 App、全部 LocaleSmith 项目程序集、Rust DLL、MCP Host、deps/runtimeconfig 与刚生成的 publish 输入逐文件 SHA-256 一致;
- 检查四个图标、Windows App SDK/VCLibs 依赖和 payload 中无证书/私钥材料。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add the promised framework-dependency audit

When a manifest change removes or alters the Windows App Runtime or VCLibs PackageDependency, the documented gate still passes: Test-MsixPackage.ps1 reads only the manifest Identity fields and never selects or validates any Dependencies nodes. Because this line says the script checks those framework dependencies, release reviewers can accept a package that does not satisfy the stated runtime contract; add the manifest assertions or narrow the documented coverage.

Useful? React with 👍 / 👎.

@DZXH-TX

DZXH-TX commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

后续发布已完成:mcp-v0.1.1 指向合并提交 1f3f3d9a,Publish GitHub Package run 32784059982 全部成功,Packages 页面已显示 0.1.1 为“最新”。精确发布 artifact 证据见 PR #13

DZXH-TX added a commit that referenced this pull request Aug 24, 2026
## 概要 采用参考文档的简洁视觉层级重排中英文 README,并补记 PR #12 squash merge 后的 MCP Host
0.1.1 实际发布证据。参考稿只作为排版与语气参考;当前事实仍以仓库源码、最终构建和发布 workflow 为准。 ## README 改版
- 将“快速开始”前移,使用 Store / GitHub Release 定宽安装表和事实修正后的“三步上手”。 -
核心能力拆为“翻译与流水线 / 模型接入 / 桌面体验与运维”三个折叠组。 - 支持范围改为首列定宽 HTML
表格,并保留多归档、字节码与模型边界。 - Microsoft Store 订阅与国内加速拆成“订阅说明与定价 /
权益核验与下载链路”两个折叠块,保留 fail-closed、一次性 URL、四路 Range、续签、SHA-256 与默认源回退事实。 -
将源码构建独立成节,继续保留 Windows App Runtime 2.3.1 与 Cargo `--locked` 门禁。 - 参与贡献改为
checklist;AI 使用声明折叠;版权与项目链接改为居中 footer。 - 中英文结构同步;没有加入参考稿中不存在于仓库的截图。 ##
MCP 0.1.1 发布证据 - 区分本地 MSIX 二进制验证提交 `2d087426` 与 PR #12 squash merge /
发布提交 `1f3f3d9a`。 - `mcp-v0.1.1` 触发 Publish GitHub Package run
`32784059982`;完整 run 约 59 秒,其中 publish job 为 55 秒,测试、pack、安装
smoke、artifact 上传与 Packages 推送全部成功。 - Actions artifact ZIP 为 430,797
bytes;其中唯一 nupkg 为 433,460 bytes,SHA-256
`B740AECC8D6B4242F478F1B48503AFD4675E2BA0B0C233B00AC09B2D5815D87D`。 -
nuspec `RepositoryCommit` 与 EXE ProductVersion 均绑定 `1f3f3d9a…`;Packages
页面显示 `0.1.1` 为“最新”。 ## 验证 - GitHub GFM 实际渲染:中英文各 15 个二级区块、11 个折叠区、10
张表格,IMPORTANT / WARNING 均正常。 - `<details>`、`<table>`、`<div>`
标签数量成对;政策文档相对路径存在;`git diff --check` 通过。 - 保留当前基线:855/855 .NET
tests、28/28 Rust tests、五语言各 676 keys。 - 本 PR 只有一个提交 `9625026`;本地 `git
verify-commit` 为 Good signature,GitHub API 为
`verification.verified=true` / `reason=valid`。 - 本 PR 仅修改
Markdown,不修改产品代码,不加入图片。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants