Skip to content

Let the link exclusions expire when the repositories ship - #16

Merged
ChesterHsu merged 3 commits into
mainfrom
fix/let-the-link-exclusions-expire-when-the-repos-ship
Sep 8, 2026
Merged

ChesterHsu merged 3 commits into
mainfrom
fix/let-the-link-exclusions-expire-when-the-repos-ship

Conversation

@ChesterHsu

Copy link
Copy Markdown
Member

Public link check has been failing on seven links to flytohub/flyto-flow and flytohub/flyto-warroom. Both are private, so a reader following "Public CE source" or the git clone line in flow/community-edition-docker.md gets a 404 today.

Deleting those pages would delete a plan that is only waiting on publication — and publication is a separate decision. Excluding the URLs is right for now and wrong permanently: the day the repositories go public, nothing checks those links again and nobody remembers the flag is there.

So the exclusion carries its own expiry

check-unpublished-links.mjs reads config/unpublished-repos.json, asks GitHub whether each listed repository answers publicly, and fails when one does — naming the --exclude to remove and the entry to delete.

# today
unpublished link exclusions still apply: 2 repository(ies)
  flytohub/flyto-flow is still private (Flow CE source-available publication is prepared but paused)
  flytohub/flyto-warroom is still private (Warroom CE publication is prepared but paused)

# the day one ships
unpublished link exclusions need attention:
- flytohub/flyto-flow is public now. Remove its --exclude from .github/workflows/seo.yml
  and its entry from config/unpublished-repos.json so the docs links to it are checked again.

It also fails if a repository is listed without a matching exclusion, so the list cannot drift away from the workflow. A GitHub outage or rate limit fails rather than reporting "now public" — guessing in either direction is worse than stopping.

Verified both directions

Not only the passing one. With the two real repositories it passes and names them as still private; with a public repository (flytohub/flyto-core) temporarily added to the list it fails and asks for the exclusion to be removed.

npm run verify passes in full — and its documentation contract caught that config/ had no documentation owner, so scripts/README.md now explains the mechanism rather than the manifest merely claiming ownership of it.

The external link check has been failing on seven links to flytohub/flyto-flow
and flytohub/flyto-warroom. Both are private, so a reader following
"Public CE source" or the git clone line in flow/community-edition-docker.md
gets a 404 today.

Deleting those pages would delete a plan that is only waiting on publication,
and publication is a separate decision. Excluding the URLs is the right call
for now and the wrong one permanently: the day the repositories go public,
nothing checks those links again and nobody remembers the flag is there.

So the exclusion carries its own expiry. check-unpublished-links.mjs reads
config/unpublished-repos.json, asks GitHub whether each listed repository
answers publicly, and fails when one does -- naming the --exclude to remove
and the entry to delete. While they are private it says so and passes. It
also fails if a repository is listed without a matching exclusion, so the
list cannot drift away from the workflow.

A GitHub outage or rate limit fails rather than reporting "now public",
because guessing in either direction is worse than stopping.

Verified both directions, not only the passing one: with the two real
repositories it passes and names them as still private; with a public
repository added to the list it fails and asks for the exclusion to be
removed. Full npm run verify passes, including the documentation contract --
which caught that config/ had no documentation owner, so scripts/README.md
now explains the mechanism rather than the manifest merely claiming it.
@ChesterHsu
ChesterHsu enabled auto-merge (squash) September 8, 2026 03:15
Comment thread scripts/check-unpublished-links.mjs Fixed
CodeQL flagged the outbound request as depending on file data, and it is
right that the shape is wrong even though this file is repository-controlled:
owner and name were interpolated into a URL with nothing asserting they were
repository names, so an edit could aim the request at another path or host.

Owner and name must now match GitHub's own slug shape, the assembled URL is
checked to still be an api.github.com /repos/ request, and redirects are
refused rather than followed.

The earlier check -- listed without a matching lychee exclusion -- already
rejected every malformed entry before it reached the request, which is why
probing through the config alone proved nothing about the new guard. Its
inputs were exercised directly instead: the two real names and flyto-core
accept; path traversal, a bare host, a fragment, an embedded slash, empty and
space-padded names all reject.
The link check now passes the seven flyto-flow and flyto-warroom URLs, and
fails on one this change created: reference/docs-code.md links every scanned
file to blob/main, so the entry for a newly added script 404s until the pull
request that adds it merges. That is structural -- 159 such links exist, and
any pull request adding a file hits it.

Excluding them from the external check is right, because no external check
can judge a file that does not exist on main yet. Excluding them and leaving
it there is not: a link naming a file that was renamed or deleted would then
go unnoticed.

So generate-code-reference.py --check now resolves every one of them against
the working tree that produced it, failing on a missing file or a line number
past the end. Verified by pointing one at a script that does not exist, which
it reports by name.

npm run verify passes.
@ChesterHsu
ChesterHsu merged commit 8ebba85 into main Sep 8, 2026
8 checks passed
@ChesterHsu
ChesterHsu deleted the fix/let-the-link-exclusions-expire-when-the-repos-ship branch September 8, 2026 03:39
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.

2 participants