Skip to content

fix(ci): wrap long changelog lines for lintian; clear pre-existing ty errors#209

Merged
mairas merged 2 commits into
mainfrom
fix/ci-wrap-changelog-lines
Jun 15, 2026
Merged

fix(ci): wrap long changelog lines for lintian; clear pre-existing ty errors#209
mairas merged 2 commits into
mainfrom
fix/ci-wrap-changelog-lines

Conversation

@mairas

@mairas mairas commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What

Fix the red main CI from #208's merge, and clear the two pre-existing ty errors while here.

Why

The release build (shared-workflows build-release.yml) regenerates debian/changelog from commit subjects and runs lintian --fail-on error,warning. The local .github/scripts/generate-changelog.sh prefixed each subject with * but never wrapped, so a subject over ~76 chars overflows lintian's 80-column limit and fails the build. #208 had two such subjects, so the 0.7.0 auto-release failed at the lintian step (before any tag was created — revision stays at 1).

This didn't affect downstream consumers (they build c-p-t from the git source, not the .deb), but it left main red with no release artifact.

Changes

  • fix(ci) — port the wrap_changes helper the shared-workflows fallback already uses: fold -s -w 76 each subject with a hanging indent for continuation lines. Also fixes a stale grep -v "~pre"_pre (tags use the underscore suffix per DEP-14), so pre-release tags are correctly excluded from the since-last-tag range. CI/tooling only — no version bump (.github/ is excluded from the version-bump gate; VERSION is already ahead of stable).
  • fix(types) — annotate two dict literals as dict[str, Any] that ty inferred as dict[str, str] from their string-only initial entries and then had a non-str value assigned (forward_auth dict in routing.py, read_only bool in the CasaOS transformer). Clears the long-standing ty diagnostics so uvx ty check src/ is fully green. Bundled at maintainer request.

Verification

  • uvx ty check src/ → All checks passed (was 2 diagnostics).
  • uv run pytest -m "not install" → 586 passed / 1 skipped. Lint + format clean.
  • Ran generate-changelog.sh --upstream 0.7.0 --revision 2 locally: long subjects wrap, no line exceeds 80 columns.

After merge, the next main build regenerates the wrapped changelog and produces container-packaging-tools 0.7.0-1.

🤖 Generated with Claude Code

mairas and others added 2 commits June 15, 2026 10:06
The release build regenerates debian/changelog from commit subjects and runs
lintian with --fail-on warning, so a subject over ~76 chars trips
debian-changelog-line-too-long and fails the build (it did, for 0.7.0). Port
the wrap_changes helper already used by the shared-workflows fallback: fold
each subject at 76 columns with a hanging indent. Also fix the stale
`grep -v "~pre"` (tags use the `_pre` suffix) so pre-release tags are excluded
from the since-last-tag range.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two dict literals were inferred as dict[str, str] from their initial
string-only entries, then assigned a non-str value later (a forward_auth dict
in routing.py, a read_only bool in the CasaOS transformer), tripping ty's
invalid-assignment check. Annotate both as dict[str, Any] at construction. In
routing.py the auth dict is now built before routing_data so the forward_auth
branch mutates an explicitly typed local.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mairas mairas merged commit b0f9228 into main Jun 15, 2026
4 checks passed
@mairas mairas deleted the fix/ci-wrap-changelog-lines branch June 15, 2026 07:16
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.

1 participant