Repository navigation
fix: sdlc ci and sdlc tiers name the push verdicts a repo skipped (#50) - #51
Conversation
|
Changes requested — one blocker, in the CHANGELOG only. The code is good to go. Second review at 137457e. Blocker: the entry lands in the released 0.7.0 section. The PR is based on c9cd54c, before #52 rolled Unreleased into Checked and fine:
Re-approve on a rebase that moves only the CHANGELOG line. 🤖 Generated with Claude Code |
137457e to
9f25d32
Compare
| return [c for c in DEFAULTS["push"] if c in drop and c not in CI_EXCLUDES and c not in ci] | ||
|
|
||
|
|
||
| def push_skip_line(cfg: dict) -> str | None: |
There was a problem hiding this comment.
CRITICAL (Documentation): The new public function push_skip_line has no documentation. Its return value and the conditions under which it returns None are not described.
Suggestion: Add a docstring describing the formatted skip notice and that the function returns None when there are no push skips to report.
Evidence:
def push_skip_line(cfg: dict) -> str | None:
gone = push_skips(cfg)
return f"sdlc ci: not run, skipped in [tool.sdlc.push]: {', '.join(gone)}" if gone else None
There was a problem hiding this comment.
Not a bug: push_skip_line is a one-line formatter over push_skips, whose docstring sits directly above it and explains what is named and why. Its str | None return type and the if gone else None expression already say when it returns None. Small helpers in this script, like block and names, carry no docstring, and this follows that convention. sdlc is a script, not a library with a public API.
|
Approve at 9f25d32. One mechanical step remains before the merge: main has moved again.
🤖 Generated with Claude Code |
`[tool.sdlc.push] skip` is the only way a verdict leaves ci, and a verdict that is not run was simply absent from the output, so a green `sdlc ci` read the same whether the repo ran lint or opted out of it. `sdlc plan ci` now prints, on stderr (stdout is the plan the launcher parses), one line such as sdlc ci: not run, skipped in [tool.sdlc.push]: lint, codeql and `sdlc tiers` prints the same line under its ci block. The reviewers ci never runs, and a verdict the ci block adds back, are not named. Closes #50 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Y1jg4en5vBPWthjJZsCj
9f25d32 to
c20249e
Compare
| return [c for c in DEFAULTS["push"] if c in drop and c not in CI_EXCLUDES and c not in ci] | ||
|
|
||
|
|
||
| def push_skip_line(cfg: dict) -> str | None: |
There was a problem hiding this comment.
CRITICAL (Documentation): The newly added public function push_skip_line has no docstring describing its behavior or return value.
Suggestion: Add a docstring explaining that it returns the formatted skip notice when push verdicts are skipped, and None when there are none.
Evidence:
def push_skip_line(cfg: dict) -> str | None:
gone = push_skips(cfg)
return f"sdlc ci: not run, skipped in [tool.sdlc.push]: {', '.join(gone)}" if gone else None
There was a problem hiding this comment.
Not a bug: this is the same finding as discussion_r4597617417, raised again on the rebased head, and it gets the same answer. push_skip_line is a one-line formatter over push_skips, and push_skips' docstring sits directly above it. The str | None signature and the if gone else None expression already say when it returns None. That matches the script's other small helpers, like block and names.
Closes #50.
[tool.sdlc.push] skipis the only way a verdict leaves ci, and until now a skipped verdict was just absent, so a greensdlc cilooked the same whether the repo ran lint or opted out of it.sdlc plan ciprints one line on stderr, because stdout is the planbin/sdlcparses and the launcher passes the container's stderr through to the terminal:sdlc ci: not run, skipped in [tool.sdlc.push]: lint, codeqlsdlc tiersprints the same line under itssdlc ci:block.CI_EXCLUDES) are left out because ci never runs them anyway, and so is a verdict the ci block adds back viachecks.tests/test_plan.pychecks, plus a CHANGELOG Unreleased line.Local gates: test_plan.py, ruff 0.17.1 check/format, host-contract and Gourmand all pass. Two hooks couldn't run on this seat. pre-commit can't fetch
astral-sh/ruff-pre-commit(Trentina 403repo_not_listed), so I ran the same ruff version from PyPI by hand and committed with--no-verify. The local Gatehouse got 401s from OpenRouter, so this PR's Gatehouse workflow is the only review.🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jg4en5vBPWthjJZsCj