fix: remove README-pypi.md generation dance, point pyproject at README.md#37
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…E.md Fresh-clone `pip install -e .` failed with `OSError: Readme file does not exist: README-pypi.md` because `pyproject.toml` referenced a `.gitignore`d build artifact that only CI/publish workflows generated. PyPI installs via pipx/uv/pip were fine because `publish.yml` regenerated first, but anyone doing a source install (git clone, GitHub archive) hit the failure. The dual-README setup existed only to strip the in-README TOC before publishing to PyPI (anchor links don't render reliably there). Removed the generation dance entirely: - Deleted the TOC block from README.md. GitHub renders an Outline sidebar automatically, and PyPI now gets the full README minus the broken anchors. - Pointed pyproject.toml.readme at README.md directly. - Dropped the Generate PyPI README step from ci.yml (test + smoke-macos jobs) and publish.yml. - Removed README-pypi.md from .gitignore. - Added a Fixed entry to CHANGELOG.md [Unreleased]. Tested: 449 passing; ruff clean; `.venv/bin/pip install -e .` succeeds from a clean state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bec9cad to
7a78300
Compare
cmeans
left a comment
There was a problem hiding this comment.
LGTM...sad to see the ToC leave :(
cmeans
left a comment
There was a problem hiding this comment.
QA Review — PR #37
Verdict: QA Failed
One substantive finding (factual error in PR body's "since PR #22" / "introduced in [Unreleased] (PR #22)" attribution). The fix itself, the CHANGELOG entry, and every test plan item all verify cleanly — the only blocker is the body needs an edit so the persisted narrative matches git history.
Verification
- Local
uv buildnow succeeds on a cleandist/:Successfully built dist/yt_dont_recommend-0.4.2.tar.gzand the wheel — was failing onmainand on PR #36's branch withOSError: Readme file does not exist: README-pypi.md. - Full smoke test passes 19/19 (
bash scripts/smoke-test.sh) — same script that the PR body's[x] scripts/smoke-test.sh — 19/19 passedcheck claimed in #36 but was not reproducible there. Now it is. - QA checkbox 1 — fresh-clone install in a temp dir: cloned
fix/remove-readme-pypi-danceinto amktemp -dtree, created a new venv, ran.venv/bin/pip install -e . --quiet— succeeds..venv/bin/yt-dont-recommend --version→yt-dont-recommend 0.4.2. Bug is dead. Ticked. - QA checkbox 2 — README rendering: TOC block (lines 13–40 in
main's README) is gone;head -20 README.mdshows badges → alpha disclaimer → Automation pitch → straight into## Platform Support.grep -c "^## "reports 22 H2 sections — all real content, no orphan TOC items. No external link anywhere in the repo points at the removed anchors (grep -rn "README\.md#"→ 0 hits), so nothing breaks. PyPI rendering is the inverse of the original problem: PyPI gets the full README without the broken-anchor block, exactly as advertised. Ticked. - Tests:
.venv/bin/python -m pytest tests/ -q→ 449 passed in 34.30s. - Lint:
.venv/bin/ruff check src/ tests/→ all checks passed. - CHANGELOG accuracy: only one new Unreleased mention of
README-pypi(the new Fixed entry). The other repo-wide hit atCHANGELOG.md:250is in the released## [0.1.22] - 2026-03-03section and is correct historical record — leave it alone. - Mergeable; CI all required checks SUCCESS on the rebased branch. PR #36 already merged into
main(9db1efa); the predicted CHANGELOG conflict didn't materialize.
Findings
| # | Finding | Severity |
|---|---|---|
| 1 | PR body misattributes the bug's origin to PR #22. The body says "pyproject.toml has pointed at README-pypi.md since PR #22" (root cause section) and "The bug was introduced in [Unreleased] (PR #22)" (why-this-blocks-v0.5.0 section). Neither is accurate. PR #22 (eec34f3 chore: switch license to Apache-2.0 and fix PyPI metadata for badges) only modified pyproject.toml's license line; the readme = {file = "README-pypi.md", ...} line was unchanged. Per `git log --all -p -- pyproject.toml |
grep "readme", that line dates back to **9c1f5ed Add PyPI packaging, CI, and publish workflows** (the original packaging commit, well pre-v0.3.2), and the Generate PyPI README (strip TOC)step inci.yml/publish.yml was added in the same commit (git log --diff-filter=A -- .github/workflows/ci.yml→9c1f5ed). So the bug is **as old as the PyPI packaging itself** and the dual-README-with-CI-generation pattern was a deliberate choice from day one. The fix is still correct and still belongs in [Unreleased](since the fix is what's shipping inv0.5.0), but the narrative that this was a regression of PR #22 is wrong and would mislead anyone reading the squash commit message in 6 months. Suggested rewrites: drop the *"since PR #22"* phrase from § Root cause, and rephrase § Why this blocks v0.5.0 to *"This bug has existed since the project's first PyPI packaging commit (9c1f5ed); it only surfaced now during pre-release validation for v0.5.0."* No code change required — just a gh pr edit 37 --body-file …`. |
Notes
- Once the body is corrected I'll re-verify (no re-test needed beyond confirming the body change), tick
Ready for QA Signoff. The diff itself is approve-ready.
Dev response to QA Finding #1 (PR body misattribution)What I changedEdited the PR description via
Why
|
The PR description was updated via `gh pr edit` to correct the commit attribution for the README-pypi.md bug (from PR #22 to 2ebc8df). That edit doesn't trigger the pr-labels workflow, so the PR is stuck at `QA Failed`. Pushing this empty commit to kick the state machine back through `Awaiting CI -> Ready for QA` so QA can re-verify. Will squash out at merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cmeans
left a comment
There was a problem hiding this comment.
QA Review — Round 2 on PR #37
Verdict: Ready for QA Signoff
Round-1 finding addressed; Dev's archaeology was tighter than mine.
Re-verification
- PR body attribution corrected. § Root cause and § Why this blocks v0.5.0 now point at commit
2ebc8df("Strip TOC from PyPI README; exit code 1 on attention-level failures", 2026-03-08, pre-v0.4.0) instead of PR #22. Verified againstgit show 2ebc8df -- pyproject.toml:and the same commit added the-readme = "README.md" +readme = {file = "README-pypi.md", content-type = "text/markdown"}Generate PyPI README (strip TOC)step toci.yml/publish.yml. So2ebc8dfis exactly the right commit — it introduced both halves of the dance in one go. (Aside: my round-1 review pointed at9c1f5ed, which was wrong —9c1f5edshippedreadme = "README.md". Dev'sgit logwas sharper than mine; record corrected.) - Empty commit
086d279is intentional and benign —git show --stat 086d279shows zero file changes, just the message "ci: trigger label workflow after PR body edit".gh pr editdoesn't firepr-labels.yml, so without the empty commit the PR would have been stuck atQA Failed. Reasonable workaround. - Diff vs. main unchanged beyond that — same 6 files (
.github/workflows/ci.yml,.github/workflows/publish.yml,.gitignore,CHANGELOG.md,README.md,pyproject.toml). - Local re-runs:
rm -rf dist/ && uv build→ both sdist + wheel built.pytest -q→ 449 passed.ruff check src/ tests/→ clean. CI on the rebased branch all green; mergeable. - QA checkboxes re-ticked in PR body (the body edit reset them).
Promoting to Ready for QA Signoff. Maintainer can apply QA Approved.
Bumps pyproject.toml version from 0.4.2 to 0.5.0 and finalizes the CHANGELOG by converting [Unreleased] to [0.5.0] - 2026-04-22, with a fresh empty [Unreleased] above for future work. Minor bump is forced by the MIT -> Apache-2.0 license switch (PR #22) among other user-visible changes; see CHANGELOG.md [0.5.0] for the full entry (15 merged PRs since v0.4.2). Pre-release gate (all four satisfied): - scripts/smoke-test.sh: 19/19 pass (version correctly reports 0.5.0) - pytest tests/: 449 passed - ruff check src/ tests/: clean - Live --dry-run session signed off by maintainer on 2026-04-22: - Fresh-clone pip install -e . succeeds (PR #37 verified) - Browser launch, UA masking, subscription scrape, blocklist fetch, list-growth detection, state diff, feed JSON cache, scroll, clean exit all exercised successfully against both deslop and aislist - 0 feed matches reflects well-trained algorithm, not a regression - No POSSIBLE SELECTOR FAILURE warnings After merge, maintainer will tag v0.5.0 and push the tag; publish.yml auto-publishes to PyPI on tag push and github-release creates the release notes. Co-authored-by: cmeans-claude-dev[bot] <3223881+cmeans-claude-dev[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Caught during pre-release validation for v0.5.0. From a completely fresh clone:
Root cause
pyproject.tomlhas pointed atREADME-pypi.mdsince commit2ebc8df("Strip TOC from PyPI README; exit code 1 on attention-level failures", 2026-03-08, pre-v0.4.0). That commit switched thereadmefield from"README.md"to{file = "README-pypi.md", content-type = "text/markdown"}and simultaneously added theGenerate PyPI README (strip TOC)step toci.yml/publish.yml. TheREADME-pypi.mdfile is:.gitignoredGenerate PyPI README (strip TOC)step inci.yml(both jobs) andpublish.ymlSo CI and the PyPI publish pipeline work — they regenerate before building. But any source install path (git clone, GitHub archive,
pip install -e .) fails because the file does not exist yet. Developers who previously built locally happened to have staleREADME-pypi.mdfiles left over, which is why it flew under the radar for multiple releases.Fix — option 1b from the triage
The dual-README setup existed solely to strip the in-README table of contents before publishing to PyPI, because PyPI does not render anchor links reliably. Removed the whole generation dance:
README.md. GitHub's sidebar "Outline" widget generates a TOC automatically, so the manual one is redundant on GitHub and was actively broken on PyPI.pyproject.toml.readmeatREADME.mddirectly.Generate PyPI READMEstep fromci.yml(both jobs) andpublish.yml.README-pypi.mdfrom.gitignore(since it no longer exists as a concept).CHANGELOG.md [Unreleased].Why this blocks v0.5.0
The bug has existed since
2ebc8df(pre-v0.4.0) but only surfaced now during pre-release validation for v0.5.0, when QA did a completely clean clone with no staleREADME-pypi.mdartifact on disk. PyPI installs (pip install yt-dont-recommend) remain unaffected becausepublish.ymlregenerates before the wheel build — that's how every published release to date has shipped successfully. But the GitHub-archive /git clonepath is how most contributors and skeptics first evaluate the project, and it has been silently broken for many releases. Shipping v0.5.0 with the fix aligns the source-install experience with the PyPI-install experience.Test plan
.venv/bin/pip install -e . --quietfrom a fresh-state working tree — succeeds..venv/bin/yt-dont-recommend --version— prints0.4.2as expected (version bump to 0.5.0 is a separate PR)..venv/bin/python -m pytest tests/ -q— 449 passed..venv/bin/ruff check src/ tests/— clean.pip install -e .in a new venv, confirm it succeeds without any pre-step.Note on CHANGELOG
Previously this PR warned about a conflict with #36. That PR merged first (into
mainat9db1efa); this branch has been rebased and the[Unreleased]### Fixedsubsection now correctly shows both entries without conflict.