Skip to content

fix(prek): drop the .git suffix from the doctoc repo URL - #1171

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-doctoc-repo-url
Sep 8, 2026
Merged

fix(prek): drop the .git suffix from the doctoc repo URL#1171
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-doctoc-repo-url

Conversation

@potiuk

@potiuk potiuk commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

zizmor 0.6.3 — arriving via dependabot #1167 — audits
.pre-commit-config.yaml for the first time, and its ref-confusion audit
hard-fails on ours:

fatal: no audit was performed
'ref-confusion' audit failed on file://./.pre-commit-config.yaml
    0: error in 'ref-confusion' audit

That is an audit crash, not a finding — so the whole zizmor job exits 1 with
nothing reported, and #1167 cannot go green.

Cause

ref-confusion resolves each pre-commit repo against the GitHub API to decide
whether its rev: is ambiguous between a tag and a branch. Our doctoc entry
declared a .git suffix, and it is carried into the lookup:

GET /repos/thlorenz/doctoc       200
GET /repos/thlorenz/doctoc.git   404

The 404 aborts the audit. doctoc was the only one of the four remote hooks
carrying .gitpre-commit-hooks, markdownlint-cli2 and typos already
omit it — so this is a consistency fix as much as a repair.

Why this lands on main, not on the dependabot branch

Pushing to dependabot/github_actions/… would be overwritten on its next push.
With this on main, #1167 goes green on rebase.

main is not currently broken: the pinned v0.6.2 does not audit pre-commit
configs, which is why zizmor passes in 9s on every other open PR. But the action
requests version: latest, so a future image reaches main regardless of
whether the action bump merges — this is worth fixing on its own account, not
only to unblock #1167.

Verification

  • Mechanism confirmed against the GitHub API directly (200 vs 404 above)
  • prek run doctoc --all-files passes — the hook re-clones under the new
    URL and its environment rebuilds
  • prek run --all-files passes (exit 0)

Not reproducible locally: ref-confusion is an online-only audit and zizmor
falls back to offline mode without a token, where the config passes cleanly. I
did not hand a credential to a subprocess to force the online path; the API
check establishes the mechanism without one.

🤖 Generated with Claude Code

https://claude.ai/code/session_01So3JRGXrbqSGrohtZuHWKg

zizmor 0.6.3 (dependabot apache#1167) audits .pre-commit-config.yaml for the
first time, and its `ref-confusion` audit hard-fails on ours:

    fatal: no audit was performed
    'ref-confusion' audit failed on file://./.pre-commit-config.yaml
        0: error in 'ref-confusion' audit

That is an audit crash, not a finding, so the whole zizmor job exits 1
with nothing reported.

`ref-confusion` resolves each pre-commit repo against the GitHub API to
decide whether its `rev:` is ambiguous between a tag and a branch. Ours
declared `https://github.com/thlorenz/doctoc.git`, and the suffix is
carried into the lookup:

    GET /repos/thlorenz/doctoc       200
    GET /repos/thlorenz/doctoc.git   404

The 404 aborts the audit. doctoc was the only one of the four remote
hooks carrying `.git`; the other three already omit it, so this is a
consistency fix as much as a repair.

Not reproducible locally: the audit is online-only and zizmor falls back
to offline without a token, where the config passes cleanly. The
mechanism was confirmed against the API directly instead.

Landing on main rather than on the dependabot branch, which would be
overwritten on its next push. main is not currently exposed — the pinned
v0.6.2 does not audit pre-commit configs — but `version: latest` means a
future image would reach it regardless of the action bump.

Generated-by: Claude Code (Opus 5)
@potiuk
potiuk merged commit 217a7f8 into apache:main Sep 8, 2026
9 checks passed
potiuk added a commit to potiuk/magpie that referenced this pull request Sep 9, 2026
Seven changes have landed behind the previous stamp: the agent-guard plugin
move (apache#1170), the doctoc URL fix (apache#1171), the marketplace re-sync plus the
self-correcting prek hook (apache#1174), the vetted command surface (apache#1176), and the
three PRs that extended its catalogue from 19 to 58 operations (apache#1177, apache#1178,
apache#1179). `claude plugin update` compares version strings, so none of that
reaches an adopter until the stamp moves.

Mechanical: `project.version` edited, then
`tools/dev/check-family-plugins.py --fix` propagated it to the five ecosystem
manifests and the eleven per-family plugin manifests plus the marketplace
entries, and `uv lock` refreshed the workspace's own package version.

Generated-by: Claude Code (Opus 5)
potiuk added a commit that referenced this pull request Sep 9, 2026
Seven changes have landed behind the previous stamp: the agent-guard plugin
move (#1170), the doctoc URL fix (#1171), the marketplace re-sync plus the
self-correcting prek hook (#1174), the vetted command surface (#1176), and the
three PRs that extended its catalogue from 19 to 58 operations (#1177, #1178,
#1179). `claude plugin update` compares version strings, so none of that
reaches an adopter until the stamp moves.

Mechanical: `project.version` edited, then
`tools/dev/check-family-plugins.py --fix` propagated it to the five ecosystem
manifests and the eleven per-family plugin manifests plus the marketplace
entries, and `uv lock` refreshed the workspace's own package version.

Generated-by: Claude Code (Opus 5)
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