Skip to content

emrg: Phase 4 核心改造 resolve_git_gh + R86 打包判定 + 模板注入(rant #12 §6/§9/§13) - #362

Merged
argszero merged 1 commit into
masterfrom
feature/phase4-core-git-utils
Aug 4, 2026
Merged

emrg: Phase 4 核心改造 resolve_git_gh + R86 打包判定 + 模板注入(rant #12 §6/§9/§13)#362
argszero merged 1 commit into
masterfrom
feature/phase4-core-git-utils

Conversation

@argszero

@argszero argszero commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Phase 4 一键安装包(rant #12)第 3 期:核心代码改造。

改动

  • emrg/server/git_utils.py:新增 resolve_git_gh()(install-info.json 缓存 → ~/.emrg/install/bin 捆绑 → shutil.which 兜底)、git_cmd()(用解析出的 git 二进制执行)、Windows git 路径(install/git/cmd/git.exe)
  • emrg/server/scheduler.py:_build_evolution_prompt 注入 {{ git_path }}/{{ gh_path }}(jinja2.Undefined 兼容旧模板)
  • emrg/main.py:_find_source_dir R86 修复——只查包父目录 .git,绝不 fallback cwd(打包模式用户在任何 git repo 跑 emrg update 不再误操作);_run_update 打包模式提示从 GitHub Releases 下载

验证:resolve_git_gh 返回正确路径(brew git/gh);git_cmd OK;_find_source_dir 正确;pytest 464 passed

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 4(核心改造:resolve_git_gh 三级解析 + R86 打包判定 + 模板注入,测试全绿)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 5(核心改造复核:三级解析/缓存/R86 判定正确)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 6(第 3 个 LGTM,满足合并条件)

@argszero
argszero merged commit 8eb3672 into master Aug 4, 2026
1 check passed
@argszero
argszero deleted the feature/phase4-core-git-utils branch August 4, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant