Skip to content

Commit 432707c

Browse files
ci(lint): say the ADR index step reds on a dropped header field (#31282)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XPw6CyoP7HbB48b5AYjr9Mb)_ domain:devx#3 · os-project-manager · session_01FEkQ5osNrTSqaiDeCWaBYU Fixes #31261 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`.github/workflows/lint.yml` 里 ADR 索引那一步(`id: adr-index-current-report-only`)的注释块和 `name:`,只改文字。新名字是 `ADR index is current (warnings, except a dropped header field is a red)`。 - 为什么改:PR #31252 之后,`adr-index.mjs --report` 在重新生成会清空已发布索引里的 Date / Supersedes / Superseded-by 单元格时退出 1;旧注释和旧步骤名仍说「这一步永远不会因为记录而变红」,读者会被误导。 - 风险与回滚:不改 `run:`、`id`、`continue-on-error`,步骤行为不变;回滚即还原本 PR。全仓没有任何脚本、pin 或普查读这个步骤名或这段注释。 - 先看:`.github/workflows/lint.yml` 约 687–703 行这一个 hunk。 - 两分钟验证:`pnpm check:adr-index`,预期 self-test 60 条全绿,`--report` 打印 OK 并以 0 退出(行为未变)。 - 需要你做的:受管面 Tier H(`.github/workflows/**`):由你合并或入队,或授权账号 APPROVED 后由席位落地。 ## What changes `.github/workflows/lint.yml`, the ADR index step only: - The comment block now says what the step does since PR #31252: `--report` warns and exits 0 for a stale index or an unreadable status line, and exits 1 with an error annotation when the regeneration empties a Date, Supersedes or Superseded-by cell the committed index carried (`scripts/adr-index.mjs` `reportExitCode`, `droppedFields`). It also says the index is generated from the records' header lines, not only the status line. - The step `name:` changes from `ADR index is current (report-only — warnings, never a red on a record)` to `ADR index is current (warnings, except a dropped header field is a red)`. - No change to `run:`, `id`, or `continue-on-error`. ## Tests None owed: workflow text only, no behaviour changed, so no test and no ablation. ## Acceptance notes - **Readers of the name or the id.** `git grep` on `origin/main` 07559ce for `never a red on a record`, `ADR index is current` and `adr-index-current-report-only` hits only `.github/workflows/lint.yml` itself. No pin, census or gate reads the step name, so nothing else moves. `scripts/pm/ci-failure.mjs` resolves a step by its name against the workflow source, so it follows the rename. - **Parsed name.** The new name is a plain scalar with no space-hash pair; `node scripts/check-workflow-step-name-quoting.mjs --list` judges it ok, and a YAML parse of the file gives the step as name above, `id: adr-index-current-report-only`, `continue-on-error: true`, `run: pnpm check:adr-index`. - **Why a dropped field reds the lane although the step keeps `continue-on-error: true`.** The lane's last step (`scripts/ci/lane-verdict.mjs`) reads each gate step's outcome. The comment does not restate that; the file's header already does. - **Governed surface.** `node scripts/pm/check-governed-merges.mjs --branch HEAD` on head 2787b0a, exit 3: ```text governed-surface predicate: 1 of 1 path(s) hit the register (13 surfaces govern objectstack). ⛔ GOVERNED — a human merge is the review record for this PR (#9495 regime). ⚖️ landing tier: H(人合) — the maintainer's hand, or an authorized APPROVED review (GOVERNED_APPROVERS) and then the owning seat lands it. .github/workflows/** ×1 — CI, deploy and release workflows: what runs on every push, what deploys, what gates the queue - .github/workflows/lint.yml ⚠️ head repo: NOT MEASURED — this verdict cannot tell a fork PR from an internal one; `--pr N` reads it. size: 26 changed line(s) (+16 / -10) ≤ 3000 — under the human-merge threshold (generated files included in the count). ``` - `node scripts/pm/dispatch-gates.mjs --tier`: no path-derived model mandate for this surface. ## Verification Gate union derived by `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` (42 families for this diff), run on head `2787b0af`, each exit code captured before any pipe: - **42 run, exit 0 each.** `--ran`: "42 derived famil(ies) accounted for — 42 run, 0 NOT-MEASURED". - Also run, outside the derivation: `pnpm check:adr-index` exit 0 ("self-test 60 assertions green", `--report` OK), and `node scripts/check-issue-citations.mjs` exit 0. - `pnpm lint`: the diff touches no package, so there is no scoped package lint; eslint does not read workflow YAML. - CI families are read from this PR's check-runs, not re-run here. `skip-changeset`: a workflow file, published by no package. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5osNrTSqaiDeCWaBYU)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent e20c60d commit 432707c

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

‎.github/workflows/lint.yml‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -684,17 +684,23 @@ jobs:
684684
continue-on-error: true
685685
run: pnpm check:adr-anchors
686686

687-
# #26076 ADR index, REPORT-ONLY by the maintainer's ruling (门禁不加).
688-
# docs/adr/README.md is generated by scripts/adr-index.mjs from the
689-
# records' one `**Status**:` line; the alias runs the generator's
687+
# #26076 ADR index, REPORT-ONLY by the maintainer's ruling (门禁不加),
688+
# with one exception since #30916. docs/adr/README.md is generated by
689+
# scripts/adr-index.mjs from the records' header lines (`**Status**:`,
690+
# `**Date**:`, the supersession fields); the alias runs the generator's
690691
# `--self-test` (fixtures only — it never asserts on what the records
691-
# say) and then `--report`, which prints a `::warning::` for a stale
692-
# index or a record whose status line is missing or unreadable and exits
693-
# 0 whatever it finds. So the only red this step can show is a broken
694-
# generator, never a record. `pnpm adr:index` regenerates; `--check` is
695-
# the gate's spelling for the day a maintainer names one. Alias form per
696-
# the GATE INVOCATION IDIOM note at the top of this file.
697-
- name: ADR index is current (report-only — warnings, never a red on a record)
692+
# say) and then `--report`. `--report` prints a `::warning::` for a stale
693+
# index or a record whose status line is missing or unreadable, and exits
694+
# 0 for every such finding. The exception is a DROPPED field: a Date,
695+
# Supersedes or Superseded-by cell the committed index carried that the
696+
# regeneration empties prints an `::error::` and exits 1
697+
# (`reportExitCode`), because it loses a fact the index already
698+
# published. So this step reds on a broken generator or on a dropped
699+
# header field, and on no other record finding. `pnpm adr:index`
700+
# regenerates; `--check` is the gate's spelling for the day a maintainer
701+
# names one. Alias form per the GATE INVOCATION IDIOM note at the top of
702+
# this file.
703+
- name: ADR index is current (warnings, except a dropped header field is a red)
698704
id: adr-index-current-report-only
699705
continue-on-error: true
700706
run: pnpm check:adr-index

0 commit comments

Comments
 (0)