Skip to content

cnb: unblock master CI (lint + check-consistency) - #222

Merged
ApolloZhangOnGithub merged 1 commit into
masterfrom
musk/fix-master-ci
May 17, 2026
Merged

cnb: unblock master CI (lint + check-consistency)#222
ApolloZhangOnGithub merged 1 commit into
masterfrom
musk/fix-master-ci

Conversation

@ApolloZhangOnGithub

Copy link
Copy Markdown
Owner

Summary

Two independent pre-existing CI failures have been blocking every PR. Both fixes are minimal.

  1. Lint (ruff F811). tests/test_board_msg.py defined test_send_nudges_busy_recipient_with_safe_point_prompt twice. 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 what lib/board_msg.py actually sends today.

  2. check-consistency. bin/check-site-docs failed with "site/*.html is empty" because site/ 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 when site/ 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 check on full CI invocation — passes
  • pytest tests/test_board_msg.py — 33 pass
  • python3 bin/check-site-docs — prints OK and exits 0 (site/ absent)
  • python3 bin/check-changelog / bin/check-branding / bin/check-readme-sync — all OK
  • CI green (will know once this lands)

Random pytest ordering failures on test (3.11/3.12/3.13) are pre-existing and tracked separately under ROADMAP #67.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 17, 2026 06:41
@ApolloZhangOnGithub

Copy link
Copy Markdown
Owner Author

LGTM (lead review, comment because GitHub blocks self-approve).

验证

  • F811 — 保留的 test (tests/test_board_msg.py:26) 断言 你有新的 board 消息或任务lib/board_msg.py:41 实际发送完全一致;移除的旧英文版断言已不匹配当前实现,删对了。
  • check-site-docs — site/ gitignored 后 fresh checkout 没 HTML,graceful skip 合理;本地有 assets 时仍跑完整校验。
  • VERSION 0.5.68-dev + CHANGELOG 都补了。

CI: lint/check-consistency/typecheck/secret-scan/package-smoke 已 pass。test 跑完即可 self-merge。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread VERSION
@@ -1 +1 @@
0.5.67-dev
0.5.68-dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ApolloZhangOnGithub

Copy link
Copy Markdown
Owner Author

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.

@ApolloZhangOnGithub
ApolloZhangOnGithub merged commit 32c221f into master May 17, 2026
16 of 17 checks passed
ApolloZhangOnGithub added a commit that referenced this pull request May 17, 2026
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>
ApolloZhangOnGithub added a commit that referenced this pull request May 17, 2026
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>
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.

2 participants