fix: 全仓代码审计加固 + 版本号统一 1.0.1 - #25
Merged
Merged
Conversation
- 锁心跳(P1b):Worker 改经持有 fd 写 token(绝不按路径重开), 并以 SharedArrayBuffer + Atomics 停止握手保证 release 前绝不再写, 根治 release→reacquire 窗口旧 pid 覆盖新持有者锁的跨进程竞态。 - 新增 REPO_RE:source.repo 强制 owner/repo 格式(拒绝穿越/空白/元字符)。 - 移除死常量 CRASH_LOOP_WINDOW_MS;makeError 剥离保留字段(code/message/exitCode)。 - 同步 3 份 vendor-shared 副本(字节一致)。 - 测试:P1b 跨线程覆盖竞态回归 + REPO_RE 矩阵 + refresh 句柄清理 + openssl 加固。
- classify:EACCES/EPERM→INSTALL_FAIL;exit 无退出码→无信号; CRASH_LOOP 对齐"连续 N 次"语义(移除时间窗口描述)。 - resolve:垃圾版本串提前 unresolved(不再静默 pin 最高版); isExactVersion 收敛 shared isValidSemverString 单一真源。 - manifest:versionSpec 用归一化 semver.valid(ver)(修复 ^v1.2.3)。 - stages:lastExit 基础设施失败回退 null(不误判 CRASH_LOOP); stages-heal 预览(无 --yes)零持久副作用。 - 锁 refresh 句柄传递(pipeline/index);healplan context 空对象兜底。 - 测试:audit-fixes 回归 + stages-heal 磁盘断言 + classify 穷尽。
- gateway:成功信封统一 code:"OK"/exitCode:0;失败 exitCode 由 shared exitCodeForCode 推导(ERR_ASSEMBLY_* 不再被压成 1)。 - patch:mountPack 事务化(失败全量回滚 link/bundles/patch/npm); removePatchBlock 返回统一契约;锁 refresh 句柄传递。 - market:修复运算符优先级死代码(网络失败正确显示"网络请求失败")。 - ai-session:saveSession 收敛 shared writeFileAtomic(无 .tmp 残留)。 - status:旧单 # marker 用 shared findPatchBlock 识别。 - client:离线 CATALOG 标 importable:false;详情失败显式标记;无 manifest 拒绝导入。 - memory-hub store 锁 refresh 句柄传递。 - 测试:audit-fixes + gateway + patch + market 错误分支。
- vendor patch-editor:writeFileAtomic 收敛 shared(O_EXCL + 随机 tmp + rename); 锁 refresh 句柄传递。 - C# ReleasePatchLock(m7):移除 finally 中无条件 File.Delete,token pid 不匹配时仅关闭自身 fd、绝不删除锁文件,与 JS releaseLock 语义一致。 - 契约测试 PatchContractTests 实机编译运行 69/69(含新增 m7 断言)。
- README.md:徽章、当前版本表、发布链接、各平台安装包文件名 v1.0.0 → v1.0.1(中英两段)。 - 重建 DSH-Hotplug-Hub-Setup.exe(内嵌 v1.0.1)。 - 甄别保留:第三方插件 dseam-skillmcp 0.8.1-pre、子包独立版本 (shared-core 0.1.0 / launcher 0.3.0 / memory-hub 0.8.0-pre)、 示例数据、测试夹具、.NET assembly version 均不改动。
vendor/dseam-skillmcp 源码改动(patch-editor.js 原子写收敛、vendor-shared 同步 lock-heartbeat.js 等)后,release/embedded 下的内嵌 tgz 未同步, 导致 CI「embedded tgz 与 vendor 源码逐字节一致(R-v5-15)」失败。 经 scripts/repack-dseam-tgz.mjs 重打包,check-embedded-tgz.mjs 本地校验 45 文件一致。
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.
概述
对 monorepo 全部源码做了一轮精益求精审计,修复 24 项真实问题(P1/P2/P3),并统一项目版本号为 1.0.1(不变)。
主要修复
锁(最高优先级)
契约统一
其他
测试
vendor-shared 三份副本与 shared-core 字节零漂移。
版本号甄别
统一 1.0.1 的范围仅限「项目版本号」;保留不改:第三方插件 dseam-skillmcp 0.8.1-pre、子包独立版本(shared-core 0.1.0 / launcher 0.3.0 / memory-hub 0.8.0-pre)、示例数据、测试夹具、.NET assembly version。