Why: establish the authorized task workspace and its initial baseline.
Evidence: preserved precheck receipt in .task/feature-development-governance-v2-triage-hardening.md; R0=82c8989973112d0533ee7c70654c907269df7859.
Impact: task metadata only; the feature workspace starts at d46dec31de.
Refs: .task/feature-development-governance-v2-triage-hardening.md
Why: two U2.1 runs ended failed-unknown and were reconciled before a fresh run.
Evidence: receipts /tmp/gov2-receipt-u21.json and -r2.json; private clones had no remote and no commits.
Impact: task metadata only.
Refs: PR #585
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: the worker's terminal record was followed by a code fence and failed closed.
Evidence: /tmp/gov2-receipt-u21-r3.json; private clone had no remote and no commits.
Impact: task metadata only.
Refs: PR #585
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: the worker exited before reaching the model because of a TLS network failure.
Evidence: /tmp/gov2-receipt-u21-r4.json; private workspace clean, no remote.
Impact: task metadata only.
Refs: PR #585
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Both runs ended failed-unknown and must be reconciled before a fresh dispatch.
Evidence: /tmp/gov2-receipt-u21-r5.json, /tmp/ops-receipt-disable-cursor-dev.json (SELF).
Impact: Task card only; nothing integrated.
Refs: .task/feature-development-governance-v2-triage-hardening.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: U2.1 completed on the sixth fresh run and was applied by transport.
Evidence: make evidence run of task.sh syntax and 119 triage/task tests (SELF).
Impact: Task card only.
Refs: .task/feature-development-governance-v2-triage-hardening.md
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: U2.3 completed and was applied by transport; the first run was rejected before start.
Evidence: make evidence run of test_task_pr_check and test_ci_credentials (SELF).
Impact: Task card only.
Refs: .task/feature-development-governance-v2-triage-hardening.md
Co-authored-by: Cursor <cursoragent@cursor.com>
.gitea/workflows/ci.yaml: branches: [main] removed from pull_request; PR base gate step added after unset TOKEN SUBMODULE_TOKEN, no env: block on the step.
cmd_local: any Stop(EXIT_REMOTE=6) from Gitea client or git ls-remote failure → exit 6 (printed REMOTE_UNVERIFIED).
cmd_ci: only reads GITHUB_*_REF and local .task/<head>.md; no network, no token.
Credential handling in CI: PR base gate step runs after unset TOKEN SUBMODULE_TOKEN, has no env: block; cmd_ci does not read GITEA_TOKEN or any secret; test_ci_credentials checkout still passes.
Count-based auto-decision: verified absent — single-candidate test test_single_candidate_requires_decision_never_auto_join requires explicit decide; test_remote_initiative_needs_explicit_decision_and_never_auto_joins confirms task.sh triage exits 5 and never emits [verdict] JOIN.
Blocking problems
None.
Non-blocking notes
Makefile:task-pr-check recipe uses python3 … without @ prefix while sibling recipes use @bash …; minor style inconsistency.
In cmd_start the PRECHECK_RECEIPT validation runs before TRIAGE_RECEIPTverify; PRECHECK validation has no branch/worktree side effects so the goal ("before creating a branch") still holds.
Makefile:task-triage uses "$(REQ)"; double-quote in REQ would break shell quoting — general Makefile limitation, not introduced by this diff.
VERDICT: APPROVE
CI(GATE):run 3488 在 head f8bccba6b5 上 test / test-pg / svc-realcombo 均 success。
独立评审(REPLAY;工具 pi,`-p --no-session` 全新进程,fresh_session=true,session id not-observable;输入仅为固定目标、base d46dec31deda / head f8bccba6b5f6、diff 与测试命令):
## Review
**Scope verified:**
- `scripts/task_triage.py` (new, 505 lines): discover/decide/verify, schema `agent-system/task-triage/v1`, fail-closed `EXIT_REMOTE=6` on any remote failure.
- `scripts/task_pr_check.py` (new, 291 lines): `local` (PR base/head gate + parent initiative + `--final` registry) and `ci` (hermetic, no network/token, `pull_request` only).
- `scripts/task.sh`: `cmd_triage`/`cmd_triage_decide` added; `cmd_start` rejects when `TRIAGE_RECEIPT` unset (line 153), runs `verify` (line 161-167) before any `git worktree add` (line 220).
- `Makefile`: `task-triage`/`task-triage-decide`/`task-pr-check` targets; `TRIAGE_RECEIPT` exported.
- `.gitea/workflows/ci.yaml`: `branches: [main]` removed from `pull_request`; `PR base gate` step added after `unset TOKEN SUBMODULE_TOKEN`, no `env:` block on the step.
- All 46 triage+pr_check+ci_credentials tests, 77 test_task tests, 18 test_task_recovery tests pass.
**Fail-closed checks:**
- `discover`: raises `Stop(EXIT_REMOTE=6)` on `git ls-remote` failure, missing token, API unreachable/401/4xx/non-list; receipt is never written on failure.
- `decide`: re-snapshots and compares `fingerprint` (head_sha+card_sha256+pr fields); rejects on candidate drift.
- `verify`: re-snapshots; rejects on age>4h, root_target mismatch, verdict/kind mismatch, candidate drift.
- `cmd_local`: any `Stop(EXIT_REMOTE=6)` from Gitea client or `git ls-remote` failure → exit 6 (printed `REMOTE_UNVERIFIED`).
- `cmd_ci`: only reads `GITHUB_*_REF` and local `.task/<head>.md`; no network, no token.
**Credential handling in CI:** PR base gate step runs after `unset TOKEN SUBMODULE_TOKEN`, has no `env:` block; `cmd_ci` does not read `GITEA_TOKEN` or any secret; `test_ci_credentials` checkout still passes.
**Schema enforcement:** `load_receipt` rejects non-`agent-system/task-triage/v1` schema, missing keys, malformed candidates, invalid requirement/discovered_at.
**Count-based auto-decision:** verified absent — single-candidate test `test_single_candidate_requires_decision_never_auto_join` requires explicit `decide`; `test_remote_initiative_needs_explicit_decision_and_never_auto_joins` confirms `task.sh triage` exits 5 and never emits `[verdict] JOIN`.
### Blocking problems
None.
### Non-blocking notes
- `Makefile:task-pr-check` recipe uses `python3 …` without `@` prefix while sibling recipes use `@bash …`; minor style inconsistency.
- In `cmd_start` the `PRECHECK_RECEIPT` validation runs before `TRIAGE_RECEIPT` `verify`; PRECHECK validation has no branch/worktree side effects so the goal ("before creating a branch") still holds.
- `Makefile:task-triage` uses `"$(REQ)"`; double-quote in REQ would break shell quoting — general Makefile limitation, not introduced by this diff.
VERDICT: APPROVE
CI(GATE):run 3488 在 head f8bccba6b5f60ebabe3ab65a3bb8624b8f3192f4 上 test / test-pg / svc-realcombo 均 success。
weichen
merged commit ba029e4bdc into feature/development-governance-v22026-10-16 17:12:30 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
feature/development-governance-v2-triage-hardening 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
基线与授权
权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)=
82c8989973工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-development-governance-v2-triage-hardening(worktree);分支:feature/development-governance-v2-triage-hardening
分支类型:child;initiative_id:feature-development-governance-v2;root_target:main;immediate_target:feature/development-governance-v2;accepting_requirements:false;parent_branch:feature/development-governance-v2;parent_head_sha:d46dec31deda8dd95ab3447883e72b86e67076f0;parent_pr:https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/585
授权与交付终点:<本次允许的动作与终点;未授权事项写明>
交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
人工决策点:仅限目标/范围/验收变更、重大取舍、高后果操作或无法自动判定的业务验收
当前阶段:需求拆解;当前增量:I1(待定义)
流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
目标与非目标
scripts/task_triage.py(discover/decide/verify);task-start无有效收据拒绝建分支;禁止按候选数量自动 JOIN;远端/平台不可核验 fail closed。Agent 实施收据
按根目录 AGENT-EXECUTION.md 路由;外部 Agent 一单元一新进程/工作区。实施、修复与测试的正常候选仅为 Cursor、Antigravity(agy)和 PI;每个候选对安全可恢复失败最多 3 次全新尝试,然后才换下一候选。三者都安全耗尽后,才允许一次全新的 Codex CLI 紧急尝试。Codex 平时只用于规划、方案设计、实施计划或独立 Review。显式 fail-stop(failed-unknown、scope-expansion、blocked、cancelled、无效配置、未对账 Git 状态与安全失败)立即停止。不因推理时长、工具次数、规划方式或首次写文件时间判定失败;尝试只在显式终态失败、进程退出、总超时,或 stdin/stdout/stderr 均无活动的空闲超时时失败。CLI 可在目标、范围与安全边界内自主检查、计划、测试并迭代。实施集成必须是成功 transport 上的 scripts/agent_exec.py apply,或 pre-commit admit 的精确内容来源。host 直接管理的豁免仅为 .task/、docs/superpowers/specs/ 与 docs/superpowers/plans/**。fallback 列只记录该行是否为 Codex 紧急尝试。安全耗尽不发出 host-fallback-authorized,终态为 unavailable 或 blocked。不授权 host 直接撰写该单元。原始日志保留在源码外收据路径。
~/.local/bin/cursor-agent-stable包装脚本把 stdout 缓冲到进程结束才输出,执行器 600 s 内观察不到活动。处置:包装脚本改为tee实时输出(原文件备份为cursor-agent-stable.bak-20261016-buffered,冒烟验证 stream-json 实时到达),随后以全新运行重新派发。~/.local/bin的 PATH 启动执行器,cursor 在收据中如实记为 unavailable 后顺延 agy。关联方向与规划
需求分析
方案与计划
阶段记录
探索试验与迭代
同步记录
82c8989973d46dec31de证据(Evidence)
交付调度
结果与验证(完成后填写)
规划进展与下一步
合入与清理
独立评审(REPLAY;工具 pi,
-p --no-session全新进程,fresh_session=true,session id not-observable;输入仅为固定目标、based46dec31de/ head f8bccba6b5f6、diff 与测试命令):Review
Scope verified:
scripts/task_triage.py(new, 505 lines): discover/decide/verify, schemaagent-system/task-triage/v1, fail-closedEXIT_REMOTE=6on any remote failure.scripts/task_pr_check.py(new, 291 lines):local(PR base/head gate + parent initiative +--finalregistry) andci(hermetic, no network/token,pull_requestonly).scripts/task.sh:cmd_triage/cmd_triage_decideadded;cmd_startrejects whenTRIAGE_RECEIPTunset (line 153), runsverify(line 161-167) before anygit worktree add(line 220).Makefile:task-triage/task-triage-decide/task-pr-checktargets;TRIAGE_RECEIPTexported..gitea/workflows/ci.yaml:branches: [main]removed frompull_request;PR base gatestep added afterunset TOKEN SUBMODULE_TOKEN, noenv:block on the step.Fail-closed checks:
discover: raisesStop(EXIT_REMOTE=6)ongit ls-remotefailure, missing token, API unreachable/401/4xx/non-list; receipt is never written on failure.decide: re-snapshots and comparesfingerprint(head_sha+card_sha256+pr fields); rejects on candidate drift.verify: re-snapshots; rejects on age>4h, root_target mismatch, verdict/kind mismatch, candidate drift.cmd_local: anyStop(EXIT_REMOTE=6)from Gitea client orgit ls-remotefailure → exit 6 (printedREMOTE_UNVERIFIED).cmd_ci: only readsGITHUB_*_REFand local.task/<head>.md; no network, no token.Credential handling in CI: PR base gate step runs after
unset TOKEN SUBMODULE_TOKEN, has noenv:block;cmd_cidoes not readGITEA_TOKENor any secret;test_ci_credentialscheckout still passes.Schema enforcement:
load_receiptrejects non-agent-system/task-triage/v1schema, missing keys, malformed candidates, invalid requirement/discovered_at.Count-based auto-decision: verified absent — single-candidate test
test_single_candidate_requires_decision_never_auto_joinrequires explicitdecide;test_remote_initiative_needs_explicit_decision_and_never_auto_joinsconfirmstask.sh triageexits 5 and never emits[verdict] JOIN.Blocking problems
None.
Non-blocking notes
Makefile:task-pr-checkrecipe usespython3 …without@prefix while sibling recipes use@bash …; minor style inconsistency.cmd_startthePRECHECK_RECEIPTvalidation runs beforeTRIAGE_RECEIPTverify; PRECHECK validation has no branch/worktree side effects so the goal ("before creating a branch") still holds.Makefile:task-triageuses"$(REQ)"; double-quote in REQ would break shell quoting — general Makefile limitation, not introduced by this diff.VERDICT: APPROVE
CI(GATE):run 3488 在 head
f8bccba6b5上 test / test-pg / svc-realcombo 均 success。