Skip to content

fix(lint): stop typos flagging hex SHA fragments in changelog fragment names - #18733

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/typos-fragment-sha-names-202611240529
Nov 24, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/typos-fragment-sha-names-202611240529

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: unblocks release PR #18706, whose Lint Repo typos check fails on a generated fragment name

Summary

scripts/dependabot-fragments.sh names each Dependabot changelog fragment .changes/<plugin>/dependabot-<pr>-<sha8>.md from the merge commit's SHA. typos checks file names, splits d13ba6b8 into words and flags ba ("should be be, by"), so Lint Repo fails on #18706 (run). The SHA cannot be redrawn the way new-changelog-fragment.sh redraws its random suffix, and renaming the fragments would make the generator rewrite every fragment already released, since it skips a fragment by its exact path in history.

Fix

  • _typos.toml is sync-managed from melodic-software/standards (listed in pr-check-managed-files-hosted.yml), so this PR leaves it alone. A new locally owned overlay, .github/typos-local.toml, defines a dependabot-fragment file type (extend-glob = ["dependabot-[0-9]*-*.md"]) with check-filename = false.
  • The Lint Repo Spell-check step passes the overlay as its config. typos applies --config on top of the _typos.toml it finds in each path's parent directories, so every managed rule still applies.
  • Only the file names of the generated fragments go unchecked. Their content is still spell-checked under the managed rules. Other fragment names and all other files keep the file-name check.
  • scripts/README.md: the local typos command row now names the overlay.

Basis: typos reference: default.check-filename: "Verify spelling in file names."; type.NAME.extend-glob: "File globs for matching NAME. This is required when defining new file types."; config sources in precedence order: "File specified via --config PATH", then "Search parents of specified file / directory for one of typos.toml, _typos.toml, ...".

Verification

typos 1.52.2, the version the ci-workflows typos action pins. The command is the CI invocation (paths . .changes, the step's --exclude globs), run with a temporary .changes/knowledge/dependabot-18634-d13ba6b8.md that was deleted before the commit:

  • --config _typos.toml: exit 2, error: `ba` should be `be`, `by` on .changes/knowledge/dependabot-18634-d13ba6b8.md (the CI failure).
  • --config .github/typos-local.toml: exit 0.
  • Fragment content is still checked: a fragment with that name whose body reads "whilst fixing teh colour" fails on whilst (a managed extend-words rule), teh and colour (the managed en-us locale).
  • The file-name check still applies elsewhere: .changes/knowledge/teh-d13ba6b8.md still fails on teh and ba.
  • A probe file under docs/ still fails on managed rules with the overlay config.
  • All 52 dependabot-* fragment names in the repository's history were checked with --isolated. The old config flags only dependabot-18634-d13ba6b8.md. The overlay flags none.

Related

🤖 Generated with Claude Code

…t names

scripts/dependabot-fragments.sh names each fragment
.changes/<plugin>/dependabot-<pr>-<sha8>.md from the merge commit's SHA,
so the name cannot be redrawn the way new-changelog-fragment.sh redraws
its random suffix. typos splits the SHA into words and flags runs such
as "ba" (d13ba6b), failing Lint Repo on the Dependabot fragments
release PR.

_typos.toml is a sync-managed file from melodic-software/standards, so
the rule goes in a locally owned overlay, .github/typos-local.toml, that
the Spell-check step now passes as its config. typos layers --config
over the _typos.toml it discovers in each path's parents, so every
managed rule still applies. The overlay defines a file type for
dependabot-[0-9]*-*.md with check-filename = false: only the file name
of those generated fragments goes unchecked; their content is still
spell-checked under the managed rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T05:39:04.358494Z c969fac PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed fa0864ba4a58e7dd2b66d943a0c8099599109f27: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This was an incremental, blocking-only review of the change since c969face4ea3ae2f53edfdfb13f9b6099141cae2. The only file in scope is scripts/check-affected.sh, and I read its whole hunk. The prior-findings file says blocking only: yes, so only CRITICAL and IMPORTANT findings would be reported. There are none.

What the change does. The local typos pre-flight used to hard-code _typos.toml. It now reads the config: input of the typos step in .github/workflows/pr-require-checks.yml, using the existing step_input awk reader (scripts/check-affected.sh:479-490). It falls back to _typos.toml when that input is empty or the workflow file is missing (lines 506-510). The resolved path is tried under $tools first and then under $PWD, and it is passed to typos --config as one quoted argument (line 504).

Trust-boundary check.

  • What the value can do. It comes from a workflow file in the developer's own checked tree. It is used only as a path to a typos config file. A typos config holds spell-check rules and runs no code, so even a hostile value can at most change which spelling rules apply.
  • No shell injection. The value is never evaluated as shell code. It shows up unquoted only in run_check's display label (line 523), which works the same way as the existing ${changed[*]} label.
  • No control touched. The script is not on the trusted-path list. The change widens no trusted-actor check, token scope, kill switch or merge hold.

Instruction surfaces and manifests. No standing instruction is deleted or softened, and no plugin manifest is touched.

PR context. It contains no directives aimed at this lane.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on c969face4ea3ae2f53edfdfb13f9b6099141cae2; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread .github/workflows/pr-require-checks.yml Resolved
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed fa0864ba4a58e7dd2b66d943a0c8099599109f27: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental: c969fac → fa0864b, blocking only)

This lane already reviewed an earlier head, so this pass reports only blocking findings.

One file changed since the last review: scripts/check-affected.sh. It now reads the typos step's config: input from the checked tree's .github/workflows/pr-require-checks.yml with step_input typos config | head -n 1. When the workflow is missing or the step has no config:, it falls back to _typos.toml. It looks for that path in the tools checkout first and then in the checked tree, the same order it used for _typos.toml before (L506-L519). The skip and command labels name the resolved path.

This fixes the earlier finding (discussion_r4676049863): the local pre-flight now passes .github/typos-local.toml, the same config CI passes.

Checks I made by reading the code:

  • With set -uo pipefail and no errexit, a false [[ -f ... ]] && at top level does not abort the script.
  • An empty step_input result falls back to the default through ${typos_rel:-_typos.toml}.
  • awk prints a single word and exits, so head -n 1 cannot cause a SIGPIPE failure.
  • The fixture in scripts/check-affected.test.sh still declares config: _typos.toml, so the assertion at L202 still holds.

Not verified: I did not run the script, its test suite or typos. Two things come from the PR author: that typos layers --config over the _typos.toml it finds in parent directories, and the probe results.

No closing issue: the PR says it unblocks #18706 and states no acceptance criteria. The diff changes no plugin manifest.

Spend: none beyond this review run.

Loosened checks: the wrapper wrote no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: line. This review therefore used fail with no consumer entries and did not check the citation requirement. The increment changes no check's strictness. It only points the local pre-flight at the config CI already uses. I did not read the criterion file, so its Loosened checks would be marked: line is not reported here.

Verifier dropped 0 of 0 candidates.

scripts/check-affected.sh said each check calls the tool CI calls, but its
typos check still passed --config _typos.toml after CI moved to the
.github/typos-local.toml overlay. It now reads the typos step's `config`
input from pr-require-checks.yml, the same way it already reads the step's
exclude globs, and falls back to _typos.toml when the step names none.

check-affected.test.sh: 155 passed, 0 failed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 92d7e30 Nov 24, 2026
152 of 156 checks passed
@kyle-sexton
kyle-sexton deleted the fix/typos-fragment-sha-names-202611240529 branch November 24, 2026 07:18
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 3, survived 4, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 43%; mutation score 43%.

File Killed Survived Timeout No coverage Invalid Not run
scripts/check-affected.sh 3 4 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
scripts/check-affected.sh:506 SBR productive input-gap
scripts/check-affected.sh:507 UOI productive input-gap
scripts/check-affected.sh:508 other productive input-gap
scripts/check-affected.sh:516 SBR productive input-gap

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant