Skip to content

sync: write the README upstream badge with the pin, and fail the build when it disagrees - #186

Merged
creedants merged 4 commits into
mainfrom
landing/e175
Oct 12, 2026
Merged

creedants merged 4 commits into
mainfrom
landing/e175

Conversation

@creedants

Copy link
Copy Markdown
Owner

The upstream version badge in the README can no longer disagree with upstream.json.

  • scripts/sync_upstream.py rewrites the badge when it writes a new pin. It changes the two version spans and no other byte, and it keeps the file's line endings.
  • When the README has no badge in the expected form, the sync says so, exits non-zero, and writes nothing.
  • When the new upstream version is not a dotted number, the sync says the badge cannot carry it, exits non-zero, and writes nothing.
  • python3 scripts/check.py with no tree argument, and python3 scripts/build.py, fail when the badge is missing or names another version. A check of a named outside tree gets no badge finding.

Known limits. A prerelease upstream version is refused, not carried. A version string holding a line break prints its refusal on two lines.

Reviewed at de4ea8c5.

@creedants
creedants merged commit e3eecfc into main Oct 12, 2026
2 checks passed
@creedants
creedants deleted the landing/e175 branch October 12, 2026 06:09
creedants added a commit that referenced this pull request Oct 12, 2026
…lure reasons (#194)

AGENTS.md lists the reasons the build fails. The README upstream badge
check was added to the build in #186, and the list did not mention it.
Step 5 of Porting an upstream file now says the build also fails on a
README upstream badge that is missing or disagrees with `upstream.json`.

How it was checked: the reviewer matched the sentence to the check in
`scripts/build.py` and `scripts/check.py` and to its tests. The build
and the check pass.

Known limits:

- This is a document-only change. The full test suite was not run.

Reviewed at 629cb2fd.
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