Skip to content

feat: add online link-check advisory caller - #12

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/lychee-online
Jun 22, 2026
Merged

feat: add online link-check advisory caller#12
kyle-sexton merged 1 commit into
mainfrom
feat/lychee-online

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Add a scheduled (weekly + workflow_dispatch) caller of the ci-workflows
link-check reusable workflow — external link health as an advisory signal that
files a rolling tracking issue, not a ci-status gate. Extend the shared
lychee.toml with URL excludes (auth-walled hosts, loopback, placeholders) used
only by the online lane.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Add a scheduled (weekly + workflow_dispatch) caller of the ci-workflows
link-check reusable workflow — external link health as an advisory signal that
files a rolling tracking issue, not a ci-status gate. Extend the shared
lychee.toml with URL excludes (auth-walled hosts, loopback, placeholders) used
only by the online lane.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kyle-sexton
kyle-sexton merged commit 52485a9 into main Jun 22, 2026
27 checks passed
@kyle-sexton
kyle-sexton deleted the feat/lychee-online branch June 22, 2026 19:43
kyle-sexton added a commit that referenced this pull request Jul 8, 2026
## Problem
The `owner/repo#N` tracker-reference rule let the **owner** segment
contain `.`, so a bare domain with a numeric fragment in a comment —
e.g. `// see foo.com/bar#3` or `# example.com/page#2` at a space/start
boundary — was misread as a cross-repo issue reference and flagged. The
existing leading-boundary `.`/`-` exclusion only caught hosts *embedded*
in a longer URL (preceded by `/` or `.`, e.g.
`https://example.com/page#2`), not hosts at a word boundary — so the
adjacent comment's claim that dotted hosts were handled was only half
true.

## Fix
A GitHub **owner** login (user or org) may contain only alphanumerics
and hyphens — never a `.` or `_` (GitHub username rules; ≤39 chars, no
leading/trailing/double hyphen). So the owner character class is
restricted from `[A-Za-z0-9._-]` to `[A-Za-z0-9-]`. The **repo** segment
keeps `.`/`_` because repository names legitimately allow them. A dotted
host can no longer be read as an owner.

Verified against the module test suite (`comment-hygiene.test.sh`),
which I extended: the regression guard now covers **bare** domains
(`foo.com/bar#3`, `example.com/page#2`, `sub.example.com/path#9`)
alongside the existing scheme'd-URL cases. Genuine refs — including
hyphenated owners (`melodic-software/app#123`, `owner-name/repo#7`) —
still match.

- `shellcheck -x`: clean.
- Module test: **12/12 pass** (test #11 now guards the bare-domain false
positive; #12 confirms hyphenated owners still flag).

## Propagation
This library is vendored downstream:
- **ci-workflows** carries a byte-identical copy (its comment-hygiene
action self-test sources it) — a sync PR follows.
- Consuming repos (e.g. `kyle-sexton/github-iac`) re-copy on their next
standards sync.

## Separate follow-up (not fixed here)
While committing I found the **local lefthook `shellcheck` hook diverges
from CI**: CI passes `--rcfile modules/shellcheck/.shellcheckrc` (which
sets `external-sources=true`), but the local hook relies on root
`.shellcheckrc` auto-discovery, and standards has no root copy — so the
hook emits `SC1091` for any script that `source`s another (e.g.
`comment-hygiene.test.sh`) and can't be committed without
`SHELLCHECK_OPTS=--external-sources`. That's a pre-existing dogfooding
gap in standards' own tooling, orthogonal to this fix, and touches the
root-stub/sync-manifest model — flagging for a maintainer decision
rather than fixing inline.

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

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Changes are limited to comment-scan regex behavior and ShellCheck
config; no runtime auth, data, or production paths.
> 
> **Overview**
> **Comment-hygiene** tightens the `owner/repo#N` tracker rule so dotted
hosts in comments (e.g. `foo.com/bar#3`, `example.com/page#2`) are no
longer treated as cross-repo issue refs. The **owner** segment no longer
allows `.` (GitHub logins cannot contain dots); the **repo** segment
still allows `.` and `_`, and `_` remains in the owner class for GitHub
Enterprise Managed User logins (e.g. `mona-cat_octo/repo#12`). Tests add
bare-domain regression cases and an EMU owner positive case.
> 
> A **root `.shellcheckrc`** is added as the repo’s ShellCheck ruleset
(aligned with `modules/shellcheck/`), so local hooks that auto-discover
config from the repo root can resolve `source`d scripts with
`external-sources=true` and the same optional checks as CI’s `--rcfile`
path.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
76df493. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.8 (1M context) <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