fix(coexist): 新炼境接管项目文件后,旧炼境的模板分发、蓝图规则同步与 buff 轮询跳过该项目 #47
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/files-managed-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
为什么
共存期新旧炼境会来回覆盖同一批托管文件(AGENTS.md、CLAUDE.md、lian-jing 技能、CONVENTIONS、任务卡)。新炼境(lian-jing-next)接管某个项目时,会在
.lian-jing/context.json写files_managed_by="lian-jing-next";旧炼境需要据此跳过该项目。设计见 lian-jing 仓库docs/tasks/2026-10-06-file-distribution-design.md§4。改了什么(+86 行)
mcp_inject.rs:files_managed_by_next(root)守卫(只读;文件缺失或不合法时视为未接管)dispatch_templates_with、sync_blueprint_rules_with、buffcheck_projectwrite_canonical_context_with)本来就保留未知字段,加测试锁定接管标记不会被抹掉agent 自验
cargo test --lib:417 passed,0 failedfiles_managed_by_next_guard_reads_context_and_survives_identity_rewrite、dispatch_skips_projects_managed_by_next、sync_skips_projects_managed_by_next没验什么
check_project的调用点没有单测(它需要 AppHandle),与另两处共用同一个守卫函数human_verify
🤖 Generated with Claude Code