refactor: single-source hash-avoid prompts + official npm registry#181
Conversation
- Add shared/prompts/hash-avoid-zh.txt and hash-avoid-en.txt as the single source of truth for hash-number avoidance instructions. - Consistency tests now compare both TS (reviewers.ts) and Python (run-github-opencode.py) inline definitions against the shared files, eliminating fragile cross-language regex comparison. - Add multi-review/.npmrc to pin registry.npmjs.org, removing dependency on local npmmirror configuration. Regenerated package-lock.json.
|
有条件合并 本 PR 将 hash-avoid 提示文案集中到 阻塞项:
建议项:
📋 各 Reviewer 详细审查结果quality我需要先查看实际文件来验证 PR 的内容。 本 PR 将 hash-avoid 提示文案提取到 阻塞项:
建议项:
security安全无虞 本 PR 为依赖与配置优化类变更,不涉及业务代码改动:
阻塞项:无 performance性能良好 本 PR 主要是:
阻塞项:无 建议项:
architecture架构有疑虑 本次 PR 的核心改动是在仓库根新增 架构层面观察:
阻塞项:
建议项:
|
- Restore assertIsNotNone semantics via raise AssertionError (not stripped by -O)
- Remove leading empty line from shared prompt files; use .strip("\n")
and .lstrip("\n") to decouple file format from inline text
- Fix docstring: clarify this is a test-side anchor, not runtime SSOT
- Add shared/README.md documenting directory purpose and conventions
审计分析PR #XXX 规范要求(来自 PR 标题与正文,无关联 issue):
实现核对:
关于 review 评论:评论中提及的若干项( 无遗漏 PR 规范中的全部功能项(单一真源文件、跨语言一致性测试改造、 |
|
可合并 总结:本 PR 将 阻塞项:无 建议项:
📋 各 Reviewer 详细审查结果quality(审查失败: fetch failed) security安全无虞 本 PR 的主要变更:
安全分析:
阻塞项:无 建议项:
performance性能良好 本 PR 主要内容是:1) 创建 阻塞项:无 建议项:
architecture架构有疑虑 架构分析:
但"shared 文件仅供测试使用、运行时仍由 TS/Python 各自硬编码"这一设定在架构上存在疑问:原实现是"两份实现 + 双向一致性测试",改动后变成"两份运行时实现 + 一份测试侧参考文件 + 三方一致性测试",共享文件并没有消除重复,反而引入了第三个需要手动同步的副本;README 又将其称为"canonical reference",容易给后续维护者造成"应以 shared/ 为准"的误解。建议要么真正将 TS/Python 改造为运行时从 阻塞项:无 建议项:
|

Summary
Addresses the two remaining architecture/infrastructure suggestions from PR #178 review.
Changes
1. Single-source hash-avoid prompts (
shared/prompts/)shared/prompts/hash-avoid-zh.txtandshared/prompts/hash-avoid-en.txtas the single source of truthreviewers.ts) and Python (run-github-opencode.py) inline definitions against these shared files2. Official npm registry (
multi-review/.npmrc)multi-review/.npmrcwithregistry=https://registry.npmjs.org/package-lock.jsonresolved against the developer's localnpmmirror.comconfig (138 references)Testing
tsc --noEmit)