Compare commits
No commits in common. "ed2b95b90dffb92d694a2981762a735ee3720b9c" and "246d562b15523a6cb9fa25011a0b74aa81637d2d" have entirely different histories.
ed2b95b90d
...
246d562b15
@ -429,10 +429,10 @@ modules:
|
|||||||
- id: dsh-takeover-readiness
|
- id: dsh-takeover-readiness
|
||||||
name: DSH 接管准备
|
name: DSH 接管准备
|
||||||
area: backend
|
area: backend
|
||||||
status: in_progress
|
status: planned
|
||||||
progress: 30
|
progress: 0
|
||||||
updated: 2026-09-11
|
updated: 2026-09-11
|
||||||
note: "T1 记忆审计(24 条全定态,3 条回流 AGENTS/cicd-workflow,3 条过期删除)+ T2 CI commit 校验(探针实测红→绿)当日收官;T3-T7 挂触发器(信任期开启/接管时点/V4.1 Pro)。协作模式=指挥 DSH 干活 + Claude 调教(调教落文件)"
|
note: "四层方法论沿用 enterprise 同名模块;协作模式=指挥 DSH 干活 + Claude 调教(调教落文件)。当下只做 T1 记忆审计 / T2 CI commit 校验(有实锤背书),T3-T7 挂触发器(信任期开启/接管时点/V4.1 Pro)"
|
||||||
position: [2500, 150]
|
position: [2500, 150]
|
||||||
|
|
||||||
- id: mcp-single-server
|
- id: mcp-single-server
|
||||||
|
|||||||
@ -13,17 +13,6 @@ CI/CD 配置管理和 GitHub Actions Workflow 文件生成。支持两种部署
|
|||||||
> 炼境自身发版链路经本机 act_runner 实测跑通(v0.1.16 上线 OSS,见 gitea-integration R0 复盘)。
|
> 炼境自身发版链路经本机 act_runner 实测跑通(v0.1.16 上线 OSS,见 gitea-integration R0 复盘)。
|
||||||
> 「Actions 运行历史」待 PR/CI 事件联动落地后按 Gitea 事实源重建(concept 卡在 gitea-integration)。
|
> 「Actions 运行历史」待 PR/CI 事件联动落地后按 Gitea 事实源重建(concept 卡在 gitea-integration)。
|
||||||
|
|
||||||
## 本机 CI runner 速查(2026-09-11 自 Claude 私有记忆回流;CI 排障先读这里)
|
|
||||||
|
|
||||||
- 拓扑:公网 Gitea + 内网本机 runner(出站拉任务,无需入站)
|
|
||||||
- 安装位置:`C:\Users\yangzhixiang\act_runner\`(act_runner.exe v0.2.13 + config.yaml + .runner + runner.log)
|
|
||||||
- 注册身份:`lianjing-win`,标签 `windows:host`(host 模式,直接用本机工具链)
|
|
||||||
- 关键配置(config.yaml):`docker_host: "-"` + `labels: ["windows:host"]`——默认生成的 docker labels 会导致 daemon 拒启
|
|
||||||
- 启动:`act_runner.exe daemon -c config.yaml`;开机自启靠启动文件夹 `act_runner.vbs`(隐藏窗口,日志追加 runner.log)
|
|
||||||
- 排障:日志级别 trace 时 step 输出全落 runner.log,可直接定位构建失败;工作目录 `C:/Users/yangzhixiang/act_runner/work`
|
|
||||||
- **Gitea 1.22.6 无 `/actions/runs` REST API**:查 CI 结果用 `GET /repos/{o}/{r}/commits/{sha}/statuses`;迁移创建的仓库默认关 Actions 单元(`PATCH /repos/{o}/{r} {"has_actions":true}` 开启)
|
|
||||||
- 签名密钥:`~/.tauri/dev-manager-tauri.key`(2026-07-02 换钥,旧钥 .old-locked 备份),密码双写 Gitea Secrets + 炼境密钥凭据库(密钥类 secret 单一存储 = 定时炸弹)
|
|
||||||
|
|
||||||
## 任务卡
|
## 任务卡
|
||||||
|
|
||||||
### ✅ CI/CD 配置 CRUD
|
### ✅ CI/CD 配置 CRUD
|
||||||
|
|||||||
@ -29,28 +29,21 @@
|
|||||||
|
|
||||||
## 任务卡
|
## 任务卡
|
||||||
|
|
||||||
### ✅ T1 记忆审计回流 · complexity: S · status: done (2026-09-11)
|
### 📋 T1 记忆审计回流 · complexity: S
|
||||||
- 内容:Claude 私有 memory(24 条)逐条核对 repo/.blueprint 落点,无落点的知识回流进
|
- 内容:Claude 私有 memory(24 条)逐条核对 repo/.blueprint 落点,无落点的知识回流进
|
||||||
`.blueprint/` 或 docs(DSH 看不到 Claude memory,泄漏 = 接管后重踩坑;enterprise T1
|
`.blueprint/` 或 docs(DSH 看不到 Claude memory,泄漏 = 接管后重踩坑;enterprise T1
|
||||||
实锤事故背书:memory 泄漏连错两轮)。重点核对 project_* 与 reference_* 类
|
实锤事故背书:memory 泄漏连错两轮)。重点核对 project_* 与 reference_* 类
|
||||||
(gitea 统一架构、飞轮战略、act_runner 部署、MCP 注册坑)
|
(gitea 统一架构、飞轮战略、act_runner 部署、MCP 注册坑)
|
||||||
- files: `C:/Users/yangzhixiang/.claude/projects/E--code-project-dev-manager-tauri/memory/`(读)、
|
- files: `C:/Users/yangzhixiang/.claude/projects/E--code-project-dev-manager-tauri/memory/`(读)、
|
||||||
`.blueprint/modules/*.md`、`docs/ai-context/`(写)
|
`.blueprint/modules/*.md`、`docs/ai-context/`(写)
|
||||||
- acceptance: `[人工+grep] 逐条 memory 给出「已有落点(路径)/已回流(commit)/仅 Claude 相关无需回流」三态清单,无遗留未定态` ✅
|
- acceptance: `[人工+grep] 逐条 memory 给出「已有落点(路径)/已回流(commit)/仅 Claude 相关无需回流」三态清单,无遗留未定态`
|
||||||
- 结果:24 条全部定态——已有落点 14 / 已回流 3+1 部分(炼境信号采集层红线、127.0.0.1 网络律、
|
|
||||||
未提交改动处置 → AGENTS.md「设计红线与本机事实」节;act_runner 运维细节 → cicd-workflow.md
|
|
||||||
「本机 CI runner 速查」节)/ 仅 Claude 相关 3(user_profile、CID 否决评估、Claude hooks 坑)/
|
|
||||||
过期删除 3(git_commit 署名禁令与现实矛盾、mcp_debug 被 registration 结论取代、dashboard_redesign 方向已弃)
|
|
||||||
|
|
||||||
### ✅ T2 CI 加 commit message 校验 · complexity: S · status: done (2026-09-11)
|
### 📋 T2 CI 加 commit message 校验 · complexity: S
|
||||||
- 内容:Conventional 格式 + `Feature-Confirmed` trailer 校验加入 `pr-check.yml`
|
- 内容:Conventional 格式 + `Feature-Confirmed` trailer 校验加入 `pr-check.yml`
|
||||||
(服务端强制;enterprise 实锤 lefthook 在 DSH workspace-write 沙箱内静默失效——
|
(服务端强制;enterprise 实锤 lefthook 在 DSH workspace-write 沙箱内静默失效——
|
||||||
非法 message 探针 commit 成功落库,本卡为机器层硬补偿,对 Claude 时代也是纵深防御)
|
非法 message 探针 commit 成功落库,本卡为机器层硬补偿,对 Claude 时代也是纵深防御)
|
||||||
- files: `.gitea/workflows/pr-check.yml`、`.gitea/scripts/check-commit-msg.mjs`
|
- files: `.gitea/workflows/pr-check.yml`
|
||||||
- acceptance: `[CI] 推一个 message 非法的 commit 到 feat 分支 → CI 失败并指明格式问题;合法 commit 通过` ✅
|
- acceptance: `[CI] 推一个 message 非法的 commit 到 feat 分支 → CI 失败并指明格式问题;合法 commit 通过`
|
||||||
- 验收留痕:run 74 探针 commit 35df41f2 被点名拦截(日志「首行不符合 Conventional Commits」),
|
|
||||||
移除探针后 1c3133c 全绿(校验+typecheck+test)。新分支首推的 origin/master..HEAD 兜底路径实证生效;
|
|
||||||
校验范围含 force push 后 before 不可达的退化链(fetch master → 仅 HEAD),该分支仅本地用例覆盖
|
|
||||||
|
|
||||||
### 📋 T3 DSH 接入炼境 · complexity: S · 触发:信任期开启日
|
### 📋 T3 DSH 接入炼境 · complexity: S · 触发:信任期开启日
|
||||||
- 内容:`~/.dsh/cordis.patch.yml` 挂 lian-jing MCP(炼境 server 双传输,走 streamable-http
|
- 内容:`~/.dsh/cordis.patch.yml` 挂 lian-jing MCP(炼境 server 双传输,走 streamable-http
|
||||||
|
|||||||
@ -1,67 +0,0 @@
|
|||||||
// CI 侧 commit message 校验:Conventional Commits + feat 须带 Feature-Confirmed trailer。
|
|
||||||
// 与 lefthook commit-msg 同一套规则的服务端硬补偿——agent 沙箱(如 DSH workspace-write)
|
|
||||||
// 内 lefthook 会静默失效,本脚本保证机器校验层不缺位(dsh-takeover-readiness T2)。
|
|
||||||
// 环境变量:EVENT_NAME / BEFORE_SHA / BASE_SHA / HEAD_SHA(由 workflow 从 github context 注入)
|
|
||||||
import { execSync } from 'node:child_process';
|
|
||||||
|
|
||||||
const git = (cmd) => execSync(`git ${cmd}`, { encoding: 'utf8' }).trim();
|
|
||||||
|
|
||||||
const CONVENTIONAL =
|
|
||||||
/^(feat|fix|docs|chore|refactor|ci|perf|style|test|build|revert)(\(.+\))?!?: .+/;
|
|
||||||
const ZERO_SHA = /^0+$/;
|
|
||||||
|
|
||||||
const { EVENT_NAME, BEFORE_SHA, BASE_SHA, HEAD_SHA } = process.env;
|
|
||||||
|
|
||||||
let range;
|
|
||||||
if (EVENT_NAME === 'pull_request' && BASE_SHA) {
|
|
||||||
range = `${BASE_SHA}..${HEAD_SHA}`;
|
|
||||||
} else if (BEFORE_SHA && !ZERO_SHA.test(BEFORE_SHA)) {
|
|
||||||
range = `${BEFORE_SHA}..${HEAD_SHA}`;
|
|
||||||
} else {
|
|
||||||
// 新分支首推等场景拿不到 before:与 master 比对兜底,再退化为仅查 HEAD
|
|
||||||
try {
|
|
||||||
git('fetch origin master --quiet');
|
|
||||||
range = `origin/master..${HEAD_SHA || 'HEAD'}`;
|
|
||||||
} catch {
|
|
||||||
range = `${HEAD_SHA || 'HEAD'} -1`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let shas;
|
|
||||||
try {
|
|
||||||
shas = git(`rev-list --no-merges ${range}`).split('\n').filter(Boolean);
|
|
||||||
} catch {
|
|
||||||
// force push 后旧 before 在 clone 里不存在等场景:退化为与 master 比对,再退化为仅查 HEAD
|
|
||||||
try {
|
|
||||||
git('fetch origin master --quiet');
|
|
||||||
range = `origin/master..${HEAD_SHA || 'HEAD'}`;
|
|
||||||
shas = git(`rev-list --no-merges ${range}`).split('\n').filter(Boolean);
|
|
||||||
} catch {
|
|
||||||
range = 'HEAD -1';
|
|
||||||
shas = [git('rev-parse HEAD')];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
console.log(`commit message 校验:范围 ${range},共 ${shas.length} 个 commit`);
|
|
||||||
|
|
||||||
const errors = [];
|
|
||||||
for (const sha of shas) {
|
|
||||||
const subject = git(`log -1 --format=%s ${sha}`);
|
|
||||||
if (!CONVENTIONAL.test(subject)) {
|
|
||||||
errors.push(`${sha.slice(0, 8)} 首行不符合 Conventional Commits:${subject}`);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (/^feat/.test(subject)) {
|
|
||||||
const body = git(`log -1 --format=%B ${sha}`);
|
|
||||||
if (!body.includes('Feature-Confirmed: true')) {
|
|
||||||
errors.push(`${sha.slice(0, 8)} feat 提交缺少 "Feature-Confirmed: true" trailer:${subject}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errors.length > 0) {
|
|
||||||
console.error('\n❌ commit message 校验失败:');
|
|
||||||
for (const e of errors) console.error(` ${e}`);
|
|
||||||
console.error('\n 规则:首行须为 <type>(<scope>): <subject>;feat 提交末尾须有 Feature-Confirmed: true');
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
console.log('✅ commit message 校验通过');
|
|
||||||
@ -12,8 +12,6 @@ jobs:
|
|||||||
runs-on: windows
|
runs-on: windows
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
@ -25,15 +23,6 @@ jobs:
|
|||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
# 服务端 commit message 校验(lefthook 在 agent 沙箱内会静默失效,此为机器层硬补偿)
|
|
||||||
- name: Commit message 校验
|
|
||||||
env:
|
|
||||||
EVENT_NAME: ${{ github.event_name }}
|
|
||||||
BEFORE_SHA: ${{ github.event.before }}
|
|
||||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
||||||
HEAD_SHA: ${{ github.sha }}
|
|
||||||
run: node .gitea/scripts/check-commit-msg.mjs
|
|
||||||
|
|
||||||
- run: pnpm install --frozen-lockfile
|
- run: pnpm install --frozen-lockfile
|
||||||
- run: pnpm typecheck
|
- run: pnpm typecheck
|
||||||
- run: pnpm test
|
- run: pnpm test
|
||||||
|
|||||||
11
AGENTS.md
11
AGENTS.md
@ -268,17 +268,6 @@ docs/templates/ 炼境接入包模板草案(设计层)
|
|||||||
人只保留两件事:**需求澄清(目标定义权)** 和 **目标验收(终验权)**。
|
人只保留两件事:**需求澄清(目标定义权)** 和 **目标验收(终验权)**。
|
||||||
完整体系设计见 `docs/ai-context/agent-button-system.md`。
|
完整体系设计见 `docs/ai-context/agent-button-system.md`。
|
||||||
|
|
||||||
### 炼境设计红线与本机事实(2026-09-11 自 Claude 私有记忆回流,任何 agent 均须遵守)
|
|
||||||
|
|
||||||
- **炼境 = 信号采集层,不是评判层**:炼境只采集与呈现信号(git 提交自动标 🔵),
|
|
||||||
任务状态的语义评判归 agent(读过代码才能标 ✅/🔴),用户只做方向决策。
|
|
||||||
凡「让用户手动改任务状态」的功能需求一律拒绝或撤销(2026-06 用户立法)。
|
|
||||||
- **MCP URL 一律写 `127.0.0.1`,禁用 `localhost`**:Windows 11 将 localhost 解析为
|
|
||||||
`::1`(IPv6),炼境服务只绑 IPv4,用 localhost 必连接失败。
|
|
||||||
- **未提交改动处置**:动手提交前发现目标文件带有先前遗留的未提交改动 → 先确认归属
|
|
||||||
(完整功能则独立提交;废弃则丢弃),禁止字符串手术做选择性暂存;
|
|
||||||
验证命令独立成步执行,不与提交串进一条复合命令(管道会吃退出码)。
|
|
||||||
|
|
||||||
### 炼境自己的 Agent 按钮清单
|
### 炼境自己的 Agent 按钮清单
|
||||||
|
|
||||||
| 能力 | 调用方式 | 通过标准 |
|
| 能力 | 调用方式 | 通过标准 |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user