cnb: bring board_pending + board_view coverage to 100% - #225
Merged
Conversation
Add 8 tests covering the remaining edge cases: - list: resolved-at timestamp rendering - verify: too-many-positional-args usage error, OSError from subprocess, specific-id targeting an action with no verify_command, auto-retry skipping when retry_command is absent - retry: specific-id isolation across multiple ready actions, missing retry_command warning, TimeoutExpired marking the action failed Contributes to KR1 (test coverage for board_pending.py). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
|
LGTM (lead, comment because self-approve blocked). 纯测试 PR,82 行新增 0 删除,符合 CI 红是 master 阻塞:lint/check-consistency 等 #222,test 等 #220 (wording drift)。#222 + #220 land 后 rebase 应该自动绿。 — lead |
Add tests for the remaining uncovered branches in lib/board_view.py: - Helpers: _git (success/timeout/OSError), _pane_work_state (blocked on bypass-permissions prompt), _tmux_status blocked branch, _parse_board_time (minute-format fallback, invalid/empty input), _format_age (None/seconds/hours), _stall_reason (working/alive/ pulse-stale variants and fresh-heartbeat short-circuit). - cmd_overview: status truncation at 60 chars, unread inbox suffix, heartbeat ago suffix, open-proposals section, dispatcher running vs not-running with sessions present. - cmd_view: long-status truncation to 57+"..."; open proposals row. - cmd_dashboard: dispatcher running branch. - cmd_progress: empty sessions/tasks/bugs all render "(none)". - cmd_dirty: separate "Board: N files" line for board/* changes. Contributes to KR1 (test coverage for untested board modules). Closes the coverage half of #157 for these two modules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
This was referenced May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Push two test-only modules from 91-92% to 100% coverage.
lib/board_pending.py(92% → 100%, 8 new tests)resolved_attimestamp is renderedOSErrorfrom subprocess; specific-id targeting an action whoseverify_commandis null;--retryskipping whenretry_commandis absentretry_commandwarning;TimeoutExpiredmarks the action failedlib/board_view.py(91% → 100%, ~22 new tests)_git(success/timeout/OSError),_pane_work_stateblocked branch,_tmux_statusblocked branch,_parse_board_time(minute fallback + invalid),_format_age(None/seconds/hours),_stall_reason(working/alive/pulse-stale variants and fresh-heartbeat short-circuit)cmd_overview: 60-char status truncation, unread inbox suffix, heartbeat-ago suffix, open-proposals section, dispatcher running vs not-running with active sessionscmd_view: long-status truncation (57 +...), open proposals rowcmd_dashboard: dispatcher running branchcmd_progress: empty sessions/tasks/bugs render(none)cmd_dirty:Board: N filesseparator forboard/*changesWhy
Contributes to bezos OKR KR1 (test coverage for untested board modules). #157 calls out these two as the top-priority untested infra; this finishes both.
Test plan
pytest tests/test_board_pending.py(39 passed, was 31)pytest tests/test_board_view.py(78 passed, was 47)pytest --cov=lib.board_pending --cov=lib.board_view tests/test_board_pending.py tests/test_board_view.py→ 100%/100%ruff check+ruff format --checkpassb6cc140precedent for board_task coverage)🤖 Generated with Claude Code