Compare commits

..
Author SHA1 Message Date
agent-exec-transport d55ff23b0c Explain why CI keeps both submodule SSH endpoint mappings
ci / svc-realcombo (pull_request) Successful in 2m55s
ci / test (pull_request) Successful in 10m1s
ci / test-pg (pull_request) Successful in 13m54s
Why: After the Gitea migration some repositories still declare the legacy
endpoint in .gitmodules while facts F3 names the new one as authoritative. Both
endpoints currently resolve and serve git, so CI needs both insteadOf mappings;
dropping either one makes that batch of pins fall back to real SSH and the
svc-realcombo job fails on host key verification.

Evidence: 2026-10-23 measurement from this machine — both endpoints answer
git ls-remote with the same HEAD; Agent-System-Dev declares 14 submodule URLs on
the legacy endpoint, Agent-System-Backend 10, Agent-System-RDM 8 and
Agent-System-KB-Regulations 2 on the new one.

Impact: comments only; no GIT_CONFIG key, job structure or credential handling
changes.

Refs: feature/ecs-deploy-dev8788-and-kb
2026-10-23 13:06:55 +00:00
weichen 05b1e34dc5 Fold-close the task card before merge
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-ecs-deploy-dev8788-and-kb.md -> .task/archive/feature-ecs-deploy-dev8788-and-kb.md; status 已完成(合入前闭合); PR #720 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/720.
Impact: task metadata only; the card is archived within PR #720 and lands with its merge commit.
Refs: task.sh close --self
2026-10-23 12:42:04 +00:00
14 changed files with 35 additions and 277 deletions
+13 -16
View File
@@ -77,9 +77,6 @@ jobs:
"fetch.recurseSubmodules": "false", "submodule.recurse": "false",
"http.followRedirects": "false", "protocol.allow": "never",
"protocol." + urlsplit(SERVER).scheme + ".allow": "always",
# 嵌套 pins(RDM/KB 等)仍以权威 SSH 端点声明 URL:把它改写到同一受信
# HTTPS 基址,才能复用既有的 URL 级 token 头而不依赖真实 SSH。
# 本仓 .gitmodules 已是 HTTPS 形式,SSH 允许清单常量保持不变。
}
@@ -289,9 +286,6 @@ jobs:
"fetch.recurseSubmodules": "false", "submodule.recurse": "false",
"http.followRedirects": "false", "protocol.allow": "never",
"protocol." + urlsplit(SERVER).scheme + ".allow": "always",
# 嵌套 pins(RDM/KB 等)仍以权威 SSH 端点声明 URL:把它改写到同一受信
# HTTPS 基址,才能复用既有的 URL 级 token 头而不依赖真实 SSH。
# 本仓 .gitmodules 已是 HTTPS 形式,SSH 允许清单常量保持不变。
}
@@ -436,9 +430,12 @@ jobs:
SERVER="$(printf '%s' "$GITHUB_SERVER_URL" | sed 's:/*$::')"
scheme="${GITHUB_SERVER_URL%%://*}"
# 嵌套 pins 的 SSH 端点有两代:旧 git-ssh.*:31411 与迁移后的 gitea.*:52222。
# 两条 insteadOf 必须同时保留:RDM 自身的 pins 已迁到权威端点,而它钉住的
# 基座/前端仓里仍有以旧端点声明的嵌套 pins,去掉任一条都会让那批 pins 退回
# 真实 SSH,CI 无 key 时必然 host key 失败。等所有 .gitmodules 迁完后才能收敛。
# 两个 insteadOf 必须同时保留,直到本仓与所有组件仓的 .gitmodules 全部迁到
# 新端点(policy/facts.md F3 已把新端点列为权威;2026-10-23 实测本仓
# .gitmodules 仍有旧端点子模块,Agent-System-Backend 亦然):
# · 去掉旧端点映射 → 旧端点声明的子模块退回真实 SSH,CI 无 key 必失败;
# · 去掉新端点映射 → RDM/KB 等已迁移的 pins 同样退回真实 SSH 而失败。
# 同键多值,git 会依次匹配。
export GIT_CONFIG_COUNT=5
export GIT_CONFIG_KEY_0="protocol.$scheme.allow"
export GIT_CONFIG_VALUE_0="always"
@@ -624,9 +621,6 @@ jobs:
"fetch.recurseSubmodules": "false", "submodule.recurse": "false",
"http.followRedirects": "false", "protocol.allow": "never",
"protocol." + urlsplit(SERVER).scheme + ".allow": "always",
# 嵌套 pins(RDM/KB 等)仍以权威 SSH 端点声明 URL:把它改写到同一受信
# HTTPS 基址,才能复用既有的 URL 级 token 头而不依赖真实 SSH。
# 本仓 .gitmodules 已是 HTTPS 形式,SSH 允许清单常量保持不变。
}
@@ -734,16 +728,19 @@ jobs:
SERVER="$(printf '%s' "$GITHUB_SERVER_URL" | sed 's:/*$::')"
scheme="${GITHUB_SERVER_URL%%://*}"
# 嵌套 pins 的 SSH 端点有两代:旧 git-ssh.*:31411 与迁移后的 gitea.*:52222。
# 两条 insteadOf 必须同时保留:RDM 自身的 pins 已迁到权威端点,而它钉住的
# 基座/前端仓里仍有以旧端点声明的嵌套 pins,去掉任一条都会让那批 pins 退回
# 真实 SSH,CI 无 key 时必然 host key 失败。等所有 .gitmodules 迁完后才能收敛。
# 两个 insteadOf 必须同时保留,直到本仓与所有组件仓的 .gitmodules 全部迁到
# 新端点(policy/facts.md F3 已把新端点列为权威;2026-10-23 实测本仓
# .gitmodules 仍有旧端点子模块,Agent-System-Backend 亦然):
# · 去掉旧端点映射 → 旧端点声明的子模块退回真实 SSH,CI 无 key 必失败;
# · 去掉新端点映射 → RDM/KB 等已迁移的 pins 同样退回真实 SSH 而失败。
# 同键多值,git 会依次匹配。
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@gitea.naitangbaobao.cn:52222/weichen/"
export GIT_CONFIG_VALUE_2="ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
export GIT_CONFIG_KEY_3="core.hooksPath"
export GIT_CONFIG_VALUE_3="/dev/null"
export GIT_CONFIG_KEY_4="url.$SERVER/weichen/.insteadOf"
@@ -1,6 +1,6 @@
# feature/ecs-deploy-dev8788-and-kb 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
任务主记录:PR #720 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/720;状态:已完成(合入前闭合);owner:weichen
## 基线与授权
@@ -678,3 +678,9 @@
}
```
| 同步(记录前对象) | 0650e81133b853f27e8e53f516de8f6c1e73e4a4 | 1a3f9a1e5f08d25cedc82024ba1354b186932777 | 2026-10-23T11:13:15Z |
## 闭合记录(合入前折叠)
- 本卡在 PR #720(https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/720)合入前闭合并归档,随该 PR 一同合入。
- 该 PR 的合并提交即本任务的落地记录。
- 合入后无需回填,也无需单独的闭合 PR。
@@ -1,158 +0,0 @@
# feature/audit-review-minors-cleanup 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
## 基线与授权
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 0650e81133b853f27e8e53f516de8f6c1e73e4a4
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-audit-review-minors-cleanup(worktree);分支:feature/audit-review-minors-cleanup
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=8093a20aeb1bf2cdf72035222ea6296c93a89d1f9af5a33174b7b4e137b203ff;triage_receipt=/tmp/triage-minors-1792741494.json;receipt_sha256=f971d66ba14af677a56e68112fb842731e90066b0a5dd9ce66a746c86561257a
- 授权与交付终点:用户已批准启动评审 minor 打包收口(四份评审报告的非阻塞跟进项,M5 与批二收据注记已在先前任务完成)。范围内连续推进:按仓库拆 6 个单元实施、验证、组合、Review、PR/CI/合入。未授权:A4、部署、svc 测试环境与 .gitmodules 镜像改写排查(另行诊断任务)。
- 单元拆分:U1 native(会话身份编码防碰撞);U2 squad(探针改直拷、过期注释、保存失败回写内存态);U3 command(unknown 回执 JSON 往返契约文档/再水化);U4 intent(基线漂移说明、fmt.Sprint 逐元素比较);U5 backend-session(intent_session 注释同步、取消拒绝原因、过期 fail-closed、落槽归属用例锁定);U6 backend-diag(终态抑制 wait 映射、截断注记、优先级组合测试)。
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
- 人工决策点:仅限目标/范围/验收变更、重大取舍、高后果操作或无法自动判定的业务验收
- 当前阶段:需求拆解;当前增量:I1(待定义)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
**目标**:18 条 minor 中全部有效代码/文档项收口(含 A1 评审 m1-m4、批二 B-1/B-2/B-3/B-5),逐条对照评审报告原文验证。
**非目标**:A4;svc 测试 flake 与 .gitmodules 改写排查(另行诊断);任何行为语义变更(各 minor 均为卫生级,保持既有语义,仅消除隐患/失实/脆弱)。
## 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 |
|---|---|---|---|
| 启动 | 0650e81133b853f27e8e53f516de8f6c1e73e4a4 | 0650e81133b853f27e8e53f516de8f6c1e73e4a4 | 2026-10-23T07:46:24Z |
## 证据(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 与规划记录)
- 启动授权:未授权(建议不自动启动新任务,仍须明确授权)
## 合入与清理
- 实施收据:U1 native(cursor,会话身份编码,verify-min-native exit=0);U2 squad(pi 三连终态记录解码失败后 codex 承接——/pi 禁用与 codex 入列的理由入档,M2 直拷+M4 注释+B-3 回写,verify-minm2c4 exit=0);U3 command(M3 往返标记,verify-min-cmd exit=0);U4 intent(基线说明+逐元素比较,verify-min-int3 exit=0);U5 backend-session(m1-m4,verify-min-sess2 exit=0);U6 backend-diag(MI1-3+B-1/B-2,verify-min-diag exit=0);pin 级联集成(test 角色,minorg6-run.json)。
- 组合验证:全量 make test PASS(verify-minors-combo4.json exit=0)。
- Review 记录:独立 CLI 评审单元 minors-cleanup-independent-review(收据 /tmp/agent-stack-b2/reviewmin-run.json);结论 BLOCK(BL1 属实:backend 分支从未包含 m1-m4——min-sess2 的 apply 因我误读输出被跳过)→ 修复单元 a1m-fix(从保留的 transport diff 重放,backend 7776399)→ 已入分支;报告 .task/reviews/2026-10-22-minors-cleanup-independent-review.md;backend pin 随之更新(84530464)。
- 冲突记录: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-23T07:45:30.253011+00:00",
"command": "make precheck",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev",
"before_head": "0650e81133b853f27e8e53f516de8f6c1e73e4a4",
"after_head": "0650e81133b853f27e8e53f516de8f6c1e73e4a4",
"branch": "main",
"target_branch": "main",
"target_head": "0650e81133b853f27e8e53f516de8f6c1e73e4a4",
"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=0650e81133",
"[remote] origin/main=0650e81133 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/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] 0650e81133(完整:0650e81133b853f27e8e53f516de8f6c1e73e4a4)",
"[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": "c1734e4f72604116deae298cf460045ba0adade340c8ef670bf95d4e9f8de5d6",
"receipt_sha256": "629046bbfcce1b86b48f1f7e1333a2a3d3ca84ce78376de9c2f41a8661e77902",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/629046bbfcce1b86b48f1f7e1333a2a3d3ca84ce78376de9c2f41a8661e77902.json"
}
```
@@ -1,90 +0,0 @@
# Independent Code Review — feature/audit-review-minors-cleanup (minors cleanup)
- Reviewer: independent CLI review session (minors-cleanup-independent-review unit; fresh session, not the implementer)
- Date: 2026-10-23 (UTC), report file per unit packet naming
- Review object: Dev superrepo @ `f8377960` (branch `feature/audit-review-minors-cleanup`) versus main merge point `0650e811` (R0 per task card; no `origin/*` refs exist in this sandbox, `git merge-base HEAD 0650e811 = 0650e811`, so `git diff 0650e811...HEAD` ≡ `git diff origin/main...HEAD`).
- Dev-level diff: `.task/feature-audit-review-minors-cleanup.md` (new, host domain) + five gitlinks, nothing else:
- `deps/agent-native` `be556f46..4183ea77` (2 commits: M1 fix + nested intent pin)
- `deps/agent-squad` `95b387d7..2d27389d` (3 commits: routing config, M2, M4+B-3 + nested pins)
- `deps/agent-intent` `7f3ff6a1..78312281` (1 commit: A3-1 + A3-2)
- `deps/agent-command` `fe7987dc..d5bb4254` (1 commit: M3)
- `modules/backend` `bd5c0f39..67102901` (1 transport commit: A2 MI1-MI3 + B-1 + B-2 + nested pins — **but NOT A1 m1-m4, see Blocker 1**)
- Fix-item trace: the packet says "the four reports in `.task/reviews/`"; the 16 claimed items actually trace across **five** reports: b1 (`2026-10-21-agent-stack-b1-…`: M1/M2/M3/M4), a1 (`2026-10-22-a1-intent-multi-turn-…`: m1-m4), a2 (`2026-10-22-a2-diagnostics-…`: MI1-MI3), a3 (`2026-10-22-a3-recall-eval-…`: minors 1-2), b2 (`2026-10-22-agent-stack-b2-…`: minors 1/2/3 = B-1/B-2/B-3). All five were used as the comparison baseline.
- Method: full read of every changed file plus the surrounding code each fix touches (migration manifest, cancel handler, intentsession service, native loop serialization, squad recovery paths); gitlink- and tree-level trace of every intermediate dev/component pin on this branch; stdlib-only probe for the one encoding claim tested below. Findings only — the report file is the only change made.
## 1. Verification runs (this session, foreground; honest exits)
| Check | Result |
|---|---|
| `git diff 0650e811...HEAD --stat` | exactly task card + 5 gitlinks; matches declared scope |
| `git status --porcelain` (dev + all 5 components) at review start | clean; all checkouts at pinned SHAs, 0 dirty files |
| `bash scripts/check-pins.sh` | exit 0, `pins ok`; guidelines/manager deltas warn-only by design; `pin regression check skipped` (no `origin/main` locally — same as prior review sessions) |
| Nested pin agreement (`git ls-tree` at all levels) | command `d5bb4254` (Dev=backend), intent `78312281` (Dev=backend=native=squad), native `4183ea77` (Dev=backend=squad), squad `2d27389d` (Dev=backend) — all agree |
| `deps/agent-command`: `GOWORK=off go test -count=1 ./...` | **ok** (2 packages); focused `-run "Trusted|Misplaced|ReceiptJSON|Untrusted"`: 6/6 PASS — M3 verified by execution |
| `deps/agent-native`: `GOWORK=off go test -count=1 ./exec/ ./runtime/session/ ./runtime/tools/` | **ok** (tools 11.4s) |
| `deps/agent-native`: `GOWORK=off go build ./adapters/native/` (M1 package) | **NOT_RUN** — module setup fails on unmaterialized `deps/error-code-system`/`logging-system` (empty gitlinks, objects absent, network forbidden, submodule ops forbidden) |
| squad / intent / backend builds (M2/B-3/M4, A3-2, A2/B-1/B-2 packages) | **NOT_RUN** — same unmaterialized replace-target reason; static line review + git-trace instead |
| `gofmt -l` sweep over all 15 changed Go files | clean except `deps/agent-squad/squad/engine.go` — **pre-existing** (identical deviation at old pin `95b387d7`, struct-literal alignment at :870; the changed hunks :1069-1090 are clean) |
| A3 baseline immobility | `sha256sum intent/testdata/recall_corpus.json` = `53d26cfc4caad994…` == `corpus_digest` in `evaluation/metrics.json` — corpus untouched, as the fix commit claims |
| M1 encoding probe (verbatim extraction of `scopeIdentity`, /tmp, deleted after) | reproduced a **cross-path collision** (see Minor 1) |
| Task-card-recorded receipts (`verify-min-*`, `verify-minors-combo4`, `make test PASS`) | **[未经证实]** — not re-executable in this sandbox; per packet `make test` was not run |
## 2. Findings
### Blocker
**BL1 — A1 m1-m4 are claimed in the backend range `bd5c0f3..6710290` but are absent from it; the range does not contain the four claimed fixes (lens 1 fails for 4 of 16 items).**
The unit packet and the task card (unit split U5 "intent_session 注释同步、取消拒绝原因、过期 fail-closed、落槽归属用例锁定"; receipt row "U5 backend-session(m1-m4,verify-min-sess2 exit=0)") claim these four a1-review minors are fixed in this PR's backend advance. They are not, at any point in the branch's backend history:
- **m1 (store comment sync) — unfixed.** `internal/store/intent_session.go:11-13` still says the table 「不进 storage-migrate 的 copyOrder(同 admission_leases…)」, while `cmd/storage-migrate/main.go:313` ships `intent_session` in `copyOrder` (mandated by the dynamic manifest check in `cmd/storage-migrate/main_test.go:213-219` — the fix direction is the comment, as the a1 report concluded). Verbatim the state the a1 report flagged.
- **m2 (cancel rejection reason) — unfixed.** `internal/server/intent_cancel.go:142` still sets `result.Accepted=false` on bus rejection with no `Reason`; the local path sets `Reason` only on dispatch error (:162). The bus-rejected asymmetry stands exactly as reported.
- **m3 (expiry fail-closed) — unfixed.** `internal/intentsession/intentsession.go:366-374`: `live()` still returns `true` when `ExpiresAt` is zero (unparseable/missing expiry = never expires), the fail-open the a1 report asked to invert.
- **m4 (slot-ownership tightening) — unfixed.** `internal/server/intent_session.go:203` still accepts explicit `set_slot`/`change_slot` 不看意图归属 (comment unchanged), and no ownership-locking test was added (`intent_session_test.go` still has the same 8 tests from the A1 development; no cross-intent lock case).
History trace (this is not a transport-rebuild artifact): every backend pin on this dev branch was examined — `faf815f9`→`bd5c0f3` (unchanged), `f0d94360`→`a6d0c650`, `7539da50`→`3647f980`, `b7a9879a`/`f8377960`→`67102901`. `git diff bd5c0f3..a6d0c650` contains only the U6 diag/runtime changes; `a6d0c650..3647f980` and `3647f980..67102901` are nested-gitlink-only. `git log --all` in the backend checkout (branch `fix/audit-minors-cleanup`, full cloned history) shows **no commit has ever touched** `internal/store/intent_session.go`, `internal/server/intent_cancel.go`, `internal/server/intent_session.go`, or `internal/intentsession/intentsession.go` after their original A1 development commits (`0fb64c4`, `c2e3104`). The U5 work therefore never landed in any commit this PR ships; the task card's U5 receipt does not correspond to any object in the reviewed history and must be reconciled by the host before merge.
Blocking because lens (1) — "each minor actually fixed as its review report described" — is the core acceptance criterion of this unit, and 4 of the 16 claimed items silently failed it while the card records them as green.
### Minor
**MN1 — M1's new encoding is collision-free within each path but not across paths (residual, low practical reachability).**
`adapters/native/contract_bind.go:76-80` length-prefixes only when a component contains `/`; slash-free scopes keep the legacy `t+"/"+p+"/"+sess` join (byte-identical filename preservation — verified by `TestScopeIdentityLegacySlashFreeUnchanged`, and correct: legacy join is injective when no component contains `/`; the prefixed form is self-delimiting and injective within its own path). But a legacy-encoded string and a prefixed-encoded string can coincide: probe-verified —
- legacy scope `{tenant:"3:a", project:"b3:c", session:"d0:"}` (all slash-free) → `"3:a/b3:c/d0:"`
- prefixed scope `{tenant:"a/b", project:"c/d", session:""}` → `"3:a/b3:c/d0:"`
Same identity → same hashed transcript path; the store's exact-match check passes for whichever scope binds first, so two distinct logical scopes silently share one session transcript. Reachability today is nil (product identifiers contain no `/` per the b1 review's own note, so the prefixed branch never fires; legacy identifiers would additionally need digit-led colon-bearing shapes), and the failure mode is fail-safe at first contact only in the lucky ordering. Non-blocking, but the doc comment's "collision-free" claim (contract_bind.go:61-66) overstates: suggest either documenting the cross-path gap, or versioning the encoding (e.g. prefix the whole identity with a scheme byte) in a follow-up. The new tests (`contract_regression_test.go:177/199/210`) cover the intra-prefixed case, legacy stability, and mismatch refusal — none cover cross-path.
### Notes (non-defects, recorded for the merge decision)
1. **Routing config (declared infra, reviewed for YAML correctness only).** Net squad `AGENT-EXECUTION.md` delta 95b387d→2d27389: `emergency_profile: codex` removed; `implementation` gains `codex`; cursor stays disabled with refreshed reason; antigravity stays disabled (reason from 2026-10-21); **pi is enabled in the final tree** — it was disabled mid-range in `e0d58e6` (three terminal-record decode failures, reason recorded) and re-enabled in `681c303` (micro-packet mitigation, reason recorded). The packet's wording "disable cursor/antigravity/pi" matches the mid-range state, not the net-final state; both transitions carry recorded reasons per the file's own convention, all referenced profiles exist, and the roles/profiles YAML is well-formed. Not blocking per packet instruction; noted so the merge author knows the net state re-enables pi.
2. **A2 MI1 (terminal-state suppression) — fixed and correctly scoped.** `rundiag.go:249-264` nils stale card/decision/confirm on terminal runs and names each leftover in a note (`staleWaitRecords`, :434-447); `run.status` stays visible. Recovery holds are deliberately *not* treated as stale on terminal runs — correct, an open hold on a failed run is operationally meaningful and the switch keeps `recovery_hold`/`HoldUnknown` precedence (fail-closed ordering untouched). `isTerminalRun` (:423-432) is exactly failed/completed/cancelled; cancelled+leftovers maps to `unknown` (unmapped-status default) with no confirm advice — asserted by test.
3. **A2 MI2 (truncation notes) — fixed.** Package doc gains the "有界读取也要说出来" bullet (:10-11); confirms-cap note (:196-199), audit-scan-cap note (:215-219), and `side_effects` cap note via the new `sideEffects` truncation flag (:386-401, consumed at :230-236). The flag semantics preserve the old cap set byte-for-byte (cap check moved before append; first over-cap matching envelope returns `out, true`).
4. **A2 MI3 (precedence combinations) — fixed with the two combinations the a2 report named:** released-hold + open HITL card → `reconciling` (table case :112), decision outranks pending confirm → `waiting_hitl` (:123), plus terminal+leftover (:135); dedicated `TestBuildTerminalRunSuppressesStaleWaitEvidence` (:459, failed/completed/cancelled/live quadrants) and `TestBuildReportsReadCapsInsteadOfSilentTruncation` (:520, three caps + uncapped no-noise).
5. **B-1 (sink contract) — fixed as documentation** (`squad_events.go:62-68` on `squadEventLog`, :86-87 on `onEvent`): synchronous/fast/non-blocking sink contract, with the trade-off (moving Emit out of the lock sacrifices same-order invariant) spelled out — matches the b2 report's recommendation.
6. **B-2 (queued-access invariant) — fixed as documentation**, and its factual premise verified in the pinned native: `runtime/loop.go:228` wraps `Config.OnEvent` via `serializeHostCallbacks` (:610-619, mutex around inner), so the llm_direct comment's claim (parallel `tool_execution_start` events serialize through `onEvent`; queued need no lock; inflight/finalParts do) is accurate (`llm_direct.go:57`, `:766-774`, `:1452-1456`).
7. **M2 (direct field copy) — fixed, behavior-preserving.** `register.go:230-231` copies `SideEffects` (string-underlying conversion `exec.SideEffects`→`squad.ExecSideEffects`, values `none`/`possible` identical on both sides) and `Canceled`; `Aborted` stays zero — correct, native `exec.Result` has no `Aborted` field (grep: absent), so the old JSON probe could never have set it either; the old probe and its rationale are deleted, and the replacement comment explains the compile-time-pinning argument. `TestFromNativeCopiesTerminalFidelityDirectly` (register_test.go:18-93) is additive; no pre-existing test was removed. All prior register tests retained.
8. **M4 (stale comment) — fixed accurately.** The rewritten `recoverInterrupted` doc (engine.go:1069-1090) was checked line-by-line against the code: the only "一次重试" path is the 1c branch (`SideEffects=none` + missing files + `attempts<2`, engine.go:1140-1154); interactive synthesizes the HITL hold; auto/disabled/default land in `RunWaitingReconciliation` and nothing fails directly — the comment now says exactly this.
9. **B-3 (save-failure memory consistency) — fixed at both cited sites.** `gcFinish` (groupchat.go:344-349) and `runReviewDriver` (review.go:331-336) rewrite `st.Meta.Status` and `wf.Status` to `RunFailed` inside the same critical section before unlocking and returning the failed result. `cancelRun`'s save-failure path is intentionally out of B-3 scope (returns RunCancelled by design, per the b2 report's own wording). Three new tests in `terminal_state_consistency_test.go` capture the in-memory `*RunState` at `SaveRun` and assert memory==result, including a degraded→failed control-group fixture that proves the degraded branch is really exercised.
10. **A3-1 (baseline-drift caveat) — fixed**: `evaluation/BASELINE.md:74-83` states engine changes do not trigger baseline invalidation and manual re-run is required, in the a3 report's own terms; corpus digest unchanged (see §1).
11. **A3-2 (element-wise slice assertion) — fixed**: `intent/corpus.go:194-204` adds `equalStringSlices` (nil==empty, order-sensitive by documented intent) used at :235; `fmt` still used elsewhere so the import stays live.
12. **M3 (trusted-marker JSON roundtrip) — fixed and executed green in this session.** Wire field `operationIdTrusted` (omitempty ⇒ bytes for non-trusted receipts unchanged), marker restored only from the wire (never sticky on the receiver — tested), misplaced marker rejected via `ErrMisplacedTrustedMarker` (including mutated trusted→committed shape), `ParseExecReceipt` rehydrates+validates. Format risk contained: `AuditEnvelope` carries `State` as a plain string, not an embedded receipt, so no persisted payload gains the new key. Error-message change in `Validate` (:151) has no stale string assertions anywhere (grepped).
13. **Composition consistency**: `check-pins.sh` exit 0; nested pins agree at every level (§1); dev-level intermediate pins were transport-rebuilt on the same trees (native `9ec1bf7a`→`4183ea77` differs only by the nested intent gitlink; squad `5c752e0b`→`2d27389d` only by nested pins; backend `3647f980` is not an ancestor of `67102901` but their tree delta is exactly the nested `agent-command` gitlink) — the established transport pattern from prior PRs, no content drift found at dev or component level beyond the declared items.
14. **NOT_RUN matrix** (environment, not code — identical constraint to every prior review in this repo): native `adapters/native`, squad (all packages), intent (all packages), backend (all packages). The backend's A2/B-1/B-2 changes and squad's M2/M4/B-3 changes are verified statically; their recorded author receipts remain SELF-level and unreplayed here. Combined with BL1, the PR cannot claim lens (4) coverage for the four missing A1 items at all.
## 3. Lens summaries
1. **Fixes-as-reported** — 12 of 16 claimed items verified fixed with file:line evidence and (where testable) executed or read tests; **4 of 16 (A1 m1-m4) absent from the shipped backend range while claimed by packet and task card → Blocker BL1**.
2. **No behavior regressions** — for everything actually present: `fromNative` output proven identical field-for-field (M2 + test); legacy identity encoding byte-preserved (M1 legacy test); M3 wire format additive/omitempty with no embedded-receipt consumers; sideEffects cap set unchanged; terminal-suppression only diverts advisory output for terminal runs; check-pins green. No regression found in shipped code; the unshipped A1 fixes are simply missing.
3. **Composition consistency** — pass for what ships (pins, nested pins, card); fail as a claim: the card's U5 receipt references work absent from history (BL1).
4. **Tests assert fixed behaviors** — pass for the 12 shipped items (new tests target the exact trigger conditions, incl. fault injection for B-3 and cap/stale matrices for A2); N/A for the four missing items; M1's new tests miss the cross-path collision (MN1).
## 4. Conclusion
The twelve shipped minor fixes (M1-M4, B-1/B-2/B-3, A2 MI1-MI3, A3-1/A3-2) are real, scoped, behavior-preserving, and test-pinned where it matters; composition and routing-config hygiene are in order. But the unit's own acceptance lens fails: the backend range does not contain the four A1 session-minor fixes the packet and task card claim (store comment sync, cancel rejection reason, expiry fail-closed, slot-ownership tightening), no commit in the branch's history ever contained them, and the card records a U5 receipt for work that does not exist in any reviewed object. The PR must not merge as the "18-minor cleanup" it advertises until those four fixes actually land in a backend advance on this branch (and the U5 receipt is reconciled), after which a follow-up re-review of the backend delta alone would suffice.
Blocking reasons: BL1 (A1 m1-m4 missing from `modules/backend bd5c0f3..6710290`; card receipt/object mismatch). Non-blocking follow-ups: MN1 (cross-path identity collision residual), Note 1 (pi net-state vs packet wording), Note 14 (NOT_RUN replay at merge gate per policy).
REVIEW VERDICT: BLOCK
+1 -1
View File
@@ -3,7 +3,7 @@
{
"id": "rdm",
"name": "研发记忆 RDM",
"repo": "ssh://git@gitea.naitangbaobao.cn:52222/weichen/Agent-System-RDM.git",
"repo": "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-RDM.git",
"repoEnv": "SVC_RDM_ORIGIN",
"defaultRef": "origin/main",
"goModule": "agent-system-rdm",
+1 -1
View File
@@ -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@gitea.naitangbaobao.cn:52222/weichen/Agent-System-RDM.git"
RDM_ORIGIN_DEFAULT="ssh://git@git-ssh.u1680832.nyat.app:31411/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
View File
@@ -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://gitea.naitangbaobao.cn}"
web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
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://gitea.naitangbaobao.cn}"
web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
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://gitea.naitangbaobao.cn}"
local web_base="${TASK_CARD_WEB_BASE:-https://git-home.u1680832.nyat.app:30319}"
local url owner repo
url=$(git remote get-url origin); url="${url%.git}"
repo=$(basename "$url"); owner=$(basename "$(dirname "$url")")
+1 -1
View File
@@ -29,7 +29,7 @@ import urllib.parse
import urllib.request
SCHEMA = "agent-system/task-triage/v1"
DEFAULT_API = "https://gitea.naitangbaobao.cn/api/v1"
DEFAULT_API = "https://git-home.u1680832.nyat.app:30319/api/v1"
DEFAULT_TARGET = "main"
DEFAULT_MAX_AGE = 14400
PAGE_LIMIT = 50
+4 -1
View File
@@ -49,7 +49,10 @@ def ci_git_env():
if not (CI_SERVER and CI_TOKEN):
return {}
scheme = CI_SERVER.split("://", 1)[0]
# 子模块已改用权威 HTTPS 端点;这里只保留权威 SSH 端点的改写,供仍以 SSH 声明 pins 的仓库使用。
# 嵌套 pins 的 SSH 端点有两代:旧 git-ssh.*:31411 与迁移后的 gitea.*:52222。
# 两个 insteadOf 必须同时保留,直到所有 .gitmodules 迁到新端点(policy/facts.md
# F3 已把新端点列为权威;本仓 .gitmodules 仍有旧端点子模块):任去掉一个,
# 对应那批 pins 都会退回真实 SSH,而 CI 运行器没有 key,必然 host key 失败。
return {
"GIT_CONFIG_COUNT": "5",
"GIT_CONFIG_KEY_0": "protocol.%s.allow" % scheme,