boardx / boardx/workspacex

ci: 契约签核后没有门保证 spec 与验收文档同步——今天两次让 spec 对着契约里不存在的东西做断言

Open
#3,140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
969

Description

## 现象(今天两次,同一个模式)
1. **TW-P0-3①**:spec 断言态名 `awaiting-approval` / `completed`,而 `packages/contracts/src/plan-control.ts:76` 的 `PlanPhase` 枚举是 `["preparing","planning","executing","approving","done","failed","cancelled"]`——那两个名字**不在枚举里**。spec 还要求指示器线上六格含 `failed`,而已签核的 `phases/phase-01-run-a-project/contracts/plan-control/ui.md:115` 逐字写「`failed` 不出现在这条线上,替换整条」。
2. **TW-P0-3⑥**:验收文档要求三个恢复动作,而人类 **2026-08-26 裁决 (c)** 已移除「恢复检查点」,实现里有正面断言它不存在(`plan-control-gate-and-recovery.test.tsx:95-97`),契约截图清单 G-08 也写明「仅两个恢复动作」。

两次都是:**契约/裁决更新了,spec 与 `.harness/instructions/*-acceptance.md` 没跟上**,于是 spec 对着不存在的东西做断言、永远红,红的原因还与被测能力无关。

## 为什么值得机械门控
本仓已有的教训是「没有脚本的规范条目视为未落地」(AGENTS.md)。契约签核目前是人的动作,但**签核之后下游同步没有任何检查**——只能靠人记得,今天证明记不住。

## 建议门控
扫描 `apps/web/e2e/**/*.spec.ts` 与 `.harness/instructions/*-acceptance.md` 里出现的**态名与契约锚点**,凡不在对应契约枚举/契约文档里的,判红并指名。先从 `PlanPhase` 这一个枚举做起,跑通再扩。

⚠ 反证要求:加门后故意把一个 spec 里的态名改成枚举外的值,门必须红;改回即绿。不能做成恒真门(本仓今天刚修过一个,#3122)。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with packages/contracts/src/plan-control.ts, apps/web/e2e/**/*.spec.ts, .harness/instructions/*-acceptance.md, and the referenced plan-control gate test. Trace how PlanPhase and the acceptance anchors are represented, then run the existing checks. Done means an out-of-enum state makes the gate fail with a useful reference, while restoring it makes the check pass, including the required counterexample.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd, documentation, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.