Repository navigation
fix(docs): remove stale local documents during pull - #817
Merged
Merged
Conversation
Yong-yuan-X
marked this pull request as ready for review
September 24, 2026 15:50
PR 描述已包含构建后真实 CLI 端到端验证记录,测试说明符合要求。 |
先前提出的文件/目录类型切换冲突已通过暂存替换及回滚逻辑修复,不再重复提出。PR 描述包含构建后的真实 CLI 端到端验证记录,测试说明符合要求。 |
|
未发现新的确定性问题。
|
jeff-r2026
approved these changes
Sep 24, 2026
SaulMoro
added a commit
to SaulMoro/teamai-cli
that referenced
this pull request
Sep 24, 2026
Merges Tencent#817 (docs mirror), Tencent#788/Tencent#790 and Tencent#809/Tencent#813. The docs mirror now targets the member's resolved docs set: it copies only the delivered files and prunes every local entry the team repo does not have, but a local copy of a team doc in an inactive namespace follows the Tencent#707 rule (removed when byte-equal, kept and named when edited). Withdrawal runs inside the mirror, after the single-repo early return, so it never deletes from the team repo's own docs/. Doctor expects the delivered set and does not report a withheld namespace's team doc as stale. Tencent#817's failure handling (docsSyncFailed, cleared revision, result.completed) is kept.
6 of 9 tasks
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
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.
Summary
修复 docs 同步只增不删的问题:团队库删除文档后,普通
teamai pull会同步删除sharing.docs.localDir中的旧文件,包括嵌套文档、最后一篇文档及整个 docs 目录被删除的情况,无需新增参数或配置。docs 同步失败时不再误报成功,后续资源仍继续同步,并清除同步版本标记以便下次 pull 重试。
teamai doctor同时检查缺失与过期文档,包括团队文档已删空但本地仍有残留的情况。同步更新中英文使用指南和 core skill 的简短行为说明,相关单测归并到
docs.test.ts。Type of Change
Test Plan
本地 Windows 环境已完成:
npx tsc --noEmitnpm run build回归测试覆盖:
Real CLI Verification
构建后,在隔离 HOME、本地 Git 远端及 Claude 工具目录环境中,执行实际
dist/index.js pull和doctor --json:以上流程没有使用 prune 开关
Related Issues
Fixes #794
Notes for Reviewers
localDir应为专用文档目录:镜像同步也会删除本地独有的非隐藏草稿。teamai pull --force清理历史残留。