Skip to content

docs: make the README work off GitHub and show what differs - #174

Merged
bagowix merged 1 commit into
mainfrom
docs/readme-links-and-structure
Aug 17, 2026
Merged

docs: make the README work off GitHub and show what differs#174
bagowix merged 1 commit into
mainfrom
docs/readme-links-and-structure

Conversation

@bagowix

@bagowix bagowix commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

The README is the package's long description, and PyPI resolves a relative link against pypi.org rather than the repository. All 31 relative links — the whole of docs/, CONTRIBUTING.md, SECURITY.md, the licence, the examples — answered 404 for anyone arriving on the package page, which is exactly where the new Homepage link sends people. Verified with readme_renderer[md], the renderer warehouse itself uses: 31 relative links before, 0 after.

Every link is now absolute, and documentation points at the published site instead of raw Markdown — which also spares a GitHub reader the === "uv" tab syntax that only renders once built.

While in there, the page also never demonstrated the two reasons to pick this breaker over the established ones. Its only configured example set a failure rate and a minimum call count, the two knobs every other library has:

  • the quickstart now configures the slow-call thresholds and says which dependency they catch (one that answers slowly and never raises, so a consecutive-failure counter never trips);
  • the same instance then guards an async callable, so "sync and async in one class" is shown rather than asserted;
  • a new Shared state across instances section shows Redis-backed coordination in five lines;
  • the rollout section drops the paragraph that restated the states guide;
  • docs/img/state-machine.svg opens the page: CLOSED / OPEN / HALF_OPEN with the condition on every edge, including the slow-call rate. One asset, no external fonts, no theme-dependent colours, so it renders identically on GitHub, on PyPI and in either colour scheme.

tests/test_readme.py keeps it that way: it fails on a relative link, on a documentation url with no page behind it, on a repository url with no file behind it, and on an anchor with no matching heading. Each guard was confirmed to fail on a deliberately broken README before being kept.

Note: the diagram is embedded through a raw.githubusercontent.com/.../main/... url, so it renders as a broken image in this PR preview and starts working the moment the branch lands on main. Relative paths are not an option — they are the bug this PR fixes.

Verified locally: every code block in the README executes as written (quickstart, rollout transport, Redis storage, httpx2 transport, pipeline), uv build + twine check PASSED, uv run pytest --cov 776 passed at 100%, ruff/mypy/pyright/pyrefly clean.

Checklist

  • Tests added or updated (suite stays at 100% coverage)
  • uv run ruff format --check and uv run ruff check pass
  • uv run mypy, uv run pyright and uv run pyrefly check pass
  • Docs updated (docs/) for user-facing changes
  • CHANGELOG.md [Unreleased] updated
  • Commits follow Conventional Commits

Related issues

Added

  • Added slow-call threshold and async callable examples.
  • Added Redis-backed shared-state example.
  • Added a state-machine diagram.
  • Added README validation for documentation links, repository paths, and anchors.

Fixed

  • Replaced relative README links with absolute URLs for GitHub and PyPI compatibility.
  • Linked README documentation to the published site.
  • Fixed homepage title, PyPI navigation, and safe-rollout documentation links.

Changed

  • Removed redundant rollout documentation.
  • Expanded sync and async usage, integration, contributing, and license documentation.
  • Added documentation metadata and Google Search Console verification.

The README is the package's long description, and PyPI resolves a relative
link against pypi.org rather than the repository — so all 31 of them, the
whole of docs/ plus CONTRIBUTING.md, SECURITY.md, the licence and the
examples, answered 404 for a reader arriving on the package page, which is
where the new Homepage link now sends people. Every link is absolute and
documentation points at the published site instead of raw Markdown, which
also spares a GitHub reader the tab syntax that only renders once built.

The page also never demonstrated the two reasons to choose this breaker: the
only configured example set a failure rate and a minimum call count, the two
knobs every other library has. The quickstart now configures the slow-call
thresholds and guards an async callable with the same instance, a new section
shows Redis-backed shared state, the rollout section drops the paragraph that
restated the states guide, and a state-machine diagram opens the page.

tests/test_readme.py fails the build on a relative link, on a documentation
url with no page behind it, on a repository url with no file behind it, and
on an anchor with no matching heading.
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 43fa1c3e-f270-42ec-9c45-e15e3fbbe434

📥 Commits

Reviewing files that changed from the base of the PR and between 8eb4d69 and 8519817.

⛔ Files ignored due to path filters (1)
  • docs/img/state-machine.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • CHANGELOG.md
  • README.md
  • tests/test_readme.py
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-links-and-structure

Comment @coderabbitai help to get the list of available commands.

@codspeed-hq

codspeed-hq Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 28 untouched benchmarks


Comparing docs/readme-links-and-structure (8519817) with main (8eb4d69)

Open in CodSpeed

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@bagowix

bagowix commented Aug 17, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai help

@bagowix
bagowix merged commit 284d69d into main Aug 17, 2026
18 of 21 checks passed
@bagowix
bagowix deleted the docs/readme-links-and-structure branch August 17, 2026 18:19
@bagowix bagowix mentioned this pull request Aug 17, 2026
6 tasks
bagowix added a commit that referenced this pull request Aug 17, 2026
## Summary

Prepare the `2.6.1` patch release.

* Bump the package version from `2.6.0` to `2.6.1`.
* Move the current `[Unreleased]` changelog entries into `[2.6.1] -
2026-08-17`.
* Update changelog comparison links and the comparison-page release
version.
* Regenerate `docs/llms-full.txt`.

Patch, not minor: nothing under `interlock/` changed since v2.6.0 — the
release carries documentation and packaging metadata only (#166, #173,
#174), and griffe reports the `VERSION` attribute as the sole public
difference.

It exists because a package page keeps the description and the project
urls of the version that was uploaded, so none of that work is visible
where it was aimed. pypi.org currently serves the README whose 31
relative links answer 404 there, and a `Homepage` pointing at the
repository rather than at the documentation. Checked on the built wheel:
`Homepage` → the documentation site, 0 relative links in the long
description, state-machine diagram embedded.

## Checklist

* [x] Tests added or updated (suite stays at 100% coverage)
* [x] `uv run ruff format --check` and `uv run ruff check` pass
* [x] `uv run mypy`, `uv run pyright` and `uv run pyrefly check` pass
* [x] Docs updated (`docs/`) for user-facing changes
* [x] `CHANGELOG.md` `[Unreleased]` updated
* [x] Commits follow Conventional Commits

Additional release checks: the package build passes
(`interlock_cb-2.6.1`), `twine check` PASSED on both artefacts, and
griffe reports only the expected public `VERSION` change (`2.6.0` →
`2.6.1`).

One timing note for tagging: GitHub is currently returning `No server is
currently available to service your request` on parts of its API —
CodeQL and Scorecard failed that way on #174 and on `main`, at the
Initialize step rather than in analysis. Worth having those green before
pushing the tag, so the publish job does not meet the same outage.

## Related issues

#166 
#173 
#174
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