docs: record the deferred promotion-window invariant and test-isolation rules
Add the shared promotion-window EXCLUDE-constraint idea to the deferred designs so the flash/group overlap ordering problem has a recorded structural fix. Note in AGENTS.md that suite assertions must be scoped to fixtures the test created, that a list endpoint warrants two consecutive green runs, and that a piped test command hides the real exit code.
This commit is contained in:
@@ -32,6 +32,8 @@ pnpm --filter @vmall/<改动过的前端> build
|
||||
```
|
||||
|
||||
- 修 bug:先复现,修完确认复现不再触发;有价值的场景补成集成测试(放 `apps/api/tests/`,复用 `tests/common/mod.rs` 夹具)。
|
||||
- 测试隔离:测试库不截断,夹具靠唯一 slug/email。**断言不要假设全局集合为空或恰好 N**——只对自己创建的 id 过滤后断言。新增列表/发现类接口时,`cargo test -p vmall-api` 需**连跑两次**都全绿(单次可能只是库恰好干净)。
|
||||
- 管道跑测试时注意退出码:`cargo test | grep` 返回的是 grep 的状态,用 `set -o pipefail` 或显式取 `$?`,否则会漏掉 `FAILED`。
|
||||
- UI 变更:起 dev server 用浏览器实际点一遍改动路径,视觉确认才算完成。
|
||||
- 不要跑与改动无关的全仓命令(`pnpm -r build`、lint 全仓等)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user