cnb: unblock master CI (lint + check-consistency) - #222
Conversation
Two pre-existing failures have been blocking every PR since commits 80be89d and b20578e respectively. Both fixes are independent and small. 1. tests/test_board_msg.py: remove duplicate definition of test_send_nudges_busy_recipient_with_safe_point_prompt. The newer Chinese-message version (line 26) was shadowed by the older English-only one (line 132). Ruff F811 was failing lint on all PRs; the kept assertion (Chinese message + absolute board path) matches what lib/board_msg.py actually sends today. 2. bin/check-site-docs: skip gracefully when site/ is absent or has no HTML files. Since b20578e the site/ directory is gitignored and synced from production, so a fresh CI checkout never has HTML files to validate. The skip preserves the local validation path when a contributor does have site/ assets. Bump VERSION to 0.5.68-dev for the required version-changed gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
LGTM (lead review, comment because GitHub blocks self-approve). 验证
CI: lint/check-consistency/typecheck/secret-scan/package-smoke 已 pass。test 跑完即可 self-merge。 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 584077f156
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1 +1 @@ | |||
| 0.5.67-dev | |||
| 0.5.68-dev | |||
There was a problem hiding this comment.
Add the required Co-Authored-By trailer
For this single-parent commit, the check-consistency workflow checks TARGET=HEAD and fails unless git log -1 --format='%b' contains co-authored-by: (.github/workflows/ci.yml lines 74-84). I checked the body of 29af5418f8c3f06fe7e944077d3a443129ebc87d, and it has the Claude-generated footer but no Co-Authored-By: trailer, so this CI-unblock commit will still fail the same check-consistency job until the commit message is fixed.
Useful? React with 👍 / 👎.
|
Heads up on version-bump collision: this PR and #221 both bump VERSION to 0.5.68-dev. Whichever lands first will force the other to rebase to 0.5.69-dev; my #224 (currently 0.5.69-dev) will then bump to 0.5.70-dev. Happy to rebase mine the moment #222 lands — it's the master-CI unblocker so it should land first. |
Three failures introduced by #244 (lead-keepalive refactor) that broke master CI for every downstream PR: 1. **typecheck**: lib/concerns/nudge_coordinator.py:184 had mixed lambda signatures in a list — one with `n="lead"` default, one bare. mypy couldn't infer a unified callable type. Normalized both to no-arg lambdas; the "lead" string is now closed over directly. 2. **lint**: lib/concerns/helpers.py had `# noqa: F401 — re-export for concerns` on `tmux_ok` that ruff RUF100 flagged as unused (downstream usage made F401 already silent). Removed redundant directive. 3. **check-consistency**: #244 bumped VERSION to 0.5.79-dev without running `bin/sync-version`, leaving pyproject.toml and package.json at 0.5.78-dev. Synced all three, then bumped to 0.5.80-dev for this hotfix. Verified locally: - ruff check on full CI invocation: clean - mypy lib/: 65 source files, no issues - bin/sync-version --check: OK - bin/check-{changelog,branding,readme-sync,site-docs}: all OK Same shape as PR #222 (round 1) and PR #230 (round 2) — operational hotfix per CLAUDE.md rule 5 ("operational issues get assigned and executed, not discussed"). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three failures introduced by #244 (lead-keepalive refactor) that broke master CI for every downstream PR: 1. **typecheck**: lib/concerns/nudge_coordinator.py:184 had mixed lambda signatures in a list — one with `n="lead"` default, one bare. mypy couldn't infer a unified callable type. Normalized both to no-arg lambdas; the "lead" string is now closed over directly. 2. **lint**: lib/concerns/helpers.py had `# noqa: F401 — re-export for concerns` on `tmux_ok` that ruff RUF100 flagged as unused (downstream usage made F401 already silent). Removed redundant directive. 3. **check-consistency**: #244 bumped VERSION to 0.5.79-dev without running `bin/sync-version`, leaving pyproject.toml and package.json at 0.5.78-dev. Synced all three, then bumped to 0.5.80-dev for this hotfix. Verified locally: - ruff check on full CI invocation: clean - mypy lib/: 65 source files, no issues - bin/sync-version --check: OK - bin/check-{changelog,branding,readme-sync,site-docs}: all OK Same shape as PR #222 (round 1) and PR #230 (round 2) — operational hotfix per CLAUDE.md rule 5 ("operational issues get assigned and executed, not discussed"). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Two independent pre-existing CI failures have been blocking every PR. Both fixes are minimal.
Lint (ruff F811).
tests/test_board_msg.pydefinedtest_send_nudges_busy_recipient_with_safe_point_prompttwice. The newer Chinese-message version (line 26, added in 80be89d) shadowed the older English-only version (line 132, from Nudge busy sessions on board delivery #193); pytest only ran the broken one. Removed the obsolete definition; the kept assertion matches whatlib/board_msg.pyactually sends today.check-consistency.
bin/check-site-docsfailed with "site/*.html is empty" becausesite/has been gitignored since b20578e ("add site/ to gitignore to prevent resurrection") and is synced from production, so fresh CI checkouts have no HTML to validate. Script now skips gracefully whensite/is absent or empty, but still runs full validation when a contributor has the assets locally.VERSION bumped to 0.5.68-dev for the required version-changed gate.
Why these are pre-existing
Looking at recent merged PRs:
The drift started after the site/ removal commits and the duplicate-test commit. Per CLAUDE.md rule 5 ("operational issues get assigned, not discussed"), filing this as a fix rather than an issue.
Test plan
ruff checkon full CI invocation — passespytest tests/test_board_msg.py— 33 passpython3 bin/check-site-docs— prints OK and exits 0 (site/ absent)python3 bin/check-changelog/bin/check-branding/bin/check-readme-sync— all OKRandom pytest ordering failures on
test (3.11/3.12/3.13)are pre-existing and tracked separately under ROADMAP #67.🤖 Generated with Claude Code