@feng0531/dsh-code-review 0.38.0 → 0.39.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -411
- package/CORE-ALIGNMENT-TASKS.md +47 -0
- package/CORE-SOURCE-INVENTORY.md +168 -0
- package/DEVELOPMENT.md +52 -0
- package/README.md +76 -145
- package/RELEASE-NOTES.md +26 -0
- package/index.mjs +1 -1
- package/package.json +2 -2
- package/src/dependency-chain.mjs +33 -0
- package/src/snapshot.mjs +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,439 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 版本变化
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本文件介绍对使用者有意义的变化。安装与参数见 [README](README.md),本次发布正文见 [发布说明](RELEASE-NOTES.md)。历史提交和安装包保留在 [GitHub Releases](https://github.com/f-e-n-g-0531/dsh-code-review/releases);本文不把开发日志当作功能介绍。
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- 仅精确扩展名选取(大小写兼容),不匹配备份/伪后缀;原common与notice保持,指导不授读取或证据权限。主审/窗口/交互/复核指导继承与原输入预算验收,378全量测试通过,无新增调用;待固定标签原工件发布。
|
|
5
|
+
## 0.39.1 — 文档整理
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
- 重写安装、使用、参数和报告说明,去掉开发流水账与未解释术语。
|
|
8
|
+
- 分开用户说明、开发发布流程、能力差距和评测观察。
|
|
9
|
+
- GitHub Release 使用专门编写的发布说明,不再只展示自动生成的提交列表。
|
|
10
|
+
- 不改变审查工具参数或运行行为。正式交付需完成本版发布验证。
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
- 祖先与节点真实路径/URL链/wcroot/UUID及属性校验,拒绝switched/external/special/keywords;竞争含本地未跟踪路径但无正文权限。真实SVN预览零发送、过期拒绝、满槽、二进制及超限验收,375项离线通过;固定标签CI37933398779四矩阵通过;唯一npm发布37933848198成功但tarball传播404使核验超时,同原artifact11617224527恢复37935128694成功;99052字节npm/Release逐字节及双hash/清单匹配正式交付,无重新pack或npm publish。
|
|
12
|
+
## 0.39.0 — Git 工作区依赖上下文
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
启用 autoContext 后,最多沿三层静态 import/include 依赖取得上下文。循环依赖不会重复读取;所有层共享路径查询、文件和时间上限。排除的变更不会作为上下文重新进入。
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
- 两侧共用30秒、128正文/1MiB、256记录/64KiB及512探针/1MiB;共享20上下文/4MiB快照,oldOnly复用不自动批准new侧;根提交、删除、竞争歧义、共享扫描耗尽及预览执行已验收。导航不证明调用/语义绑定或完整覆盖,真实模型质量未验收。370冻结测试及四矩阵通过;唯一发布37929860863原artifact11615712667的95603字节与npm/Release逐字节、双hash及清单一致。
|
|
16
|
+
仅适用于 Git 工作区。Git 历史和 SVN 仍是直接依赖导航;不等于编译器的符号绑定或完整调用图。本会话尚未核验该版本的正式发布完成情况。
|
|
17
17
|
|
|
18
|
-
## 0.
|
|
18
|
+
## 0.38.0 — 协议文件审查指导
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- 普通变更继续走原变化身份,不新增重复正文;显式oldContext去重,满上下文槽不阻塞已批准旧身份复用。导航不证明语义调用/绑定,B2完整能力仍需后续来源场景。363离线验收、固定标签四矩阵及唯一发布37918056608通过;原artifact11610243325的92968字节与npm/Release逐字节、双hash及校验清单一致。
|
|
20
|
+
分别为 Protobuf、Thrift、Cap’n Proto、GraphQL 和 Prisma 提供兼容性检查提示,区分数据格式、生成代码、客户端和迁移的变化。提示不代替实现证据,也不自动增加读取范围。
|
|
22
21
|
|
|
23
|
-
## 0.
|
|
22
|
+
## 0.35.0~0.37.0 — 历史与 SVN 上下文
|
|
24
23
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
24
|
+
- 0.35.0:历史旧版本依赖已批准删除文件时,复用原来的旧侧内容,不重复占用上下文名额。
|
|
25
|
+
- 0.36.0:在指定目录内寻找 Git 历史版本中的字面引用方,只读取固定版本,不读取当前工作区。
|
|
26
|
+
- 0.37.0:把指定目录内的字面引用方发现扩展到 SVN;不支持的工作副本状态会被拒绝。
|
|
27
27
|
|
|
28
|
-
## 0.34.
|
|
28
|
+
## 0.33.0~0.34.1 — 历史上下文与审查可靠性
|
|
29
29
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
30
|
+
- 手动指定历史旧版本上下文,不把它当作新版本证据。
|
|
31
|
+
- 增加失败原因和实际覆盖状态;零选择、全排除或全阻断不再看起来像审查成功。
|
|
32
|
+
- 兼容单个完整 JSON 代码块,但仍严格检查结构和证据。
|
|
33
|
+
- 减少大窗口输入中的重复说明;超预算时明确阻断,不丢弃源码证据。
|
|
34
|
+
- 小变更可减少规划和分组调用。
|
|
35
|
+
- 支持 1~3 次独立审查,默认一次,各次共享已有上限。
|
|
33
36
|
|
|
34
|
-
## 0.
|
|
37
|
+
## 0.27.0~0.32.0 — 检索、规划与工作区引用方
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
- 340冻结离线测试及固定标签四矩阵通过,唯一发布37914089607原工件91349字节与npm/Release逐字节及双hash一致。
|
|
39
|
+
增加批准文件目录内的查找和限定搜索、业务需求输入、风险规划失败后的回退,以及指定 Git 工作区目录内的引用方发现。所有检索仍受预览范围约束。
|
|
38
40
|
|
|
39
|
-
## 0.
|
|
41
|
+
## 0.18.0~0.26.0 — 审查调度与诊断
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
- 预览与执行同决策及minimumCalls,窗口使用完整主文件而非局部窗口大小;低层skipSmallRiskPlans显式启用、可保留原无条件规划。336冻结离线及四矩阵通过;唯一发布37912784526原工件91049字节与npm/Release逐字节及双hash一致。
|
|
43
|
+
改进风险规划、分组回退、模型失败处理和覆盖状态。完整逐版历史见相应标签;这些机制不代表真实模型效果已经达标。
|
|
43
44
|
|
|
44
|
-
## 0.
|
|
45
|
+
## 0.17.0 — 沿用宿主权限
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
- 预览同算法计入本地综合输入及调用预算,综合超限仍明确blocked;331冻结离线测试、固定标签四矩阵通过,唯一发布37911400566原工件90189字节与npm/Release逐字节及双hash一致。
|
|
47
|
+
移除插件额外的独立审批请求,改用 DSH 正常工具权限。仍须确认预览,且不能绕过宿主策略。
|
|
48
48
|
|
|
49
|
-
## 0.
|
|
49
|
+
## 0.12.0~0.16.0 — 跨文件与跨窗口分析
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
- 报告selection保留total/reviewable/excluded/blocked分母;零选择、全排除或全阻塞返回partial及未执行限制,不冒充完整通过。327冻结离线测试及标签四矩阵通过,唯一发布37910021333原工件89493字节与npm/Release逐字节及双hash一致。
|
|
51
|
+
增加跨窗口综合、跨文件综合以及 JS/TS、C#、C++ 的保守关联和位置线索。这些线索不等于完整语义解析。
|
|
53
52
|
|
|
54
|
-
## 0.
|
|
53
|
+
## 0.8.0~0.11.0 — 关联、归组与多仓库
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
- 当前/历史旧侧隔离、无scope仍阻断、预览执行预算一致、超时等适配器清理且窗口pending验收通过;320离线及真实宿主离线smoke、固定标签四矩阵及唯一发布通过;npm/Release原工件88999字节双hash一致。不宣称用户碰撞审查已恢复或超时根因已定位。
|
|
55
|
+
增加有限的依赖关联、保守重复报告归组、修改前后复核,以及工作区子仓库选择。原始候选和证据仍保留。
|
|
58
56
|
|
|
59
|
-
## 0.
|
|
57
|
+
## 0.4.0~0.7.0 — 规则、覆盖与候选复核
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
- 不完整JSON返回MODEL_INVALID_JSON及字节/封装类型诊断,不泄露响应正文。317离线测试及固定四矩阵/唯一发布通过,npm/Release原工件88609字节双hash匹配。实际碰撞审查原始响应未知,不能宣称复现其三处根因;超时与大文件范围缺口仍待定位。
|
|
59
|
+
支持显式项目规则、大变更输入预检、未完成项提示和候选证据复核。引用不匹配时保留失败,不放宽证据要求。
|
|
63
60
|
|
|
64
|
-
## 0.
|
|
61
|
+
## 0.1.1~0.3.1 — 基础审查
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
- 314离线测试、pack/隔离安装、固定标签四矩阵及原工件发布核验通过:npm/Release88082字节双hash一致;B3整体未完成。
|
|
63
|
+
提供 Git/SVN 只读变更采集、行号定位、受限快照检索、初步分组及中文插件标题。早期独立外发审批方式已由 0.17.0 的宿主权限方式取代。
|
|
68
64
|
|
|
69
|
-
##
|
|
65
|
+
## 证据说明
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
- reader与导入/C#关系消费者按侧分派;schema/service预览显示旧侧元数据,生成/综合/复核提示纳入共享输入预算。
|
|
73
|
-
- 链接/submodule/凭据、重复及重叠路径、root无baseline、字节/槽/快照预算拒绝;真实Git零发送预览、工作树隔离、证据receipt验收。311离线测试通过;标签CI37904841884及发布37905053267成功,npm/正式Release原字节87754及SHA512/SHA256核验匹配。
|
|
74
|
-
|
|
75
|
-
## 0.32.0
|
|
76
|
-
|
|
77
|
-
- 新增显式callerScopePaths工作区Git限定字面引用方捕获;预览显示扫描身份和候选,非匹配正文不发送。
|
|
78
|
-
- 元数据/正文/探针/生命周期硬预算,所有扫描hash及索引与竞争路径重核,调用者与既有上下文共享名额;历史/SVN明确拒绝。
|
|
79
|
-
- 报告导航限制,不冒充完整caller或符号绑定;302离线测试通过。标签CI四矩阵通过;npm处理延迟导致原发布验证404,恢复37898945312使用原工件完成正式Release;npm/Release原字节85750及双hash匹配。
|
|
80
|
-
|
|
81
|
-
## 0.31.1
|
|
82
|
-
|
|
83
|
-
- 最终报告保留业务需求hash/bytes与不可信状态,不重印正文,预览发送告知补全。
|
|
84
|
-
- 真实Git当前/历史需求身份及服务预算预览零发送集成回归,290测试通过。
|
|
85
|
-
|
|
86
|
-
## 0.31.0
|
|
87
|
-
|
|
88
|
-
- 新增显式业务需求businessRequirement预览参数,16KiB UTF8、正文hash/bytes展示及快照身份绑定。
|
|
89
|
-
- 规划生成窗口综合交互复核保留不可信约束提示,纳入原预算,不扩大权限或证明缺陷;289测试通过。
|
|
90
|
-
|
|
91
|
-
## 0.30.2
|
|
92
|
-
|
|
93
|
-
- 对照Agent核心plan失败继续main行为,风险计划异常回退原输入主审查,不传无效假设,保留fallback原因/partial限制。
|
|
94
|
-
- 原调用/时间预算与取消不绕过,不重试计划;主及交互回退287测试通过。
|
|
95
|
-
|
|
96
|
-
## 0.30.1
|
|
97
|
-
|
|
98
|
-
- 风险请求来源sourceReadCoverage记录本批生成阶段requested/read/unread;未读来源不能以无发现冒充完整核查。
|
|
99
|
-
- search/find与旧批次不算片段读取,报告partial限制,无新调用/权限,285测试通过。
|
|
100
|
-
- 完成主loop核心退出/定位/预算调度复核;agent/templates剩余核查仍待。
|
|
101
|
-
|
|
102
|
-
## 0.30.0
|
|
103
|
-
|
|
104
|
-
- Git自动直接上下文改512字面候选index探针,不枚举全tracked;普通tracked有效性及同probe竞态重核保持。
|
|
105
|
-
- 累计metadata1MiB/每probe64KiB、目录扩张拒绝;11000大树auto及指纹相关性回归,283测试通过。SVN索引未改。
|
|
106
|
-
|
|
107
|
-
## 0.29.2
|
|
108
|
-
|
|
109
|
-
- Git工作副本基线捕获不再全HEAD枚举,仅可审查变更基线路径literal非递归lookup,改名使用oldPath,删除/子模块边界不变。
|
|
110
|
-
- 11000无关文件大树4Shader工作变更及稳定hash/status不改回归,282测试通过;自动上下文tracked索引仍另行有界规划。
|
|
111
|
-
|
|
112
|
-
## 0.29.1
|
|
113
|
-
|
|
114
|
-
- 参考核心selection核实新增凭据路径不可覆盖门禁:.env家族模板例外、.ssh/私钥/包管理凭据纯路径排除。
|
|
115
|
-
- Git改名旧新路径、SVN、历史blob、local context、规则与catalog统一拒绝,不读秘密正文,282测试通过。
|
|
116
|
-
- 继续核心逐文件差距核查;默认复用当前DSH模型不增加独立配置。
|
|
117
|
-
|
|
118
|
-
## 0.29.0
|
|
119
|
-
|
|
120
|
-
- 重建固定源码能力对照任务,区分已读行为/待读核心/功能缺口/安全替代;恢复持续目标96总轮检查点。
|
|
121
|
-
- 新增批准catalog路径find,大小写敏感字面子串、来源身份/版本侧/hash、truncated,复用共享calls/output及检索审计;不全仓查找。
|
|
122
|
-
- 280测试通过,实际模型质量仍后置。
|
|
123
|
-
|
|
124
|
-
## 0.28.0
|
|
125
|
-
|
|
126
|
-
- 快照字面搜索可选sourceIds批准catalog身份过滤,精确限定文件与版本避免同名混杂。
|
|
127
|
-
- 整批预校验1至20唯一已批准身份;不新增读取范围或预算,278测试通过。
|
|
128
|
-
|
|
129
|
-
## 0.27.1
|
|
130
|
-
|
|
131
|
-
- C#候选同名引用判断改一次标识符计数,避免每调用重扫整文件;同名多次保守跳过。
|
|
132
|
-
- 真实Git基线/目标C#自动上下文及定义提示、脏工作副本不泄漏/哈希稳定/status不改,276测试通过。
|
|
133
|
-
|
|
134
|
-
## 0.27.0
|
|
135
|
-
|
|
136
|
-
- C#同目录静态零参调用Type.cs必要上下文有界探针,沿用批准路径/changed排除及历史对象查询。
|
|
137
|
-
- 无using/dynamic/同名其他引用且file-scoped namespace窄语法,捕获不证明绑定;275测试通过。
|
|
138
|
-
|
|
139
|
-
## 0.26.3
|
|
140
|
-
|
|
141
|
-
- 历史依赖链接/目录/子模块参与路径歧义,不先过滤后误判唯一普通文件;仍禁止捕获非普通对象正文。
|
|
142
|
-
- 重叠目录与index探针分别字面查询,避免Git合并路径展开;真实对象竞争及大树回归通过。
|
|
143
|
-
|
|
144
|
-
## 0.26.2
|
|
145
|
-
|
|
146
|
-
- 跨文件规划/生成输入附批准上下文import/include/caller语法绑定线索,带primaryFileId及历史contextSide/contextVersion。
|
|
147
|
-
- 只已捕获快照导航,无全仓caller扫描,不增加审查覆盖或因果证明;原输入预算测量含线索,272测试通过。
|
|
148
|
-
|
|
149
|
-
## 0.26.1
|
|
150
|
-
|
|
151
|
-
- 跨文件生成目录附各文件专用缺陷指引,按已捕获正文选择,复核复用.m内容提示不退回路径默认。
|
|
152
|
-
- 不复制正文或新增读取调用;指引纳入原输入预算,271测试通过。
|
|
153
|
-
|
|
154
|
-
## 0.26.0
|
|
155
|
-
|
|
156
|
-
- Shader/HLSL/GLSL/cginc/hlsli/compute直接字面include纳入有界自动上下文,不宏/条件展开,不编译搜索路径。
|
|
157
|
-
- 专用坐标空间、精度/NaN、采样/资源绑定/pass变体缺陷指引;270测试通过,不保证编译或绑定。
|
|
158
|
-
|
|
159
|
-
## 0.25.3
|
|
160
|
-
|
|
161
|
-
- 历史C#方法语法提示按侧使用明确捕获的oldText/目标text,标记contextSide/contextVersion;缺oldText不回退新定义。
|
|
162
|
-
- 268测试通过,线索不作为语义绑定或因果证明,不额外读取。
|
|
163
|
-
|
|
164
|
-
## 0.25.2
|
|
165
|
-
|
|
166
|
-
- 修预览已知跨文件minimumCalls计入风险规划,动态业务交互maximumAdditionalInitialCalls同样计入规划阶段。
|
|
167
|
-
- 预览/实际链路一致预算断言,避免静态调用下界漏计。
|
|
168
|
-
|
|
169
|
-
## 0.25.1
|
|
170
|
-
|
|
171
|
-
- 修复大仓库小提交历史快照Command output limit exceeded:用diff-tree raw NUL元数据取代两端全树ls-tree,不扩大整树上限。
|
|
172
|
-
- 上下文/规则局部字面非递归对象查询,自动依赖512路径限,禁目录/通配符扩张;无工作树读取或fetch。
|
|
173
|
-
- 真实11000文件超1MiB树的4 Shader提交回归、自动上下文规则及安全边界通过;全量266通过。
|
|
174
|
-
|
|
175
|
-
## 0.25.0
|
|
176
|
-
|
|
177
|
-
- 跨文件交互批次也制定风险假设,至少两文件精确editRefs,同一主调用signal及全局预算,不冒充证据。
|
|
178
|
-
- 实际生成输入/单文件假设拒绝/调用耗尽回归,业务组集成更新额外规划调用。
|
|
179
|
-
|
|
180
|
-
## 0.24.1
|
|
181
|
-
|
|
182
|
-
- 历史上下文关系分别对基线/目标文本推断,标记contextSide/contextVersion;缺少oldText不回退目标正文。
|
|
183
|
-
- 避免旧import绑定新definition;263测试通过,不增读取调用。
|
|
184
|
-
|
|
185
|
-
## 0.24.0
|
|
186
|
-
|
|
187
|
-
- 历史旧侧import/include导航未修改上下文,保留oldText/oldRevision/目标revision,context-old检索身份分离并校验来源。
|
|
188
|
-
- 同时保留目标侧正文,原总文件/大小预算与排除边界不变;旧侧独有/删除上下文和调用者搜索尚不支持。
|
|
189
|
-
|
|
190
|
-
## 0.23.3
|
|
191
|
-
|
|
192
|
-
- 发布验收实际有界下载npm tarball并逐字节/内容SHA512验证,不再仅相信metadata integrity;tarball404重试耗尽失败。
|
|
193
|
-
- 仅https registry.npmjs.org且拒绝redirect,流输出限原工件长度;260测试通过。0.23.2本地tarball404验收仍未通过不冒充。
|
|
194
|
-
|
|
195
|
-
## 0.23.2
|
|
196
|
-
|
|
197
|
-
- .m使用已有快照前8KiB首个非空行提示区分Objective-C/MATLAB,.mm与Swift专用生命周期缺陷指引,不新读取。
|
|
198
|
-
- 主输入按新侧/删除旧侧识别,复核复用主输入指引不增调用;258测试通过,识别非语义证明。
|
|
199
|
-
|
|
200
|
-
## 0.23.1
|
|
201
|
-
|
|
202
|
-
- 模板/IaC/协议schema按已捕获路径附缺陷检查:实际上下文转义、权限/破坏性资源变化、wire/client兼容/授权迁移风险。
|
|
203
|
-
- 指引不证明执行/应用/约束,不增加读取/调用,不加风格审核;256测试通过。
|
|
204
|
-
|
|
205
|
-
## 0.23.0
|
|
206
|
-
|
|
207
|
-
- 补Java/Go/Python/Rust/Kotlin/PHP缺陷检查及依赖清单/GitHub Actions专用风险指引;仅已捕获路径选择,不新读取/调用,不风格审核。
|
|
208
|
-
- 全量255及新增主输入集成通过;参考更多语言/文件映射仍有差距,不宣称完整覆盖。
|
|
209
|
-
|
|
210
|
-
## 0.22.3
|
|
211
|
-
|
|
212
|
-
- 修复浅克隆遍历隐藏父节点使非根提交误用空基线:改读原始commit头,仅真实无父节点使用空侧;缺失父树失败,不自动fetch。
|
|
213
|
-
- 真实depth-1克隆验证非根失败及隐藏merge父节点仍要求区间;全量253通过。
|
|
214
|
-
|
|
215
|
-
## 0.22.2
|
|
216
|
-
|
|
217
|
-
- 历史显式规则只从目标提交普通blob捕获,复用现有4文件、md/txt、UTF-8、16KiB单文件/32KiB总量及排除变更校验;不读取工作树。
|
|
218
|
-
- 规则与上下文路径互斥,自动候选不重复规则;真实Git脏规则不泄漏、hash变化、重复/格式拒绝,全量252通过。
|
|
219
|
-
|
|
220
|
-
## 0.22.1
|
|
221
|
-
|
|
222
|
-
- 历史显式/自动直接导入上下文仅捕获目标树普通blob,20总量/原文件与快照预算、显式去重、阻塞可见;不读工作树。
|
|
223
|
-
- 未选/阻塞/删除变更不可重新作为上下文,历史规则继续拒绝。真实Git隔离/去重/哈希/限额及全量252、宿主离线通过。
|
|
224
|
-
|
|
225
|
-
## 0.22.0
|
|
226
|
-
|
|
227
|
-
- 工具注册Git指定提交/区间,预览及JSON/Markdown报告展示解析端点和精确树语义,原快照哈希/Agent再验证保留。
|
|
228
|
-
- 历史上下文/规则明确拒绝避免混入工作树,SVN明确不支持。真实服务零发送预览/脏树隔离执行、全量251及宿主离线通过。
|
|
229
|
-
|
|
230
|
-
## 0.21.1
|
|
231
|
-
|
|
232
|
-
- 新增低层不可变Git commit/range对象快照,不读工作树;根提交空侧,merge要求明确区间,端点树差异、重命名按增删表达。
|
|
233
|
-
- 严格revision参数、安全blob模式、文件/树/输出/总大小界限及取消。全量251通过;注册/上下文历史接入待完成。
|
|
234
|
-
|
|
235
|
-
## 0.21.0
|
|
236
|
-
|
|
237
|
-
- 注册入口开启唯一精确锚纠正,跨文件限定原组候选主ID,原候选/状态JSON保留及Markdown提示。
|
|
238
|
-
- 仍校验原qualified编辑/读取/复核;故意错行C++综合全链6调用通过,全量250及宿主离线通过,未宣称整体源码对齐。
|
|
239
|
-
|
|
240
|
-
## 0.20.2
|
|
241
|
-
|
|
242
|
-
- 可选主文件唯一全行原文锚纠正,仅同侧且重叠原精确编辑,保留原完整候选/状态,仍经原验证,不加调用权限。
|
|
243
|
-
- 歧义/无引用/不重叠拒绝,有界CPU及取消;注册/跨文件纠正未开启,全量250通过。
|
|
244
|
-
|
|
245
|
-
## 0.20.1
|
|
246
|
-
|
|
247
|
-
- SVN自动上下文使用离线正常节点索引,排除外部/切换/复制/冲突/属性变化,双读及规范化完整状态指纹一致性验证。
|
|
248
|
-
- 报告保留自动上下文元数据及阻塞/截断限制;真实SVN及全量246通过,调用者/定义搜索待继续。
|
|
249
|
-
|
|
250
|
-
## 0.20.0
|
|
251
|
-
|
|
252
|
-
- 工具显式autoContext选择有界Git上下文,预览显示候选状态与实际路径不含正文,执行原选项复捕获哈希校验;默认关闭,SVN明确拒绝。
|
|
253
|
-
- 全量245及真实宿主离线通过,调用者/定义/SVN等对齐继续,不声称完整上下文支持。
|
|
254
|
-
|
|
255
|
-
## 0.19.2
|
|
256
|
-
|
|
257
|
-
- 低层autoContext接Git有界跟踪regular索引及必要上下文安全捕获,双读/索引一致性、hash及总限额复用,阻塞元数据可见。
|
|
258
|
-
- untracked/excluded不再进入;真实Git与全量245通过。入口/SVN/调用者搜索未完成,保持明确限制。
|
|
259
|
-
|
|
260
|
-
## 0.19.1
|
|
261
|
-
|
|
262
|
-
- 新增只读纯上下文候选导航:唯一tracked未修改直接相对import/include,排除歧义/条件宏/不支持文本/已选变更,20候选截断可见。
|
|
263
|
-
- 尚未接捕获/入口,不声称上下文检索完成;全量244项通过。
|
|
264
|
-
|
|
265
|
-
## 0.19.0
|
|
266
|
-
|
|
267
|
-
- 注册入口启用有界业务分组,预检计一次调用并披露动态综合执行前未知/初始上界,报告展示假设状态。
|
|
268
|
-
- 双文件服务预检5实际6调用链通过;全量241项及宿主离线冒烟通过,真实质量未测,其他源码对齐继续。
|
|
269
|
-
|
|
270
|
-
## 0.18.4
|
|
271
|
-
|
|
272
|
-
- 可选业务元数据分组闭集每主恰一次/4文件限,共享首主期限/总调用预算,失败保留原组并记限制。
|
|
273
|
-
- 成功追加业务综合接原证据验证/末主期限;注册及预检启用待后续,未声称全对齐。
|
|
274
|
-
|
|
275
|
-
## 0.18.3
|
|
276
|
-
|
|
277
|
-
- 注册入口开启风险规划,预检相同选项计入规划初始调用并提示共享预算;报告展示计划状态/假设数,不算发现或覆盖。
|
|
278
|
-
- 全量237项及真实Cordis/ToolRuntime离线两调用零重复审批只读冒烟通过;业务分组待实现,真实模型未测。
|
|
279
|
-
|
|
280
|
-
## 0.18.2
|
|
281
|
-
|
|
282
|
-
- 低层可选风险规划接原主批次执行,共享信号/超时/调用/读取预算;主审增加计划后重新计量输入。
|
|
283
|
-
- 预检相同选项纳入规划初始调用数,计划不算发现,预算耗尽零主审保留失败状态。
|
|
284
|
-
- 当前注册入口未开启、业务分组未完成;全量237项通过。
|
|
285
|
-
|
|
286
|
-
## 0.18.1
|
|
287
|
-
|
|
288
|
-
- 增加风险计划纯校验组件:限定批准文件/原编辑/sourceId、20风险/4文件,标记假设非发现,不增加权限。
|
|
289
|
-
- 尚未接执行或业务分组,不声称已完成风险规划;定向2项及全量235项通过。
|
|
290
|
-
|
|
291
|
-
## 0.18.0
|
|
292
|
-
|
|
293
|
-
- 原创C++/C#/JS-TS/配置缺陷指引按文件类型进入主输入和候选复核,计入输入预算,不新增读取调用或权限,不把清单当证据。
|
|
294
|
-
- 持续源码对齐计划记录七项及验收,七项不当作完整清单;单批发布不结束总体目标。
|
|
295
|
-
- 全量233项通过,真实模型质量未测。
|
|
296
|
-
|
|
297
|
-
## 0.17.0
|
|
298
|
-
|
|
299
|
-
- 按用户选择的DSH工具权限执行,注册入口不再重复approval.request,不再要求allowModelSending开关;仅依赖tools/llm。
|
|
300
|
-
- 保留preview确认、不可变快照、范围只读、证据校验及调用读取生命周期预算;不把never当自动批准,不改宿主策略。
|
|
301
|
-
- 真实ToolRuntime离线入口回归:未确认0调用,正常执行0额外审批、当前Agent路由及源码不变;不是GUI权限策略或真实模型质量证明。
|
|
302
|
-
|
|
303
|
-
## 0.16.1
|
|
304
|
-
|
|
305
|
-
- 宿主effectivePolicy为never时明确解释自动拒绝与完整文件权限不等于外发批准;保留宿主请求与唯一allowed-once授权,不修改策略。
|
|
306
|
-
- 补never诊断回归,全量231项;每批改动完成均更新版本并按标签CI/Actions发布核验,不只提交代码。
|
|
307
|
-
|
|
308
|
-
## 0.16.0
|
|
309
|
-
|
|
310
|
-
- 批准范围C++头/实现命名与quoted include关系接入现有分组综合,显式context原include位置及方向/当前版本注释。
|
|
311
|
-
- C++零参独立调用原行导航,每侧20条,未解析宏/重载/动态,不冒充完整调用覆盖或因果。
|
|
312
|
-
- 保留宿主审批闭集拒绝诊断,只有literal allowed-once放行;服务级拒绝0发送回归,不变更宿主策略。
|
|
313
|
-
- 线程退出、调试器关闭、分配器生命周期缺陷/safe合成样本及跨文件精确凭据复核;230项全量与宿主只读离线冒烟通过,真实效果未测。
|
|
314
|
-
|
|
315
|
-
## 0.15.0
|
|
316
|
-
|
|
317
|
-
- C#显式批准上下文补窄范围静态类型/零参方法位置线索,原行号进入主输入及输入预算,无新增读取/权限。
|
|
318
|
-
- 不支持目标仍保留为歧义竞争者,拒绝重载、同名遮蔽及畸形/类型外/嵌套声明;current context不冒充old历史。
|
|
319
|
-
- 219项全量与宿主只读审批离线冒烟通过;仅语法提示,不是通用语义绑定或C++适配,不宣称真实模型质量。
|
|
320
|
-
|
|
321
|
-
## 0.14.0
|
|
322
|
-
|
|
323
|
-
- 同一批准仓库关联组追加有界跨文件综合,2–4文件,目录精确编辑与本阶段原文read覆盖,不静默截断规则/context。
|
|
324
|
-
- 文件限定编辑引用、主归因一致与原锚校验,保留原候选,不参与模糊去重。
|
|
325
|
-
- 综合共享批准reader、全局调用及组末主文件生命周期;预检一致,超时取消/预算不足和跨组未覆盖明确限制。
|
|
326
|
-
- 215项回归及宿主只读审批离线冒烟通过;增加缺陷/safe样本判读协议,不宣称真实模型质量。
|
|
327
|
-
|
|
328
|
-
## 0.13.0
|
|
329
|
-
|
|
330
|
-
- 增加批准范围命名相对import别名→简单调用→同侧直接export function的保守位置线索,组输入及显式context保留原始行号。
|
|
331
|
-
- 调用名其他出现、目标同名变更、重复导出/重导出及不支持语法不生成绑定线索,不冒充通用语义图或因果证明。
|
|
332
|
-
- 不增加读取权限、组成员、模型调用或审查覆盖;实际主输入传输、歧义拒绝、全量及宿主只读审批离线验收通过。
|
|
333
|
-
- 本轮质量增强到此冻结,最终版本发布工件核验后停止自主轮次,不自动升级或重启宿主。
|
|
334
|
-
|
|
335
|
-
## 0.12.0
|
|
336
|
-
|
|
337
|
-
- 多批主文件增加有界跨窗口综合,使用完整原始窗口定位目录及批准快照读取,不把目录当作源码证据。
|
|
338
|
-
- 综合发现必须引用至少两个不同窗口编辑,且每个引用编辑的非空旧/新侧至少一侧在本阶段read完整覆盖;保持原始定位和精确证据复核。
|
|
339
|
-
- 综合与局部/复核共享每文件超时、全局调用及读取额度;预检包含综合初始请求,局部覆盖和综合状态分别记录,超限/耗尽/取消不冒完成。
|
|
340
|
-
- 离线集成覆盖综合检索、旧新证据凭据复核、取消和预算边界;不扩权限、不证明模型结论质量,不自动升级宿主。
|
|
341
|
-
|
|
342
|
-
## 0.11.1
|
|
343
|
-
|
|
344
|
-
- 0.11.0候选标签Windows CI发现临时目录8.3短路径与canonical长路径的测试比较差异,未触发正式发布。夹具根统一realpath,保留生产路径安全校验不放宽;原标签不移动,使用新候选。
|
|
345
|
-
|
|
346
|
-
## 0.11.0
|
|
347
|
-
|
|
348
|
-
- 工作区根不必是仓库:preview增加repositoryPath选择工作区相对Git/SVN子仓库,兄弟仓库独立预览/审批执行,保持会话cwd;执行绑定且重新验证选定目标。拒绝上级/绝对/链接目录与不明确根,不支持一次混审多个仓库。
|
|
349
|
-
- 复核增加修改前后regression分类及批准主文件旧新侧精确证据索引;原有响应保留但明确unassessed。候选、证据全保留,不把模型分类当因果证明。
|
|
350
|
-
- 报告展示对照分类/理由/覆盖;严格去重隔离对照冲突,不折叠uncertain/unassessed。没有新增模型调用或越过审批。
|
|
351
|
-
- 真实临时Git/SVN子仓库只读状态、预览后链接替换阻断和宿主离线审批验证通过;不升级或重启宿主,不宣称真实模型质量结论。
|
|
352
|
-
|
|
353
|
-
## 0.10.0
|
|
354
|
-
|
|
355
|
-
- 增加findingGroups保守重复报告分组,严格要求复核支持及完整精确证据、触发/影响/解释和展示字段一致;不按模糊标题或部分证据重叠合并。
|
|
356
|
-
- JSON保留全部候选和证据;Markdown仅精简重复说明,保留每处定位、原文和编辑引用。渲染重新核对以免过期分组误折叠。
|
|
357
|
-
- 不新增模型调用,不晋升因果证明,不删除反驳/不确定/未完成候选;四项代码审查增强到此冻结,最终发布核验后停止自主开发。
|
|
358
|
-
|
|
359
|
-
## 0.9.0
|
|
360
|
-
|
|
361
|
-
- 完整输入超限时,在已批准检索范围内回退精确hunk窗口;保留原始旧新行号、CRLF及EOF,完整快照用于定位和证据校验。
|
|
362
|
-
- 全部窗口仍超单请求时最多20批顺序审查,共用每文件超时、全局调用和检索限额;单hunk不内部截断,任一窗口不可容纳则不启动分批。
|
|
363
|
-
- 预检minimumCalls包含批次;成功与待审窗口显式记录,预算耗尽/取消/超时不冒算覆盖。发现须引用本批编辑并在本窗口定位。
|
|
364
|
-
- 全量与宿主离线验证不证明真实模型质量;捕获硬限和审批边界不变,无自动恢复或新管理流程。
|
|
365
|
-
|
|
366
|
-
## 0.8.0
|
|
367
|
-
|
|
368
|
-
- 批准快照内JS/TS单行相对静态import/export加入有界分组,并记录旧新侧和原始行号;显式context增加方向解释,不新增读取或审查覆盖。
|
|
369
|
-
- 简单default/named alias导入支持有界独立调用语法位置;每源码侧一次索引,不是绑定/作用域/可达性证明。
|
|
370
|
-
- 歧义、阻断/排除目标、旧路径重命名竞争、畸形引号、块注释/模板/续行字符串保守跳过;不支持完整语言依赖图。
|
|
371
|
-
- 延续四文件组及输入预算回退,不改变审批、当前Agent模型或只读边界。
|
|
372
|
-
|
|
373
|
-
## 0.7.0
|
|
374
|
-
|
|
375
|
-
- 复核支持本次批准read结果生成的receiptId,减少模型重新抄写完整证据;兼容原六字段证据。
|
|
376
|
-
- 编号仅在单次复核有效,拒绝伪造、跨次及混合覆盖;报告仍保存完整证据,最终使用批准reader精确复验并消耗共享预算。
|
|
377
|
-
- 编号附加字节计入读取输出硬限;超限和无效引用仍保留候选及partial/followup。
|
|
378
|
-
- 不扩大审批范围,不自动重试;离线回归不证明真实模型质量提升或历史复核失败已解决。
|
|
379
|
-
|
|
380
|
-
## 0.6.2
|
|
381
|
-
|
|
382
|
-
- 按用户指定以新版本继续正式发布,运行代码沿用0.6.1冻结的安全证据诊断补丁,无新增功能。
|
|
383
|
-
- 0.6.1上传获npm接受但注册表可见性校验超时,未创建GitHub Release;保留原标签与失败记录,不覆盖旧版。
|
|
384
|
-
|
|
385
|
-
## 0.6.1
|
|
386
|
-
|
|
387
|
-
- 证据引用不匹配时报告固定字段名,不泄露原文或模型提供的值;精确匹配、审批及检索边界不变。
|
|
388
|
-
- 增加安全诊断回归;仓库保存六次真实模型试跑(累计12次调用),历史引入候选复核失败如实保留为partial,不声称整体质量达标。评测资产不进入npm包。
|
|
389
|
-
|
|
390
|
-
## 0.6.0
|
|
391
|
-
|
|
392
|
-
- 本地预览提供全文件初始输入计划,包含实际UTF-8字节及关联回退;与执行共享输入构造。
|
|
393
|
-
- 报告提供未完成文件与复核缺口的后续选择建议,要求新预览、新审批,不自动续审。
|
|
394
|
-
- ready不代表已审查,minimumCalls不含检索/复核;200文件可能耗尽100次调用而仍有未完成项。
|
|
395
|
-
- 不提升捕获硬限、不拆分超大文件,不承诺真实模型发现率提升。
|
|
396
|
-
|
|
397
|
-
## 0.5.0
|
|
398
|
-
|
|
399
|
-
- 显式rulePaths项目规则:UTF-8 Markdown/文本,最多4文件,单文件16KiB、总32KiB,不扫描或执行规则。
|
|
400
|
-
- 规则纳入快照身份、预览及宿主审批,两阶段共享不可变规则数据和既有预算;报告列出路径与哈希。
|
|
401
|
-
- 规则变更使预览失效,拒绝审批零外发;拒绝链接、非普通文件、二进制及排除/删除路径。
|
|
402
|
-
- 不提供可执行配置、远程规则或规则继承。真实模型遵循效果未评测,未自动更新GUI。
|
|
403
|
-
|
|
404
|
-
## 0.4.0
|
|
405
|
-
|
|
406
|
-
- 审批后的候选增加证据与反证复核,验证来源、哈希、完整行范围及精确原文;模型支持不等于事实证明。
|
|
407
|
-
- 两阶段共享调用/检索预算与单文件超时;失败、不确定及原始限制明确保留,反驳不删除候选。
|
|
408
|
-
- 报告展示复核状态及转义后的理由与证据。修复通用检索指令与复核输出格式冲突。
|
|
409
|
-
- 真实模型质量评测尚未完成;不宣称误报或漏报已改善,未自动安装当前GUI。
|
|
410
|
-
|
|
411
|
-
## 0.3.1
|
|
412
|
-
|
|
413
|
-
- 插件管理显示标题改为“代码审查”(英文Code Review),保留仓库、npm包和内部ID。通过宿主locale元数据提供,宿主详情仍可能展示技术标识。
|
|
414
|
-
- 安装工件验证本地化导出,真实宿主解析器验证中英文标题。
|
|
415
|
-
- 不更改审核行为;未自动安装或重启用户当前GUI。
|
|
416
|
-
|
|
417
|
-
## 0.3.0
|
|
418
|
-
|
|
419
|
-
- JS/TS实现—测试唯一命名关联及确定性有界分组,仅限批准快照中的可审查文件。
|
|
420
|
-
- 同组两侧作为主文件上下文,每个主文件独立审查;输入预算不足明确回退并报告partial。
|
|
421
|
-
- Markdown展示关联理由、拆组提示与输入覆盖;实际检索封装计入输入预检预算。
|
|
422
|
-
- 发布前留存原工件30天,registry可见性延迟进行有限重试,完整性不符立即失败。
|
|
423
|
-
|
|
424
|
-
限制:仅保守命名提示,不是通用依赖图;尚无独立反证复核或真实模型质量提升结论,未在当前GUI安装验收。
|
|
425
|
-
|
|
426
|
-
## 0.2.0
|
|
427
|
-
|
|
428
|
-
- 有界行 diff、上下文 hunk 和紧凑编辑引用,保留 EOF/换行差异,超限明确报告。
|
|
429
|
-
- 发现支持变更归因引用校验及中文展示;引用有效不等于因果已被独立验证。缺失归因保留发现并报告 partial。
|
|
430
|
-
- 审批后允许模型在同一批准快照内进行只读行段读取和字面搜索,不开放 shell、不访问范围外文件。
|
|
431
|
-
- 检索轮次、调用次数、字节数与整个文件审查超时均受限;截断和失败显式报告。
|
|
432
|
-
- 检索审计记录来源哈希及位置,包括批次中途失败前已完成的读取;本地检索不等于模型已接收。
|
|
433
|
-
- 保持默认禁止模型外发和逐次宿主审批。
|
|
434
|
-
|
|
435
|
-
限制:尚未完成真实模型质量评测、当前 GUI 安装验收、关联文件联合分组或独立反证复核。模型结果需要人工判断。本版本未新增自动修复能力。
|
|
436
|
-
|
|
437
|
-
## 0.1.1
|
|
438
|
-
|
|
439
|
-
首次完成 npm 与 GitHub Release 同工件正式发布;独立非商业源码公开许可证、Git/SVN只读采集及定位验证。
|
|
67
|
+
历史上 npm 已接受发布但实际安装包暂时返回 404 时,部分版本通过原安装包恢复 GitHub Release。恢复不意味着重新打包或重复发布。工程回归测试与少量模型试跑均不能推算整体检出率、漏报率或误报率。
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 核心能力对照与剩余工作
|
|
2
|
+
|
|
3
|
+
本文供维护者和关注开发进度的用户阅读,不是安装说明。日常使用见 [README](README.md)。
|
|
4
|
+
|
|
5
|
+
对照对象是 alibaba/open-code-review 的固定提交 2d67596c961f80436deb2afa643efa2b1725d34c。只对齐代码审查所需能力,不建设管理平台、自动修复或独立模型计费系统。
|
|
6
|
+
|
|
7
|
+
**结论:主要审查流程已经具备,必要上下文和整体效果验收仍未完成。不能用版本数量或测试数量表示对齐百分比。**
|
|
8
|
+
|
|
9
|
+
## 已具备的能力
|
|
10
|
+
|
|
11
|
+
| 能力 | 已完成内容 | 不能据此推断 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 变更采集 | Git/SVN 本地变更、Git 固定历史版本、位置与原文校验 | 支持所有 SVN 状态或历史模式 |
|
|
14
|
+
| 范围保护 | 预览确认、版本与内容指纹、执行前复核、凭据路径排除 | 普通源码中一定没有秘密 |
|
|
15
|
+
| 审查流程 | 风险规划、分组与回退、窗口分析、跨文件综合、候选反证 | 模型一定找到所有问题 |
|
|
16
|
+
| 检索 | 只在批准文件中查找、搜索和读行段,记录来源与证据 | 找到名称就证明符号绑定 |
|
|
17
|
+
| 引用方发现 | Git 工作区、历史与 SVN 的指定目录字面引用导航 | 完整函数调用图或动态分派 |
|
|
18
|
+
| 历史上下文 | 显式旧版本文件;复用已批准删除依赖的旧正文 | 自动批准对应的新正文 |
|
|
19
|
+
| 审查次数 | 默认一次,可选 1~3 次,各阶段共享预算 | 次数增加就保证效果提高 |
|
|
20
|
+
| 文件指导 | 常用语言大类与五类协议指导 | 全部语言专用检查已验收 |
|
|
21
|
+
|
|
22
|
+
## 剩余工作与优先级
|
|
23
|
+
|
|
24
|
+
| 优先级 | 未完成项 | 验收重点 |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| 1 | 必要语义调用者、定义、别名及实例上下文 | 歧义不能猜测;不扩大到全仓无界扫描 |
|
|
27
|
+
| 2 | Git 历史两侧及 SVN 的依赖链 | 旧新版本分别捕获;共享读取上限;排除文件不能重新进入 |
|
|
28
|
+
| 3 | 其他旧侧独有来源 | 来源、版本、权限与删除场景保持一致 |
|
|
29
|
+
| 4 | 剩余语言与路径专用指导 | 只提示具体缺陷和反证;不照搬风格禁令 |
|
|
30
|
+
| 5 | 剩余预算组合与端到端矩阵 | 分组、窗口、检索、多次审查的终态与覆盖一致 |
|
|
31
|
+
| 后置 | 真实模型质量评测 | 保存真实输出,人工裁决,分开统计失败和未完成 |
|
|
32
|
+
|
|
33
|
+
Git 工作区三层字面依赖链已实现并通过测试。这解决了“导入转发文件后,未取得后续实现正文”的部分问题,但仍不是完整定义绑定。历史与 SVN 不具备同样的链式能力。
|
|
34
|
+
|
|
35
|
+
## 当前验证结论
|
|
36
|
+
|
|
37
|
+
- 最近完整回归:383 项通过。
|
|
38
|
+
- 实际 DSH 工具运行时检查通过;模型响应受控,不是质量成绩。
|
|
39
|
+
- v0.39.0 独立安装包的真实 Git、服务与预算测试:5 项通过。
|
|
40
|
+
- 已核验正式交付至 v0.38.0。v0.39.0 已冻结标签,本文不在缺少公开安装包核验时把它算作正式交付。
|
|
41
|
+
- 当前优先任务是文档重构与新正式版本;文档发布完成不代表本表的核心差距完成。
|
|
42
|
+
|
|
43
|
+
## 不在范围内
|
|
44
|
+
|
|
45
|
+
自动改代码、管理平台、独立模型配置与费用系统、无限扫描仓库、运行项目代码。保守拒绝不支持的内容是安全边界,不应为了模拟参考实现而取消。
|
|
46
|
+
|
|
47
|
+
参考来源及语言差距见 [源码对照](CORE-SOURCE-INVENTORY.md)。小规模模型观察见 [评测结果](https://github.com/f-e-n-g-0531/dsh-code-review/blob/main/evaluation/PILOT-RESULTS.md)。
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# 参考源码对照
|
|
2
|
+
|
|
3
|
+
供维护者核查实现依据。使用方法见 [README](README.md),开发优先级见 [能力清单](CORE-ALIGNMENT-TASKS.md)。
|
|
4
|
+
|
|
5
|
+
参考版本固定为 alibaba/open-code-review 提交 2d67596c961f80436deb2afa643efa2b1725d34c,不随上游最新分支变化。
|
|
6
|
+
|
|
7
|
+
## 对照结论
|
|
8
|
+
|
|
9
|
+
已阅读核心审查模块、54 篇语言规则,以及相关的 Git 命令、路径、模型和覆盖状态依赖。**阅读完成不等于实现完成。**
|
|
10
|
+
|
|
11
|
+
| 参考模块 | 当前对应能力 | 仍需补齐 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| agent、delegate | 风险规划、分组、窗口、综合、多次审查、失败回退 | 剩余预算组合与完整场景验收 |
|
|
14
|
+
| llmloop | 模型循环、有限检索、候选反证、明确结束状态 | 真实模型质量验证 |
|
|
15
|
+
| tool | 批准快照内的文件查找、搜索、读取和证据校验 | 必要语义调用方、定义、别名与实例上下文 |
|
|
16
|
+
| config/rules | 语言和文件用途检查提示、显式项目规则 | 剩余专用指导及路径选择验收 |
|
|
17
|
+
| diff、gitcmd、pathutil | 只读变更、固定历史对象、路径保护、命令限额 | 不照搬实时无界读取 |
|
|
18
|
+
| model、session/manifest | 覆盖状态、未完成原因、失败与取消区别 | 组合场景的整体一致性验收 |
|
|
19
|
+
|
|
20
|
+
## 有意不同的实现
|
|
21
|
+
|
|
22
|
+
- 本插件沿用当前 DSH Agent 的模型和权限,不建立单独模型、费用或管理平台。
|
|
23
|
+
- 审查前固定源码,执行前重新核验;不让模型读取任意实时工作区。
|
|
24
|
+
- 检索最多读取 200 行,且只限批准来源;不照搬参考的任意路径或正则搜索。
|
|
25
|
+
- 默认一次审查,可选三次,不照搬参考默认次数和对话继承方式。
|
|
26
|
+
- 历史重命名按删除和新增表达;区间比较使用明确端点,不自动计算合并基点。
|
|
27
|
+
- 参考中的风格偏好、无条件性能建议和错误绝对规则不作为缺陷标准。
|
|
28
|
+
|
|
29
|
+
## 语言指导的剩余工作
|
|
30
|
+
|
|
31
|
+
| 类型 | 剩余重点 |
|
|
32
|
+
|---|---|
|
|
33
|
+
| F#、R、Elm、Haskell、Julia、Nim、OCaml | 仍以通用指导为主;需处理各语言的资源、求值、数据与运行契约 |
|
|
34
|
+
| Rego、Jsonnet、Nix | 策略未定义值、对象合并、构建依赖和具体运行版本 |
|
|
35
|
+
| Solidity、Vyper | 部署版本、存储布局、重入、外部调用与实际消费者 |
|
|
36
|
+
| Verilog/SystemVerilog、VHDL | 调度、位宽、有符号值、时钟跨域和目标工具支持 |
|
|
37
|
+
| Zig | 分配器、异常清理、借用寿命和构建模式 |
|
|
38
|
+
| PO/POT、MyBatis 映射文件 | 文本身份、占位符、复数规则、绑定值与动态 SQL |
|
|
39
|
+
| JS/TS/React | hook、异步清理、渲染副作用的实际缺陷与反证 |
|
|
40
|
+
| Go、Python、Rust | 版本前提、并发、宏求值和调用契约细化 |
|
|
41
|
+
| Objective-C、Swift、MATLAB、ArkTS、PHP、Kotlin、Java、C/C++ | 大类指导已有;部分生命周期、并发、版本和调用场景需具体测试 |
|
|
42
|
+
| 模板、依赖清单、基础设施 | 转义方式、引擎版本、消费者与部署约束,不按文件名推定行为 |
|
|
43
|
+
|
|
44
|
+
Protobuf、Thrift、Cap’n Proto、GraphQL、Prisma 的专用指导已交付。不把协议检查提示当作解析器、迁移执行结果或缺陷证据。
|
|
45
|
+
|
|
46
|
+
## 固定参考文件索引
|
|
47
|
+
|
|
48
|
+
下表仅记录查证来源。分类代码的含义:A1=源码对照,A2=调度与预算,A3=审查次数;B1=调用方,B2=旧版本上下文,B3=定义;C2=输出格式,C3=大输入;D1=语言指导,E1=整体验收。
|
|
49
|
+
|
|
50
|
+
| 参考文件 | 阅读状态 | 分类 |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
|[agent/agent.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/agent.go)|已阅读|A1|
|
|
53
|
+
|[agent/estimate.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/estimate.go)|已阅读|A1|
|
|
54
|
+
|[agent/grouping.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/grouping.go)|已阅读|A1|
|
|
55
|
+
|[agent/identity.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/identity.go)|已阅读|A1|
|
|
56
|
+
|[agent/preview.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/preview.go)|已阅读|A1|
|
|
57
|
+
|[agent/selection.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/selection.go)|已阅读|A1|
|
|
58
|
+
|[agent/util.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/agent/util.go)|已阅读|A1|
|
|
59
|
+
|[delegate/format.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/delegate/format.go)|已阅读|A1|
|
|
60
|
+
|[delegate/rulegroup.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/delegate/rulegroup.go)|已阅读|A1|
|
|
61
|
+
|[llmloop/compression.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/llmloop/compression.go)|已阅读|A1|
|
|
62
|
+
|[llmloop/loop.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/llmloop/loop.go)|已阅读|A1|
|
|
63
|
+
|[llmloop/pool.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/llmloop/pool.go)|已阅读|A1|
|
|
64
|
+
|[llmloop/tool_args_json.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/llmloop/tool_args_json.go)|已阅读|A1|
|
|
65
|
+
|[llmloop/tool_failure_streak.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/llmloop/tool_failure_streak.go)|已阅读|A1|
|
|
66
|
+
|[tool/code_comment.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/code_comment.go)|已阅读|A1|
|
|
67
|
+
|[tool/code_search.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/code_search.go)|已阅读|A1|
|
|
68
|
+
|[tool/comment_args_repair.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/comment_args_repair.go)|已阅读|A1|
|
|
69
|
+
|[tool/comment_collector.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/comment_collector.go)|已阅读|A1|
|
|
70
|
+
|[tool/definitions.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/definitions.go)|已阅读|A1|
|
|
71
|
+
|[tool/file_find.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/file_find.go)|已阅读|A1|
|
|
72
|
+
|[tool/file_read.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/file_read.go)|已阅读|A1|
|
|
73
|
+
|[tool/file_read_diff.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/file_read_diff.go)|已阅读|A1|
|
|
74
|
+
|[tool/filereader.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/filereader.go)|已阅读|A1|
|
|
75
|
+
|[tool/response_message.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/response_message.go)|已阅读|A1|
|
|
76
|
+
|[tool/stub.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/tool/stub.go)|已阅读|A1|
|
|
77
|
+
|[diff/git.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/git.go)|已阅读|A1|
|
|
78
|
+
|[diff/gitignore.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/gitignore.go)|已阅读|A1|
|
|
79
|
+
|[diff/hunk.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/hunk.go)|已阅读|A1|
|
|
80
|
+
|[diff/parser.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/parser.go)|已阅读|A1|
|
|
81
|
+
|[diff/quotedpath.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/quotedpath.go)|已阅读|A1|
|
|
82
|
+
|[diff/relocation.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/relocation.go)|已阅读|A1|
|
|
83
|
+
|[diff/resolver.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/resolver.go)|已阅读|A1|
|
|
84
|
+
|[diff/workspace_file.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/diff/workspace_file.go)|已阅读|A1|
|
|
85
|
+
|[config/allowlist/allowed_ext.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/allowlist/allowed_ext.go)|已阅读|A1|
|
|
86
|
+
|[config/allowlist/default_exclude_patterns.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/allowlist/default_exclude_patterns.json)|已阅读|A1|
|
|
87
|
+
|[config/allowlist/default_secret_patterns.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/allowlist/default_secret_patterns.json)|已阅读|A1|
|
|
88
|
+
|[config/allowlist/secret_path.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/allowlist/secret_path.go)|已阅读|A1|
|
|
89
|
+
|[config/allowlist/supported_file_types.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/allowlist/supported_file_types.json)|已阅读|A1|
|
|
90
|
+
|[config/rules/sniffer.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/sniffer.go)|已阅读|A1|
|
|
91
|
+
|[config/rules/system_rules.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/system_rules.go)|已阅读|A1|
|
|
92
|
+
|[config/rules/system_rules.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/system_rules.json)|已阅读|A1|
|
|
93
|
+
|[config/template/effort.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/effort.go)|已阅读|A1|
|
|
94
|
+
|[config/template/scan_template.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/scan_template.json)|已阅读|A1|
|
|
95
|
+
|[config/template/task_template.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/task_template.json)|已阅读|A1|
|
|
96
|
+
|[config/template/template.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/template.go)|已阅读|A1|
|
|
97
|
+
|[config/testconnection/task.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/testconnection/task.json)|已阅读|A1|
|
|
98
|
+
|[config/testconnection/testconnection.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/testconnection/testconnection.go)|已阅读|A1|
|
|
99
|
+
|[config/toolsconfig/tools.json](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/toolsconfig/tools.json)|已阅读|A1|
|
|
100
|
+
|[config/toolsconfig/toolsconfig.go](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/toolsconfig/toolsconfig.go)|已阅读|A1|
|
|
101
|
+
|[config/template/prompts/grouping_task_system.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/grouping_task_system.md)|已阅读|A1|
|
|
102
|
+
|[config/template/prompts/grouping_task_user.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/grouping_task_user.md)|已阅读|A1|
|
|
103
|
+
|[config/template/prompts/main_task_system.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/main_task_system.md)|已阅读|A1|
|
|
104
|
+
|[config/template/prompts/main_task_user.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/main_task_user.md)|已阅读|A1|
|
|
105
|
+
|[config/template/prompts/memory_compression_task_system.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/memory_compression_task_system.md)|已阅读|A1|
|
|
106
|
+
|[config/template/prompts/memory_compression_task_user.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/memory_compression_task_user.md)|已阅读|A1|
|
|
107
|
+
|[config/template/prompts/plan_task_system.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/plan_task_system.md)|已阅读|A1|
|
|
108
|
+
|[config/template/prompts/plan_task_user.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/plan_task_user.md)|已阅读|A1|
|
|
109
|
+
|[config/template/prompts/re_location_task_system.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/re_location_task_system.md)|已阅读|A1|
|
|
110
|
+
|[config/template/prompts/re_location_task_user.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/re_location_task_user.md)|已阅读|A1|
|
|
111
|
+
|[config/template/prompts/review_filter_task_system.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/review_filter_task_system.md)|已阅读|A1|
|
|
112
|
+
|[config/template/prompts/review_filter_task_user.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/template/prompts/review_filter_task_user.md)|已阅读|A1|
|
|
113
|
+
|[config/rules/rule_docs/arkts.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/arkts.md)|已阅读|D1|
|
|
114
|
+
|[config/rules/rule_docs/astro.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/astro.md)|已阅读|D1|
|
|
115
|
+
|[config/rules/rule_docs/bicep.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/bicep.md)|已阅读|D1|
|
|
116
|
+
|[config/rules/rule_docs/build_gradle.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/build_gradle.md)|已阅读|D1|
|
|
117
|
+
|[config/rules/rule_docs/c.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/c.md)|已阅读|D1|
|
|
118
|
+
|[config/rules/rule_docs/capnp.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/capnp.md)|已阅读|D1|
|
|
119
|
+
|[config/rules/rule_docs/cargo_toml.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/cargo_toml.md)|已阅读|D1|
|
|
120
|
+
|[config/rules/rule_docs/composer_json.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/composer_json.md)|已阅读|D1|
|
|
121
|
+
|[config/rules/rule_docs/cpp.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/cpp.md)|已阅读|D1|
|
|
122
|
+
|[config/rules/rule_docs/default.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/default.md)|已阅读|D1|
|
|
123
|
+
|[config/rules/rule_docs/elm.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/elm.md)|已阅读|D1|
|
|
124
|
+
|[config/rules/rule_docs/freemarker.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/freemarker.md)|已阅读|D1|
|
|
125
|
+
|[config/rules/rule_docs/fsharp.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/fsharp.md)|已阅读|D1|
|
|
126
|
+
|[config/rules/rule_docs/github_config.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/github_config.md)|已阅读|D1|
|
|
127
|
+
|[config/rules/rule_docs/github_workflows.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/github_workflows.md)|已阅读|D1|
|
|
128
|
+
|[config/rules/rule_docs/go.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/go.md)|已阅读|D1|
|
|
129
|
+
|[config/rules/rule_docs/graphql.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/graphql.md)|已阅读|D1|
|
|
130
|
+
|[config/rules/rule_docs/handlebars_mustache.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/handlebars_mustache.md)|已阅读|D1|
|
|
131
|
+
|[config/rules/rule_docs/haskell.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/haskell.md)|已阅读|D1|
|
|
132
|
+
|[config/rules/rule_docs/java.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/java.md)|已阅读|D1|
|
|
133
|
+
|[config/rules/rule_docs/jinja.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/jinja.md)|已阅读|D1|
|
|
134
|
+
|[config/rules/rule_docs/json.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/json.md)|已阅读|D1|
|
|
135
|
+
|[config/rules/rule_docs/jsonnet.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/jsonnet.md)|已阅读|D1|
|
|
136
|
+
|[config/rules/rule_docs/julia.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/julia.md)|已阅读|D1|
|
|
137
|
+
|[config/rules/rule_docs/kotlin.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/kotlin.md)|已阅读|D1|
|
|
138
|
+
|[config/rules/rule_docs/mapper_dao_xml.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/mapper_dao_xml.md)|已阅读|D1|
|
|
139
|
+
|[config/rules/rule_docs/matlab.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/matlab.md)|已阅读|D1|
|
|
140
|
+
|[config/rules/rule_docs/nim.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/nim.md)|已阅读|D1|
|
|
141
|
+
|[config/rules/rule_docs/nix.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/nix.md)|已阅读|D1|
|
|
142
|
+
|[config/rules/rule_docs/objc.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/objc.md)|已阅读|D1|
|
|
143
|
+
|[config/rules/rule_docs/ocaml.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/ocaml.md)|已阅读|D1|
|
|
144
|
+
|[config/rules/rule_docs/package_json.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/package_json.md)|已阅读|D1|
|
|
145
|
+
|[config/rules/rule_docs/php.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/php.md)|已阅读|D1|
|
|
146
|
+
|[config/rules/rule_docs/po.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/po.md)|已阅读|D1|
|
|
147
|
+
|[config/rules/rule_docs/pom_xml.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/pom_xml.md)|已阅读|D1|
|
|
148
|
+
|[config/rules/rule_docs/pot.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/pot.md)|已阅读|D1|
|
|
149
|
+
|[config/rules/rule_docs/prisma.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/prisma.md)|已阅读|D1|
|
|
150
|
+
|[config/rules/rule_docs/properties.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/properties.md)|已阅读|D1|
|
|
151
|
+
|[config/rules/rule_docs/protobuf.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/protobuf.md)|已阅读|D1|
|
|
152
|
+
|[config/rules/rule_docs/pug.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/pug.md)|已阅读|D1|
|
|
153
|
+
|[config/rules/rule_docs/python.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/python.md)|已阅读|D1|
|
|
154
|
+
|[config/rules/rule_docs/r.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/r.md)|已阅读|D1|
|
|
155
|
+
|[config/rules/rule_docs/rego.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/rego.md)|已阅读|D1|
|
|
156
|
+
|[config/rules/rule_docs/rust.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/rust.md)|已阅读|D1|
|
|
157
|
+
|[config/rules/rule_docs/solidity.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/solidity.md)|已阅读|D1|
|
|
158
|
+
|[config/rules/rule_docs/swift.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/swift.md)|已阅读|D1|
|
|
159
|
+
|[config/rules/rule_docs/terraform.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/terraform.md)|已阅读|D1|
|
|
160
|
+
|[config/rules/rule_docs/thrift.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/thrift.md)|已阅读|D1|
|
|
161
|
+
|[config/rules/rule_docs/ts_js_tsx_jsx.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/ts_js_tsx_jsx.md)|已阅读|D1|
|
|
162
|
+
|[config/rules/rule_docs/verilog.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/verilog.md)|已阅读|D1|
|
|
163
|
+
|[config/rules/rule_docs/vhdl.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/vhdl.md)|已阅读|D1|
|
|
164
|
+
|[config/rules/rule_docs/vyper.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/vyper.md)|已阅读|D1|
|
|
165
|
+
|[config/rules/rule_docs/yaml.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/yaml.md)|已阅读|D1|
|
|
166
|
+
|[config/rules/rule_docs/zig.md](https://github.com/alibaba/open-code-review/blob/2d67596c961f80436deb2afa643efa2b1725d34c/internal/config/rules/rule_docs/zig.md)|已阅读|D1|
|
|
167
|
+
|
|
168
|
+
相关依赖还包括 internal/gitcmd、internal/pathutil、internal/model 和 internal/session/manifest.go。会话存储、历史管理、自动修复及独立扫描平台不在本项目范围内。
|
package/DEVELOPMENT.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 开发与发布指南
|
|
2
|
+
|
|
3
|
+
本文供维护者使用。安装与日常审查见 [README](README.md)。
|
|
4
|
+
|
|
5
|
+
## 本地验证
|
|
6
|
+
|
|
7
|
+
要求 Node.js 22+、Git、SVN 和 svnadmin。测试只在临时目录创建样本仓库,不修改业务仓库。
|
|
8
|
+
|
|
9
|
+
npm ci --ignore-scripts
|
|
10
|
+
npm test
|
|
11
|
+
node scripts/host-smoke.mjs <DSH-checkout>
|
|
12
|
+
|
|
13
|
+
宿主检查加载真实 DSH 工具运行时,但使用受控模型响应,不是 GUI 安装或真实模型质量测试。Windows SVN 需要支持 UTF-8 路径;CI 使用临时工具,不修改用户安装。
|
|
14
|
+
|
|
15
|
+
## 审查预算
|
|
16
|
+
|
|
17
|
+
除 README 中的文件和输入上限外:
|
|
18
|
+
|
|
19
|
+
- 每个主文件的模型与检索阶段共享默认 120 秒;关联综合沿用相关主文件的生命周期,不因切换阶段重新计时。
|
|
20
|
+
- 每阶段最多三轮检索;全局最多 50 次读取请求,返回内容累计 256 KiB,单次最多 64 KiB,读取最多 200 行。
|
|
21
|
+
- Git 工作区依赖链最多三层、512 个精确路径查询、20 个候选、1 MiB 正文;文件读取与最终复核共享 30 秒。
|
|
22
|
+
- 引用方发现最多四个不重叠的非根目录;128 个候选正文共 1 MiB,目录索引最多 256 条/64 KiB,竞争路径最多 512 个。发现与复核共享 30 秒。
|
|
23
|
+
|
|
24
|
+
达到上限必须阻断或说明未完成,不能静默扩大范围、丢弃证据或重新计时。
|
|
25
|
+
|
|
26
|
+
## 正式发布
|
|
27
|
+
|
|
28
|
+
1. 修改版本号与锁文件;更新 [变更记录](CHANGELOG.md) 和 [发布说明](RELEASE-NOTES.md)。
|
|
29
|
+
2. 完成测试、差异检查和独立安装验证后,提交、推送,并创建对应 vX.Y.Z 标签。标签一旦进入发布流程就不再移动。
|
|
30
|
+
3. 等待标签 CI 的 Ubuntu/Windows × Node.js 22/24 四组测试全部成功。
|
|
31
|
+
4. 在 Actions 的 CI 工作流选择该标签,设置 publish: true,仅触发一次正式发布。
|
|
32
|
+
5. 发布任务打包一次、验证安装、保存安装包,再发布 npm。随后下载 npm 实际安装包,检查它与保存的原包是否一致。
|
|
33
|
+
6. 核验通过后,把同一安装包与 SHA256SUMS.txt 附到 GitHub Release,并使用发布说明作为正文。
|
|
34
|
+
7. 下载 Release 的实际附件,与原包逐字节比较,核验 SHA-256、SHA-512 及校验清单。
|
|
35
|
+
|
|
36
|
+
需要仓库 Secret NPM_AUTOMATION_TOKEN。普通标签测试不会发布,普通分支推送也不会触发这套 CI。
|
|
37
|
+
|
|
38
|
+
## npm 已成功,但 Release 失败怎么办
|
|
39
|
+
|
|
40
|
+
**不要再次 npm publish,不要重新打包,不要移动标签。**
|
|
41
|
+
|
|
42
|
+
先检查原发布任务中的保存工件和日志。注册表元数据存在不代表安装包已经可下载;等待实际安装包可读,并与原包核验。恢复工作流只能下载原运行的安装包、验证固定提交及校验值,然后补建 Release。
|
|
43
|
+
|
|
44
|
+
若原包缺失或实际字节不一致,不得宣称该版本正式交付。
|
|
45
|
+
|
|
46
|
+
## 文档写作约定
|
|
47
|
+
|
|
48
|
+
- 使用者文档先回答用途、操作和结果,不从内部字段或测试编号开始。
|
|
49
|
+
- 新术语首次出现就解释。状态名保留英文时,同时写出中文含义。
|
|
50
|
+
- 变更记录写用户能感受到的变化;流水线日志和长哈希不是功能介绍。
|
|
51
|
+
- 能力清单区分实现、验证与发布,不能把“读过参考源码”写成“功能已完成”。
|
|
52
|
+
- 不保留逐轮过程记录,不把小样本观察说成总体质量成绩。
|
package/README.md
CHANGED
|
@@ -1,185 +1,116 @@
|
|
|
1
1
|
# DSH Code Review
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DSH 的只读代码审查插件。它比较 Git 或 SVN 中的代码变更,使用当前 Agent 的模型分析问题,并返回带文件位置、证据和复核结果的中文报告。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**不会修改代码、自动修复、提交、回滚或发布业务项目。模型报告仍需人工判断。**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Git历史预览新增oldContextPaths:最多20个显式仓库相对文件,与contextPaths/自动上下文共享20槽、256KiB每blob及4MiB快照。仅从baseline普通Git blob捕获,不checkout/fetch/读取工作树;根提交无baseline拒绝,working/SVN明确拒绝。旧侧条目携带oldRevision/oldBlobOid/oldHash,仅进入context-old;oldOnly表示仅批准旧侧,不证明target路径不存在。所选变更复用原changed-old,不重复上下文;excluded/blocked变更、链接/submodule、凭据路径不能重新进入。预览显示身份元数据、不显示正文,确认执行才按宿主正常权限发送。主审/综合/复核按侧提示,计入原输入预算,旧证据不能冒充新侧回归证明。
|
|
10
|
-
|
|
11
|
-
预览可选callerScopePaths,最多4个非根、非重叠相对目录,支持Git/SVN工作区及Git固定commit/range两侧对象。SVN仅离线normal普通节点,校验祖先与文件URL链/wcroot/UUID及属性,拒绝switched/external/special/keywords;竞争路径含本地未跟踪项但不授其正文。历史两侧共用30秒、128正文/1MiB、256记录/64KiB、512竞争探针/1MiB,blob版本/OID/hash及非匹配身份绑定;不读取工作树。预览读取目录内tracked JS/TS/C-family候选正文(含非匹配),仅匹配引用方作为上下文发送模型;128扫描文件/1MiB正文/256索引记录/64KiB索引/512竞争路径探针,发现与重核共享30秒,复核累计2MiB,仍共享20上下文及4MiB快照。绑定所有扫描hash、索引及竞争探针;execute重新捕获。SVN目录深度<=32、索引256条/64KiB、探针512条/1MiB;与Git工作区同共享30秒/正文128条1MiB/复核2MiB,缺正文/超限fail-closed;历史root无旧侧,删除仅旧侧导航,oldOnly上下文复用不新增new授权。字面引用仅导航,不证明函数调用或完整覆盖,报告保留partial限制。
|
|
12
|
-
|
|
13
|
-
最终报告记录业务需求hash/bytes用于溯源,不重复需求正文;真实Git当前/历史捕获及服务预览执行预算集成已验收。
|
|
14
|
-
|
|
15
|
-
预览可选businessRequirement(16KiB UTF8),显示正文与hash并绑定快照;规划、生成和复核用作不可信约束数据,计输入预算,不作为权限或缺陷证据。
|
|
16
|
-
|
|
17
|
-
风险计划失败时在原预算内回退不带计划的主审查,保留fallback原因与partial限制;不重试无效计划,取消/超时/调用耗尽仍阻断。
|
|
18
|
-
|
|
19
|
-
风险计划sourceIds会记录本批生成读取片段/未读状态;未读产生partial覆盖限制。search/find不算读,读过片段也不证明条件已核查或缺陷成立,不自动添加调用。
|
|
20
|
-
|
|
21
|
-
Git自动直接依赖上下文仅查询从已捕获源码导出的最多512路径索引探针,不列整个tracked树;累计索引1MiB并在结束核对同探针指纹。SVN沿用原索引限额,此项不冒充SVN等价。
|
|
22
|
-
|
|
23
|
-
凭据路径硬排除:.env及其后缀(.env.example/.env.sample/.env.template例外)、.ssh目录、SSH私钥及.netrc/_netrc/.npmrc/.pypirc/.dockercfg,大小写无关;显式选择不可绕过,上下文/规则同样拒绝。仅路径策略,不保证普通文件无秘密。
|
|
24
|
-
|
|
25
|
-
检索支持find批准catalog路径字面子串查找,返回来源身份/版本侧/hash;仅导航不证明正文已读,不搜索仓库外路径。当前持续任务见[核心对照任务](CORE-ALIGNMENT-TASKS.md)。
|
|
26
|
-
|
|
27
|
-
模型快照字面search可带sourceIds,1至20个已批准catalog身份筛选文件/版本。未指定保留全快照搜索;未知或重复身份整批拒绝,不增加快照外读取。
|
|
28
|
-
|
|
29
|
-
C#自动上下文支持窄语法同目录Type.cs静态零参调用探针,需file-scoped namespace且无using/dynamic/注释字符串/同名其他引用;捕获后定义提示再校验命名空间。不是编译器解析,不全仓寻找类型。
|
|
30
|
-
|
|
31
|
-
历史捕获用diff-tree精确端点变更元数据,不前置完整枚举文件树;显式上下文/规则和直接导入依赖按字面非递归路径查询。自动依赖最多512个待查路径,仍保留200变更/20上下文/4MiB快照限制,大树小提交不因无关文件元数据超限。
|
|
32
|
-
|
|
33
|
-
历史自动上下文导航旧侧import/include:未修改依赖保留两侧普通blob及版本;已批准删除依赖复用原changed-old,不重复捕获或占用上下文槽。excluded/blocked删除不恢复,目标链接不赋予新侧权限。新增上下文仍共享20槽、blob字节及4MiB快照限额,自动来源边界其余场景待验收;导航不证明调用者覆盖或符号绑定。
|
|
34
|
-
|
|
35
|
-
单提交审查直接读取原始commit头的父节点,不受浅克隆遍历边界影响;缺失父树明确失败且不自动fetch,不能把非根提交当空旧侧。
|
|
36
|
-
|
|
37
|
-
Git历史审查预览传 `commit`(相对唯一父提交,根提交空旧侧;merge需区间),或 `baseRevision` 与 `targetRevision`(精确端点树差异,非merge-base);两类互斥。预览/报告显示解析对象ID,执行复捕获hash验证引用变化。历史显式/自动直接导入上下文只捕获目标提交树普通blob,默认20总量且排除变更不能再进入;历史显式规则同样只从目标树blob捕获,最多4个md/txt、UTF-8、每个16KiB/合计32KiB,不混工作树,SVN不冒充此语义。
|
|
38
|
-
|
|
39
|
-
工具对错误行锚可进行一次同文件同侧唯一完整原文纠正,须重叠原引用精确编辑;原候选/状态保留JSON,Markdown提示。纠正后仍校验窗口、跨文件编辑及生成读取证据,不增调用、不猜歧义或跨文件迁移,不证明缺陷或因果。
|
|
40
|
-
|
|
41
|
-
可在预览传入 `autoContext: true`,显式选择有界Git/SVN直接import/include上下文捕获;默认关闭。候选、阻塞、截断及实际路径在预览可见,正文仅在确认后发送,执行重新验证快照。仅当前侧导航非历史/调用图,SVN使用离线正常节点索引支持同样导航;不会自动引入未跟踪或排除变更。,包含有界覆盖预检、显式项目规则及候选证据与反证复核;发布状态以 npm 和 GitHub Release 为准。已通过真实临时 Git/SVN 仓库测试,以及隔离进程中的真实 DSH ToolRuntime 注册验证。当前开发会话的实际预览已返回0.6.0的plan/rules字段,空变更预览与默认关闭外发已验证;已进行经宿主审批的六次小规模真实试跑,累计12次模型调用;四组合成正负例与历史修复对照符合预期,历史引入方向检出候选但引用复核未完成(partial)。不是独立盲测或整体质量证明。详情见 [试跑结果](evaluation/PILOT-RESULTS.md)。
|
|
42
|
-
|
|
43
|
-
## 工作区下多个子仓库(0.11.0)
|
|
44
|
-
|
|
45
|
-
当会话目录不是仓库而其子目录含Git/SVN仓库时,预览可指定 `repositoryPath`,例如会话位于工作区根时传 `{ "repositoryPath": "c3animation" }`。该参数必须是工作区相对路径(正斜杠),指向明确仓库根;不能使用绝对路径、上级路径或链接目录。文件、上下文、规则路径仍相对此次选定仓库。多个子仓库分别预览和执行,不混用快照;execute只接收previewId,不能另改目标。省略参数保持原行为。使用此参数需宿主安装0.11.0或更新版本;仓库发布不会自动更新当前宿主。
|
|
46
|
-
|
|
47
|
-
## 完整文件权限与审批策略
|
|
48
|
-
|
|
49
|
-
0.17.0起注册工具沿用DSH正常工具执行权限,不再主动调用approval.request,不要求额外allowModelSending开关。宿主工具权限控制入口调用;完整权限下不再因插件重复审批而失败。不修改宿主策略,不把never解释为allowed-once。
|
|
50
|
-
|
|
51
|
-
## C++关联与审批诊断(0.16.0)
|
|
52
|
-
|
|
53
|
-
批准文件中的同目录唯一头/实现命名与字面量引号include进入现有关联分组,最多4文件的综合仍共享原读取/调用/生命周期预算。显式context注释保留from/to与include原行,current内容不冒充old历史。无需扫描新文件或执行编译器;系统include、构建搜索路径、条件宏和不支持文本不解析,同目录命名不证明绑定。
|
|
54
|
-
|
|
55
|
-
主输入提供每侧最多20条零参独立调用原位置,含 `worker.join()`、`debugger->Close()`、`Allocator::Shutdown()` 等语法导航;标记未解析,不证明宏展开、重载选择、动态分派或执行顺序,也不表示全部调用覆盖。其他源码须批准范围内read获取。线程退出/调试器关闭/分配器生命周期合成缺陷与safe反例仅验证明确抽象契约及离线证据协议,不是编译或真实模型质量成绩。
|
|
56
|
-
|
|
57
|
-
0.16.x的独立外发审批已在0.17.0移除;仍保留预览确认及快照/范围/只读校验。未执行或失败仍不是审核通过。
|
|
58
|
-
|
|
59
|
-
## C#显式上下文位置线索(0.15.0)
|
|
60
|
-
|
|
61
|
-
仅注释已批准.cs context,不增加读取或覆盖。支持file-scoped同namespace、静态class、public static零参void/int/bool/string方法与独立Type.Method()语法;保留调用/类型/方法原始行号。目标括号须平衡、方法直属类型;重载、同名竞争者(包括不支持语法)、局部遮蔽、using/partial/继承或动态等不推定绑定。有字符串/注释/预处理等不支持文本保守不生成线索,不影响普通源码审查。当前context明确不是old历史内容。不执行编译器、工程或用户源码,不冒充C++适配、语义绑定或可达性证明,线索不足仍须模型说明证据限制。
|
|
62
|
-
|
|
63
|
-
## 批准快照内跨文件综合(0.14.0)
|
|
64
|
-
|
|
65
|
-
关联组最多4个批准主文件、至少2个文本变化时追加跨文件综合。目录保留完整精确编辑原位置,不作为源码证据;每条发现须引用至少2文件的 `interaction.editRefs:[{fileId,editId}]`,主attribution与主引用一致,原锚重叠主编辑,每个引用编辑至少一非空侧须本综合生成read完整覆盖。共享批准reader/全局调用额度,嵌入组最后主文件原超时,不重置生命周期;预检包含额外初始调用,检索复核另计。interactions独立记录pending/completed/blocked,跨组和未完成明确限制。不合并多文件候选,不自动扩文件/仓库。源码/规则/context仍不可信。真实模型样本未跑,安全反例空输出模拟不代表模型查准率;拒绝审批表示未审查不是通过。
|
|
66
|
-
|
|
67
|
-
## 静态调用绑定线索(0.13.0)
|
|
68
|
-
|
|
69
|
-
批准JS/TS源码中的命名相对import及别名、简单独立调用,可补充到同侧直接 `export function` 声明的原始行号线索。组输入 `bindingRelations` 及显式上下文注释保留导入/调用/声明位置;不新增读取、组成员或审查覆盖。局部名其他出现(参数/声明/赋值/逃逸)、目标名额外出现、重复导出、重导出或不支持语法保守不生成绑定线索;绑定不确定不阻止普通源码审查。不是通用模块解析、语义绑定或可达性/因果证明。输入预算不足沿用原有关联回退,不截断规则或上下文。
|
|
70
|
-
|
|
71
|
-
## 跨窗口综合分析(0.12.0)
|
|
72
|
-
|
|
73
|
-
主文件需要多批精确窗口时,在局部分析后追加一次有界综合检查。完整原始窗口目录不充当源码;综合发现必须引用至少两个不同窗口的编辑,每个引用编辑至少一个非空旧/新侧必须在本综合生成阶段被批准read完整覆盖(不能借用前批/复核审计或search)。使用原定位及证据复核,不截断规则/context。共享原每文件超时和全局调用/读取额度;预检minimumCalls包含综合初始请求,后续检索复核另计。synthesisStatus独立记录pending/completed/blocked,局部窗口完成不表示综合完成;输入超限或预算耗尽不冒算覆盖。读取覆盖及模型分析仍不证明跨路径正确性或因果事实,真实模型质量未新增验证。
|
|
74
|
-
|
|
75
|
-
## 修改前后对照复核(0.11.0)
|
|
76
|
-
|
|
77
|
-
复核可返回 `regression`:`introduced`(模型判断本次引入)、`preexisting`(模型判断原有问题)、`uncertain`(对照不足)。前两者必须引用候选主文件旧新两侧的已精确校验证据,索引指向本候选复核 `evidence` 数组;空源或缺少任一侧时不能虚构支持。旧协议缺省标为 `unassessed`,关闭复核同样明确未评估。报告保留全部候选并展示分类、理由及 `regressionCoverage`;模型支持但对照不足进入限制。分类及引用有效不等于因果事实成立,也不宣称真实模型质量提升已获验证。去重隔离分类/理由/证据索引冲突,uncertain及unassessed不折叠。
|
|
78
|
-
|
|
79
|
-
## 保守重复报告归组(0.10.0)
|
|
80
|
-
|
|
81
|
-
结构化报告保留全部原始 `findings`,附加 `findingGroups` 中的零基发现索引。仅当归因引用有效、复核支持、整套精确证据及标题、触发条件、影响、建议、前后行为和解释一致时归组,不按标题相似、证据部分重叠或传递关系合并。Markdown精简重复说明,仍展示各处定位/原文/变更引用,完整候选与复核证据保留在JSON。不新增模型调用,不证明根因事实,不合并不确定/反驳/未完成发现。
|
|
82
|
-
|
|
83
|
-
## 证据引用编号(0.7.0)
|
|
84
|
-
|
|
85
|
-
复核阶段的批准行段读取会返回宿主生成的 `receiptId`;模型可用 `{receiptId}` 引用该次读取,避免重新抄写哈希、换行和原文。仍兼容原六字段完整证据。编号仅在本次复核有效,不允许附带字段覆盖证据,不扩展文件权限。宿主解析后仍重新读取批准快照、精确校验并计入共享预算;编号元数据也占用输出额度。报告保留完整证据而非临时编号。无效引用仍明确标记复核未完成,不自动重试,不证明因果或真实审核质量。
|
|
86
|
-
|
|
87
|
-
## 项目规则(0.5.0)
|
|
88
|
-
|
|
89
|
-
`code_review_preview` 可传 `rulePaths: ["review-rules.md"]`,只读显式选入的仓库相对路径;不会自动搜索父目录、加载远程规则或执行 include。仅接受 UTF-8 `.md`/`.txt`,最多4个、单个16 KiB、合计32 KiB。规则还占用快照和模型输入预算,超限不静默截断。
|
|
7
|
+
## 安装
|
|
90
8
|
|
|
91
|
-
|
|
9
|
+
环境要求:Node.js 22 或更新版本,以及目标仓库使用的 Git 或 SVN 命令行工具。插件依赖 DSH 的工具和模型服务,不能脱离 DSH 单独运行。
|
|
92
10
|
|
|
93
|
-
|
|
11
|
+
在 DSH 中通过插件管理器安装并启用,或使用:
|
|
94
12
|
|
|
95
|
-
|
|
13
|
+
dsh plugin add https://github.com/f-e-n-g-0531/dsh-code-review.git
|
|
96
14
|
|
|
97
|
-
|
|
15
|
+
升级后确认当前 DSH 进程已经加载新版本。仓库发布新版本不会自动更新正在运行的 DSH;本项目也不会自动修改已有 profile 或重启宿主。
|
|
98
16
|
|
|
99
|
-
|
|
17
|
+
> 许可限制:本项目采用非商业源码公开许可证。公司内部商业项目、收费服务及商业交付需要另行取得书面授权。详见 [LICENSE](LICENSE)。
|
|
100
18
|
|
|
101
|
-
##
|
|
19
|
+
## 第一次使用
|
|
102
20
|
|
|
103
|
-
|
|
104
|
-
- DSH 提供 tools、llm 服务;当前已核对宿主 API,尚未承诺稳定跨版本兼容。
|
|
105
|
-
- Windows SVN 必须支持 UTF-8 路径;CI 对临时 SVN 工具设置 UTF-8 manifest,不修改用户安装的 SVN。
|
|
21
|
+
在目标仓库的 DSH Agent 会话中,可以这样提出请求:
|
|
106
22
|
|
|
107
|
-
|
|
23
|
+
> 审查 src/api.ts 和 src/client.ts 的改动。先展示审查范围和模型目的地,确认后再执行。不要修改代码。
|
|
108
24
|
|
|
109
|
-
|
|
25
|
+
插件提供两个工具:
|
|
110
26
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```
|
|
27
|
+
1. **code_review_preview**:读取本地变更,列出审查文件、额外上下文、排除原因和模型目的地。此步骤不调用模型。
|
|
28
|
+
2. **code_review_execute**:接收预览返回的 previewId 和 confirmed: true。执行前重新检查文件;只有预览仍有效且宿主允许执行时,才把批准内容发送给当前 Agent 模型。
|
|
114
29
|
|
|
115
|
-
|
|
30
|
+
调用示例:
|
|
116
31
|
|
|
117
|
-
|
|
32
|
+
{"selectedPaths":["src/api.ts","src/client.ts"],"autoContext":true}
|
|
118
33
|
|
|
119
|
-
|
|
34
|
+
执行参数为:
|
|
120
35
|
|
|
121
|
-
|
|
122
|
-
2. 可用 `selectedPaths` 精确选择变更文件;未跟踪文件必须显式选入。`contextPaths` 提供仓库相对路径的额外上下文。
|
|
123
|
-
3. 展示预览中的仓库范围、文件、排除原因及模型提供方。调用 `code_review_execute`,传入 `previewId` 和 `confirmed: true`。
|
|
124
|
-
4. DSH 正常工具权限机制决定是否调用执行入口;插件不另发审批请求,不读取never当作授权。执行会把预览快照发送至当前Agent模型,confirmed仅确认预览,不修改宿主权限。
|
|
125
|
-
5. 返回 `json`(结构化报告字符串)及 `markdown`(中文报告)。文件、模型或目录变化时需重新预览。
|
|
36
|
+
{"previewId":"预览返回的ID","confirmed":true}
|
|
126
37
|
|
|
127
|
-
|
|
38
|
+
执行返回中文 Markdown 报告,以及 JSON 格式的结构化报告。代码、会话目录或模型路由变化后,需要重新预览。
|
|
128
39
|
|
|
129
|
-
##
|
|
40
|
+
## 可以审查什么
|
|
130
41
|
|
|
131
|
-
|
|
42
|
+
| 场景 | 支持情况 |
|
|
43
|
+
|---|---|
|
|
44
|
+
| Git 工作区 | HEAD 与工作区的净变化,包含暂存和未暂存改动;没有单独的 staged/unstaged 模式 |
|
|
45
|
+
| Git 单个提交 | 使用 commit 参数;与唯一父提交比较,根提交与空旧版本比较。合并提交请使用区间模式 |
|
|
46
|
+
| Git 两个版本 | 使用 baseRevision 和 targetRevision;比较两个版本的文件树,不自动计算合并基点 |
|
|
47
|
+
| SVN 工作副本 | 本地 BASE 与工作副本比较,不连接远端;不支持 SVN 历史区间审查 |
|
|
48
|
+
| 多个子仓库 | 用 repositoryPath 指定会话工作区中的一个仓库根目录;每个仓库分别预览和执行 |
|
|
132
49
|
|
|
133
|
-
|
|
50
|
+
未跟踪文件必须通过 selectedPaths 显式选入。省略 selectedPaths 时,审查范围是仓库根目录的变更,不只是当前子目录。
|
|
134
51
|
|
|
135
|
-
|
|
52
|
+
## 常用参数
|
|
136
53
|
|
|
137
|
-
|
|
54
|
+
所有文件路径都相对于本次选定的仓库,使用正斜杠;不要使用绝对路径、上级路径或链接目录。
|
|
138
55
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
|
|
56
|
+
| 参数 | 用途 | 示例 |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| selectedPaths | 只审查选中的变更文件 | ["src/api.ts"] |
|
|
59
|
+
| repositoryPath | 指定工作区内的子仓库 | "project-a" |
|
|
60
|
+
| contextPaths | 手动加入理解代码所需的文件 | ["src/types.ts"] |
|
|
61
|
+
| autoContext | 自动寻找有限范围内的直接依赖;Git 工作区最多沿三层依赖链读取 | true |
|
|
62
|
+
| callerScopePaths | 在指定目录中寻找引用变更文件的代码 | ["src/clients"] |
|
|
63
|
+
| oldContextPaths | Git 历史审查中,只加入旧版本的上下文 | ["src/removed-helper.ts"] |
|
|
64
|
+
| rulePaths | 加入项目审查规则,最多四个 UTF-8 Markdown 或文本文件 | ["review-rules.md"] |
|
|
65
|
+
| businessRequirement | 提供业务要求;不是缺陷证据,也不会增加读取权限 | "请求失败时必须释放连接" |
|
|
66
|
+
| reviewRounds | 独立审查次数,1~3,默认 1;会增加模型调用量 | 2 |
|
|
149
67
|
|
|
150
|
-
|
|
68
|
+
commit 与 baseRevision/targetRevision 不能同时使用。oldContextPaths 只能用于 Git 历史审查。
|
|
151
69
|
|
|
152
|
-
|
|
70
|
+
自动上下文和引用方发现是保守的文本导航,不是编译器分析。动态导入、宏、重载、继承和实例方法可能无法解析;找到引用不等于证明函数实际被调用。Git 历史与 SVN 的自动依赖捕获目前仍限于直接依赖。
|
|
153
71
|
|
|
154
|
-
|
|
72
|
+
## 如何读报告
|
|
155
73
|
|
|
156
|
-
|
|
74
|
+
先看**覆盖情况和限制**,再看问题列表:
|
|
157
75
|
|
|
158
|
-
|
|
76
|
+
- completed:相应阶段完成,不表示代码绝对正确。
|
|
77
|
+
- partial:只完成部分工作;检查未完成文件、证据不足或预算限制。
|
|
78
|
+
- failed:审查执行失败,不是“审核通过”。
|
|
79
|
+
- cancelled:审查被取消。
|
|
159
80
|
|
|
160
|
-
|
|
161
|
-
npm ci --ignore-scripts
|
|
162
|
-
npm test
|
|
163
|
-
node scripts/host-smoke.mjs <DSH-checkout>
|
|
164
|
-
```
|
|
81
|
+
每个候选问题会保留位置、触发条件、影响和复核结果。复核可能支持、反驳、无法确定或未完成;被反驳的候选不会悄悄删除。程序会核对引用的位置和原文,但这不能代替人工判断缺陷是否成立。
|
|
165
82
|
|
|
166
|
-
|
|
83
|
+
额外上下文被读取,不等于它已作为主文件完成审查。没有发现问题,也不证明代码没有缺陷。
|
|
167
84
|
|
|
168
|
-
|
|
85
|
+
## 数据与安全
|
|
169
86
|
|
|
170
|
-
|
|
87
|
+
- 预览会在本地读取选定变更和上下文;确认执行后,这些内容可能发送给当前模型提供方。发送前请检查范围。
|
|
88
|
+
- 插件沿用 DSH 正常工具权限,不额外发起一套审批;confirmed 只确认预览,不能绕过宿主权限。
|
|
89
|
+
- 不执行项目代码、构建脚本或模型生成的 shell 命令。模型只能在批准的快照中查找、搜索和读取。
|
|
90
|
+
- 常见凭据路径会被排除,但普通源码也可能含秘密。路径过滤不能代替人工检查。
|
|
91
|
+
- 二进制、不能解码的文件、链接和超限内容会被阻断,不会自动截断后假装完成。
|
|
92
|
+
- SVN 的复制、替换、切换目录、外部工作副本、冲突及部分属性状态不受支持。含 svn:keywords 的文件也会被阻断,以免把关键字展开当作代码变化。
|
|
171
93
|
|
|
172
|
-
|
|
173
|
-
2. 确认包名 `@feng0531/dsh-code-review` 的所有权、版本号和分发许可;更新版本及锁文件,提交并推送同名 `vX.Y.Z` 标签。
|
|
174
|
-
3. 在 Actions → CI → Run workflow 选择该标签,设置 `publish: true`。四组测试全部通过后才进入发布任务。
|
|
175
|
-
4. 打包一次,在临时目录安装检查,然后先发布 npm,核对 registry 的 SHA-512 完整性,再用同一 tgz 和 SHA256SUMS.txt 创建 GitHub Release。
|
|
94
|
+
## 默认规模限制
|
|
176
95
|
|
|
177
|
-
|
|
96
|
+
| 项目 | 默认上限 |
|
|
97
|
+
|---|---|
|
|
98
|
+
| 变更文件 | 200 个 |
|
|
99
|
+
| 单文件 | 256 KiB |
|
|
100
|
+
| 全部快照 | 4 MiB |
|
|
101
|
+
| 额外上下文 | 共 20 个文件,手动与自动来源共享 |
|
|
102
|
+
| 单次模型输入 | 约 96 KiB |
|
|
103
|
+
| 一次审查的模型调用 | 100 次,多个审查阶段共享 |
|
|
178
104
|
|
|
179
|
-
|
|
105
|
+
大变更可以按保留原始行号的差异窗口分批分析;不能容纳的部分会明确标为未完成。详细读取、时间和发现预算见 [开发与发布指南](DEVELOPMENT.md)。
|
|
180
106
|
|
|
181
|
-
|
|
107
|
+
## 文档导航
|
|
182
108
|
|
|
183
|
-
|
|
109
|
+
- [版本变化](CHANGELOG.md):各版对使用者有何影响。
|
|
110
|
+
- [本次发布说明](RELEASE-NOTES.md):新版本内容、升级注意事项及限制。
|
|
111
|
+
- [开发与发布指南](DEVELOPMENT.md):测试、打包、发布和失败恢复。
|
|
112
|
+
- [核心能力对照](CORE-ALIGNMENT-TASKS.md):已具备能力与尚未完成的差距。
|
|
113
|
+
- [参考源码对照](CORE-SOURCE-INVENTORY.md):维护者使用的固定参考来源。
|
|
114
|
+
- [评测说明](https://github.com/f-e-n-g-0531/dsh-code-review/blob/main/evaluation/README.md):样本、试跑观察及其证据限制。
|
|
184
115
|
|
|
185
|
-
|
|
116
|
+
最新安装包与正式版本以 [npm](https://www.npmjs.com/package/@feng0531/dsh-code-review) 和 [GitHub Releases](https://github.com/f-e-n-g-0531/dsh-code-review/releases) 为准。发布与安装成功不代表真实模型的误报率或漏报率已经得到证明。
|
package/RELEASE-NOTES.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# v0.39.1 发布说明
|
|
2
|
+
|
|
3
|
+
## 本版解决什么问题
|
|
4
|
+
|
|
5
|
+
项目文档此前混入了大量开发过程、测试编号和内部术语,难以回答“怎么安装、怎么使用、有哪些限制”。本版重新组织文档,让使用说明、版本变化、开发流程和能力差距各自独立。
|
|
6
|
+
|
|
7
|
+
## 主要变化
|
|
8
|
+
|
|
9
|
+
- README 改为安装、第一次使用、常用参数、报告解读和安全限制。
|
|
10
|
+
- 发布说明与变更记录使用面向用户的描述,不再把流水线编号和校验日志混入功能介绍。
|
|
11
|
+
- 检查评测与能力对照文档,区分已完成、部分实现和未验证,删除过时的过程叙述。
|
|
12
|
+
- 发布流程使用本说明作为 GitHub Release 正文,避免自动生成的提交列表代替产品说明。
|
|
13
|
+
|
|
14
|
+
## 升级是否需要改用法
|
|
15
|
+
|
|
16
|
+
不需要。工具名称和参数保持不变;没有增加审批、模型配置或代码修改能力。新安装包保留 Git 工作区最多三层依赖上下文的能力,Git 历史与 SVN 仍只做直接依赖导航。
|
|
17
|
+
|
|
18
|
+
升级后请确认 DSH 已加载新包,并重新预览审查范围。旧预览不应用于升级后的执行。
|
|
19
|
+
|
|
20
|
+
## 验证与限制
|
|
21
|
+
|
|
22
|
+
发布前运行完整回归测试、安装包检查和 DSH 工具运行时检查;正式发布还需通过 Ubuntu、Windows 与 Node.js 22、24 的四个组合测试。
|
|
23
|
+
|
|
24
|
+
这些验证证明插件流程和边界符合测试预期,不证明真实模型的检出率或误报率。完整语义调用者、历史与 SVN 依赖链及部分语言指导仍未完成。
|
|
25
|
+
|
|
26
|
+
安装方法见 [README](README.md)。开发和安装包一致性验证方法见 [开发与发布指南](DEVELOPMENT.md)。
|
package/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ export function apply(ctx, config = {}) {
|
|
|
12
12
|
};
|
|
13
13
|
ctx.tools.register({
|
|
14
14
|
name: 'code_review_preview', description: 'Preview Git/SVN working-copy or Git commit/range review scope and model destination without sending source to a model. repositoryPath selects an explicit child repository relative to session workspace; file paths are repository-relative. Preview each repository separately. Show the preview before execution.',
|
|
15
|
-
parameters: { type: 'object', additionalProperties: false, properties: { reviewRounds: { type: 'integer', minimum: 1, maximum: 3, description: 'Explicit independent review passes, default 1. Preview discloses extra sends; later passes omit the first risk plan. Shares existing timeout, call and retrieval budgets, not provider reasoning effort. Bound to this preview; execute cannot override.' }, oldContextPaths: { type: 'array', maxItems: 20, items: { type: 'string' }, description: 'Explicit Git historical baseline-only blob context paths. Shares 20 context slots. No target text is inferred; selected old changes reuse their original identity, excluded changes cannot reenter. Unsupported on working reviews and SVN.' }, callerScopePaths: { type: 'array', minItems: 1, maxItems: 4, items: { type: 'string' }, description: 'Explicit non-root repository-relative directories for bounded tracked literal reverse import/include discovery. Git/SVN working review or Git fixed commit/range review. SVN uses offline normal nodes, rejects unsafe ancestor states and special/keyword properties. Historical sides share scan budgets and use object blobs only. Preview reads candidate bodies, including nonmatches; only captured matching context is sent. Navigation only, not complete caller coverage.' }, businessRequirement: { type: 'string', maxLength: 16384, description: 'Optional business constraint text up to 16KiB UTF8; untrusted data, not evidence or permission. Bound to preview and sent in review phases.' }, commit: { type: 'string', description: 'Git commit versus sole parent; root empty, merge requires range.' }, baseRevision: { type: 'string', description: 'Git old endpoint; requires targetRevision, mutually exclusive with commit.' }, targetRevision: { type: 'string', description: 'Git new endpoint, exact tree endpoints not merge-base. Explicit context uses target tree with available baseline provenance; oldContextPaths is baseline-only. Historical caller discovery scans fixed sides; explicit rules use target-tree blobs.' }, repositoryPath: { type: 'string', description: 'Workspace-relative explicit child Git/SVN repository root, forward slashes; omit for current repository.' }, selectedPaths: { type: 'array', items: { type: 'string' }, maxItems: 200 }, autoContext: { type: 'boolean', description: 'Opt in to
|
|
15
|
+
parameters: { type: 'object', additionalProperties: false, properties: { reviewRounds: { type: 'integer', minimum: 1, maximum: 3, description: 'Explicit independent review passes, default 1. Preview discloses extra sends; later passes omit the first risk plan. Shares existing timeout, call and retrieval budgets, not provider reasoning effort. Bound to this preview; execute cannot override.' }, oldContextPaths: { type: 'array', maxItems: 20, items: { type: 'string' }, description: 'Explicit Git historical baseline-only blob context paths. Shares 20 context slots. No target text is inferred; selected old changes reuse their original identity, excluded changes cannot reenter. Unsupported on working reviews and SVN.' }, callerScopePaths: { type: 'array', minItems: 1, maxItems: 4, items: { type: 'string' }, description: 'Explicit non-root repository-relative directories for bounded tracked literal reverse import/include discovery. Git/SVN working review or Git fixed commit/range review. SVN uses offline normal nodes, rejects unsafe ancestor states and special/keyword properties. Historical sides share scan budgets and use object blobs only. Preview reads candidate bodies, including nonmatches; only captured matching context is sent. Navigation only, not complete caller coverage.' }, businessRequirement: { type: 'string', maxLength: 16384, description: 'Optional business constraint text up to 16KiB UTF8; untrusted data, not evidence or permission. Bound to preview and sent in review phases.' }, commit: { type: 'string', description: 'Git commit versus sole parent; root empty, merge requires range.' }, baseRevision: { type: 'string', description: 'Git old endpoint; requires targetRevision, mutually exclusive with commit.' }, targetRevision: { type: 'string', description: 'Git new endpoint, exact tree endpoints not merge-base. Explicit context uses target tree with available baseline provenance; oldContextPaths is baseline-only. Historical caller discovery scans fixed sides; explicit rules use target-tree blobs.' }, repositoryPath: { type: 'string', description: 'Workspace-relative explicit child Git/SVN repository root, forward slashes; omit for current repository.' }, selectedPaths: { type: 'array', items: { type: 'string' }, maxItems: 200 }, autoContext: { type: 'boolean', description: 'Opt in to tracked literal import/include context shown in preview. Working Git follows at most 3 dependency layers under shared 512 exact probes, 20 candidates/context slots, 1MiB source and 30s verification budget. SVN and Git history remain direct navigation. Not semantic binding or complete definitions.' }, contextPaths: { type: 'array', items: { type: 'string' }, maxItems: 20 }, rulePaths: { type: 'array', items: { type: 'string' }, maxItems: 4 } } },
|
|
16
16
|
output,
|
|
17
17
|
async execute(args, exec) { const preview = await service.preview(args, exec); return { json: JSON.stringify(preview), markdown: '' }; },
|
|
18
18
|
});
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feng0531/dsh-code-review",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
|
|
7
7
|
"main": "./index.mjs",
|
|
8
8
|
"exports": { ".": "./index.mjs", "./package.json": "./package.json", "./locale/*.json": "./locale/*.json" },
|
|
9
|
-
"files": ["index.mjs", "cordis.patch.yml", "src/", "locale/", "README.md", "CHANGELOG.md", "LICENSE", "LICENSES/"],
|
|
9
|
+
"files": ["index.mjs", "cordis.patch.yml", "src/", "locale/", "README.md", "CHANGELOG.md", "RELEASE-NOTES.md", "DEVELOPMENT.md", "CORE-ALIGNMENT-TASKS.md", "CORE-SOURCE-INVENTORY.md", "LICENSE", "LICENSES/"],
|
|
10
10
|
"dsh": { "bundle": { "patch": "./cordis.patch.yml" } },
|
|
11
11
|
"repository": { "type": "git", "url": "https://github.com/f-e-n-g-0531/dsh-code-review.git" },
|
|
12
12
|
"type": "module",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {contextCandidates} from './context-candidates.mjs';
|
|
2
|
+
import {gitContextIndex} from './tracked-context.mjs';
|
|
3
|
+
import {readLocal} from './content.mjs';
|
|
4
|
+
// Fixed-depth literal navigation, not symbol binding. Never enumerate the repository.
|
|
5
|
+
export async function captureDependencyChain(root,files,options={}){
|
|
6
|
+
const signal=AbortSignal.any([AbortSignal.timeout(30000),...(options.signal?[options.signal]:[])]);
|
|
7
|
+
const scoped={...options,maxFileBytes:Math.min(options.maxFileBytes??256*1024,256*1024),signal},probes=new Set(),visited=new Set(files.map(f=>f.path)),context=[],candidates=[];
|
|
8
|
+
const reserved=new Set([...(options.contextPaths??[]),...(options.rulePaths??[])]),limit=Math.min(options.maxContextFiles??20,20);
|
|
9
|
+
let frontier=files,index,bytes=0,truncated=false,depth=0;
|
|
10
|
+
const onProbe=paths=>{for(const p of paths)probes.add(p);if(probes.size>512)throw new Error('Git context lookup limit exceeded');};
|
|
11
|
+
for(depth=1;depth<=3&&frontier.length;depth++){
|
|
12
|
+
signal.throwIfAborted();contextCandidates(frontier,[],{onProbe});
|
|
13
|
+
index=await gitContextIndex(root,{...scoped,probePaths:[...probes]});
|
|
14
|
+
const plan=contextCandidates(frontier,index.paths);truncated ||= plan.truncated;
|
|
15
|
+
const next=[];
|
|
16
|
+
for(const entry of plan.candidates){
|
|
17
|
+
if(visited.has(entry.path)||reserved.has(entry.path))continue;
|
|
18
|
+
visited.add(entry.path);const candidate={...entry,depth};candidates.push(candidate);
|
|
19
|
+
if(candidates.length>20)throw new Error('Dependency candidate limit exceeded');
|
|
20
|
+
if(context.length+new Set(options.contextPaths??[]).size>=limit){candidate.status='blocked';candidate.reason='Context file limit exceeded';continue;}
|
|
21
|
+
try{
|
|
22
|
+
const item={path:entry.path,...await readLocal(root,entry.path,scoped)};
|
|
23
|
+
bytes+=item.bytes;if(bytes>1024*1024)throw new Error('Dependency source byte limit exceeded');
|
|
24
|
+
context.push(item);candidate.status='captured';
|
|
25
|
+
next.push({path:item.path,eligibility:'reviewable',right:item});
|
|
26
|
+
}catch(error){signal.throwIfAborted();if(error.message==='Dependency source byte limit exceeded')throw error;candidate.status='blocked';candidate.reason=error.message;}
|
|
27
|
+
}
|
|
28
|
+
frontier=next;
|
|
29
|
+
}
|
|
30
|
+
if(frontier.length)truncated=true;
|
|
31
|
+
const indexOptions={...scoped,probePaths:[...probes]};
|
|
32
|
+
return {context,index,indexOptions,autoContext:{candidates,capturedPaths:context.map(c=>c.path),truncated,maxDepth:3,probeCount:probes.size,sourceBytes:bytes,notice:'Bounded current-side literal dependency navigation, depth <=3, 512 shared exact probes, 20 candidates/context slots, 1MiB source bytes and 30s through verification. Not symbol binding, caller coverage or complete definitions.'}};
|
|
33
|
+
}
|
package/src/snapshot.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {captureDependencyChain} from './dependency-chain.mjs';
|
|
1
2
|
import {captureSvnCallers} from './svn-caller-capture.mjs';
|
|
2
3
|
import { captureCallers } from './caller-capture.mjs';
|
|
3
4
|
import { validateCallerScopes } from './caller-index.mjs';
|
|
@@ -49,7 +50,10 @@ export async function captureSnapshot(cwd, options = {}) {
|
|
|
49
50
|
const rules = await captureProjectRules(snapshot.root, rulePaths, { signal: options.signal, files: snapshot.files });
|
|
50
51
|
const context = [];
|
|
51
52
|
let autoContext, index, indexOptions = options;
|
|
52
|
-
if (options.autoContext === true) {
|
|
53
|
+
if (options.autoContext === true && type==='git') {
|
|
54
|
+
const chain=await captureDependencyChain(snapshot.root,snapshot.files,options);
|
|
55
|
+
context.push(...chain.context);autoContext=chain.autoContext;index=chain.index;indexOptions=chain.indexOptions;
|
|
56
|
+
} else if (options.autoContext === true) {
|
|
53
57
|
if(type==='git'){const probes=new Set();contextCandidates(snapshot.files,[],{onProbe:paths=>{for(const p of paths)probes.add(p);if(probes.size>512)throw new Error('Git context lookup limit exceeded');}});indexOptions={...options,probePaths:[...probes]};}
|
|
54
58
|
index = await (type === 'git' ? gitContextIndex : svnContextIndex)(snapshot.root, indexOptions);
|
|
55
59
|
const plan = contextCandidates(snapshot.files, index.paths);
|
|
@@ -90,7 +94,7 @@ export async function captureSnapshot(cwd, options = {}) {
|
|
|
90
94
|
}
|
|
91
95
|
// Re-capture verifies both selected sides while collecting explicit context.
|
|
92
96
|
if ((await capture(cwd, options)).id !== snapshot.id) throw new Error('Snapshot changed while collecting context');
|
|
93
|
-
for (const item of context) if ((await readLocal(snapshot.root, item.path,
|
|
97
|
+
for (const item of context) if ((await readLocal(snapshot.root, item.path, indexOptions)).hash !== item.hash) throw new Error('Context changed during capture');
|
|
94
98
|
if (index && (await (type === 'git' ? gitContextIndex : svnContextIndex)(snapshot.root, indexOptions)).fingerprint !== index.fingerprint) throw new Error('Tracked context index changed during capture');
|
|
95
99
|
const verifiedRules = await captureProjectRules(snapshot.root, rulePaths, { signal: options.signal, files: snapshot.files });
|
|
96
100
|
if (JSON.stringify(verifiedRules) !== JSON.stringify(rules)) throw new Error('Rules changed during capture');
|