Skip to content

fix: the docs-preview link pointed at a sinkholed domain for every repo using the default - #26

Merged
sotashimozono merged 1 commit into
mainfrom
fix/docs-preview-base-points-at-a-sinkholed-domain
Sep 9, 2026
Merged

sotashimozono merged 1 commit into
mainfrom
fix/docs-preview-base-points-at-a-sinkholed-domain

Conversation

@sotashimozono

Copy link
Copy Markdown
Member

Reported from a PR in ExperimentalAPI.jl, where the preview comment read
https://codes.sota-shimozono.com/ExperimentalAPI.jl/previews/PR35/.

The domain does not answer

$ getent hosts codes.sota-shimozono.com
198.135.184.22  sinkhole.paloaltonetworks.com

$ curl -o /dev/null -w '%{http_code}' https://codes.sota-shimozono.com/ExperimentalAPI.jl/previews/PR35/
000

Not a 404 — it resolves to a DNS sinkhole.

Five of seven callers use that default

repository preview-base
DataVault.jl, ExperimentalAPI.jl, AbstractQAtlas.jl, ParamIO.jl, TestShards.jl the default → dead link
templateHPC.jl, SweepRunner.jl 'https://qatlashub.github.io' passed by hand

Two repositories already carrying the same compensation is what says the default is wrong
rather than the callers.

The fix: ask GitHub where the site is

A constant cannot know about a custom domain; the Pages API already does.

resolved link
default (Pages API) https://qatlashub.github.io/ExperimentalAPI.jl/previews/PR35/ 200
explicit preview-base https://example.org/ExperimentalAPI.jl/previews/PR35/ override still wins
fallback (no Pages site yet) https://qatlashub.github.io/ExperimentalAPI.jl/previews/PR35/

All three branches dry-run to the URL above; the first is confirmed serving.

The fallback lowercases the owner, because Pages serves from a lowercase host while
github.repository_owner is spelled as the org is. pages: read added for the API call.

After this merges the two hand-written preview-base lines can be deleted — they now say exactly
what the default computes.

🤖 Generated with Claude Code

…po using the default

`preview-base` defaulted to `https://codes.sota-shimozono.com`. Measured 2026-09-09:

    $ getent hosts codes.sota-shimozono.com
    198.135.184.22  sinkhole.paloaltonetworks.com

    $ curl -o /dev/null -w '%{http_code}' https://codes.sota-shimozono.com/ExperimentalAPI.jl/previews/PR35/
    000

Five of the seven repositories calling this workflow use that default — DataVault.jl,
ExperimentalAPI.jl, AbstractQAtlas.jl, ParamIO.jl, TestShards.jl — so every preview comment in
them names a host that does not answer. The other two, templateHPC.jl and SweepRunner.jl, already
pass `preview-base: 'https://qatlashub.github.io'` by hand; two repositories carrying the same
compensation is what says the default is wrong rather than the callers.

The URL is now asked of the Pages API instead of assembled from a constant, because a constant
cannot know about a custom domain and the API already does:

    default (Pages API)      https://qatlashub.github.io/ExperimentalAPI.jl/previews/PR35/   → 200
    explicit preview-base    https://example.org/ExperimentalAPI.jl/previews/PR35/
    fallback (no Pages yet)  https://qatlashub.github.io/ExperimentalAPI.jl/previews/PR35/

`preview-base` still wins when given, so a repository served from somewhere the API cannot report
keeps its override. The fallback lowercases the owner, because Pages serves from a lowercase host
while `github.repository_owner` is spelled as the org is.

`pages: read` added for the API call, and the fallback covers a repository whose Pages site does
not exist yet or whose token cannot read it.

After this, the two hand-written `preview-base` lines can be deleted — they now say what the
default computes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sotashimozono
sotashimozono merged commit cc1e721 into main Sep 9, 2026
1 check passed
@sotashimozono
sotashimozono deleted the fix/docs-preview-base-points-at-a-sinkholed-domain branch September 9, 2026 09:58
sotashimozono added a commit to QAtlasHub/templateHPC.jl that referenced this pull request Sep 9, 2026
…tes (#9)

* chore: drop the preview-base override the reusable workflow now computes

The default was `https://codes.sota-shimozono.com`, which resolves to
`sinkhole.paloaltonetworks.com`, so this repository passed the right base by hand. QAtlasHub/.github#26
made the default ask the Pages API where the site actually is, which for this repository answers
`https://qatlashub.github.io/templateHPC.jl/` — the same value this line was supplying.

The preview comment on this pull request is the check: it should read
`https://qatlashub.github.io/templateHPC.jl/previews/PR<N>/` with the override gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci: re-run the preview with the fixed reusable workflow

A re-run reuses the reusable workflow at the ref the original run resolved, so it cannot pick up
QAtlasHub/.github#27. A new event can.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
sotashimozono added a commit to QAtlasHub/SweepRunner.jl that referenced this pull request Sep 9, 2026
… it was there (#40)

The comment said the reusable workflow defaults to `codes.sota-shimozono.com`, which does not
resolve — correct, and it stayed correct here while every other caller of that workflow kept
posting a dead link. QAtlasHub/.github#26 fixed the default instead: it now asks the Pages API
where the site is, which for this repository answers `https://qatlashub.github.io/SweepRunner.jl/`.

Both the override and its explanation go, because the condition the explanation describes no
longer holds and a comment that outlives its condition is worse than none.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
sotashimozono added a commit that referenced this pull request Sep 10, 2026
The commented-out override in the README showed `codes.sota-shimozono.com`, which is the value
that was the workflow's default until #26 — and which resolves to
`sinkhole.paloaltonetworks.com`. A reader copying the example would have re-created the bug.

The default now asks the Pages API where the site is, so the override is for the case the API
cannot answer: a site served from somewhere else. The example says that instead of naming a dead
host.

Co-authored-by: Claude Opus 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