From 7a78300cdecee946979f1dc7c0e4cd212ac93a16 Mon Sep 17 00:00:00 2001 From: "cmeans-claude-dev[bot]" <3223881+cmeans-claude-dev[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 15:33:50 -0500 Subject: [PATCH 1/2] fix: remove README-pypi.md generation dance, point pyproject at README.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) --- .github/workflows/ci.yml | 20 -------------------- .github/workflows/publish.yml | 10 ---------- .gitignore | 3 --- CHANGELOG.md | 1 + README.md | 28 ---------------------------- pyproject.toml | 2 +- 6 files changed, 2 insertions(+), 62 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44402bd..3518ea4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,16 +17,6 @@ jobs: - uses: astral-sh/setup-uv@v5 - - name: Generate PyPI README (strip TOC) - run: | - python -c " - import re - from pathlib import Path - src = Path('README.md').read_text(encoding='utf-8') - cleaned = re.sub(r'\n---\n.*?\n---\n', '\n\n', src, count=1, flags=re.DOTALL) - Path('README-pypi.md').write_text(cleaned, encoding='utf-8') - " - - name: Install dependencies run: uv sync --extra dev @@ -51,16 +41,6 @@ jobs: - uses: astral-sh/setup-uv@v5 - - name: Generate PyPI README (strip TOC) - run: | - python -c " - import re - from pathlib import Path - src = Path('README.md').read_text(encoding='utf-8') - cleaned = re.sub(r'\n---\n.*?\n---\n', '\n\n', src, count=1, flags=re.DOTALL) - Path('README-pypi.md').write_text(cleaned, encoding='utf-8') - " - - name: Install package run: uv tool install . diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dbc7e23..baa8da0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,16 +14,6 @@ jobs: - uses: astral-sh/setup-uv@v5 - - name: Generate PyPI README (strip TOC) - run: | - python -c " - import re - from pathlib import Path - src = Path('README.md').read_text(encoding='utf-8') - cleaned = re.sub(r'\n---\n.*?\n---\n', '\n\n', src, count=1, flags=re.DOTALL) - Path('README-pypi.md').write_text(cleaned, encoding='utf-8') - " - - name: Build distributions run: uv build diff --git a/.gitignore b/.gitignore index 6cd6976..23ef41c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ # Virtual environment .venv/ -# Generated at publish time (strip TOC for PyPI) -README-pypi.md - # Python __pycache__/ *.pyc diff --git a/CHANGELOG.md b/CHANGELOG.md index e4809d2..32f859e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/). Versions follow ### Fixed +- **Fresh-clone `pip install -e .` failure**: `pyproject.toml` pointed at `README-pypi.md`, a `.gitignore`d build artifact only generated by CI/publish workflows, so any source install from a fresh clone failed with `OSError: Readme file does not exist: README-pypi.md`. The dual-README setup existed solely to strip the in-README table of contents before publishing to PyPI (anchor links don't render reliably there). Removed the generation dance entirely: deleted the TOC block from `README.md` (GitHub's "Outline" sidebar provides a TOC anyway), pointed `pyproject.toml` at `README.md` directly, and dropped the `Generate PyPI README` step from `ci.yml` (both jobs) and `publish.yml`. `README-pypi.md` is no longer gitignored because it is no longer a thing. - **Stale `python -m yt_dont_recommend` examples in the package module docstring** (closes #31): replaced every example in `src/yt_dont_recommend/__init__.py` with the `yt-dont-recommend` console-script form (the package has no `__main__.py`, so the `python -m` form never worked), and added the now-required `--blocklist` flag to each example. The same doc-drift affected `CLAUDE.md` § "End-to-End Test Cycle", which referenced a non-existent top-level `yt_dont_recommend.py` — updated to use the console-script form as well. Also corrected a stale `License: MIT` line in the module docstring to `License: Apache-2.0` to match the main-branch license switch. - **Scheduler catch-up spawn storm** (closes #17): after the host woke from sleep (or otherwise missed multiple consecutive scheduled slots), the heartbeat loop would spawn one full blocklist+clickbait run per missed slot back-to-back, resulting in three or more overlapping browser sessions fighting over the same Chromium profile. Stale missed slots are now coalesced into a single catch-up run. - **`workflow_run` event registration for `pr-labels-ci.yml`** (PRs #24–#28): literal GitHub Actions template-expression syntax inside shell comments in `run:` blocks was being substituted by the runner at queue time, which failed parsing and silently prevented the workflow from registering with the `workflow_run` trigger at all — the label automation never fired. Took five iterations to diagnose and escape correctly. The workflow now registers cleanly (visible under `gh api repos/.../actions/workflows`) and dispatches on completion of the source workflow. diff --git a/README.md b/README.md index 6dcedc7..9452c90 100644 --- a/README.md +++ b/README.md @@ -13,34 +13,6 @@ Automates YouTube's "Don't recommend channel" action in bulk, using any channel No browser extension can do this. Extensions filter content client-side on a single browser. This tool affects the server-side recommendation engine. ---- - -- [Platform Support](#platform-support) -- [Install](#install) - - [Clickbait Detection Extras](#clickbait-detection-extras) -- [Upgrading](#upgrading) -- [Uninstall](#uninstall) -- [Development Setup](#development-setup) -- [Usage](#usage) -- [Exclusion Lists](#exclusion-lists) -- [Subscription Protection](#subscription-protection) -- [Auto-Unblock (False Positive Correction)](#auto-unblock-false-positive-correction) -- [Blocklist Format](#blocklist-format) -- [Built-in Sources](#built-in-sources) -- [How It Works](#how-it-works) -- [State & Logs](#state--logs) -- [Caveats](#caveats) -- [Automatic Safeguards](#automatic-safeguards) -- [Running Periodically](#running-periodically) -- [Notifications](#notifications) -- [Updates](#updates) -- [Checking and Updating Selectors](#checking-and-updating-selectors) -- [Acknowledgments](#acknowledgments) -- [Changelog](#changelog) -- [License](#license) - ---- - ## Platform Support | Platform | Status | diff --git a/pyproject.toml b/pyproject.toml index 43832eb..17be6da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "yt-dont-recommend" version = "0.4.2" requires-python = ">=3.10" description = "Bulk-train YouTube's recommendation algorithm via 'Don't recommend channel' — works on Fire TV, mobile, and smart TVs" -readme = {file = "README-pypi.md", content-type = "text/markdown"} +readme = {file = "README.md", content-type = "text/markdown"} license = {text = "Apache-2.0"} authors = [ {name = "Chris Means", email = "chris.a.means@gmail.com"}, From 086d279f7872684f02fde70b2cf4c360669c99b7 Mon Sep 17 00:00:00 2001 From: "cmeans-claude-dev[bot]" <3223881+cmeans-claude-dev[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 17:56:52 -0500 Subject: [PATCH 2/2] ci: trigger label workflow after PR body edit 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)