Skip to content

feat: widen comment-hygiene tracker-reference policy - #39

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/comment-hygiene-widen
Jun 24, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
feat/comment-hygiene-widen

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Widens the org-default comment-hygiene validator to the references the org actually uses (cc-issue, closing-keyword+#N, issue/issues/tracked #N, owner/repo#N, GH-N) and recognizes /*, *, <!-- comment lines. Closing keywords require # so "fix 3 bugs" stays clean; Jira-style keys deferred (false-positive collision with UTF-8/SHA-256/etc.). Fixtures + module test cover every new kind, the new comment styles, and a false-positive battery — all pass locally. ci-workflows vendored copy + coarse prefilter widen in a follow-up.

🤖 Generated with Claude Code

The org-default validator only caught TODO/FIXME/HACK/XXX, issue|fixes|closes #N,
and PR #N on // and # comment lines. Extend it to the references the org actually
uses: cc-issue, GitHub closing keywords paired with a number (fix(es|ed)/
close[sd]/resolve[sd] #N), issue/issues/tracked #N, owner/repo#N, and GH-N; and
recognize comment lines beginning /*, * (block continuation), and <!-- too.

Closing keywords require the # so prose like "fix 3 bugs" stays clean. Jira-style
PROJ-123 keys are deliberately not matched — the bare letters-number shape
collides with UTF-8 / SHA-256 / ISO-8601 / RFC-2119 / CVE-2025-… / P-256 and
POSIX ERE cannot lookahead-exclude them; deferred until a Jira-using consumer
supplies an explicit project-key list.

Fixtures and the module test cover every new kind, the new comment styles, and a
false-positive battery (technical tokens + unanchored keywords stay clean).

The ci-workflows vendored copy and the action's coarse prefilter are widened to
match in a follow-up so the full-tree scan picks the new patterns up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kyle-sexton
kyle-sexton merged commit fe37d33 into main Jun 24, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the feat/comment-hygiene-widen branch June 24, 2026 22:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2438fd1f02

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Issue-tracker references in comments.
if [[ "$line" =~ (^|[^[:alnum:]_])(issue|fixes|closes)[[:space:]]*#?[0-9]+ ]]; then
# Internal continuous-collaboration issue marker.
if [[ "$line" =~ cc-issue ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the action prefilter with these new refs

When a repo uses this module through the documented composite action, the current dogfood workflow is still pinned to ci-workflows@04a6dac (.github/workflows/ci.yml:460-463), and the repo docs describe a coarse git grep prefilter before chp::scan_text runs (docs/dedup-program/research/comment-hygiene.md:36, :60-66). The parity backlog says that hardcoded prefilter misses exactly the newly-added shapes such as cc-issue, tracked: #, and owner/repo# (docs/dedup-program/plan.md:109-111), so a file whose only violation is # cc-issue 17 is filtered out before this rule executes; the widened policy is therefore not enforced outside the direct module test until the action/pin is widened with it.

Useful? React with 👍 / 👎.

kyle-sexton added a commit to melodic-software/ci-workflows that referenced this pull request Jun 24, 2026
Re-syncs the vendored `comment-hygiene-patterns.sh` to the widened
standards SSOT (byte-identical) and widens `scan-tree.sh`'s coarse
prefilter to a strict superset of the new triggers (cc-issue,
closing-keyword #N, issue/tracked #N, owner/repo#N, GH-N, and /* * <!--
comment lines). Dogfood scan over this repo is clean. Follows
melodic-software/standards#39.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jun 25, 2026
… follow-ups (#41)

Marks Phase 4 complete (reference-integrity, Pester, comment-hygiene
built; skill-governance the only keep-local gap block), records medley's
third cutover wave (#1162/#1167) and the by-decision inline lanes
(Pester/dotnet/ts), and logs the post-cutover platform follow-ups
(ci-workflows #30–#39) + the dotnet/ts no-build decision.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Oct 19, 2026
Refs: #805

## Summary

Dependabot alerts
[#40](https://github.com/melodic-software/standards/security/dependabot/40)
(smol-toml 1.8.0, GHSA-r4xh-jqrq-34v2, fixed in 1.9.0) and
[#39](https://github.com/melodic-software/standards/security/dependabot/39)
(katex 0.16.47, GHSA-238p-pmpm-9mq7, fixed in 0.18.2) cannot be fixed by
an update: `markdownlint-cli2` 0.23.3 pins `smol-toml` 1.8.0, and
`micromark-extension-math` (via `markdownlint`) allows only `katex
^0.16.0`. Owner decision (GitHub Security & Cost interview, 2026-10-18):
bounded npm overrides. The standards sync cannot carry them (its
`markdownlint` component ships only `.markdownlint-cli2.jsonc`; each
repository owns its `package.json`), so each repository carries the
override itself.

## Fix

In `package.json`, a new top-level `overrides` block: `smol-toml`
`^1.9.0` and `katex` `~0.18.2`.

Lockfile regenerated with `npm install`: smol-toml 1.8.0 to 1.9.1, katex
0.16.47 to 0.18.10, and commander 8.3.0 to 15.0.0 (katex's CLI
dependency, engine floor node >=22.12, below the repo's Node 24 pin).
Nothing else changed.

**Removal condition:** remove the `smol-toml` override once
`markdownlint-cli2` allows `smol-toml >=1.9.0`, and the `katex` override
once `micromark-extension-math` allows `katex >=0.18.2`. Tracked in
#805.

## Verification

- `npm ls smol-toml katex --all` resolves smol-toml@1.9.1 and
katex@0.18.10 (overridden) under `markdownlint-cli2@0.23.3`.
- `npm run lint:md`: 131 files linted, 0 issues.
- A Markdown file with inline and block math lints clean, and katex
0.18.10 loads and renders. markdownlint loads katex only as the
math-syntax dependency, not to render output.

## Related

- Tracking issue for removal: #805
- Same change in the other affected repositories (standards,
claude-code-plugins, dotfiles, github-iac, songwriting, provisioning,
medley, claude-code-proxy).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant