Skip to content

fix(ci): unblock package check, dependabot label, and ty tracking - #656

Merged
martin-majlis merged 2 commits into
masterfrom
fix/twine-metadata-2.5-and-dependabot-label
Sep 3, 2026
Merged

martin-majlis merged 2 commits into
masterfrom
fix/twine-metadata-2.5-and-dependabot-label

Conversation

@martin-majlis

@martin-majlis martin-majlis commented Sep 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes pre-existing repo issues that surface on every open PR (including dependabot #638), and hardens dependency management so nothing silently drifts again. None are caused by a dependency bump itself.

1. Build package check (make check-package)

hatchling now emits Metadata-Version: 2.5, but twine 6.2.0 monkeypatches packaging's allowed metadata versions to cap at 2.4, so twine check rejects the wheel:

InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version

Fix: pin twine==7.0.0 (supports metadata 2.5) and relock. Verified locally — twine check now PASSED for both wheel and sdist.

2. Dependabot Pull Request check

On a major update of a "production" dependency (any GitHub Action bump qualifies), the workflow runs gh pr edit --add-label "requires-manual-qa", but that label does not exist in the repo:

'requires-manual-qa' not found
##[error]Process completed with exit code 1.

Fix: create the label idempotently with gh label create --force before adding it.

3. ty was invisible to Dependabot (duplicate declaration)

ty was declared twice in the dev group — ty==0.0.27 and ty>=0.0.27. Dependabot cannot reconcile a package declared twice with conflicting specifiers, so it silently skipped ty entirely: it never opened a single ty PR, and ty drifted 51 releases behind (0.0.27 vs 0.0.78). Removed the redundant >= line so Dependabot can track it. No version change.

4. Pin every package with == (was >= for a few)

Replaced the remaining open lower bounds (ruff, pytest-recording, vcrpy) with exact pins at their currently-locked versions. All dependencies are now == pinned, so Dependabot proposes each upgrade as a reviewable PR instead of leaving >= ranges to drift silently (the failure mode that stranded twine at a stale major and hid ty). requires-python and the python_version environment marker are intentionally left as >=. No version changes — pins match the existing lock.

Not addressed here (out of scope / not code bugs)

  • CLI integration tests — Wikipedia content drift (summary_zh_cn/zh_tw, small mismatches). Fails on master too; expected, needs snapshot re-record.
  • CodeQL Analyze — CodeQL infra version mismatch (config 4.36.3 vs runner 4.37.4); transient, resolves on re-run.

Testing

  • uv build && uv run twine check dist/* → both artifacts PASSED
  • uv lock → only specifier changes, no version changes
  • pre-commit on changed files → all hooks pass

🤖 Generated with Claude Code

@martin-majlis
martin-majlis force-pushed the fix/twine-metadata-2.5-and-dependabot-label branch from abf5921 to 1a0ebb8 Compare September 3, 2026 20:05
Three pre-existing issues, none caused by a single dependency bump:

- Build package: hatchling now emits Metadata-Version 2.5, but twine
  6.2.0 monkeypatches the allowed metadata versions to cap at 2.4 and
  rejects the wheel ("'2.5' is not a valid metadata version"). Pin twine
  to 7.0.0 (supports 2.5) and relock. Pinned with == (not >=) to match
  the sibling build tools (setuptools, wheel) so Dependabot keeps it
  current; Dependabot had not proposed the 6->7 major bump on its own.

- Dependabot Pull Request: the major-update branch adds the
  "requires-manual-qa" label, but the label does not exist in the repo,
  so `gh pr edit --add-label` exits 1 and fails the check. Create the
  label idempotently with `gh label create --force` before adding it.

- ty was declared twice in the dev group (ty==0.0.27 and ty>=0.0.27).
  Dependabot cannot reconcile a package declared twice with conflicting
  specifiers, so it silently skipped ty entirely -- it never opened a
  single ty PR and ty drifted 51 releases behind (0.0.27 vs 0.0.78).
  Remove the redundant >= line so Dependabot can track it going forward.
  No version change here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BifaamrWqi1EhVUhTkVBPC
@martin-majlis
martin-majlis force-pushed the fix/twine-metadata-2.5-and-dependabot-label branch from 1a0ebb8 to 82a1d99 Compare September 3, 2026 20:11
@martin-majlis martin-majlis changed the title fix(ci): unblock package check (twine metadata 2.5) and dependabot label fix(ci): unblock package check, dependabot label, and ty tracking Sep 3, 2026
Replace the remaining open lower bounds (ruff, pytest-recording, vcrpy)
with exact pins at their currently-locked versions. Every dependency is
now == pinned so Dependabot proposes each upgrade as a reviewable PR,
avoiding the silent drift that left twine and ty stuck. requires-python
and the python_version environment marker are intentionally left as >=.

No version changes -- pins match the existing lock.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BifaamrWqi1EhVUhTkVBPC
@martin-majlis
martin-majlis merged commit 92a6442 into master Sep 3, 2026
39 of 41 checks passed
@martin-majlis
martin-majlis deleted the fix/twine-metadata-2.5-and-dependabot-label branch September 3, 2026 20:20
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.04%. Comparing base (1115088) to head (be37d0d).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #656   +/-   ##
=======================================
  Coverage   94.04%   94.04%           
=======================================
  Files          76       76           
  Lines        3373     3373           
=======================================
  Hits         3172     3172           
  Misses        201      201           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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