Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23282e5d30 | ||
|
|
502e7da6f4 | ||
|
|
fc54402f2e | ||
|
|
c5d0f89ca7 | ||
|
|
bb1f891268 | ||
|
|
c1e209a064 | ||
|
|
11002fe208 | ||
|
|
5673dec347 | ||
|
|
c8aa609636 | ||
|
|
6c28119bd5 | ||
|
|
dd0e07848d | ||
|
|
25979ab849 | ||
|
|
a0028f131a | ||
|
|
0269b0c35c | ||
|
|
0650e81133 | ||
|
|
3f28f67f9a | ||
|
|
9aa18eb30b | ||
|
|
a648579519 | ||
|
|
226bf8d38c | ||
|
|
ec89964880 | ||
|
|
63578e86f0 | ||
|
|
27cd65e450 | ||
|
|
b497f75e03 | ||
|
|
3b78ccb6b0 | ||
|
|
e704d4d417 | ||
|
|
8e3f9edb24 | ||
|
|
ff1c5458d0 | ||
|
|
56ca0ee7c7 | ||
|
|
3dae91ecf4 | ||
|
|
c45fbf9569 | ||
|
|
a49aee1bbc | ||
|
|
29d97aec39 | ||
|
|
06d0afb76c | ||
|
|
bccb88f294 | ||
|
|
d610a99274 | ||
|
|
fa79a8eb84 | ||
|
|
c21601454b | ||
|
|
274a118924 | ||
|
|
ce2754f9c2 | ||
|
|
bbd80aa388 | ||
|
|
7f95c61a63 | ||
|
|
90eddbfa8e | ||
|
|
e62092a447 | ||
|
|
f6a43bd23b | ||
|
|
8148120e87 | ||
|
|
224771dd1e | ||
|
|
35524f3d65 | ||
|
|
2068d0a630 | ||
|
|
235d700831 | ||
|
|
3f9a121f47 | ||
|
|
7434a7f2a9 | ||
|
|
e767759af5 | ||
|
|
c3fbf85732 | ||
|
|
e5c491a693 | ||
|
|
6a3e6764fe | ||
|
|
78676bd0a2 | ||
|
|
317afaab2d | ||
|
|
c1bc29f8a6 | ||
|
|
accd3943ea | ||
|
|
24aa13d9ac | ||
|
|
8207d780d1 | ||
|
|
fcd7282e17 | ||
|
|
4d066efe91 | ||
|
|
6ced938a12 | ||
|
|
0e70a52aea | ||
|
|
1383cf1d2b | ||
|
|
344776cc18 | ||
|
|
8e4cdf09af | ||
|
|
fa96910d17 | ||
|
|
6cb6a276ca | ||
|
|
6bcd496636 | ||
|
|
6e0dd42190 | ||
|
|
aa1e8c2b2b | ||
|
|
ab5f51174a | ||
|
|
11e61d6f8a | ||
|
|
b7acfeb3ee | ||
|
|
a69e8c82bd | ||
|
|
7a289378a1 | ||
|
|
6bec85e1f8 | ||
|
|
8441284c7c | ||
|
|
05e4034089 | ||
|
|
bd2fe3de22 | ||
|
|
0fd28ea94d | ||
|
|
39bb5bc71f |
@@ -35,7 +35,7 @@ jobs:
|
||||
parsed_server = urlsplit(SERVER)
|
||||
if parsed_server.scheme not in {"http", "https"} or not parsed_server.netloc:
|
||||
sys.exit("Checkout server must be the platform-injected http(s) URL")
|
||||
SSH = "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
SSH = "ssh://git@gitea.naitangbaobao.cn:52222/weichen/"
|
||||
# Reviewed allowlist, independent of candidate .gitmodules. Add repositories
|
||||
# here only with an explicit review of the checkout credential's scope.
|
||||
REPOSITORIES = {
|
||||
@@ -178,6 +178,31 @@ jobs:
|
||||
tar -C /usr/local --strip-components=1 -xJf "$RUNNER_TEMP/node.tar.xz"
|
||||
- name: Install house-style Python packages
|
||||
run: python3 -m pip install --break-system-packages -i https://pypi.tuna.tsinghua.edu.cn/simple python-docx python-pptx openpyxl
|
||||
- name: Provision the Gitea token file for facts verification
|
||||
env:
|
||||
T1: ${{ secrets.GITEA_TOKEN }}
|
||||
T2: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "provision: GITEA_TOKEN length=${#T1}, GITHUB_TOKEN length=${#T2}"
|
||||
if [ -n "$T1" ]; then
|
||||
token="$T1"; source_name=GITEA_TOKEN
|
||||
elif [ -n "$T2" ]; then
|
||||
token="$T2"; source_name=GITHUB_TOKEN
|
||||
else
|
||||
echo "provision: GITEA_TOKEN/GITHUB_TOKEN both empty"
|
||||
exit 1
|
||||
fi
|
||||
echo "provision: using ${source_name}"
|
||||
mkdir -p "$HOME/.secrets"
|
||||
printf 'HOME:\n- ACCESS_TOKEN=%s\n' "$token" > "$HOME/.secrets/gitea"
|
||||
chmod 600 "$HOME/.secrets/gitea"
|
||||
code="$(curl -fsS -m 10 -H "Authorization: token ${token}" https://gitea.naitangbaobao.cn/api/v1/user -o /dev/null -w '%{http_code}')" || true
|
||||
if [ "$code" != "200" ]; then
|
||||
echo "provision: /api/v1/user self-check failed with http code ${code:-none} (source ${source_name})"
|
||||
exit 1
|
||||
fi
|
||||
echo "provision: /api/v1/user self-check ok (http 200)"
|
||||
- name: make test (boundaries, pins, libs, core, backend, frontend, ui, agent-command)
|
||||
run: make test
|
||||
- name: Build the single binary
|
||||
@@ -219,7 +244,7 @@ jobs:
|
||||
parsed_server = urlsplit(SERVER)
|
||||
if parsed_server.scheme not in {"http", "https"} or not parsed_server.netloc:
|
||||
sys.exit("Checkout server must be the platform-injected http(s) URL")
|
||||
SSH = "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
SSH = "ssh://git@gitea.naitangbaobao.cn:52222/weichen/"
|
||||
# Reviewed allowlist, independent of candidate .gitmodules. Add repositories
|
||||
# here only with an explicit review of the checkout credential's scope.
|
||||
REPOSITORIES = {
|
||||
@@ -404,15 +429,17 @@ jobs:
|
||||
# https 基址后再取。只追加 pin 的三个 40 位 hex,不 source pin 文件。
|
||||
SERVER="$(printf '%s' "$GITHUB_SERVER_URL" | sed 's:/*$::')"
|
||||
scheme="${GITHUB_SERVER_URL%%://*}"
|
||||
export GIT_CONFIG_COUNT=4
|
||||
export GIT_CONFIG_COUNT=5
|
||||
export GIT_CONFIG_KEY_0="protocol.$scheme.allow"
|
||||
export GIT_CONFIG_VALUE_0="always"
|
||||
export GIT_CONFIG_KEY_1="http.$SERVER/.extraheader"
|
||||
export GIT_CONFIG_VALUE_1="AUTHORIZATION: token $SUBMODULE_TOKEN"
|
||||
export GIT_CONFIG_KEY_2="url.$SERVER/weichen/.insteadOf"
|
||||
export GIT_CONFIG_VALUE_2="ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
export GIT_CONFIG_VALUE_2="ssh://git@gitea.naitangbaobao.cn:52222/weichen/"
|
||||
export GIT_CONFIG_KEY_3="core.hooksPath"
|
||||
export GIT_CONFIG_VALUE_3="/dev/null"
|
||||
export GIT_CONFIG_KEY_4="url.$SERVER/weichen/.insteadOf"
|
||||
export GIT_CONFIG_VALUE_4="ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
git clone --depth=1 "$SERVER/weichen/Agent-System-RDM.git" rdm
|
||||
mapfile -t pins < <(python3 - <<'PY'
|
||||
import pathlib
|
||||
@@ -544,7 +571,7 @@ jobs:
|
||||
parsed_server = urlsplit(SERVER)
|
||||
if parsed_server.scheme not in {"http", "https"} or not parsed_server.netloc:
|
||||
sys.exit("Checkout server must be the platform-injected http(s) URL")
|
||||
SSH = "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
SSH = "ssh://git@gitea.naitangbaobao.cn:52222/weichen/"
|
||||
# Reviewed allowlist, independent of candidate .gitmodules. Add repositories
|
||||
# here only with an explicit review of the checkout credential's scope.
|
||||
REPOSITORIES = {
|
||||
@@ -692,15 +719,17 @@ jobs:
|
||||
# https 基址后再取。
|
||||
SERVER="$(printf '%s' "$GITHUB_SERVER_URL" | sed 's:/*$::')"
|
||||
scheme="${GITHUB_SERVER_URL%%://*}"
|
||||
export GIT_CONFIG_COUNT=4
|
||||
export GIT_CONFIG_COUNT=5
|
||||
export GIT_CONFIG_KEY_0="protocol.$scheme.allow"
|
||||
export GIT_CONFIG_VALUE_0="always"
|
||||
export GIT_CONFIG_KEY_1="http.$SERVER/.extraheader"
|
||||
export GIT_CONFIG_VALUE_1="AUTHORIZATION: token $SUBMODULE_TOKEN"
|
||||
export GIT_CONFIG_KEY_2="url.$SERVER/weichen/.insteadOf"
|
||||
export GIT_CONFIG_VALUE_2="ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
export GIT_CONFIG_VALUE_2="ssh://git@gitea.naitangbaobao.cn:52222/weichen/"
|
||||
export GIT_CONFIG_KEY_3="core.hooksPath"
|
||||
export GIT_CONFIG_VALUE_3="/dev/null"
|
||||
export GIT_CONFIG_KEY_4="url.$SERVER/weichen/.insteadOf"
|
||||
export GIT_CONFIG_VALUE_4="ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
git clone --depth=1 "$SERVER/weichen/Agent-System-RDM.git" rdm
|
||||
# 凭据环境须保持到 pins 子模块取完(insteadOf + token 头覆盖嵌套 SSH URL),
|
||||
# 之后再 unset。
|
||||
|
||||
+14
-14
@@ -1,42 +1,42 @@
|
||||
[submodule "modules/core"]
|
||||
path = modules/core
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Core.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-Core.git
|
||||
[submodule "modules/backend"]
|
||||
path = modules/backend
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Backend.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-Backend.git
|
||||
[submodule "modules/frontend"]
|
||||
path = modules/frontend
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Frontend.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-Frontend.git
|
||||
[submodule "modules/documents"]
|
||||
path = modules/documents
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Documents.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-Documents.git
|
||||
[submodule "deps/development-guidelines"]
|
||||
path = deps/development-guidelines
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Development-Guidelines.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Development-Guidelines.git
|
||||
[submodule "deps/agent-native"]
|
||||
path = deps/agent-native
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Native.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-Native.git
|
||||
[submodule "deps/agent-squad"]
|
||||
path = deps/agent-squad
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-Squad.git
|
||||
[submodule "deps/agent-intent"]
|
||||
path = deps/agent-intent
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Intent.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-Intent.git
|
||||
[submodule "deps/error-code-system"]
|
||||
path = deps/error-code-system
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Error-Code-System.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Error-Code-System.git
|
||||
[submodule "deps/logging-system"]
|
||||
path = deps/logging-system
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Logging-System.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Logging-System.git
|
||||
[submodule "modules/ui"]
|
||||
path = modules/ui
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-UI.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-UI.git
|
||||
[submodule "deps/agent-command"]
|
||||
path = deps/agent-command
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Command.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-Command.git
|
||||
[submodule "deps/development-manager"]
|
||||
path = deps/development-manager
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Development-Manager.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Development-Manager.git
|
||||
[submodule "deps/agent-document-renderer"]
|
||||
path = deps/agent-document-renderer
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Document-Renderer.git
|
||||
url = ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-Document-Renderer.git
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
# feature/catalog-recall-eval-a3 任务卡
|
||||
|
||||
任务主记录:PR #713 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/713;状态:已完成(合入前闭合);owner:weichen
|
||||
|
||||
## 基线与授权
|
||||
|
||||
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 6ced938a126981ee2a4fab671a2da94f49cb56c5
|
||||
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-catalog-recall-eval-a3(worktree);分支:feature/catalog-recall-eval-a3
|
||||
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
|
||||
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=bf205afb1f04e503573784c93b52a991095554ed7314d9ac0f6c1996660a3211;triage_receipt=/tmp/triage-a3-1792716554.json;receipt_sha256=1a4ee8fe2133a52386520d35955d0fc600817f9a6bd94d40730eb8fce0904f44
|
||||
|
||||
- 授权与交付终点:用户已批准启动 A3 能力目录召回评测(方案 Functional Follow-Ups 第三项:先建脱敏评测集并产出指标基线,"是否需要检索/调模型"的决策由基线数据支撑、另行决策)。范围内连续推进:设计、agent-per-unit 实施、验证、组合、Review、PR/CI/合入。未授权:检索实现、模型/提示词调整、A2 后续、A4、部署。
|
||||
- 设计决定(2026-10-22,host):
|
||||
1. 评测落在 agent-intent 既有机制上(cmd/intentctl eval + testdata/corpus.json 共用格式),不新建平行体系。
|
||||
2. 数据集五类覆盖(否定/引用指令、多意图、错误槽位、过期确认、生成规则一致性),全部合成脱敏、由现有 fixture 规格派生;规模 ≥30 例。
|
||||
3. 指标层只记录不设质量阈值:top-1 命中率、误执行数(命中≠预期动作)、澄清率、fallback 率、生成 vs 规则一致性(离线 fake generator)。
|
||||
4. 基线报告(evaluation/BASELINE.md + metrics.json)随库提交,附复跑方式;质量结论由人/后续任务基于数据做出。
|
||||
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
|
||||
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
|
||||
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
|
||||
- 人工决策点:仅限目标/范围/验收变更、重大取舍、高后果操作或无法自动判定的业务验收
|
||||
- 当前阶段:需求拆解;当前增量:I1(待定义)
|
||||
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
|
||||
|
||||
## 目标与非目标
|
||||
|
||||
**目标**:脱敏评测集(五类 ≥30 例)+ intentctl eval 指标输出(JSON 与表格)+ 基线报告;离线可复跑(fake generator,无真实模型调用)。
|
||||
|
||||
**非目标**:检索/召回增强实现;提示词或模型调整;真实用户数据;控制台;A2 后续/A4。
|
||||
|
||||
## Agent 实施收据
|
||||
|
||||
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
|
||||
|
||||
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
|
||||
|
||||
## 关联方向与规划
|
||||
|
||||
- 适用状态:待核对(无适用规划时说明原因)
|
||||
- 主记录路径/版本:待核对(路径按仓库根目录定位,归档后不变;只引用唯一正文)
|
||||
- 对应里程碑:待核对
|
||||
|
||||
## 需求分析
|
||||
|
||||
| ID | 描述 | 项目符合度及依据 | 优先级 | 验收条件 | 依赖 | 结论 |
|
||||
|---|---|---|---|---|---|---|
|
||||
| R1 | 待填写 | 待评估 | 待定 | 待定义 | 待确认 | 待评审 |
|
||||
|
||||
## 方案与计划
|
||||
|
||||
- 方案引用:待填写(含对象版本)
|
||||
- 实施计划引用:待填写(含增量与需求 ID)
|
||||
- 测试计划引用:待填写(含需求 ID 与验收条件)
|
||||
|
||||
## 阶段记录
|
||||
|
||||
| 阶段 | 对象版本 | 状态 | 决策/执行者 | 时间 | 依据 |
|
||||
|---|---|---|---|---|---|
|
||||
| 需求拆解 | 待定 | 待执行 | — | — | — |
|
||||
| 需求评估 | 待定 | 待执行 | — | — | — |
|
||||
| 需求表确认 | 待定 | 待执行 | — | — | — |
|
||||
| 方案设计 | 待定 | 待执行 | — | — | — |
|
||||
| 实施计划 | 待定 | 待执行 | — | — | — |
|
||||
| 实施与自检 | 待定 | 待执行 | — | — | — |
|
||||
| 正式测试与验收 | 待定 | 待执行 | — | — | — |
|
||||
| 代码 Review | 待定 | 待执行 | — | — | — |
|
||||
| 合入 | 待定 | 待执行 | — | — | — |
|
||||
| 合入核验与收口 | 待定 | 待执行 | — | — | — |
|
||||
|
||||
## 探索试验与迭代
|
||||
|
||||
| 增量/试验 | 假设 | 范围 | 判断和停止条件 | 授权/决策依据 | 结果 | 变更影响 | 需重审补测 |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 待定义 | — | — | — | 待核对 | NOT_RUN | 待评估 | 待评估 |
|
||||
|
||||
## 同步记录
|
||||
|
||||
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|
||||
|---|---|---|---|
|
||||
| 启动 | 6ced938a126981ee2a4fab671a2da94f49cb56c5 | 6ced938a126981ee2a4fab671a2da94f49cb56c5 | 2026-10-23T00:51:18Z |
|
||||
|
||||
## 证据(Evidence)
|
||||
|
||||
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
|
||||
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|
||||
|---|---|---|---|---|---|
|
||||
|
||||
## 交付调度
|
||||
|
||||
- 调度状态:未入队;调度记录:无
|
||||
- entry_id:无;attempt_id:无;窗口执行者:无
|
||||
- 固定候选:无(base/head、组件与相关配置引用实际尝试)
|
||||
- 调度依据:policy/delivery.md#合入调度
|
||||
- 固定后证据:源码外 RECEIPT;实际结果后按授权原样导入和闭合
|
||||
|
||||
## 结果与验证
|
||||
|
||||
- 结果:
|
||||
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
|
||||
- 影响与剩余项:
|
||||
|
||||
## 规划进展与下一步
|
||||
|
||||
- 本次推进/剩余:待核对(依据实际成果更新适用方案/规划)
|
||||
- 首选下一任务:待核对(无适用规划、已完成或受阻时如实说明,不虚构任务)
|
||||
- 推荐依据:待填写
|
||||
- 前置条件/待确认:待核对
|
||||
- 预期产物/验收条件:待定义
|
||||
- 重复任务核对:待核对(已有/在途任务、PR 与规划记录)
|
||||
- 启动授权:未授权(建议不自动启动新任务,仍须明确授权)
|
||||
|
||||
## 合入与清理
|
||||
|
||||
- 实施收据:a3-recall-eval-dataset(cursor attempt1,五类语料+指标+基线报告,intent 6aa4925,verify-a3 exit=0);gitlink 集成(native d1f72aa/squad a5afe9c/backend 8dc91c1 含嵌套 intent/native 级联,a3git5/a3git10-run.json)。
|
||||
- 组合验证:全量 make test PASS(verify-a3-combo3.json exit=0)。
|
||||
- Review 记录:独立 CLI 评审单元 a3-independent-review(收据 /tmp/agent-stack-b2/reviewa3-run.json);结论 APPROVE;报告 .task/reviews/2026-10-22-a3-recall-eval-independent-review.md;被审对象 35524f3d 组合 vs main
|
||||
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
|
||||
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
|
||||
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
|
||||
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
|
||||
|
||||
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
|
||||
```json
|
||||
{
|
||||
"summary_schema": 1,
|
||||
"source": "SELF",
|
||||
"timestamp": "2026-10-23T00:50:13.586423+00:00",
|
||||
"command": "make precheck",
|
||||
"exit_code": 0,
|
||||
"cwd": "/home/weichen/projects/Agent-System-Dev",
|
||||
"before_head": "6ced938a126981ee2a4fab671a2da94f49cb56c5",
|
||||
"after_head": "6ced938a126981ee2a4fab671a2da94f49cb56c5",
|
||||
"branch": "main",
|
||||
"target_branch": "main",
|
||||
"target_head": "6ced938a126981ee2a4fab671a2da94f49cb56c5",
|
||||
"root_target": "main",
|
||||
"immediate_target": "main",
|
||||
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"output_tail": [
|
||||
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
|
||||
"[repo] branch=main head=6ced938a12",
|
||||
"[remote] origin/main=6ced938a12 ahead=0 behind=0",
|
||||
"[tree] clean submodules_drift=0 uninit=0",
|
||||
"[worktrees] linked=8",
|
||||
"[recycle] merged un-recycled branches: feature/exec-recovery-diagnostics-a2 fix/rdm-pin-advance-latest-2",
|
||||
"[initiatives] local cards (not authoritative): none",
|
||||
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
|
||||
"[facts] policy/facts.md 6 条事实均在有效期内",
|
||||
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
|
||||
"[R0] 6ced938a12(完整:6ced938a126981ee2a4fab671a2da94f49cb56c5)",
|
||||
"[worktree] before-sync: recursive component checks passed",
|
||||
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
|
||||
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
|
||||
],
|
||||
"output_sha256": "9f6b7e8979503847e2ec5623a17ee9624cbafd5450149556482244a86abe9192",
|
||||
"receipt_sha256": "1cf2c62aea8ef98b5d211cb94c053174407c70aeab274681c1b77db0a2878db9",
|
||||
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/1cf2c62aea8ef98b5d211cb94c053174407c70aeab274681c1b77db0a2878db9.json"
|
||||
}
|
||||
```
|
||||
|
||||
## 闭合记录(合入前折叠)
|
||||
|
||||
- 本卡在 PR #713(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/713)合入前闭合并归档,随该 PR 一同合入。
|
||||
- 该 PR 的合并提交即本任务的落地记录。
|
||||
- 合入后无需回填,也无需单独的闭合 PR。
|
||||
@@ -0,0 +1,168 @@
|
||||
# feature/recall-misexec-fixes 任务卡
|
||||
|
||||
任务主记录:PR #717 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/717;状态:已完成(合入前闭合);owner:weichen
|
||||
|
||||
## 基线与授权
|
||||
|
||||
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= bccb88f294038ce52a37fc5592a6daebd10e88b4
|
||||
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-recall-misexec-fixes(worktree);分支:feature/recall-misexec-fixes
|
||||
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
|
||||
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=5510782fe6debd449a832c3353d191c6efb76f50c77932c5adf387a2f0a27bcd;triage_receipt=/tmp/triage-misexec-1792727028.json;receipt_sha256=914545afa88ab6ce4cbe9bd48240e8a8b2f829c970d245c24fb1a7c0d8ca495c
|
||||
|
||||
- 授权与交付终点:用户已批准启动 A3 基线驱动的规则层修复(评测集暴露的 6 次误执行:语义否定被当作肯定 ×5、多意图平分误选寒暄 ×1;另有错误槽位未澄清 3 例)。范围内连续推进至合入;检索/调模型决策留待修复后基线。未授权:A4、部署。
|
||||
- 设计决定(2026-10-22,host):
|
||||
1. 否定修复放 compiledSpec.evaluate 匹配层:正命中若被前置否定词(不要/别/不用/先不要/先别/无需/不需要,紧邻或间隔≤2字)限定,且该 spec 的全部正命中均被否定 → reject "negated_match"(确定性,不逐 spec 配置)。
|
||||
2. 平分裁决加确定性 tie-break:优先级相同 → 已抽取到槽位值多者优先(带槽位信号的动作胜过裸寒暄)→ id 字典序。不引入新配置。
|
||||
3. 槽位抽取修正:抽取跨度内含多值分隔(和/还是/、/,)→ 视为多候选无效(clarify);规范化后仅剩符号/空 → 无效;字符集违规(如声明字母数字却抽出 abc_def 的部分截取)→ 无效。无效一律走 clarify,不 start。
|
||||
4. 验收即评测集:上述用例从 record_only FAIL 翻为 PASS;overall mis_exec 须为 0;gen_agree 与其余类别不回退。
|
||||
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
|
||||
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
|
||||
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
|
||||
- 人工决策点:仅限目标/范围/验收变更、重大取舍、高后果操作或无法自动判定的业务验收
|
||||
- 当前阶段:需求拆解;当前增量:I1(待定义)
|
||||
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
|
||||
|
||||
## 目标与非目标
|
||||
|
||||
**目标**:消除评测集 6 次误执行 + 3 例错误槽位未澄清:匹配层否定感知、裁决 specificity tie-break、槽位多值/字符集无效化;评测指标 mis_exec 归零且其余类别不回退;既有测试全绿。
|
||||
|
||||
**非目标**:检索/召回增强;模型/提示词调整;「刚才那个」跨会话指代解析(A1 会话域);真实语料;gen_agree 的 3 例生成器分歧(回放器行为,另行处理)。
|
||||
|
||||
## Agent 实施收据
|
||||
|
||||
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
|
||||
|
||||
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
|
||||
|
||||
## 关联方向与规划
|
||||
|
||||
- 适用状态:待核对(无适用规划时说明原因)
|
||||
- 主记录路径/版本:待核对(路径按仓库根目录定位,归档后不变;只引用唯一正文)
|
||||
- 对应里程碑:待核对
|
||||
|
||||
## 需求分析
|
||||
|
||||
| ID | 描述 | 项目符合度及依据 | 优先级 | 验收条件 | 依赖 | 结论 |
|
||||
|---|---|---|---|---|---|---|
|
||||
| R1 | 待填写 | 待评估 | 待定 | 待定义 | 待确认 | 待评审 |
|
||||
|
||||
## 方案与计划
|
||||
|
||||
- 方案引用:待填写(含对象版本)
|
||||
- 实施计划引用:待填写(含增量与需求 ID)
|
||||
- 测试计划引用:待填写(含需求 ID 与验收条件)
|
||||
|
||||
## 阶段记录
|
||||
|
||||
| 阶段 | 对象版本 | 状态 | 决策/执行者 | 时间 | 依据 |
|
||||
|---|---|---|---|---|---|
|
||||
| 需求拆解 | 待定 | 待执行 | — | — | — |
|
||||
| 需求评估 | 待定 | 待执行 | — | — | — |
|
||||
| 需求表确认 | 待定 | 待执行 | — | — | — |
|
||||
| 方案设计 | 待定 | 待执行 | — | — | — |
|
||||
| 实施计划 | 待定 | 待执行 | — | — | — |
|
||||
| 实施与自检 | 待定 | 待执行 | — | — | — |
|
||||
| 正式测试与验收 | 待定 | 待执行 | — | — | — |
|
||||
| 代码 Review | 待定 | 待执行 | — | — | — |
|
||||
| 合入 | 待定 | 待执行 | — | — | — |
|
||||
| 合入核验与收口 | 待定 | 待执行 | — | — | — |
|
||||
|
||||
## 探索试验与迭代
|
||||
|
||||
| 增量/试验 | 假设 | 范围 | 判断和停止条件 | 授权/决策依据 | 结果 | 变更影响 | 需重审补测 |
|
||||
|---|---|---|---|---|---|---|---|
|
||||
| 待定义 | — | — | — | 待核对 | NOT_RUN | 待评估 | 待评估 |
|
||||
|
||||
## 同步记录
|
||||
|
||||
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|
||||
|---|---|---|---|
|
||||
| 启动 | bccb88f294038ce52a37fc5592a6daebd10e88b4 | bccb88f294038ce52a37fc5592a6daebd10e88b4 | 2026-10-23T03:45:01Z |
|
||||
|
||||
## 证据(Evidence)
|
||||
|
||||
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
|
||||
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|
||||
|---|---|---|---|---|---|
|
||||
|
||||
## 交付调度
|
||||
|
||||
- 调度状态:未入队;调度记录:无
|
||||
- entry_id:无;attempt_id:无;窗口执行者:无
|
||||
- 固定候选:无(base/head、组件与相关配置引用实际尝试)
|
||||
- 调度依据:policy/delivery.md#合入调度
|
||||
- 固定后证据:源码外 RECEIPT;实际结果后按授权原样导入和闭合
|
||||
|
||||
## 结果与验证
|
||||
|
||||
- 结果:
|
||||
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
|
||||
- 影响与剩余项:
|
||||
|
||||
## 规划进展与下一步
|
||||
|
||||
- 本次推进/剩余:待核对(依据实际成果更新适用方案/规划)
|
||||
- 首选下一任务:待核对(无适用规划、已完成或受阻时如实说明,不虚构任务)
|
||||
- 推荐依据:待填写
|
||||
- 前置条件/待确认:待核对
|
||||
- 预期产物/验收条件:待定义
|
||||
- 重复任务核对:待核对(已有/在途任务、PR 与规划记录)
|
||||
- 启动授权:未授权(建议不自动启动新任务,仍须明确授权)
|
||||
|
||||
## 合入与清理
|
||||
|
||||
- 实施收据:misexec-rules-fix(cursor attempt1,否定感知匹配+specificity tie-break+槽位 fail-closed,intent 7f3ff6a,eval mis_exec=0/37 全过,verify-misexec2 exit=0);pin 级联嵌套提升(host 提交 N4/S4/B4')与 Dev 集成(misexec-git3-run.json)。
|
||||
- 组合验证:全量 make test PASS(verify-misexec-combo2.json exit=0)。
|
||||
- Review 记录:独立 CLI 评审单元 misexec-independent-review(收据 /tmp/agent-stack-b2/reviewm-run.json);结论 APPROVE;报告 .task/reviews/2026-10-22-misexec-fixes-independent-review.md;被审对象 8e3f9edb 组合 vs main
|
||||
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
|
||||
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
|
||||
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
|
||||
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
|
||||
|
||||
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
|
||||
```json
|
||||
{
|
||||
"summary_schema": 1,
|
||||
"source": "SELF",
|
||||
"timestamp": "2026-10-23T03:44:02.622816+00:00",
|
||||
"command": "make precheck",
|
||||
"exit_code": 0,
|
||||
"cwd": "/home/weichen/projects/Agent-System-Dev",
|
||||
"before_head": "bccb88f294038ce52a37fc5592a6daebd10e88b4",
|
||||
"after_head": "bccb88f294038ce52a37fc5592a6daebd10e88b4",
|
||||
"branch": "main",
|
||||
"target_branch": "main",
|
||||
"target_head": "bccb88f294038ce52a37fc5592a6daebd10e88b4",
|
||||
"root_target": "main",
|
||||
"immediate_target": "main",
|
||||
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"output_tail": [
|
||||
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
|
||||
"[repo] branch=main head=bccb88f294",
|
||||
"[remote] origin/main=bccb88f294 ahead=0 behind=0",
|
||||
"[tree] clean submodules_drift=0 uninit=0",
|
||||
"[worktrees] linked=7",
|
||||
"[recycle] merged un-recycled branches: feature/exec-recovery-diagnostics-a2 fix/gitea-endpoint-facts",
|
||||
"[initiatives] local cards (not authoritative): none",
|
||||
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
|
||||
"[facts] policy/facts.md 6 条事实均在有效期内",
|
||||
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
|
||||
"[R0] bccb88f294(完整:bccb88f294038ce52a37fc5592a6daebd10e88b4)",
|
||||
"[worktree] before-sync: recursive component checks passed",
|
||||
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
|
||||
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
|
||||
],
|
||||
"output_sha256": "6a6f70969d0b85288dde21bf2011b0485af1251a29fbb677ba7d7d9e94c79785",
|
||||
"receipt_sha256": "b5fc6e81a92e8ecb97bbf51630a10608507425dfe27220efb75341b4f607bffd",
|
||||
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/b5fc6e81a92e8ecb97bbf51630a10608507425dfe27220efb75341b4f607bffd.json"
|
||||
}
|
||||
```
|
||||
|
||||
## 闭合记录(合入前折叠)
|
||||
|
||||
- 本卡在 PR #717(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/717)合入前闭合并归档,随该 PR 一同合入。
|
||||
- 该 PR 的合并提交即本任务的落地记录。
|
||||
- 合入后无需回填,也无需单独的闭合 PR。
|
||||
@@ -0,0 +1,100 @@
|
||||
# fix/rdm-pin-advance-latest-2 任务卡
|
||||
|
||||
任务主记录:PR #711 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/711;状态:已完成(合入前闭合);owner:weichen
|
||||
|
||||
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 6ced938a126981ee2a4fab671a2da94f49cb56c5
|
||||
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-rdm-pin-advance-latest-2(worktree);分支:fix/rdm-pin-advance-latest-2
|
||||
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
|
||||
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=93558e2670e0b23a79612fed5a161be7cb54de39485d98d72f67b6541ee38a8a;triage_receipt=/tmp/pin-f2-triage.json;receipt_sha256=00841f4dfa7626161dcab13a8a598b10fdd81dcf26679b8de6d8177beaf3d655
|
||||
|
||||
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
|
||||
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
|
||||
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
|
||||
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
|
||||
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
|
||||
|
||||
## 目标与非目标
|
||||
|
||||
<预期结果、受影响入口/模块/契约;明确不做什么。>
|
||||
|
||||
## Agent 实施收据
|
||||
|
||||
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
|
||||
|
||||
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
|
||||
|
||||
## 同步记录
|
||||
|
||||
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|
||||
|---|---|---|---|
|
||||
| 启动 | 6ced938a126981ee2a4fab671a2da94f49cb56c5 | 6ced938a126981ee2a4fab671a2da94f49cb56c5 | 2026-10-23T00:50:42Z |
|
||||
|
||||
## 证据(Evidence)
|
||||
|
||||
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
|
||||
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|
||||
|---|---|---|---|---|---|
|
||||
|
||||
## 结果与验证
|
||||
|
||||
- 结果:
|
||||
- 验证:<结论摘要 PASS/FAIL/SKIP/NOT_RUN 逐项;逐条证据由 make evidence 写入上方证据表>
|
||||
- 影响与剩余项:
|
||||
|
||||
## 合入与清理
|
||||
|
||||
- Review 记录:NOT_RUN(审阅智能体/平台身份、base/head、结论、问题闭合及重放依据)
|
||||
- 冲突记录:NOT_RUN(最新目标同步、冲突处置、组合兼容核验及复审/补测)
|
||||
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
|
||||
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
|
||||
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
|
||||
|
||||
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
|
||||
```json
|
||||
{
|
||||
"summary_schema": 1,
|
||||
"source": "SELF",
|
||||
"timestamp": "2026-10-23T00:49:47.450962+00:00",
|
||||
"command": "make precheck",
|
||||
"exit_code": 0,
|
||||
"cwd": "/home/weichen/projects/Agent-System-Dev",
|
||||
"before_head": "6ced938a126981ee2a4fab671a2da94f49cb56c5",
|
||||
"after_head": "6ced938a126981ee2a4fab671a2da94f49cb56c5",
|
||||
"branch": "main",
|
||||
"target_branch": "main",
|
||||
"target_head": "6ced938a126981ee2a4fab671a2da94f49cb56c5",
|
||||
"root_target": "main",
|
||||
"immediate_target": "main",
|
||||
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"output_tail": [
|
||||
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
|
||||
"[repo] branch=main head=6ced938a12",
|
||||
"[remote] origin/main=6ced938a12 ahead=0 behind=0",
|
||||
"[tree] clean submodules_drift=0 uninit=0",
|
||||
"[worktrees] linked=7",
|
||||
"[recycle] merged un-recycled branches: feature/exec-recovery-diagnostics-a2",
|
||||
"[initiatives] local cards (not authoritative): none",
|
||||
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
|
||||
"[facts] policy/facts.md 6 条事实均在有效期内",
|
||||
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
|
||||
"[R0] 6ced938a12(完整:6ced938a126981ee2a4fab671a2da94f49cb56c5)",
|
||||
"[worktree] before-sync: recursive component checks passed",
|
||||
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
|
||||
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
|
||||
],
|
||||
"output_sha256": "d78ae27fdc16acddac83815947924a7eb3d6031e421381f3d9313f29f3c0fc9e",
|
||||
"receipt_sha256": "aa32f1bbde2a3b12b355fedc1e5ed3b91dea43758fb2a307e93f56fd2c5ae9af",
|
||||
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/aa32f1bbde2a3b12b355fedc1e5ed3b91dea43758fb2a307e93f56fd2c5ae9af.json"
|
||||
}
|
||||
```
|
||||
| 同步(记录前对象) | c3fbf85732788ba91d32c921783993a645580041 | c3fbf85732788ba91d32c921783993a645580041 | 2026-10-23T01:26:28Z |
|
||||
|
||||
## 闭合记录(合入前折叠)
|
||||
|
||||
- 本卡在 PR #711(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/711)合入前闭合并归档,随该 PR 一同合入。
|
||||
- 该 PR 的合并提交即本任务的落地记录。
|
||||
- 合入后无需回填,也无需单独的闭合 PR。
|
||||
| 同步(记录前对象) | e62092a4479bbe101e74e91b39e03577ce0786ae | bbd80aa38874dbac8a3188b42bc6ed977a4fb379 | 2026-10-23T02:14:09Z |
|
||||
@@ -0,0 +1,180 @@
|
||||
# fix/gitea-endpoint-migration 任务卡
|
||||
|
||||
任务主记录:PR #706 https://gitea.naitangbaobao.cn/weichen/Agent-System-Dev/pulls/706;状态:进行中;owner:weichen;状态:进行中;owner:weichen
|
||||
|
||||
- 权威仓:ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 3d3474a731f9ef3ee1f41935e63bca3afb70db56
|
||||
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-fix-gitea-endpoint-migration(worktree);分支:fix/gitea-endpoint-migration
|
||||
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
|
||||
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=f4118023ba80fc3d75db8755e2dd21e4697b7a15b554f0df85717ac6ac814cf8;triage_receipt=/tmp/gitea-migration-triage.json;receipt_sha256=e0bca239b2c0ebaea8fb76d5b743de43d06a3ee911ea0e2587bc07226367110d
|
||||
|
||||
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
|
||||
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
|
||||
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
|
||||
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
|
||||
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
|
||||
|
||||
## 目标与非目标
|
||||
|
||||
**目标**:Gitea 服务器迁移后(web https://gitea.naitangbaobao.cn,SSH gitea.naitangbaobao.cn:52222,凭据不变),更新本仓全部功能性端点引用:`.gitmodules`、`scripts/task.sh`、`scripts/task_triage.py`、`scripts/facts-verify.sh`、`scripts/svc.sh`(RDM_ORIGIN_DEFAULT)、`.gitea/workflows/ci.yaml`、`tests/test_facts_verify.py`、`tests/test_ci_credentials.py`、`tests/test_svc_realcombo.py`、`tests/test_task_triage.py`、`tests/test_ci_wait.py`、`policy/facts.md`(F1/F2/F3 端点与 last_verified)、`policy/delivery.md` 合入队列链接。旧值:git-home.u1680832.nyat.app:30319(web/API)、git-ssh.u1680832.nyat.app:31411、ssh://git@192.168.3.2:2222(SSH)。
|
||||
|
||||
**完成条件**:仓内除历史记录(.task/**、docs/superpowers/ 归档规格、runtime/)外无旧端点引用;`make facts-verify` 中 F1/F2/F3(本次迁移端点)PASS;`make test-governance` 与相关单测通过。已知漂移(非阻塞,转后续任务):F4(退役 git-panel 端点)判据过时,迁移后该端点 TLS unexpected-eof,F4 严格判据不再成立,需要宿主级子模块物化环境刷新;facts-verify 非法失败不计入本任务交付门禁(不在 make test 内)。
|
||||
|
||||
**非目标**:历史记录/归档文档中的旧 URL;其他仓(RDM/KB 等)仓内引用(各自任务处理);本地 ~/.ssh/config、~/.secrets/gitea、各仓 remote(已由 owner 更新);policy/facts.md F4(退役旧端点 git-panel 的历史事实,与本次迁移无关)。
|
||||
|
||||
## Agent 实施收据
|
||||
|
||||
路由与 fail-stop 规则见根目录 AGENT-EXECUTION.md 与 policy/delivery.md;每次尝试一行,原始日志留在源码外收据路径。
|
||||
|
||||
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| gitea-endpoint-migration | 端点迁移(13 文件) | — | implementation | cursor,… | 1 | cursor(auto) | failed-unknown | 无(终态 JSON 解码失败;现场保留,diff 导出 /tmp/gitea-migration-attempt1.patch) | 否 | /tmp/gitea-migration-run2-receipt.json |
|
||||
| gitea-endpoint-migration | 同上(采用 attempt1 补丁) | — | implementation | cursor,… | 2 | cursor(auto) | failed-unknown | 无(终态 JSON 解码再次失败;cursor 本单元 2 次尝试) | 否 | /tmp/gitea-migration-run3-receipt.json |
|
||||
| gitea-migration-routing-promote-antigravity | AGENT-EXECUTION.md implementation 顺序临时调整 | — | implementation | cursor,… | 1 | cursor(auto) | completed | apply | 否 | /tmp/gitea-migration-routing-receipt.json |
|
||||
| gitea-migration-f4-refresh | policy/facts.md F4 行更新 | — | implementation | antigravity,pi-glm,… | 1 | agy | failed-unknown | 无(agy OAuth 网络故障启动即败,0 轮对话) | 否 | /tmp/gitea-f4-receipt.json |
|
||||
| gitea-migration-f4-refresh | 同上 | — | implementation | antigravity,pi-glm,… | 2 | agy | failed-unknown | 无(agy OAuth 仍不可达) | 否 | /tmp/gitea-f4-receipt2.json |
|
||||
| gitea-migration-f4-refresh | 同上 | — | implementation | antigravity,pi-glm,… | 3(agy 耗尽) | agy | failed-unknown | 无(agy OAuth 持续不可达,3 次尝试耗尽) | 否 | /tmp/gitea-f4-receipt3.json |
|
||||
| gitea-migration-routing2 | AGENT-EXECUTION.md 再调整(pi-glm 优先) | — | implementation | — | 1 | — | failed-unknown(agy 启动即败,未达目标) | 无 | 否 | /tmp/gitea-migration-routing2-receipt.json |
|
||||
| gitea-migration-routing-revert | 回退 antigravity 优先为原顺序 | — | host(baseline-match revert) | — | — | — | committed | aa1e8c2b | — | 本行披露;admit 经 baseline 精确内容核对 |
|
||||
| gitea-migration-f4-refresh | F4 行刷新 | — | implementation | cursor(原序恢复后重试) | 4 | cursor(auto) | blocked | 诚实阻塞:F4 验证依赖宿主级子模块物化,worker 隔离区无法通过;现场保留。F4 刷新转后续任务 | 否 | /tmp/gitea-f4-receipt4.json |
|
||||
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
|
||||
|
||||
## 同步记录
|
||||
|
||||
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|
||||
|---|---|---|---|
|
||||
| 启动 | 3d3474a731f9ef3ee1f41935e63bca3afb70db56 | 3d3474a731f9ef3ee1f41935e63bca3afb70db56 | 2026-10-22T11:37:21Z |
|
||||
|
||||
## 证据(Evidence)
|
||||
|
||||
<!-- CMD="<命令>" make evidence 写入;手抄/转写输出视为无效证据(AGENTS.md 证据与验证门禁)。 -->
|
||||
| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) |
|
||||
|---|---|---|---|---|---|
|
||||
|
||||
## 结果与验证(完成后填写)
|
||||
|
||||
- 结果:端点迁移完成。11 文件 + plugins/registry.json 修复;F1/F2/F3 新端点实测 PASS;目标单测与 make test-governance 全部 OK。
|
||||
- 验证:F1/F2/F3 PASS(新端点实测);目标单测(facts_verify/ci_credentials/task_triage/ci_wait/svc_precheck)全部 OK(SELF 收据已导入);F4 FAIL 已知漂移(见完成条件注记)。make test-governance 与 svc_realcombo 待 host 最终验证。
|
||||
- 影响与剩余项:端点迁移本体完成;Backend 依赖 API 对齐已完成并合入(Backend #248,含行为修复,Review r2 PASS);RDM 端点迁移+pin 前移已合入(RDM #480);rdm.pin 前移至迁移后 RDM main;legacy 生命周期用例条件化(诚实 skip);svc-realcombo ✓、test ✓(T5c 为 /tmp 共享状态污染,复跑 PASS)。**唯一剩余失败**:test-pg 的 TestTwoInstancesOverSharedPG/cross_cancel(409 in-flight run,疑似新 intent/squad 语义的 e2e 适配,见 PR #706 最新阻塞评论)。非阻塞遗留:F4 判据刷新;compat/integration 过渡分支清理。
|
||||
|
||||
## 合入与清理
|
||||
|
||||
- 最终 Review:REVIEW PASS(最终 HEAD 独立全新会话复核全量 diff:端点一致性、pin 合理性、legacy skip 诚实性、cross_cancel 重试有界、无秘密;报告 docs/superpowers/reviews/2026-10-23-gitea-endpoint-migration-final-review.md)
|
||||
- Review 记录:r1 REVIEW FAIL(阻塞项:plugins/registry.json 旧 SSH 端点,pi-glm 全新会话)→ repair transport 修复 → r2 REVIEW PASS(pi-glm 全新会话;49 处新端点书写一致、负例语义保留、facts_verify/ci_credentials/task_triage/ci_wait 全部离线实测、无秘密入仓;报告 docs/superpowers/reviews/2026-10-22-gitea-endpoint-migration-review.md)。base=3d3474a7,head 见最终推送。
|
||||
- 冲突记录:待合入前 make task-sync(main 前进时重放受影响验证)
|
||||
- CI 记录:NOT_RUN(当前 HEAD 完整 SHA、全部必需检查、运行链接、执行身份及 GATE 结果)
|
||||
- 合入记录:NOT_RUN(交付授权范围、PR、被核验 HEAD、合入 SHA、目标分支及内容核验)
|
||||
- 清理记录:NOT_RUN(授权依据、写者退出确认、worktree/分支/任务卡处置)
|
||||
|
||||
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
|
||||
```json
|
||||
{
|
||||
"summary_schema": 1,
|
||||
"source": "SELF",
|
||||
"timestamp": "2026-10-22T11:36:22.453253+00:00",
|
||||
"command": "make precheck",
|
||||
"exit_code": 0,
|
||||
"cwd": "/home/weichen/projects/Agent-System-Dev",
|
||||
"before_head": "3d3474a731f9ef3ee1f41935e63bca3afb70db56",
|
||||
"after_head": "3d3474a731f9ef3ee1f41935e63bca3afb70db56",
|
||||
"branch": "main",
|
||||
"target_branch": "main",
|
||||
"target_head": "3d3474a731f9ef3ee1f41935e63bca3afb70db56",
|
||||
"root_target": "main",
|
||||
"immediate_target": "main",
|
||||
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"output_tail": [
|
||||
"make[1]: Entering directory '/home/weichen/projects/Agent-System-Dev'",
|
||||
"[repo] branch=main head=3d3474a731",
|
||||
"[remote] origin/main=3d3474a731 ahead=0 behind=0",
|
||||
"[tree] clean submodules_drift=0 uninit=0",
|
||||
"[worktrees] linked=7",
|
||||
"[initiatives] local cards (not authoritative): none",
|
||||
"[hooks] core.hooksPath=scripts/hooks(pre-commit/post-merge 实际接线)",
|
||||
"[facts] policy/facts.md 6 条事实均在有效期内",
|
||||
"[required-reading] core/baseline.md, workflows/delivery.md §1, policy/delivery.md",
|
||||
"[R0] 3d3474a731(完整:3d3474a731f9ef3ee1f41935e63bca3afb70db56)",
|
||||
"[worktree] before-sync: recursive component checks passed",
|
||||
"[verdict] READY — 保留本次 precheck receipt 后建任务工作区:PRECHECK_RECEIPT=/tmp/task-precheck.json make task-start NAME=feature/your-branch",
|
||||
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev'"
|
||||
],
|
||||
"output_sha256": "8fe96dfd5cc52716edb7b4361609ea244aa109e4028777d1cdaf8637be6b8a08",
|
||||
"receipt_sha256": "3b4027f3dabd3bb334b3ac7767771099e439b8e67c3677c997a5c78c8c7ddfb2",
|
||||
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/3b4027f3dabd3bb334b3ac7767771099e439b8e67c3677c997a5c78c8c7ddfb2.json"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
|
||||
```json
|
||||
{
|
||||
"summary_schema": 1,
|
||||
"source": "SELF",
|
||||
"timestamp": "2026-10-22T13:49:47.717844+00:00",
|
||||
"command": "PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_facts_verify tests.test_ci_credentials tests.test_task_triage tests.test_ci_wait tests.test_svc_precheck",
|
||||
"exit_code": 0,
|
||||
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-fix-gitea-endpoint-migration",
|
||||
"before_head": "6cb6a276ca3e10101cd76db1bd3d77834e54e551",
|
||||
"after_head": "6cb6a276ca3e10101cd76db1bd3d77834e54e551",
|
||||
"branch": "fix/gitea-endpoint-migration",
|
||||
"target_branch": "main",
|
||||
"target_head": "cb36b59accd0418c5ca952912d7c181b83038a4c",
|
||||
"root_target": "main",
|
||||
"immediate_target": "main",
|
||||
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"output_tail": [
|
||||
".............................................................................",
|
||||
"----------------------------------------------------------------------",
|
||||
"Ran 77 tests in 30.719s",
|
||||
"",
|
||||
"OK"
|
||||
],
|
||||
"output_sha256": "8e55dbb47a553d2c5a34ce16057ed2d742b908e45f6ab4f8119212911a554e74",
|
||||
"receipt_sha256": "2c2e2c19d6f0cc3734c9c6ae986bc3e3021a91caa320373d66158cab4f1ec124",
|
||||
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/2c2e2c19d6f0cc3734c9c6ae986bc3e3021a91caa320373d66158cab4f1ec124.json"
|
||||
}
|
||||
```
|
||||
|
||||
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
|
||||
```json
|
||||
{
|
||||
"summary_schema": 1,
|
||||
"source": "SELF",
|
||||
"timestamp": "2026-10-22T13:50:40.361266+00:00",
|
||||
"command": "make test-governance",
|
||||
"exit_code": 0,
|
||||
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-fix-gitea-endpoint-migration",
|
||||
"before_head": "6cb6a276ca3e10101cd76db1bd3d77834e54e551",
|
||||
"after_head": "6cb6a276ca3e10101cd76db1bd3d77834e54e551",
|
||||
"branch": "fix/gitea-endpoint-migration",
|
||||
"target_branch": "main",
|
||||
"target_head": "cb36b59accd0418c5ca952912d7c181b83038a4c",
|
||||
"root_target": "main",
|
||||
"immediate_target": "main",
|
||||
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"output_tail": [
|
||||
"test_feature_missing_parent_is_allowed (test_write_guard.WriteGuardTests.test_feature_missing_parent_is_allowed) ... ok",
|
||||
"test_invalid_json_is_denied (test_write_guard.WriteGuardTests.test_invalid_json_is_denied) ... ok",
|
||||
"test_missing_parent_on_main_is_denied (test_write_guard.WriteGuardTests.test_missing_parent_on_main_is_denied) ... ok",
|
||||
"test_missing_unknown_and_malformed_write_input_are_denied (test_write_guard.WriteGuardTests.test_missing_unknown_and_malformed_write_input_are_denied) ... ok",
|
||||
"test_non_git_destination_is_explicitly_outside_scope (test_write_guard.WriteGuardTests.test_non_git_destination_is_explicitly_outside_scope) ... ok",
|
||||
"test_nonwrite_tools_are_outside_scope (test_write_guard.WriteGuardTests.test_nonwrite_tools_are_outside_scope) ... ok",
|
||||
"test_relative_path_uses_hook_cwd_not_process_cwd (test_write_guard.WriteGuardTests.test_relative_path_uses_hook_cwd_not_process_cwd) ... ok",
|
||||
"test_symlink_into_main_with_missing_parents_is_denied (test_write_guard.WriteGuardTests.test_symlink_into_main_with_missing_parents_is_denied) ... ok",
|
||||
"test_valid_multi_file_patch_on_feature_is_allowed (test_write_guard.WriteGuardTests.test_valid_multi_file_patch_on_feature_is_allowed) ... ok",
|
||||
"",
|
||||
"----------------------------------------------------------------------",
|
||||
"Ran 553 tests in 368.627s",
|
||||
"",
|
||||
"OK (skipped=18)",
|
||||
"make[1]: Leaving directory '/home/weichen/projects/Agent-System-Dev-wt-fix-gitea-endpoint-migration'"
|
||||
],
|
||||
"output_sha256": "e283e1b732170416dfd71d6ccb9118f756ac64d123a8c50b939592185c0096de",
|
||||
"receipt_sha256": "aa4fdc711f5d0839248ecefdc5e1242c6cb2d04ca3efde90099300e456f78f71",
|
||||
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/aa4fdc711f5d0839248ecefdc5e1242c6cb2d04ca3efde90099300e456f78f71.json"
|
||||
}
|
||||
```
|
||||
| 同步(记录前对象) | cb36b59accd0418c5ca952912d7c181b83038a4c | 1383cf1d2bc0dbaaecebed7d20c26d6ec8d2d783 | 2026-10-22T14:08:07Z |
|
||||
| 同步(记录前对象) | 6ced938a126981ee2a4fab671a2da94f49cb56c5 | 8207d780d12fa8c605b18fc7fa5f8cd3e8f6bc42 | 2026-10-22T16:37:40Z |
|
||||
| 同步(记录前对象) | 0650e81133b853f27e8e53f516de8f6c1e73e4a4 | 0269b0c35caf9e8d2a8471fcd2ef4876a04532f4 | 2026-10-23T05:42:58Z |
|
||||
@@ -0,0 +1,48 @@
|
||||
# 独立代码 Review:feature/catalog-recall-eval-a3(A3 召回评测集与指标基线)
|
||||
|
||||
- Reviewer:独立 CLI session(未参与本单元实施;本报告为唯一产出变更)
|
||||
- 日期:2026-10-22
|
||||
- Review 对象:`git diff 6ced938a...HEAD`(6ced938a = R0 / origin-main 合入点,与任务卡 R0 一致)
|
||||
- 组件重点:`deps/agent-intent` 765a7e7..6aa4925(单提交 "Add the sanitized recall evaluation set and metrics baseline",9 文件 +1354/-18);Dev 层 4 个 gitlink 前移 + 任务卡
|
||||
- 方法:全量 diff 阅读被测文件;对语料/指标做独立的脚本化交叉复核(只读);静态追踪指标口径、生成回放路径与 JSON 兼容性;检查嵌套 pin 级联与越界改动。聚焦测试见下文 NOT_RUN 说明。
|
||||
|
||||
## 复核结论摘要(独立重算,非转抄)
|
||||
|
||||
- 语料 `intent/testdata/recall_corpus.json`:**37 例 / 46 轮**,五类齐全且恰好五类(expired_confirmation 7/14、generation_consistency 8/8、multi_intent 7/7、negation_reference 8/10、wrong_slot 7/7),`record_only: true`;`expect_top` 轮次 31、生成用例 8 —— 与 BASELINE.md 表头逐项一致。
|
||||
- 语料 digest `sha256:53d26cfc…bc2885` 与 `evaluation/metrics.json` 的 `corpus_digest`、BASELINE.md 摘要三方一致(本机 `sha256sum` 独立重算)。
|
||||
- `evaluation/metrics.json` 全部 10 组计数与比率逐项等于 BASELINE.md 表;比率均可用 `round(n/d*10000)/10000` 独立复算(如 30/31→0.9677、13/46→0.2826、6/46→0.1304、5/14→0.3571、5/8→0.625、5/7→0.7143、3/7→0.4286)。
|
||||
- 总体口径自洽:top1_expected 3+3+7+11+7=31、hits 30(唯一 miss 即 multi_greet_then_report 的 1 次误执行)、mis_exec 5+1=6、clarify 0+0+5+5+3=13、fallback 2+0+0+3+0=5+1(gen)=6、pass 3+6+7+7+8=27。
|
||||
- 嵌套 pin 级联一致:native@d1f72aa→intent@6aa4925;squad@a5afe9c→intent@6aa4925+native@d1f72aa;backend@8dc91c1→intent@6aa4925+native@d1f72aa+squad@a5afe9c(各自 `git ls-tree` 核对);三个组件 bump 均为 pins-only(`git diff --stat` 仅 gitlink),superrepo 层 diff 仅 4 gitlink + 任务卡,无评测范围外源码改动。
|
||||
|
||||
## Findings
|
||||
|
||||
### Blocker
|
||||
|
||||
无。
|
||||
|
||||
### Major
|
||||
|
||||
无。
|
||||
|
||||
### Minor
|
||||
|
||||
1. **基线数值漂移不设防(结构性盲区,刻意取舍但建议记录)** — `intent/recall_eval_test.go:119-162`(`checkSummaryJSON`/`checkMetricsBounds`):结构测试对已提交基线只校验 schema、digest、类别计数与「内部一致」(rate==ratio(n,d)),不把基线里的 hits/rates 与本次新鲜运行比对。若识别器行为改变而语料不变(digest 不变、计数不变),过期的基线数值不会被任何测试发现;BASELINE.md「重跑」一节只靠流程约束。这与「只记录不设阈值」的定位一致(比对数值即变相质量断言),属可辩护的设计取舍,但建议在 BASELINE.md 明示「引擎变更不会触发基线失效告警,须人工重跑」。
|
||||
2. **missing-slots 断言用 `fmt.Sprint` 比较切片** — `intent/corpus.go:194-222`(`matchTurn` 中 `fmt.Sprint(got) != fmt.Sprint(turn.ExpectMissingSlots)`):`[]string(nil)` 与 `[]string{}` 都打印 `[]`,且比较对元素顺序敏感。当前引擎输出顺序确定、语料只断言单元素缺失(`["run_id"]`/`["topic"]`),不构成现实缺陷;但后续一旦断言多缺失槽位,顺序耦合会变成脆弱测试。建议改为逐元素显式比较。
|
||||
3. **任务卡内部记录不一致(文档级)** — `.task/feature-catalog-recall-eval-a3.md`:「Agent 实施收据」表全部为 NOT_RUN/待定义 占位,而「合入与清理」节已记载 `a3-recall-eval-dataset(…intent 6aa4925,verify-a3 exit=0)`、嵌套级联与 `组合验证:全量 make test PASS`;且「证据(Evidence)」表为空,组合验证结论以带外文件名(verify-a3-combo3.json 等)引用。按仓库门禁「命令输出只经 make evidence 写入任务卡」,合入前应把收据表与证据表补齐一致。不阻塞本次代码评审结论。
|
||||
|
||||
### Notes
|
||||
|
||||
1. **指标口径正确** — `intent/evalmetrics.go:129-141`(`misExecuted`):仅当实际 `matched`/`expectation_hit` 出 Top 且与期望动作不同时计数;期望 matched/expectation_hit 而未写 expect_top 的轮次不约束动作,不计;期望 fallback/ambiguous/guard_hit 却执行了即计。与 BASELINE.md「指标口径」一节逐条一致。分母:top1=写了 expect_top 的轮次(`evalmetrics.go:103-108`)、clarify/fallback=全部轮次(`evalmetrics.go:111-118,153-159`)、gen_agree=写了 generator_commands 的用例数(用例级,`evalmetrics.go:120-124`)。`ratio` 定点 4 位舍入保证 JSON 字节稳定(`evalmetrics.go:161-166`)。
|
||||
2. **汇总对账安全** — `intent/evalmetrics.go:61-92`(`SummarizeCorpus`):cases/results 按下标一一对应(越界即 break,契约已在注释声明),空 category 归入 `uncategorized`(旧语料兼容),类别名升序、overall 独立。`intent/eval_test.go:78-89` 在既有 `corpus.json`(无 category)上跑了一遍汇总,兼容路径有覆盖。
|
||||
3. **生成回放路径离线、确定性、fail-closed** — `intent/corpus.go:156-186`:`replayGenerator.Generate` 忽略输入与目录、只回放脚本命令(无模型/无网络),并深拷贝 slots 防串染;`compareGeneratorPath` 复用识别器兜底同款 `generateCommands`(`intent/recognizer.go:352-385`:start 的 ActionRef 必须从同一快照唯一解析、命令种类受限、槽位键集校验,任一不过即无 Top)。三个「故意不一致」用例路径成立:`run_id=43` 槽位分歧(sameSlots 判否)、`taskrun.restart` 错动作(handler 反查到 restart spec)、`ghost.flow` 幻觉动作(resolveActionRef 失败→校验拒绝→无 Top)。两边都无 Top 也算一致,`gen_chitchat_agree` 覆盖该分支。Nil expectation 传入 `NewRecognizer` 在该路径安全(`generateCommands` 不触达链式预期)。
|
||||
4. **eval 向后兼容** — `cmd/intentctl/main.go:254,260-262,365-390`:`-metrics-out` 缺省为空不写文件(唯一新增写文件入口,显式 opt-in;`-` 走 stdout);旧语料(无 `record_only`)失败语义不变,且 `TestEvalRecordOnlyWritesMetrics`(`cmd/intentctl/main_test.go:79-112`)同时断言 record_only 不失败+strict 语料仍失败。输出新增的指标表为追加行,不破坏既有两行指标输出。`evalCorpus` 结构仅增可选字段(`omitempty`),旧 JSON 解析不受影响。
|
||||
5. **结构测试无质量阈值伪装** — `intent/recall_eval_test.go:64-117`:只断言 ≥30 例、恰好五类、每例可执行(无「识别错误」)、generation_consistency 用例形态、JSON 合法且计数与语料一致、基线 digest 与语料一致;`checkMetricsBounds`(:164-186)只做数学界校验(n≤d、rate==ratio)。无任何质量数值断言,符合「基线只记录」边界。测试与 CLI 同源建快照(:36-62,语料自声明 builtin_specs/guard/protected + 同款 specs 目录),指标同源声明成立。
|
||||
6. **语料确为夹具派生、五类行为真实可辨** — 全部期望 top ∈ {demo.run.status_query/restart/cancel, demo.greet.hello, demo.misc.deploy, report.generate, guard.config_change},动作 id ∈ base.json 的 handler 集 + 刻意的幻觉 id;生成动作 id 与 `intent/testdata/specs/base.json` 的 handler/action 一一对应。各类用例确实 exercising 所标行为:语义否定(「不要/别/不用/先不要」无 excludes 声明,理想为 fallback)对照 `excludes_any` 声明否定(「配置」);multi_intent 覆盖 动作+动作→ambiguous、寒暄+动作→动作、动作+guard→guard_hit;wrong_slot 覆盖 缺失/中文数字/双候选/越字符集/仅符号/空主题;expired_confirmation 覆盖 链式命中、过期后裸回答回落、过期后完整重述走 matched、宿主声明 pending 再过期(`pending_expectation`+`expectation_expired` 组合,语义为「先声明后作废」,实现顺序 `intent/corpus.go:120-126` 与用例意图一致);wrong_slot 用单轮 `turns` 包装以使用本轮新增的 `expect_slots`/`expect_missing_slots` 能力。
|
||||
7. **安全边界** — 语料全合成(无真实用户数据/PII);`record_only: true` 无阈值断言;生成路径为确定性回放,无网络/模型调用;未发现任何对外部输入的写路径(除显式 `-metrics-out`)。
|
||||
8. **聚焦测试 NOT_RUN(环境受限,非变更缺陷)** — `cd deps/agent-intent && GOWORK=off go test ./intent/...` 无法编译:`agent-intent` 的嵌套 gitlink(deps/error-code-system@a3ee67b、logging-system@49b5d8b 等)在本工作区未物化,且目标提交不在任何本地对象库(`git cat-file` fatal)、无网络。按诚实出口如实标注 NOT_RUN;作为补偿,本文「复核结论摘要」的计数/digest/比率均为独立脚本重算,与基线三方对账一致。任务卡所记 `make test PASS(verify-a3-combo3.json exit=0)`本评审无法复现,标注 [未经证实](属 host 组合门禁范畴,不阻塞代码评审)。
|
||||
|
||||
## Verdict
|
||||
|
||||
未发现 blocker/major 级代码缺陷;三项 minor(基线漂移不设防的取舍说明、fmt.Sprint 切片比较的脆弱写法、任务卡收据/证据表未同步)均不阻塞合入,可在本次或后续增量处理。语料、指标、基线、CLI 兼容、结构守卫与嵌套 pin 级联均通过独立静态复核与数值对账。
|
||||
|
||||
REVIEW VERDICT: APPROVE
|
||||
@@ -0,0 +1,47 @@
|
||||
# 独立代码 Review:feature/recall-misexec-fixes(mis-exec 规则层修复)
|
||||
|
||||
- 日期:2026-10-22(评审执行于 2026-10-23 UTC 的分支对象上)
|
||||
- 评审人:独立 CLI 会话(未参与实施;本文件为本次唯一变更)
|
||||
- 评审对象:`git diff bccb88f2...HEAD`(= origin/main...HEAD;本 worktree 无 origin remote,bccb88f2 为 main 顶端合并提交,是 feature 分支的 merge-base)
|
||||
- 组件范围:deps/agent-intent @6aa4925..7f3ff6a(单提交 "Make intent matching negation-aware and slots fail closed")+ gitlink 级联(native d1f72aa→be556f4、squad a5afe9c8→95b387d、backend 8dc91c17→8031855e→bd5c0f3)+ 任务卡 `.task/feature-recall-misexec-fixes.md`
|
||||
- 方法:全文精读 9 个变更文件 + 逐条手工追踪语料用例 + 对否定判定函数做 stdlib-only 逐字提取探针验证(/tmp,脱离工作区);未修改任何代码。
|
||||
|
||||
## 验证(本工作区内的执行情况)
|
||||
|
||||
- `git status --porcelain`:评审开始时为空(clean);四个组件 checkout 均精确处于被 pin 的 SHA 且无脏文件(agent-intent 7f3ff6a、native be556f4、squad 95b387d、backend bd5c0f3)。
|
||||
- `gofmt -l intent/ cmd/`:无输出(格式干净)。
|
||||
- `go test`:**NOT_RUN(环境不可编译)**。agent-intent/go.mod 的 `replace error-code-system => ./deps/error-code-system` 所指嵌套子模块在本工作区任何层级都未物化(superrepo、agent-intent、backend 三处的 error-code-system/logging-system 目录均为空挂载点),且相应 commit 对象不存在于任何本地对象库;单元约束禁止 `git submodule init/update`、禁止网络。`GOWORK=off go test ./intent/...` 如预期在包 setup 阶段失败(reading deps/error-code-system/go.mod: no such file)。诚实出口:本报告的测试结论为读码+探针+追踪,非重放。
|
||||
- 否定判定探针(negatedAt/inNonNegatingBie 逐字提取、21 组用例):全部 corpus 否定序列判否定;「不断」「无偿」不触发误否定;「不要马上重启」(间隔 2 字)判否定、「不要立刻马上重启」(间隔 3 字)不判(窗口语义);「特别的,重启任务」跨标点正确豁免;「任务别名重启」豁免成功;「判别任务进度」被误判否定(见 F1)。
|
||||
|
||||
## 评审发现
|
||||
|
||||
### Blocker
|
||||
|
||||
无。
|
||||
|
||||
### Major
|
||||
|
||||
无。
|
||||
|
||||
### Minor
|
||||
|
||||
- **F1(recall 损失,fail-safe 方向)**:「别」字白名单 `nonNegatingBie`(intent/registry.go:211-214)是封闭列表,「判别」「辨识」「作别」等含「别」的常用词不在列。探针实测「判别任务进度」→「进度」命中被 `negatedAt`(registry.go:263-275)判为否定 → status_query 以 `negated_match` 排除 → 回落 fallback。方向是安全的(少执行而非误执行),但对该输入是误回落。建议后续把「别」的否定判定改为右边界词表或按「别+动词」结构判断。
|
||||
- **F2(残余否定词缺口,符合既定设计范围)**:token 表(registry.go:204)无「无须」「勿」「先不」「暂不」「不必」等变体,如「无须重启任务」仍会正向命中 restart。任务卡设计决定明确固定了这 7 个词,故不算实施偏差;作为残余风险记录:negation_reference 类的其他说法仍可能误执行。
|
||||
|
||||
### Notes
|
||||
|
||||
- **N1(tie-break 只认“有效”槽位)**:`resolveTie`(intent/recognizer.go:152-185)用 `len(slots)` 计数,invalid 捕获(如多候选值)不计。因此「你好,取消任务 42 和任务 43」这类输入中 cancel 的 run_id 无效 → filled=0,与寒暄同为 0 时按 priority(greet=10 > cancel=0)裁决到寒暄,动作侧的 clarify 丢失。仅在同分且优先级不同时可达,且寒暄无副作用、动作未启动,属可接受行为选择;若希望「带槽位信号」包含无效捕获信号,需另行设计。
|
||||
- **N2(fail-closed 误伤面)**:`hasInnerSeparator`(slots.go:221)/`captureTruncated`(slots.go:201)对合法值也拦截——如主题「和平与发展」会因内部分隔词判多候选、值后紧跟 ASCII 词字符即判截断,一律 clarify 而非 start。与「无效一律 clarify」的设计一致,代价是 clarify 率上升(metrics 中 wrong_slot clarify 7/7=1.0),方向安全。
|
||||
- **N3(测试夹具标签失真,表面问题)**:cmd/intentctl/main_test.go:82-85 把 record_only 的 miss 用例从「不用查进度了」换成「进度条的颜色真好看」是必要的(旧输入修复后正确回落,不再产生 miss 计数;新输入在 testSpecJSON 下确会命中 status_query,仍覆盖 miss 记账路径,断言 MisExecutions==1 成立),但 category 仍标 `negation_reference`,语义已不属否定类——建议下次触及时改名或换语料类别。
|
||||
- **N4(验收证据等级)**:mis_exec=0 / 37/37 的验收来自 intent@7f3ff6a 内提交的 evaluation/metrics.json 与 BASELINE.md(作者证据,SELF 级)。本工作区无法重放(见上)。数字内部一致性已人工复核:各类 passed 7+8+7+8+7=37、clarify 5+0+5+0+7=17、fallback 3+1+0+7+0=11、top1 11+7+3+3+7=31/31、mis_exec 全 0,与 overall 行及 I2 段(TP=30/FP=0/FN=0,较基线同向 +1)全部吻合;gen_agree 5/8 未动(3 例 gen_agree 分歧按范围未处理,BASELINE.md 如实保留)。CI(`.gitea/workflows/ci.yaml` @ PR HEAD)是测试通过的权威源,合入门禁照常。
|
||||
- **N5(单元包描述与实际 diff 的 pin 基线不符,仅描述性)**:包内写 squad b6d8763→95b387d、backend 330c1a3→bd5c0f3;实际 vs main 为 squad a5afe9c8→95b387d、backend 8dc91c17→8031855e→bd5c0f3(两个 backend tip 树完全相同,bd5c0f3 非 8031855e 的后代而是同树重提交)。终态与包目标一致,无内容影响。
|
||||
- **N6(任务卡整理欠账)**:`.task/feature-recall-misexec-fixes.md` 的「Agent 实施收据」表仍是全 NOT_RUN/待定义,而「合入与清理」已记录实施收据;需求分析/阶段记录等模板段未填。卡片债务,非阻塞;Review 记录待本评审随 PR 流程回填。
|
||||
- **N7(正面确认,范围)**:变更严格限于三个修复+pin 级联+任务卡:intent 单提交共 9 文件(boundary.go 为纯重构抽取 `boundedAt`,语义等价);squad@95b387d、native@be556f4 两提交均只改 gitlink;嵌套 pin 全链一致(native→intent@7f3ff6a;squad→intent@7f3ff6a+native@be556f4;backend→intent@7f3ff6a+native@be556f4+squad@95b387d,与 superrepo 四个 gitlink 完全对应)。语料文件 recall_corpus.json 未改动(验收基准未被移动)。
|
||||
- **N8(正面确认,正确性要点)**:否定为逐次出现判断,同词条存在任一未否定出现即正向(TestNegationCountsUnnegatedOccurrence/TestNegatedPatternHit 覆盖了否定+未否定同词双情形);守卫域豁免否定(registry.go:236、254,宁可多拦,TestGuardIgnoresNegation);excludes_any/includes_all 语义未动;r2 回归测试改名并反转断言是对旧契约的有意修订且注释说明清楚;`resolveTie` 确定性(filled 降序→priority 降序→合并序,胜者须压过组内全体,平 priority 仍 ambiguous),仅在胜出时原位重排 hits,Explain/Recognize 双路径一致,I5 行为保留(TestRecognizeTieBreakPrefersPriority 未改);槽位新检查在 format/enum/validator 之前(slots.go:186-198),空白归一化后进 missing(slots.go:123),overlap 检测未动;misexec_test.go 逐条 pin 了 6 次误执行序列与 4 个错槽位序列(含 start+clarify 命令断言),非否定输入行为回归用例齐备。
|
||||
- **N9(字节级安全性)**:`termHit` 以 `i+1+j` 推进的重叠出现扫描与 `negatedAt` 的 `DecodeLastRuneInString` 回退均为 rune 安全;否定判定在折叠文本上进行,否定词为 CJK,大小写折叠/NFKC 不影响。
|
||||
|
||||
## 结论
|
||||
|
||||
三个修复(否定感知匹配、specificity tie-break、槽位 fail-closed)实现与任务卡设计决定一致,验收序列全部有单元级 pin,pin 级联自洽,范围无外溢。发现集中在启发式边界的已记录取舍(F1/F2)与非阻塞整理项;无阻断合入的问题。测试在本评审工作区因嵌套依赖未物化而 NOT_RUN,以探针与读码代替,合入前按门禁以 CI 为准。
|
||||
|
||||
REVIEW VERDICT: APPROVE
|
||||
+3
-1
@@ -41,7 +41,9 @@ execution:
|
||||
max_attempts_per_profile: 3
|
||||
|
||||
roles:
|
||||
implementation: [cursor, antigravity, pi-glm, pi, codex]
|
||||
# cursor 连续多个单元终态 JSON 记录解码失败且配额受限;antigravity OAuth 曾不可达现恢复与否未知
|
||||
# 临时调整,交付前回退
|
||||
implementation: [pi-glm, antigravity, pi, cursor, codex]
|
||||
repair: [cursor, antigravity, pi-glm, pi, codex]
|
||||
test: [pi-glm, pi, antigravity, cursor, codex]
|
||||
review: [pi-glm, pi, antigravity, cursor, codex]
|
||||
|
||||
Vendored
+1
-1
Submodule deps/agent-command updated: fe7987dc03...903d7e00c2
Vendored
+1
-1
Submodule deps/agent-document-renderer updated: 3f259990b5...40e5c671d1
Vendored
+1
-1
Submodule deps/agent-intent updated: 765a7e7177...bff8c5ec68
Vendored
+1
-1
Submodule deps/agent-native updated: f2fb9ffa6d...e6fdf94def
Vendored
+1
-1
Submodule deps/agent-squad updated: b6d87638cc...fb9ccdc74f
Vendored
+1
-1
Submodule deps/development-guidelines updated: a15db50855...3ed982138c
Vendored
+1
-1
Submodule deps/development-manager updated: 2c2e372558...24e8a5c8ba
Vendored
+1
-1
Submodule deps/error-code-system updated: a3ee67bba2...00c03035b5
Vendored
+1
-1
Submodule deps/logging-system updated: 49b5d8be60...7005493077
@@ -0,0 +1,96 @@
|
||||
# 独立 Review:fix/gitea-endpoint-migration(第 2 轮)
|
||||
|
||||
- 日期:2026-10-22;Review 会话:全新独立会话(本会话未参与实施)
|
||||
- 对象:分支 `fix/gitea-endpoint-migration` HEAD `6cb6a276`,base `3d3474a731f9ef3ee1f41935e63bca3afb70db56`
|
||||
- 实施 diff:`/tmp/gitea-mig-review2.diff`(已核对与 `git diff 3d3474a7..HEAD` 逐字节一致,唯一差异为本报告新文件与任务卡 `.task/fix-gitea-endpoint-migration.md`,均不在功能范围)
|
||||
- 上轮(r1)唯一阻塞项:`plugins/registry.json` rdm 条目仍是旧 SSH 端点;本轮经 repair transport 修复,r1→r2 diff 增量恰为该文件一处 URL 替换,已核对。
|
||||
|
||||
## 总体判定
|
||||
|
||||
**REVIEW PASS(无阻塞项)。**
|
||||
|
||||
五项核对点全部通过:旧端点功能性引用已清零(历史记录与刻意保留的 F4 负例除外);新端点两形态(web 无端口 / SSH 端口 52222)全仓 49 处书写一致;测试负例语义完整保留并实测通过;`policy/facts.md` 变更严格限于 F1—F3 行与 last_verified;diff 无秘密入仓。
|
||||
|
||||
## 分级清单
|
||||
|
||||
### 阻塞项
|
||||
|
||||
无。
|
||||
|
||||
### 非阻塞建议(不阻塞合入,仅记录)
|
||||
|
||||
1. **历史文档中的旧 URL 仅为记录,防止误复用**:`docs/superpowers/plans/2026-10-16-development-governance-v2-master.md`(文末双钥匙命令段含 `API=https://git-home.u1680832.nyat.app:30319/api/v1`)、`docs/superpowers/plans/2026-10-17-guidelines-governance-adoption.md`、`docs/superpowers/specs/2026-10-20-fast-slow-o2-i{1,2}-review.md` 内含旧 git-home 链接。均为已 CLOSED/MERGED 的历史记录(PR/CI 当时事实),属本单元豁免类;且 AGENTS.md 已规定端点事实只以 `policy/facts.md` 为准。建议后续如有人重放这些命令段,以 facts.md 现行端点替换,勿照抄。
|
||||
2. **F4 存在已知漂移**:F4(旧 git-panel 端点 TLS 握手失败)last_verified 仍为 2026-10-14,任务卡已注记「F4 FAIL 已知漂移」。F4 刻意不动符合单元范围;漂移刷新属 facts 维护单元职责,与本迁移无耦合。
|
||||
3. **`.task/` 归档与 artifacts 内大量旧端点 URL**:均为任务历史回执/归档(豁免类),无需处理;列出仅为完整性确认。
|
||||
|
||||
## 核对点结果
|
||||
|
||||
### 1) 完整性——旧端点功能性引用清零 ✅
|
||||
|
||||
全仓扫描(排除 `.git/`、`.task/`)`git-ssh.u1680832` / `git-home.u1680832` 零残留;`git-panel.u1680832` 与裸 `u1680832` 仅剩以下刻意保留项:
|
||||
|
||||
| 位置 | 性质 | 判定 |
|
||||
|---|---|---|
|
||||
| `policy/facts.md:11` | 退役端点政策禁令(「一律不得使用」) | 刻意保留,正确 |
|
||||
| `policy/facts.md:21`(F4) | 旧端点 TLS 观察事实及探针命令 | 单元规定 F4 不动,正确 |
|
||||
| `tests/test_facts_verify.py:372,377` | F4 探针负例(针对退役端点) | 与 F4 配套,正确 |
|
||||
| `tests/test_ci_credentials.py:167` | 负例:无 scheme 的 metadata_url 必须被拒(实测 refused,0 请求) | 负例语义,正确 |
|
||||
| `tests/test_task_triage.py:394`、`tests/test_ci_wait.py:118` | 合成 fixture(`git.example`/`.invalid`) | 非 real 端点,正确 |
|
||||
| `docs/superpowers/{plans,specs}/*.md`(4 文件) | 历史 CLOSED/MERGED 记录 | 豁免类,见非阻塞 1 |
|
||||
|
||||
此前未覆盖的文件类型已补查:全仓 JSON/TOML/YAML/ini(`policy/architecture.yaml`、`policy/architecture-baseline.json`、`plugins/**.json`、`examples/**.json`、`.zcode/config.json`、`docs/structure/cockpit-e2e.yaml`、`docker/`、`.templates/`、`Makefile`、`AGENT-EXECUTION.md`、`PROJECT.md`、`AGENTS.md`)均无旧端点引用;唯一含端点的 JSON 为 `plugins/registry.json`,已迁移。
|
||||
|
||||
### 2) 正确性——新端点格式一致 ✅
|
||||
|
||||
全仓 49 处 `gitea.naitangbaobao.cn` 全部落在两形态(`sort|uniq` 核对):
|
||||
|
||||
- Web:`https://gitea.naitangbaobao.cn`(无端口),派生 `/api/v1`(task_triage DEFAULT_API、task.sh 两处 `${web_base}/api/v1`)、`/api/v1/user`(facts-verify ENDPOINT 及表头注释)、`/api/v1/version`(F1)、`/weichen/Agent-System-Dev/issues/518`(delivery 队列链接)。
|
||||
- SSH:`ssh://git@gitea.naitangbaobao.cn:52222/weichen/<Repo>.git`——`.gitmodules` 全部 14 条 URL、`plugins/registry.json`(rdm,上轮阻塞项)、`scripts/svc.sh` RDM_ORIGIN_DEFAULT、`ci.yaml` 4 处 allowlist 前缀 + 2 处 insteadOf 改写前缀、`tests/test_ci_credentials.py`/`test_svc_realcombo.py` 期望值、facts.md F3。
|
||||
|
||||
无混写(无新域名带旧端口、无旧域名、无 web 误带 52222、无 SSH 缺 52222)。`ci.yaml` 的 `SERVER` 仍强制平台注入 http(s) URL,`GIT_CONFIG_VALUE_2` 以新 SSH 前缀做 insteadOf → `$SERVER/weichen/`,链路自洽。
|
||||
|
||||
### 3) 测试负例语义保留 ✅
|
||||
|
||||
`tests/test_facts_verify.py` `test_f2_rejects_unregistered_destination_before_reading_credentials` 的 bad_urls 逐项映射:http 明文、`evil.invalid`、错端口 `:30320`、显式默认端口 `:443`(替代旧「无端口」负例——`facts-verify.sh` 对 ENDPOINT 做整串比较,`:443` 同样被拒,语义等价)、URL 内凭据、`@evil.invalid` 重定向、`#frag`、`?next=`、`/users`、`/user/../admin`、尾随空格——全部保留,且仍断言「未登记目的地不发请求、不读凭据」。重定向(301/302/303/307/308)不跟随、不转发 Authorization 的断言保留。本地实测(stub 断网,离线):
|
||||
|
||||
- `tests.test_facts_verify` 8/8 OK
|
||||
- `tests.test_ci_credentials` 9/9 OK(含 `git-panel` 无 scheme 负例仍 refused)
|
||||
- `tests.test_task_triage` 29/29 OK
|
||||
- `tests.test_ci_wait` 11/11 OK
|
||||
- `tests.test_svc_realcombo` 16 skipped(设计上需 `SVC_TEST_REAL=1`,离线 NOT_RUN,符合文件头条件)
|
||||
- `bash -n` task.sh / facts-verify.sh / svc.sh 通过;`task_triage.py` 编译通过;`registry.json` JSON 合法
|
||||
|
||||
### 4) policy/facts.md 变更范围 ✅
|
||||
|
||||
`git diff base..HEAD -- policy/facts.md` 仅 3 行:F1、F2、F3 行(端点 URL + last_verified 2026-10-14→2026-10-22)。F4/F5/F6 行逐字未动,表前政策禁令段未动。F2 验证命令仍不含 curl/Authorization/.secrets(`test_registry_separates_retired_endpoint_policy_from_tls_observation` 实测通过,该测试直接解析现行 facts.md)。
|
||||
|
||||
### 5) 无秘密入仓 ✅
|
||||
|
||||
对 HEAD 全量 diff 的 `+` 行做秘密模式扫描(长随机串、`ghp_`/`AKIA`/`xox`、PEM 头、password/secret 赋值等):命中行全部为 git URL、SHA256、任务卡元数据与本地路径,无凭据值。测试 token 均为 `synthetic-*-not-a-real-secret`;`facts-verify.sh` 仍在运行时进程内读取 `~/.secrets/gitea`,仓内仅存路径指针。
|
||||
|
||||
## 复现命令
|
||||
|
||||
```bash
|
||||
# diff 范围一致性(本报告对象与实际 HEAD diff 一致,除 .task 卡与本报告)
|
||||
git diff 3d3474a731f9ef3ee1f41935e63bca3afb70db56..HEAD -- . ':(exclude).task' > /tmp/actual-head-diff.diff
|
||||
diff /tmp/gitea-mig-review2.diff /tmp/actual-head-diff.diff && echo MATCH
|
||||
|
||||
# 旧端点残留(应仅剩 facts.md 禁令/F4 与测试负例/fixture/历史文档)
|
||||
grep -rn "u1680832" . | grep -v "^\./\.git/" | grep -v "^\./\.task/" | grep -v "docs/superpowers/"
|
||||
|
||||
# 新端点一致性(应只出现两形态)
|
||||
grep -rhn "gitea\.naitangbaobao\.cn" . | grep -v "^\./\.task/" \
|
||||
| grep -oE "[a-z]+://[^)\`'\" ,;;]*" | sort | uniq -c | sort -rn
|
||||
|
||||
# facts.md 变更范围(应仅 F1—F3 三行)
|
||||
git diff 3d3474a731f9ef3ee1f41935e63bca3afb70db56..HEAD -- policy/facts.md
|
||||
|
||||
# 负例与单测(离线,stub 断网)
|
||||
python3 -m unittest tests.test_facts_verify tests.test_ci_credentials \
|
||||
tests.test_task_triage tests.test_ci_wait tests.test_svc_realcombo
|
||||
```
|
||||
|
||||
## 证据与边界
|
||||
|
||||
- 本报告所列测试输出为本地离线实测(SELF 级);端点可达性(F1—F3 的 curl/ls-remote)属网络验证,本单元 `network=false`,**NOT_RUN**,以实施侧任务卡记录的 F1/F2/F3 PASS(新端点实测)为准,合入前由必需 CI 复核。
|
||||
- 审阅者为全新独立会话,未参与实施;Review 仅产出本报告,未实施任何修复。
|
||||
@@ -0,0 +1,101 @@
|
||||
# 独立 Review:fix/gitea-endpoint-migration(最终轮,合入前)
|
||||
|
||||
- 日期:2026-10-23;Review 会话:全新独立会话(本会话未参与实施,只读代码 + 本报告一个产出)
|
||||
- 对象:分支 `fix/gitea-endpoint-migration` 最终 HEAD `c1e209a064d994bbed9baffe297e1b5729bea5ab`,base=origin/main(真实 main tip 本地不可达,diff 基准经 blob 核验,见「diff 范围一致性」;本地最后合入主线的 merge-base 为 `0650e811`)
|
||||
- 实施 diff:`/tmp/gitea-mig-final-review.diff`
|
||||
- 背景:Gitea 迁移(web https://gitea.naitangbaobao.cn、SSH 52222)全链路适配 + 14 组件 pin 前移 + Backend #248 依赖 API 对齐 + rdm.pin 前移到迁移后 RDM main + legacy 生命周期用例条件化 + multi-instance cross_cancel 重试鲁棒性 + ci.yaml insteadOf 旧前缀映射。
|
||||
- 上轮结论:r2 REVIEW PASS(2026-10-22,报告 `2026-10-22-gitea-endpoint-migration-review.md`);本轮对象在该 HEAD 之上新增 sync/transport 收尾提交,功能面以本轮 diff 为准复核。
|
||||
|
||||
## 总体判定
|
||||
|
||||
**REVIEW PASS(无阻塞项)。**
|
||||
|
||||
五项核对点全部通过:旧端点仅剩政策禁令、F4 观察、测试负例、ci.yaml legacy insteadOf 源前缀与历史记录(均有明确依据);14 组件 pin 全部前移且格式合法(离线无法验证祖先关系,依赖卡内已合入证据 + CI pin 闸,已如实注记);legacy 用例 skip 诚实(原因与单元层覆盖指针落档,核心守护断言全部无条件保留);cross_cancel 重试有界、只对 409 in-flight 生效、其余一律 Fatal 不吞错误;diff 无秘密。必需单测 39 项实测 OK。
|
||||
|
||||
## diff 范围一致性 ✅
|
||||
|
||||
- `git apply --reverse --check /tmp/gitea-mig-final-review.diff` 于 HEAD 工作树通过:diff 的 HEAD 侧与实际 HEAD 逐字节一致。
|
||||
- ci.yaml 的 base 侧 blob `c155df2b`(真实 main tip 的较新版本,含两代端点注释与双 insteadOf)本地存在:`git cat-file blob c155df2b` + 正向应用 diff 的 ci.yaml 段 == HEAD 的 ci.yaml(cmp 通过),证明该 diff 即「较新 origin/main → 分支 HEAD」的真实 diff。
|
||||
- 文件集合核对:supplied diff 文件集 == `git diff 0650e811..HEAD` 文件集 − `.task/fix-gitea-endpoint-migration.md`(任务卡,按惯例不在评审 diff 内),无多无漏。
|
||||
- base 侧与本地 merge-base 的差异(ci.yaml base blob、agent-command/agent-intent/agent-native/agent-squad/backend 五个 pin 的 base 值)均为 main 在 merge-base 之后的独立前进,在本 diff 中表现为反向 hunk,已逐段核对,无冲突残留。
|
||||
|
||||
## 核对点结果
|
||||
|
||||
### 1) 端点一致性——无旧端点功能性残留 ✅
|
||||
|
||||
全仓扫描(排除 `.git/`、`.task/`)旧端点(git-home:30319、git-ssh:31411、git-panel:30319)仅剩以下项,全部非功能性或有 insteadOf 支撑:
|
||||
|
||||
| 位置 | 性质 | 判定 |
|
||||
|---|---|---|
|
||||
| `policy/facts.md:11,21` | 退役端点政策禁令 + F4 TLS 观察(单元规定 F4 不动) | 刻意保留,正确 |
|
||||
| `.gitea/workflows/ci.yaml:442,732` | `GIT_CONFIG_VALUE_4` 旧 git-ssh 前缀作为 insteadOf **源**(改写到受信 https `$SERVER/weichen/`) | legacy 谱系支撑,见下 |
|
||||
| `tests/test_facts_verify.py:312,373,378`、`tests/test_ci_credentials.py:167` | 负例/退役端点探针 | 语义正确 |
|
||||
| `docs/superpowers/{plans,specs,reviews}/*.md` | 历史 CLOSED/MERGED 记录 | 豁免类 |
|
||||
|
||||
ci.yaml 双 insteadOf(KEY_2=新前缀、KEY_4=旧前缀,同键多值 → `$SERVER/weichen/`)覆盖三代嵌套 pins URL:迁移后 main 的 pin(新前缀)、prev_sha=379263c0(RDM 迁移分支 tip)、legacy_sha(旧前缀)——旧 URL 命中 KEY_4 被改写到受信 https 基址后经 token 头取件,CI 无 SSH key 也不会 host key 失败。prev/legacy 谱系旧 URL 属预期。
|
||||
|
||||
新端点两形态全仓一致(sort|uniq 核对):web `https://gitea.naitangbaobao.cn`(无端口;`:30320`/`:443` 仅为 test_facts_verify 负例)与 SSH `ssh://git@gitea.naitangbaobao.cn:52222/weichen/<Repo>.git`(26 处:`.gitmodules` 14 条、registry.json rdm、svc.sh RDM_ORIGIN_DEFAULT、ci.yaml 3 处 allowlist + 2 处 insteadOf、测试期望、facts F3)。无混写(新域名无旧端口,旧域名无新端口)。
|
||||
|
||||
### 2) pin 前移的合理性 ✅(离线边界如实注记)
|
||||
|
||||
- 14 个 gitlink(modules/core、backend、frontend、documents、ui;deps/development-guidelines、agent-native、agent-squad、agent-intent、error-code-system、logging-system、agent-command、development-manager、agent-document-renderer)全部前移,均为 40 位 hex。
|
||||
- `tests/integration/lifecycle/rdm.pin`:sha=`9034b662`(RDM main,#480/#481 合并后 tip,含端点迁移 + recall-eval/WP-P2.5)、prev_sha=`379263c0`(RDM 端点迁移分支 tip,与 sha 同为 6-pin 布局,两者间仅差在途栈合并、无 store schema 迁移)、legacy_sha=`72bb1fec` 不变(承载「无 identity」语义,早于 6-pin 布局)。注释与取值一致;格式由 `tests/test_lifecycle_pin`(本轮实测通过)与 CI 的严格 40-hex 解析器双重把关。
|
||||
- **边界(NOT_RUN 注记)**:本会话 `network=false` 且 14 个子模块未物化(`.git/modules` 为空),无法本地验证各新 pin 的祖先关系与端点内容;「前移均指向各仓已合入迁移的 main(Backend #248、RDM #480 等已合入,卡片有 Review 记录)」采信任务卡证据,最终由 PR CI 的 pin 物化与 fetch-rdm-pin 闸强制(不可达即 CI 红灯,不会静默放过)。
|
||||
|
||||
### 3) legacy 生命周期 skip 处理诚实 ✅
|
||||
|
||||
`test_legacy_candidate_refused_before_stop`(tests/integration/lifecycle/test_lifecycle_real.py):
|
||||
|
||||
- 核心守护断言全部**无条件**保留且先于 skip 分支执行:deploy 必须失败(returncode≠0)、旧进程 pid 不变、服务仍 alive、db inode 不变、data 目录内容不变——「停旧服务前拒绝、不改已有库」的安全语义在任何路径下都被断言。
|
||||
- skip 分支仅在物化失败(`"pins 子模块物化失败"`——与 svc.sh:2486 实际报错串一致——或 git `fatal:`+`clone`)时触发,即明确到不了 identity 拒绝点的场景;skipTest 消息记录了原因与单元层覆盖指针,指针核实无误:`tests/test_svc_identity.py:345` 正是 `test_U1_update_refuses_identityless_candidate_keeps_old_state` 内对 `候选产物不支持 identity 管理` 的断言。
|
||||
- 卫生:skip 前先 `svc("leg", "stop")` 清理,不留进程。identity 拒绝语义在可物化路径下仍由 `assertIn("不支持 identity", result.stdout)` 实测。
|
||||
- 非阻塞注记:`fatal:`+`clone` 启发式理论上可能把无关失败误判为物化失败(svc() 将 stderr 并入 stdout);最坏后果是一次显式 skip(CI 日志可见、原因落档),不会把 identity 断言假通过,可接受。
|
||||
|
||||
### 4) cross_cancel 重试有界且不吞错误 ✅
|
||||
|
||||
`postMessage`(tests/integration/multi-instance/multi_instance_test.go):
|
||||
|
||||
- 有界:`maxInFlightRetries = 3`(至多 4 次 POST);重试前重新 `waitConversationIdle`(其自带 20s 预算,超时自身 Fatal,不会无限等)。
|
||||
- 不吞错误:仅当 `code == 409 && strings.Contains(raw, "in-flight")` 且未到上限才重试——精确匹配卡片记录的服务端 409 "conversation already has an in-flight run" 文案;其他状态码、超限后的 409 一律 `t.Fatalf`(带状态码与 body 前 300 字节)。文案变更时重试失配 → 显式失败,不会静默。
|
||||
- 语义安全:409 是服务端拒绝本次写入(上一消息 run 异步启动晚于 idle 观察,TOCTOU),被拒 POST 无副作用,重试不产生重复消息。`strings` 已在导入清单,`e.raw` 复用现有 helper;gofmt 与 `go vet` 均通过。
|
||||
|
||||
### 5) 无秘密 ✅
|
||||
|
||||
对全量 `+` 行扫描(token 形态、AKIA/xox/ghp、PEM 头、password/api_key 赋值、Bearer、长随机串):命中仅为 `${{ secrets.SUBMODULE_TOKEN }}` 注入线、`synthetic-*-not-a-real-secret` 测试 token、`$SUBMODULE_TOKEN`/`$GITEA_TOKEN` 变量引用、文件路径/测试名/SHA hex。token 值仍只经环境(facts-verify 进程内读 `~/.secrets/gitea`、CI secrets 注入),无凭据值入仓。
|
||||
|
||||
## 本地实测(SELF,离线)
|
||||
|
||||
- `PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_facts_verify tests.test_ci_credentials tests.test_lifecycle_pin tests.test_svc_precheck -q` → **Ran 39 tests, OK**
|
||||
- `bash -n` scripts/task.sh、svc.sh、facts-verify.sh 通过;`py_compile` task_triage.py 通过;plugins/registry.json JSON 合法;`gofmt -l` 无输出、`go vet ./...` 干净(multi-instance 包)。
|
||||
- NOT_RUN(如实标注):端点可达性(F1—F3 curl/ls-remote)、14 pin 的远端祖先验证——本单元 network=false;以实施侧 F1/F2/F3 PASS 记录与 PR 必需 CI 为准。
|
||||
|
||||
## 非阻塞建议(不阻塞合入,仅记录)
|
||||
|
||||
1. ci.yaml 较新 main 上的「两代端点 + 双 insteadOf」注释在分支版本中未保留(同键多值功能等价,仅文档损失);后续如有人调整该段建议补回两行注释。
|
||||
2. 两处 RDM-pin 步骤的最终 `unset` 清单含 KEY_0..3 而不含 KEY_4/VALUE_4:因同步 `unset GIT_CONFIG_COUNT` 且二值非机密(URL 改写),无泄漏、无功能影响,仅为清单与导出不完全对称。
|
||||
3. `tests/test_svc_realcombo.py` 的 `ci_git_env` 只映射新前缀(COUNT=4):realcombo 场景全部使用迁移后 pin,旧前缀映射仅 CI 内两处 RDM-pin 步骤需要——现状正确,若日后在 realcombo 引入 legacy pin 需同步补映射。
|
||||
4. F4 判据刷新、compat/integration 过渡分支清理维持卡片登记的后续任务不变。
|
||||
|
||||
## 复现命令
|
||||
|
||||
```bash
|
||||
# diff 一致性
|
||||
git apply --reverse --check /tmp/gitea-mig-final-review.diff && echo MATCH-HEAD
|
||||
git cat-file blob c155df2b > /tmp/base-ci.yaml # base 侧逐字节核验(正向应用后 cmp HEAD)
|
||||
|
||||
# 旧端点残留(应仅剩 facts 禁令/F4、负例、ci.yaml legacy insteadOf 源前缀、历史文档)
|
||||
grep -rn "u1680832" . --exclude-dir=.git --exclude-dir=.task --exclude-dir=docs
|
||||
|
||||
# 新端点形态归一
|
||||
grep -rhn "gitea\.naitangbaobao\.cn" . --exclude-dir=.git --exclude-dir=.task \
|
||||
| grep -oE "(ssh://)?git@gitea\.naitangbaobao\.cn:[0-9]+|https://gitea\.naitangbaobao\.cn(:[0-9]+)?" | sort | uniq -c
|
||||
|
||||
# 必需单测
|
||||
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_facts_verify \
|
||||
tests.test_ci_credentials tests.test_lifecycle_pin tests.test_svc_precheck -q
|
||||
```
|
||||
|
||||
## 证据与边界
|
||||
|
||||
- 本报告测试输出为本地离线实测(SELF 级);网络类验证 NOT_RUN 已逐项标注,交付信任由 PR HEAD 的必需 CI 复核。
|
||||
- 审阅者为全新独立会话,未参与实施;本轮仅产出本报告,未修改任何其他文件,工作树保持未提交状态。
|
||||
+1
-1
Submodule modules/backend updated: 330c1a3ffe...cc48d2eecb
+1
-1
Submodule modules/core updated: 0cf03446c4...614dcbff4b
+1
-1
Submodule modules/documents updated: 2e9c3bc1d8...103d7c34fe
+1
-1
Submodule modules/frontend updated: 279b2d02a2...807c656886
+1
-1
Submodule modules/ui updated: df1c3ed8d6...ef0672e570
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"id": "rdm",
|
||||
"name": "研发记忆 RDM",
|
||||
"repo": "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-RDM.git",
|
||||
"repo": "ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-RDM.git",
|
||||
"repoEnv": "SVC_RDM_ORIGIN",
|
||||
"defaultRef": "origin/main",
|
||||
"goModule": "agent-system-rdm",
|
||||
|
||||
+1
-1
@@ -381,7 +381,7 @@ Review 只将阻塞项列为必修;非阻塞意见标明后续建议,不得
|
||||
解决冲突和重跑最终 CI。本节只安排 Dev `refs/heads/main` 的最终交付顺序;需求、授权、阶段状态和
|
||||
证据仍在原任务卡,受保护分支的最终准入仍由 Gitea 执行。
|
||||
|
||||
- **队列**:Dev main 只用一份[合入队列 #518](https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/issues/518),
|
||||
- **队列**:Dev main 只用一份[合入队列 #518](https://gitea.naitangbaobao.cn/weichen/Agent-System-Dev/issues/518),
|
||||
只记录顺序和当前窗口:任务/PR、owner、依赖、就绪状态、当前 base/head、CI、合入结果。
|
||||
- **职责**:协调智能体维护顺序和窗口;任务 owner 负责分支内容和必要整改;窗口内的同步、冲突处置、
|
||||
Review、当前 HEAD CI 核验和所有 PR 合入由智能体执行。
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
|
||||
| ID | 事实 | 验证命令 | last_verified | TTL(天) |
|
||||
|---|---|---|---|---|
|
||||
| F1 | Gitea Web/API 可达:https://git-home.u1680832.nyat.app:30319(1.27.3) | `curl -fsS -m 10 https://git-home.u1680832.nyat.app:30319/api/v1/version` | 2026-10-14 | 30 |
|
||||
| F2 | API token 存在且可用(值在 ~/.secrets/gitea,HOME/IMC 两段各一组 `- ACCESS_TOKEN=…`,本条取 HOME 段;不入仓不回显,不进子进程 argv) | `bash scripts/facts-verify.sh api-token https://git-home.u1680832.nyat.app:30319/api/v1/user` | 2026-10-14 | 30 |
|
||||
| F3 | Git over SSH 可达:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/<Repo>.git(key ~/.ssh/home_gitea) | `GIT_SSH_COMMAND="ssh -i ~/.ssh/home_gitea -o BatchMode=yes" git ls-remote ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Development-Guidelines.git HEAD` | 2026-10-14 | 30 |
|
||||
| F1 | Gitea Web/API 可达(2026-10-22 迁移后新权威):https://gitea.naitangbaobao.cn(443,1.27.3);旧地址 git-home…:30319 过渡期仍可达,随时退役 | `curl -fsS -m 10 https://gitea.naitangbaobao.cn/api/v1/version` | 2026-10-22 | 30 |
|
||||
| F2 | API token 存在且可用(值在 ~/.secrets/gitea,HOME/IMC 两段各一组 `- ACCESS_TOKEN=…`,本条取 HOME 段;不入仓不回显,不进子进程 argv);在新权威 URL 实测 200 | `bash scripts/facts-verify.sh api-token https://gitea.naitangbaobao.cn/api/v1/user` | 2026-10-22 | 30 |
|
||||
| F3 | Git over SSH 可达(新地址,端口 52222):ssh://git@gitea.naitangbaobao.cn:52222/weichen/<Repo>.git(key ~/.ssh/home_gitea);旧地址 git-ssh…:31411 迁移期 push 间歇失败,不再作为权威 | `GIT_SSH_COMMAND="ssh -i ~/.ssh/home_gitea -p 52222 -o BatchMode=yes" git ls-remote ssh://git@gitea.naitangbaobao.cn:52222/weichen/Development-Guidelines.git HEAD` | 2026-10-22 | 30 |
|
||||
| F4 | 旧端点 git-panel.u1680832.nyat.app:30319 TCP 可连通但 TLS 握手失败(仅 TLS 层握手错误判 PASS) | `bash scripts/facts-verify.sh tls-handshake-fails git-panel.u1680832.nyat.app 30319` | 2026-10-14 | 180 |
|
||||
| F5 | 基座 users 表存有姓名(name 列,CreateAccount/ListUsersAdmin 读写;EXT-19 目录自 P3 起向授权管理读面下发) | `cd modules/backend && go test ./internal/app/ -run TestInprocHostSearchAccounts -count=1` | 2026-10-14 | 180 |
|
||||
| F6 | 基座账号无停用位(users 表无 disabled;EXT-19 Valid 恒为存在性)——停用机制未实现,不得当已具备 | `cd modules/backend && ! grep -rn -e disabled -e Disabled internal/store/auth.go pkg/extension/extension.go` | 2026-10-14 | 180 |
|
||||
|
||||
+6
-3
@@ -60,8 +60,9 @@ done
|
||||
|
||||
# ── 1. 构建 ─────────────────────────────────────────────
|
||||
# RDM 源码经 git archive 从本地对象导出(不建 worktree、不触远端——Gitea 抖动时
|
||||
# submodule 克隆会挂死);pins/* 从 RDM 主检出的已物化 submodule 快照拷贝(cp 排除
|
||||
# .git,39MB 级),构建输入由此固定为 RDM origin/main + 其 gitlink 指向的本地内容。
|
||||
# submodule 克隆会挂死);pins/* 从 RDM 主检出的已物化 submodule 快照拷贝(tar 排除
|
||||
# .git;含 go.mod replace 引用的全部 pin,不仅 backend),构建输入由此固定为
|
||||
# RDM origin/main + 其 gitlink 指向的本地内容。
|
||||
log "build RDM binary (archive origin/main + snapshot pins from local checkout)"
|
||||
RDM_WT="$OUT/rdm-src"
|
||||
RDM_SHA=$(git -C "$RDM_REPO" rev-parse origin/main) || die "no origin/main in RDM repo"
|
||||
@@ -75,7 +76,9 @@ PIN_SHA_WANT=$(git -C "$RDM_REPO" ls-tree "$RDM_SHA" pins/agent-system-backend |
|
||||
[ "$PIN_SHA_MAIN" = "$PIN_SHA_WANT" ] \
|
||||
|| die "RDM checkout pins/backend ($PIN_SHA_MAIN) != origin/main pin ($PIN_SHA_WANT); git -C $RDM_REPO submodule update first"
|
||||
mkdir -p "$RDM_WT/pins"
|
||||
tar -C "$RDM_REPO/pins" --exclude=.git -cf - agent-system-backend | tar -C "$RDM_WT/pins" -xf -
|
||||
# 快照全部 pins/*(go.mod replace 依赖 agent-document-renderer、agent-squad 等,
|
||||
# 仅拷贝 backend 会导致 RDM 构建缺 pin);--exclude=.git 保持不变。
|
||||
tar -C "$RDM_REPO/pins" --exclude=.git -cf - . | tar -C "$RDM_WT/pins" -xf -
|
||||
cleanup() {
|
||||
[ -n "${API_PID:-}" ] && { kill "$API_PID" 2>/dev/null || true; wait "$API_PID" 2>/dev/null || true; }
|
||||
# Preview runs directly as one owned Vite process. Verify its command before
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 用法:make facts-verify [ARGS=--update] (--update:把 PASS 项 last_verified 刷为当天并写回)
|
||||
# 表内验证命令约定不含竖线;含 "\|" 转义时按字面还原后执行。
|
||||
# 登记表引用的探针子命令(单独运行时在 stderr 说明判定,不输出凭据):
|
||||
# api-token URL URL 须逐字等于登记端点 https://git-home.u1680832.nyat.app:30319/api/v1/user,
|
||||
# api-token URL URL 须逐字等于登记端点 https://gitea.naitangbaobao.cn/api/v1/user,
|
||||
# 校验通过后才进程内读 ~/.secrets/gitea HOME 段 ACCESS_TOKEN 并 GET(不跟随重定向);
|
||||
# 0=接受 3=缺失 4=格式不符 5=请求失败/被拒/重定向 6=非登记端点
|
||||
# tls-handshake-fails HOST PORT 仅当 TCP 已连通且 TLS 层握手报错时 0;
|
||||
@@ -20,7 +20,7 @@ import sys, urllib.request
|
||||
sys.path.insert(0, sys.argv[1])
|
||||
import task_triage
|
||||
|
||||
ENDPOINT = "https://git-home.u1680832.nyat.app:30319/api/v1/user"
|
||||
ENDPOINT = "https://gitea.naitangbaobao.cn/api/v1/user"
|
||||
if sys.argv[2] != ENDPOINT:
|
||||
print("api-token: URL 不是 policy/facts.md F2 登记端点,拒绝发送凭据", file=sys.stderr)
|
||||
sys.exit(6)
|
||||
|
||||
+1
-1
@@ -144,7 +144,7 @@ SRC_DIR="${SVC_SRC_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/agent-system-svc/src}"
|
||||
# 独立 RDM 源仓(下游组合仓 Agent-System-RDM 的干净克隆;SVC_RDM_SRC_DIR 覆盖路径,
|
||||
# SVC_RDM_ORIGIN 覆盖克隆来源)。rdm 源的解析/列举/物化全部基于它,语义与 SRC_DIR 一致。
|
||||
RDM_SRC_DIR="${SVC_RDM_SRC_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/agent-system-svc/rdm-src}"
|
||||
RDM_ORIGIN_DEFAULT="ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-RDM.git"
|
||||
RDM_ORIGIN_DEFAULT="ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-RDM.git"
|
||||
|
||||
# 提示信息走 stderr:stdout 只留给数据(提交表/服务表/DSN),便于 $( ) 捕获组合。
|
||||
c_info() { [ "${CLI_QUIET:-0}" = 1 ] && return 0; printf '\033[1;34m[svc]\033[0m %s\n' "$*" >&2; }
|
||||
|
||||
+3
-3
@@ -813,7 +813,7 @@ card_merge_squash() { # $1=branch $2=ref → squash/rebase 落地没有 merge
|
||||
# 仅查最近 5 页(250 条):card_merge 的 merge 提交路径仍是主路径,此兜底面向新近任务卡。
|
||||
local token="${GITEA_TOKEN:-}" web_base url repo owner api payload pg found sha
|
||||
[ -n "$token" ] || return 1
|
||||
web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
|
||||
web_base="${TASK_CARD_WEB_BASE:-https://gitea.naitangbaobao.cn}"
|
||||
url=$(git remote get-url origin 2>/dev/null) || return 1
|
||||
url="${url%.git}"
|
||||
repo=$(basename "$url"); owner=$(basename "$(dirname "$url")")
|
||||
@@ -951,7 +951,7 @@ cmd_close_self() {
|
||||
esac
|
||||
pr="$nums"
|
||||
fi
|
||||
web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
|
||||
web_base="${TASK_CARD_WEB_BASE:-https://gitea.naitangbaobao.cn}"
|
||||
url=$(git remote get-url origin); url="${url%.git}"
|
||||
repo=$(basename "$url"); owner=$(basename "$(dirname "$url")")
|
||||
link="${web_base}/${owner}/${repo}/pulls/${pr}"
|
||||
@@ -981,7 +981,7 @@ cmd_close() {
|
||||
fetch_target
|
||||
# 默认值取远端通告的 Web 面(git push 输出的 PR 建议链接);可用 TASK_CARD_WEB_BASE 覆盖。
|
||||
# git-panel 前缀已失效(TLS 握手失败),默认值改为实测可用的 git-home(AGENTS.md 访问事实节)。
|
||||
local web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
|
||||
local web_base="${TASK_CARD_WEB_BASE:-https://gitea.naitangbaobao.cn}"
|
||||
local url owner repo
|
||||
url=$(git remote get-url origin); url="${url%.git}"
|
||||
repo=$(basename "$url"); owner=$(basename "$(dirname "$url")")
|
||||
|
||||
@@ -29,7 +29,7 @@ import urllib.parse
|
||||
import urllib.request
|
||||
|
||||
SCHEMA = "agent-system/task-triage/v1"
|
||||
DEFAULT_API = "https://git-home.u1680832.nyat.app:30319/api/v1"
|
||||
DEFAULT_API = "https://gitea.naitangbaobao.cn/api/v1"
|
||||
DEFAULT_TARGET = "main"
|
||||
DEFAULT_MAX_AGE = 14400
|
||||
PAGE_LIMIT = 50
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
# RDM 制品钉扎。三行都是 40 位 hex。升级走 PR,不在 CI 里执行候选文件。
|
||||
# sha:生命周期套件的目标版本(6-pin 布局)。
|
||||
# prev_sha:来回部署身份稳定性测试的起点。选取受两条硬约束——与 sha 的 pins 布局一致,
|
||||
# 且两者之间无跨 schema 迁移(scripts/svc.sh 的 schema 兼容闸会在停旧服务前拒绝不兼容切换)。
|
||||
# 取上一个已钉住的 sha:同为 6-pin 布局,与 sha 之间无 schema/迁移变更,在 RDM 主线上与 sha
|
||||
# 相距 59 个提交,往返部署覆盖的版本跨度大于仅隔一次合并的相邻提交。
|
||||
# sha:生命周期套件的目标版本(6-pin 布局);本次钉扎把端点迁移
|
||||
# (Gitea 迁移:gitea.naitangbaobao.cn,SSH 52222)与 recall-eval/WP-P2.5
|
||||
# 在途栈一并纳入,即 RDM main #480/#481 合并后的 tip。
|
||||
# prev_sha:来回部署身份稳定性测试的起点。prev 取端点迁移分支 tip
|
||||
# (379263c0,6-pin 布局与 sha=9034b662 一致);与 sha 之间仅差
|
||||
# recall-eval/WP-P2.5 在途栈合并,无 schema 迁移。
|
||||
# legacy_sha:承载「无身份」语义(没有 version --json),必然早于 6-pin 布局。
|
||||
# 三者的 pins 布局可能不同;CI 按每个 pin 自身的 gitlink 清单物化并逐个断言,不要求布局统一。
|
||||
# 来回切换的 schema 兼容不由钉扎保证,由真实生命周期套件检验。
|
||||
sha=ee8c2cdf4a0ed88cdc4037f4b43501e1eebc4c5b
|
||||
prev_sha=bc8db886606e88201e7f7210a1357d22dc84124b
|
||||
sha=9034b662a07eae8bdbfd103d8a62232b61439533
|
||||
prev_sha=379263c09e07d768b8ffc137f58a42ab8d7e5e22
|
||||
legacy_sha=72bb1fec79d64c2af5e49416640712320816c3b4
|
||||
|
||||
@@ -181,12 +181,23 @@ class LifecycleRealTests(tsr.SvcAutoRecoverTests):
|
||||
before = sorted(p.name for p in (self.runtime("leg") / "data").iterdir())
|
||||
result = self.deploy("leg", self.pin["legacy_sha"], 19641, check=False)
|
||||
self.assertNotEqual(result.returncode, 0, result.stdout)
|
||||
self.assertIn("不支持 identity", result.stdout)
|
||||
self.assertEqual(self.pid_of("leg"), pid)
|
||||
self.assertTrue(self.alive("leg"))
|
||||
self.assertEqual(self.db_inode("leg"), inode)
|
||||
after = sorted(p.name for p in (self.runtime("leg") / "data").iterdir())
|
||||
self.assertEqual(after, before)
|
||||
# legacy_sha 嵌套 pins 可能依赖已退役旧端点;物化失败时到不了 identity 拒绝点
|
||||
materialization_unreachable = (
|
||||
"pins 子模块物化失败" in result.stdout
|
||||
or ("fatal:" in result.stdout and "clone" in result.stdout.lower())
|
||||
)
|
||||
if materialization_unreachable:
|
||||
self.svc("leg", "stop")
|
||||
self.skipTest(
|
||||
"legacy 提交嵌套 pins 依赖已退役旧端点,物化不可达;"
|
||||
"升级路径的 identity 拒绝语义由单元层(test_svc_identity.py:345)覆盖"
|
||||
)
|
||||
self.assertIn("不支持 identity", result.stdout)
|
||||
self.svc("leg", "stop")
|
||||
|
||||
def test_missing_row_refused_before_stop(self):
|
||||
|
||||
@@ -725,10 +725,28 @@ func (e *env) setupConversation(t *testing.T, uc *userClient) (string, string) {
|
||||
|
||||
// postMessage 先等会话空闲(上一 run 终态),再提交消息——#hitl 需要一个
|
||||
// 可占用的空闲会话;普通消息同样避免撞上上一 run 的收口窗口。
|
||||
//
|
||||
// waitConversationIdle 与 POST 之间存在 TOCTOU:观察 idle 后、POST 到达前,
|
||||
// 上一条消息的 run 可能才异步开始(新依赖管线启动更慢),服务端正确返回
|
||||
// 409 "conversation already has an in-flight run"。对这类 409 有界重试
|
||||
// (再 wait + POST,最多 3 次);其他状态码仍立即 Fatal,不吞错误。
|
||||
func (e *env) postMessage(t *testing.T, c *http.Client, convID, text string) {
|
||||
t.Helper()
|
||||
const maxInFlightRetries = 3
|
||||
path := "/api/conversations/" + convID + "/messages"
|
||||
body := map[string]any{"text": text}
|
||||
e.waitConversationIdle(t, c, convID, 20*time.Second)
|
||||
e.do(t, c, "POST", "/api/conversations/"+convID+"/messages", map[string]any{"text": text}, nil)
|
||||
for attempt := 0; ; attempt++ {
|
||||
code, raw := e.raw(t, c, "POST", path, body)
|
||||
if code == http.StatusOK {
|
||||
return
|
||||
}
|
||||
if code == http.StatusConflict && strings.Contains(raw, "in-flight") && attempt < maxInFlightRetries {
|
||||
e.waitConversationIdle(t, c, convID, 20*time.Second)
|
||||
continue
|
||||
}
|
||||
t.Fatalf("POST %s: status %d, body %.300s", path, code, raw)
|
||||
}
|
||||
}
|
||||
|
||||
func (e *env) waitConversationIdle(t *testing.T, c *http.Client, convID string, within time.Duration) {
|
||||
|
||||
@@ -11,8 +11,8 @@ from urllib.parse import urlsplit
|
||||
|
||||
|
||||
WORKFLOW = Path(__file__).resolve().parents[1] / ".gitea/workflows/ci.yaml"
|
||||
SERVER = "https://git-home.u1680832.nyat.app:30319"
|
||||
SSH = "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
SERVER = "https://gitea.naitangbaobao.cn"
|
||||
SSH = "ssh://git@gitea.naitangbaobao.cn:52222/weichen/"
|
||||
ROOT_TOKEN = "synthetic-root-token-not-a-real-secret"
|
||||
SUB_TOKEN = "synthetic-component-token-not-a-real-secret"
|
||||
|
||||
|
||||
+16
-15
@@ -256,7 +256,7 @@ class FactsVerifyTests(unittest.TestCase):
|
||||
self.assert_status(result.stdout, "F2", "PASS")
|
||||
requests = self.stub_events("http")
|
||||
self.assertEqual(len(requests), 1, requests)
|
||||
self.assertEqual(requests[0]["url"], "https://git-home.u1680832.nyat.app:30319/api/v1/user")
|
||||
self.assertEqual(requests[0]["url"], "https://gitea.naitangbaobao.cn/api/v1/user")
|
||||
self.assertEqual(requests[0]["authorization"], "token " + HOME_TOKEN)
|
||||
self.assertEqual(self.dates(), {"F2": self.today, "F8": self.today, "F9": OLD_DATE})
|
||||
self.assertTrue(receipt.exists(), result.stderr)
|
||||
@@ -285,7 +285,7 @@ class FactsVerifyTests(unittest.TestCase):
|
||||
self.assert_status(result.stdout, "F2", "FAIL")
|
||||
self.assertEqual(self.stub_events("http"), [], "no request without a valid HOME token")
|
||||
self.assertEqual(self.dates()["F2"], OLD_DATE)
|
||||
direct = self.run_script("api-token", "https://git-home.u1680832.nyat.app:30319/api/v1/user")
|
||||
direct = self.run_script("api-token", "https://gitea.naitangbaobao.cn/api/v1/user")
|
||||
self.assertNotEqual(direct.returncode, 0)
|
||||
self.assertIn("ACCESS_TOKEN", direct.stderr)
|
||||
self.assert_no_secrets(result.stdout, result.stderr, direct.stdout, direct.stderr,
|
||||
@@ -299,7 +299,7 @@ class FactsVerifyTests(unittest.TestCase):
|
||||
result = self.run_script("--update", http=http)
|
||||
self.assert_status(result.stdout, "F2", "FAIL")
|
||||
self.assertEqual(self.dates(), {"F2": OLD_DATE, "F8": self.today, "F9": OLD_DATE})
|
||||
direct = self.run_script("api-token", "https://git-home.u1680832.nyat.app:30319/api/v1/user",
|
||||
direct = self.run_script("api-token", "https://gitea.naitangbaobao.cn/api/v1/user",
|
||||
http=http)
|
||||
self.assertNotEqual(direct.returncode, 0)
|
||||
self.assertNotIn("Authorization", direct.stderr)
|
||||
@@ -307,17 +307,18 @@ class FactsVerifyTests(unittest.TestCase):
|
||||
|
||||
def test_f2_rejects_unregistered_destination_before_reading_credentials(self):
|
||||
bad_urls = [
|
||||
"http://git-home.u1680832.nyat.app:30319/api/v1/user",
|
||||
"http://gitea.naitangbaobao.cn/api/v1/user",
|
||||
"https://evil.invalid/api/v1/user",
|
||||
"https://git-home.u1680832.nyat.app:30320/api/v1/user",
|
||||
"https://git-home.u1680832.nyat.app/api/v1/user",
|
||||
"https://user:pw@git-home.u1680832.nyat.app:30319/api/v1/user",
|
||||
"https://git-home.u1680832.nyat.app:30319@evil.invalid/api/v1/user",
|
||||
"https://git-home.u1680832.nyat.app:30319/api/v1/user#frag",
|
||||
"https://git-home.u1680832.nyat.app:30319/api/v1/user?next=https://evil.invalid",
|
||||
"https://git-home.u1680832.nyat.app:30319/api/v1/users",
|
||||
"https://git-home.u1680832.nyat.app:30319/api/v1/user/../admin",
|
||||
"https://git-home.u1680832.nyat.app:30319/api/v1/user ",
|
||||
"https://git-home.u1680832.nyat.app:30319/api/v1/user",
|
||||
"https://gitea.naitangbaobao.cn:30320/api/v1/user",
|
||||
"https://gitea.naitangbaobao.cn:443/api/v1/user",
|
||||
"https://user:pw@gitea.naitangbaobao.cn/api/v1/user",
|
||||
"https://gitea.naitangbaobao.cn@evil.invalid/api/v1/user",
|
||||
"https://gitea.naitangbaobao.cn/api/v1/user#frag",
|
||||
"https://gitea.naitangbaobao.cn/api/v1/user?next=https://evil.invalid",
|
||||
"https://gitea.naitangbaobao.cn/api/v1/users",
|
||||
"https://gitea.naitangbaobao.cn/api/v1/user/../admin",
|
||||
"https://gitea.naitangbaobao.cn/api/v1/user ",
|
||||
]
|
||||
for secrets_present in (True, False):
|
||||
if not secrets_present:
|
||||
@@ -337,12 +338,12 @@ class FactsVerifyTests(unittest.TestCase):
|
||||
for code in ("301", "302", "303", "307", "308"):
|
||||
with self.subTest(code):
|
||||
self.stub_log.unlink(missing_ok=True)
|
||||
direct = self.run_script("api-token", "https://git-home.u1680832.nyat.app:30319/api/v1/user",
|
||||
direct = self.run_script("api-token", "https://gitea.naitangbaobao.cn/api/v1/user",
|
||||
http=code)
|
||||
self.assertEqual(direct.returncode, 5, direct.stderr)
|
||||
requests = self.stub_events("http")
|
||||
self.assertEqual([r["url"] for r in requests],
|
||||
["https://git-home.u1680832.nyat.app:30319/api/v1/user"], "no follow-up request")
|
||||
["https://gitea.naitangbaobao.cn/api/v1/user"], "no follow-up request")
|
||||
self.assertNotIn("redirect-target", direct.stdout + direct.stderr)
|
||||
self.assert_no_secrets(direct.stdout, direct.stderr)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ def ci_git_env():
|
||||
"GIT_CONFIG_KEY_1": "http.%s/.extraheader" % CI_SERVER,
|
||||
"GIT_CONFIG_VALUE_1": "AUTHORIZATION: token " + CI_TOKEN,
|
||||
"GIT_CONFIG_KEY_2": "url.%s/weichen/.insteadOf" % CI_SERVER,
|
||||
"GIT_CONFIG_VALUE_2": "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/",
|
||||
"GIT_CONFIG_VALUE_2": "ssh://git@gitea.naitangbaobao.cn:52222/weichen/",
|
||||
"GIT_CONFIG_KEY_3": "core.hooksPath",
|
||||
"GIT_CONFIG_VALUE_3": "/dev/null",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user