Why: svc.sh update skipped services with a local@<sha> source whenever the
main checkout was dirty, and bare deploy built the current workspace. The
owner requires updates/deploys to be independent of the working tree
state, defaulting to the latest remote commit built outside the checkout.
Evidence: bash -n passes; commits dev lists from the source clone; bare
deploy --dry-run plans dev@<origin/main>; end-to-end "svc.sh update
svc-selftest" with a dirty tree updated a local@d64742c service to
dev@0be23f9 (built in runtime/.worktrees from
~/.cache/agent-system-svc/src, started healthy), then stopped and purged.
Full make test output recorded on the task card.
Impact: deploy now defaults to dev@<origin/main> resolved in the
script-owned clone (SVC_SRC_DIR, default ~/.cache/agent-system-svc/src);
--from local stays the only workspace-dependent source; update no longer
pulls the main checkout - local@/dev@ services redeploy from remote
latest, ahead/diverged/missing-on-remote still decline to act.
docs/svc.md and in-script help updated to match.
Refs: .task/svc-remote-source.md
Why: the isolated-source deploy change was finished but never merged, and
the task card had no PR link.
Evidence: the only content conflict was the shared sync-log card; both
rows kept. scripts/svc.sh merged cleanly. PR link recorded as Dev #102.
Impact: branch now contains origin/main. Deploy semantics unchanged.
Refs: https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/102
Co-authored-by: Cursor <cursoragent@cursor.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
feature/svc-remote-source 任务卡
任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen
基线与授权
f65d89e59bmodules/frontend子模块修改态,前端重设计进行中),task.sh start按门禁硬拒。owner 在任务对话中明确指示本任务并要求"更新/部署不依赖当前仓库状态",即 collaboration.md 的"经 owner 确认"路径;本工作区由 Agent 以与 task-start 完全相同的命令手动建立(同 R0、同命名、子模块零漂移),全程未写主检出、未触碰该未提交现场。scripts/svc.sh与docs/svc.md(实现 + 文档),验证后推送并建 PR;不合并(合入由 owner 决定);不动主检出modules/frontend现场。目标与非目标
背景:
scripts/svc.sh update dev在主检出工作树不干净时跳过更新("主检出工作树不干净——跳过")。owner 明确要求:更新、部署等操作不应依赖当前仓库状态;不指定时默认使用最新仓库;构建放在独立于当前仓库/目录的地方。目标:
~/.cache/agent-system-svc/src,SVC_SRC_DIR覆盖;可随时删除重建),dev 源的解析、列举(commits)、worktree 物化全部基于它。deploy与--from dev(不带 @sha)= 源仓origin/main最新提交;--from local保留为显式"构建当前工作区"。update去 pull 化:删除"local 源 → 主检出 pull(要求分支=main + 树干净)"路径;local@/dev@源一律重新部署为dev@<远端最新>(隔离 worktree 构建),与工作区脏净/所在分支无关。领先/分叉/提交不在远端三种情形仍不动作(不盲目降级)。update的 fetch 也走源仓(不再 fetch 主检出);commits dev列表改为源仓origin/main(自动确保+fetch),[HEAD]标记改为[最新]。help各主题、docs/svc.md(§2/§5/§6.3/§9.3/§11/§13/§14)。非目标:不改
--from local语义与实现;不改 release 源、数据库、生命周期、dbops 行为;不动 Makefile。同步记录
f65d89e59bf65d89e59b结果与验证
结果:已实现(提交 a42fff6)。svc.sh 新增独立部署源仓(
SVC_SRC_DIR,默认~/.cache/agent-system-svc/src,可随时删除重建):dev 源的提交解析、commits列举、worktree 物化全部基于它;裸
deploy与--from dev缺省取源仓origin/main最新;update删除"主检出 pull(要求分支=main+树干净)"路径,local@/dev@源一律重新部署为
dev@<远端最新>(领先/分叉/提交不在远端三种情形仍不动作);docs/svc.md与脚本 help 各主题同步更新。
验证:
bash -n scripts/svc.sh通过;help/help lifecycle渲染正常;scripts/svc.sh commits dev:首次自动克隆源仓并 fetch,列表来自源仓 origin/main,顶提交标
[最新];deploy --dry-run(无--from):计划dev@0be23f9(源仓远端最新);修改)并手工登记
source=local@d64742c的服务,scripts/svc.sh update svc-selftest直接更新成功:
local@d64742c → 0be23f9,从源仓物化隔离 worktree 构建(npm ci +vite + go build),服务启动健康(pid 1228696,http://127.0.0.1:8812,来源
dev@0be23f9,版本组合完整),全程未触碰工作区;随后 stop + rm --purge 清理,worktree 无残留;
make task-sync:sync_base=0be23f9a4d,tested_head=87cc6b3b55(并入 PR #101 后组合);make test全绿(core ok;backend 全部 ok 含 server 4.8s;frontend 5 文件 33 用例;ui 7 文件 49 用例;agentcmd ok),退出码 0。
影响与剩余项:
--from local;update不再依赖主检出状态,owner 遇到的"工作树不干净——跳过"场景消除。
serve -h探测不到--auth会自动省略该flag(0be23f9 产物即如此),与旧版行为一致,健康检查通过。