Repository navigation
feat(evidence): support Gitee and local-only repositories - #354
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (38)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 SummarySummaryRepository evidence is no longer limited to GitHub. The change adds Gitee links and Changed behavior
Compatibility impactExisting GitHub configuration and link behavior remain supported. Invalid origins, revisions, files, paths, and line ranges continue to fail validation. GitLab, Gitea, Forgejo, and Bitbucket web-link generation are not implemented; use ValidationThe author reports 1,041 tests, 24 browser tests, macOS package smoke testing, unchanged SVG comparisons, and a clean whitespace check. These results were not independently executed or verified from the current repository state. WalkthroughRepository evidence now supports GitHub and Gitee links, local-only verification, parsed remote identities, conditional source links, updated delta comparison, and regenerated rendered artifacts. ChangesRepository evidence portability
Priority: ➖ Normal — Impact reflects medium issue severity. Estimated code review effort: 4 (Complex) | ~60 minutes Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Repository evidence portability, local-only rendering, and regenerated artifacts have no remaining actionable merge risk. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Warning Some tools did not complete. Review the errors below. 🔧 ast-grep (0.45.2)docs/gallery/artifacts/release-delivery.workflow.htmlast-grep timed out on this file docs/gallery/artifacts/incident-response.workflow.htmlast-grep timed out on this file docs/gallery/artifacts/deployment-release.lifecycle.htmlast-grep timed out on this file
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed a3f6058 against the agreed scope of #143 and #301: preserve GitHub behavior, support Gitee web links, and provide verified local-only evidence for other Git hosts without guessing web URLs.
No blocking findings. Independently ran repository-evidence and architecture-delta tests with Chrome enabled: 42 passed, 0 failed, 0 skipped. Inspected the rendered GitHub, Gitee, and local-only source panels. Origin, pinned commit, file/path and line validation remain enforced. All 10 current-head CI checks passed. Remote repository accessibility is not claimed by local evidence validation.
Problem and value
Closes #143. Fixes #301.
目前,即使本地仓库中的提交、文件和行号都正确,Gitee 或自建 Git 仓库仍会因为地址不是 GitHub 而无法使用源码证据。
这次把“检查本地源码”与“生成网页链接”分开:
link_mode: "local-only"。图中仍显示已验证的SRC、文件路径和行号,也能搜索路径,但不生成可能错误的网页链接。支持 repository-evidence: identity binding is hard-coded to github.com, blocking self-hosted Git (Gitea/GitLab/Forgejo) #301 提到的 HTTP Gitea 地址。例如,自建仓库可这样声明:
{ "repository": { "url": "http://git.internal:3000/Team/service.git", "revision": "<完整的 40 位提交 SHA>", "link_mode": "local-only" } }本次范围沿用 #143 的首期方向:网页链接先支持 GitHub/Gitee,其他平台先提供本地校验。与 issue 中省略 URL 的示例不同,
url在 local-only 中仍必填,用来确认本地 origin 对应的是声明的仓库。无 origin、多仓库绑定和其他平台的网页链接不在本次范围内。完整规则见 authoring contract。Stability impact
provider、link_mode,调整地址校验和共享 Viewer;render、validate、deliver、preview、compare使用一致的仓库身份规则。.git后缀或不同路径是否等价。审核发现的两个误判已修复:git@host:Team/repo与ssh://git@host/Team/repo不再被当成同一位置;SCP 地址里的repo%41不再被误解为repoA。凭据不进入生成内容或失败诊断。Tests run
比较基线:
7ce87eff8e43e91069d43ed642f8845130e090c8(已包含 #325)。候选提交:a3f6058c76cc234f35504745544ab2172f3f431e。以下本地验证对应最终源码和生成内容,环境为 macOS、Node 22.23.1。cd archify && npm testARCHIFY_CHROME="/path/to/chrome" node --test test/repository-evidence.test.mjs test/desktop-reader-browser.test.mjs(在archify/)archify.zip后运行node scripts/package-smoke.mjs <解压目录>/archifygit diff upstream/main...HEAD --check两处审核问题均有先失败、修复后通过的 CLI 回归;Compare 另覆盖地址规范化后的重复解析。四个方向的子代理审核后,原安全性和规格问题已分别复审关闭。回归用例。
消融检查:移除不必要的提交链接包装函数后测试仍通过,保持删除;尝试移除相对/绝对路径区分后,CLI 和 Compare 两个回归失败,因此恢复该检查,最终测试通过。
已确认最终提交的 远端 CI 已启动。创建 PR 后首次核对时,ZIP freshness 和 published update manifest 已通过;Node 18/20/22/24、跨平台包测试及其余任务仍排队或运行中,CodeRabbit 等待结果。尚不宣称全部 CI 通过。
Visual evidence
SRC标记、路径搜索、行号、仓库链接和来源链接。预期变化是 local-only 来源显示为普通文本,GitHub/Gitee 仍可点击;图形内容保持不变。src/router.js。archify-evidence-repo-*下保留github.html、gitee.html、local-only.html,可打开这三个文件按相同条件人工比较。Generated artifacts
从合并最新 main 后的源码重建:schema 预编译校验器、两处打包示例、手写 web-app 示例的共享模板部分、Checkout Compare HTML/收据、Gallery 的 11 个页面及索引、README 演示 GIF/收据,以及
archify.zip(Node 22,78 个文件)。手写示例的 SVG 保留不变。使用现有
render-examples、build-gallery、compare、build-readme-showcase和build-zip脚本;Gallery 为 99 项检查通过,演示 GIF 为 54 帧。Guide/Start 的输入未变,完整测试中的 freshness 检查通过,因此不重建无关输出。