diff --git a/.claude/agents/os-dev.md b/.claude/agents/os-dev.md index 9ebc826f0e1..ae364bdbd68 100644 --- a/.claude/agents/os-dev.md +++ b/.claude/agents/os-dev.md @@ -187,9 +187,7 @@ dispatch prompt 只携带每单增量(裁决引文、裁决 / PM-机制假设分 它。作数的断言是 `check:authorable-surface` 绿;`baseRev` 允许滞后(一行信息,不是错 误)。⛔ 永不在 MERGE 态跑 `gen:schema`:HEAD 还是 merge 前的 tip,锚点会静默回滚到旧 分叉点 —— 依然真实、门禁全绿、一次已落地的推进被吞掉。先 commit merge 再重生成(已机 - 械化:`bash scripts/pm/os-regen-merge.sh`)。姊妹陷阱:`gen:schema` 的清理会抹掉 - `gen:openapi` 的产物(rest 里冒出假 5xx 失败);用 - `pnpm --filter @objectstack/spec gen:openapi` 恢复。 + 械化:`bash scripts/pm/os-regen-merge.sh`)。 - **家族规则:`git worktree` 只隔离工作树与 HEAD;`.git/` 下其余一切 —— refs(含 `refs/remotes/*`)、stash 栈、config、hooks —— 全 worktree 共享;配方只有不点名共享态 才 worktree-safe。家族同签名:操作看着本地、报成功,唯一症状是 `git status` 里出现他 diff --git a/.claude/skills/pm-dispatch/references/landing-operations.md b/.claude/skills/pm-dispatch/references/landing-operations.md index 3dbf74e52c6..2ddcaf5532c 100644 --- a/.claude/skills/pm-dispatch/references/landing-operations.md +++ b/.claude/skills/pm-dispatch/references/landing-operations.md @@ -12,13 +12,11 @@ 四步序已机械化:`bash scripts/pm/os-regen-merge.sh` —— ① `git merge origin/main` (⛔ 禁 rebase / force-push);② 生成物 `git checkout origin/main -- <路径>`;③ -**先 commit 掉 merge**;④ 整链重生成 + 生成物门禁全绿。顺序防两个陷阱: +**先 commit 掉 merge**;④ 整链重生成 + 生成物门禁全绿。顺序防的陷阱: - **MERGE 状态下跑 `gen:schema` 会把 authorable-surface 锚点静默倒退回旧分叉点** (HEAD 仍是合并前分支 tip),倒退后的锚点**依然 authentic**、全部门放行 ——「先 commit 再重生成」的由来。 -- **`gen:schema` 的清场会抹掉 `gen:openapi` 的产物**(rest 包成串 `expected 503 - to be 200` 假红);补跑 `pnpm --filter @objectstack/spec gen:openapi` 即复原。 重生成后**断言所有兄弟单的条目都还在**;更硬的旁证是查**上一单的实现体**完好(带 引号精确名 `git grep … origin/main -- <实现文件>`)—— 条目是索引,实现体才是被吞 diff --git a/scripts/pm/os-regen-merge.sh b/scripts/pm/os-regen-merge.sh index 1ae5e78b90e..109cddc4ffa 100644 --- a/scripts/pm/os-regen-merge.sh +++ b/scripts/pm/os-regen-merge.sh @@ -24,10 +24,7 @@ # BODY — still exist (quoted-exact-name git grep against origin/main). # # This script performs steps 1–3 and prints step 4 (the regen chain varies by -# what the branch touches; running it blind would hide a red). Sister trap for -# step 4: `gen:schema`'s cleanup wipes `gen:openapi`'s output, which shows up as -# bogus 5xx assertions in the rest package — rerun -# `pnpm --filter @objectstack/spec gen:openapi` to restore. +# what the branch touches; running it blind would hide a red). # # ## Step 3 and the pre-commit hook agree (#8047) # @@ -102,8 +99,7 @@ cat <<'EOF' → step 4 (yours, in this order — the script stops here on purpose): 1. build the spec build closure, then regenerate the WHOLE chain (e.g. pnpm --filter @objectstack/spec build && the gen:* scripts your - surface touches; gen:schema's cleanup wipes gen:openapi's output — rerun - pnpm --filter @objectstack/spec gen:openapi after it); + surface touches); 2. run the generated-artifact gates until fully green; 3. assert every sibling PR's entries AND the previous PR's implementation body still exist: quoted-exact-name `git grep "" origin/main -- `