From 14ea4a0d274ef026ffdeb1a7bc5efbb05feb28a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 14 Sep 2026 10:35:42 +0000 Subject: [PATCH] docs(agents): before editing a workflow file, derive its test readers with git grep and run them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The workflows discipline in AGENTS.md tells a round how to find out whether a workflow runs here. It said nothing about which tests read one, so that question was answered from memory, and memory indexes on names: a round that edited the lint job listed six pins by name similarity to the workflow and missed the pin that went red, because that pin is not named after any workflow. Adds one habit line beside the `git cat-file -e` probes: derive the readers with a `git grep` over test paths and run every hit locally; a workflow edit that reddens an un-listed pin is a finding against the habit, not against the round. The line states its own limit — the text search is wrong in both directions and the readers it cannot see are recorded on objectui#9198 rather than covered here. No collector and no gate: the one incident is inside the search's own hits, and the director seat's ruling on that card declines to build an instrument for the readers it misses. Empty-frontmatter changeset: AGENTS.md is not published package source, so this declares no release rather than bumping the 39-package fixed group. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01DAcomhvR9kKizeYgg89Vo8 --- .../issue-9198-workflow-test-readers-habit.md | 19 +++++++++++++++++++ AGENTS.md | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 .changeset/issue-9198-workflow-test-readers-habit.md diff --git a/.changeset/issue-9198-workflow-test-readers-habit.md b/.changeset/issue-9198-workflow-test-readers-habit.md new file mode 100644 index 0000000000..003dfbe003 --- /dev/null +++ b/.changeset/issue-9198-workflow-test-readers-habit.md @@ -0,0 +1,19 @@ +--- +--- + +`AGENTS.md` only — no released package source is touched, so this declares **no release** with +an empty frontmatter rather than a bump. A `patch` here would version-bump the whole 39-package +fixed group for a change no consumer can observe. + +objectui#9198: adds one habit line to the workflows discipline, beside the `git cat-file -e` probes +that answer "does this repo run this workflow". Before a `.github/workflows` file is edited, the +tests that read it are DERIVED with a `git grep` over test paths and every hit is run locally, +instead of being recalled from memory by name similarity to the workflow. The round that motivated +it listed six pins by name and missed the one that went red, because that pin is not named after +any workflow. + +The line states its own limit rather than leaving it to be assumed: the text search is wrong in +both directions, and the readers it cannot see — directory enumeration, a shared helper doing the +read, a gate script walking the tree — are recorded on objectui#9198, not covered by the habit. +The director seat's ruling on that card declines to build a collector or a gate for them; the one +incident this habit exists to prevent is inside the search's hits. diff --git a/AGENTS.md b/AGENTS.md index 8f8ceba5c3..87fd9bdda7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -394,6 +394,9 @@ git cat-file -e origin/main:.github/workflows/ci.yml # 阳性对照:必须解 **阳性对照不是可选项。** 没有它,一个打错的路径和一次真实的缺席给出完全相同的退出码,而你会把前者读成 后者。 +**改 `.github/workflows/X.yml` 之前,先把读它的测试推导出来、别凭名字回忆:** `git grep -l 'X.yml' -- '**/__tests__/**' '**/*.test.*'`,命中逐个本地跑。 +一次 workflow 编辑把一个没列出来的钉子弄红,是对这条习惯的发现,⛔ 不是对那一轮的发现;这条搜索两个方向都会错,它看不见的那半记在 objectui#9198 上,不在本条覆盖内。 + #### ⛔ 对照本身还有一个洞:**枚举**和**读取**必须来自不同来源才验得动 `origin/main` 阅读规则覆盖的是文件**内容**,**不覆盖文件枚举**。把工作树 glob 喂给逐文件的 `origin/main`