You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
ci.yml's Build Docs path gate fails CLOSED: a failed git diff reads as "nothing changed" and skips the site build, green #3723
Found while implementing #3523 (PR #3722), which copies this job's should_run shape into four other jobs. Filed rather than fixed there: #3722's ruling scopes it to the merge_group triggers and the ci.yml/lint.ymlpaths-ignore, and this is a pre-existing defect in a different direction.
The code
.github/workflows/ci.yml, the docs job (Build Docs), step Check for docs changes:
CHANGED=$(git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} -- \
'apps/site/' 'content/' 2>/dev/null || echo "")
if [ -n "$CHANGED" ]; then should_run=true else should_run=false fi
2>/dev/null || echo "" collapses two different facts into one value:
"the diff succeeded and nothing under apps/site/ or content/ changed" — correctly should_run=false;
"the diff could not be computed at all" — a checkout that did not fetch deep enough, a transient git failure, a malformed sha — which also yields should_run=false.
The second case skips the entire site build and the job still reports success. There is no red step, no warning, nothing in the summary: the check says the docs built when nothing was built.
Measured, both directions
Against a fixture repository, feeding an unreachable base sha into the two spellings of the same gate (PR #3722 ran this as its reverse verification):
Spelling
Unreachable base sha
fail-OPEN — if ! CHANGED=$(git diff …); then should_run=true; exit 0; fi
objectstack#4928 named this "the filter contract" after exactly this shape produced a fully green, zero-job pull request with no red signal anywhere — a flake in the filter, not in the code, decided that nothing ran. The rule it settled on is: when the filter cannot tell, RUN.
Today the blast radius here is bounded — Build Docs is not on the list of contexts #3523 found safe to require, so a false green on it does not merge anything by itself. But the shape is the one this repository keeps paying for, and #3722 has just made this job the odd one out: the four gates it added (type-check, test, e2e, lint) all fail open, and scripts/__tests__/merge-queue-reporting.test.ts pins them that way. This one still does not.
Suggested fix
Rewrite the capture as the fail-open form the new gates use, so the job runs the site build when it cannot establish that nothing docs-related changed. One step, no new mechanism. While there, the same step's push branch was already corrected by #3722 to != 'pull_request' so queue builds are covered — the diff itself is the only part left.
Activity
yinlianghui commentedon Aug 8, 2026
认领:PM 循环批 180(objectui 整仓席位,登记表 objectstack#4604)
共享基础设施复查(仓规第 8 条):
ci.yml今日已被 PR #3722 改过(merge_group 订阅 + push 分支判断),本单正文已把自己限定在其后剩余的「diff 捕获 fail-closed」一处;认领时无其他在飞 PR 触ci.yml。修法循 objectstack#4928「filter 拿不准就 RUN」契约与 #3722 四门禁的 fail-open 拼法,并入merge-queue-reporting.test.ts的钉面。会话:
session_01GTRjn8xBqp75dk7kFupVRt分支:
claude/issue-3723-docs-gate-fail-openWorktree:
objectui-3723文件面:
.github/workflows/ci.yml(docs job 一步)+scripts/__tests__/merge-queue-reporting.test.ts(扩钉)(越界即停)Generated by Claude Code
yinlianghui commentedon Aug 8, 2026
验收:PR #3744 ACCEPT(会话
session_01GTRjn8xBqp75dk7kFupVRt,PM 循环批 180)。交付内容:docs job 的 diff 捕获改为与 #3722 四门禁完全同拼法的 fail-open(含
!= 'pull_request'早退、单引号保护 revision range、去掉吞掉 git 自身报错的2>/dev/null);同文件 type-check job 里那条已变假的对照注释一并改写(同文件注释与代码矛盾比没有注释更糟——正确)。钉面从 per-filetoMatch(结构性失明:三个 fail-open 捕获替 docs 门禁满足了正则)升级为 per-capture 断言 + per-file 下限 + 全局拒绝吞噬拼法。证据:五行为矩阵用解析 YAML 后执行 step 自己的 run 脚本实测(unreachable sha → true、docs 改 → true、纯代码改 → false、merge_group/push → true),外加两条边界(空 pathspec 不过度触发、裸
...range exit 0——由此论证 #3722 的事件名早退是承重的,不是冗余);逆向验证预测 2 红 9 绿,实测逐条命中;对照运行(缺陷在场 + 旧钉 = 10 全绿)直接证明旧断言看不见本门禁。CI 上 Build Docs 本体已在真实 pull_request 事件下执行新步骤。无 changeset,与 ci.yml 前四次提交先例一致。PM 核验插曲(方法库):我初核时误读"分支上仍有旧拼法"——真因是共享 .git 下 FETCH_HEAD 被并行 dev 的 fetch 覆写,读到的是 main。已入方法库:多 worktree 共享检出核验禁用 FETCH_HEAD,一律显式 sha / origin/。分支实况:活代码零吞噬,唯一
|| echo ""在历史注释里(明确框定为 Until objectui#3723 的退役拼法,钉测试不扫注释,无重新上膛风险)。Generated by Claude Code
ci(docs): fail OPEN when the Build Docs path gate cannot compute its …