Skip to content

chore: combine annotated-logger dependency updates - #155

Merged
sophiagavrila merged 7 commits into
mainfrom
deps-update_2026-08-14
Aug 14, 2026
Merged

chore: combine annotated-logger dependency updates#155
sophiagavrila merged 7 commits into
mainfrom
deps-update_2026-08-14

Conversation

@sophiagavrila

@sophiagavrila sophiagavrila commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Note

Combined on-call dependency patching PR for Week 2 of the vuln-mgmt-eng on-call rotation, tracked by github/vuln-mgmt-eng#9583.
Generated with dependaswat and finished by hand.

What this PR does

Consolidates both open Dependabot PRs for this repo into a single reviewable change, and repairs the lint break that ruff 0.16 introduced.

Area Updates
Python (pip) 1 Dependabot PR merged, 8 pinned dev/runtime packages
GitHub Actions 1 Dependabot PR merged, 3 action pins refreshed
Docker none open
Vendored packages n/a — this repo has no requirements-vendored.txt
Lint config CPY001 + PLR0917 added to lint.ignore; Markdown excluded from the formatter

🔄 Dependabot PRs consolidated

PR Title Disposition
#152 [actions] (deps): Bump the dev-dependencies group across 1 directory with 3 updates ✅ Merged into this branch — close as superseded
#154 [pip] (deps): Bump the dev-dependencies group across 1 directory with 8 updates ✅ Merged into this branch — close as superseded (was red on ruff; fixed here)

Python packages (requirements.txt, requirements/requirements-dev.txt)

Package Previous New
certifi 2026.6.17 2026.7.22
coverage 7.15.1 7.15.4
filelock 3.29.7 3.32.2
packaging 26.2 26.3
platformdirs 4.10.0 4.11.0
pre-commit 4.6.0 4.6.1
ruff 0.15.21 0.16.1
virtualenv 21.6.1 21.7.1

certifi is the only one that reaches the published package's runtime dependency set; the rest are dev-only.

GitHub Actions pins

Action Previous New
actions/setup-python v6 v7
pypa/gh-action-pypi-publish cef2210 (v1.14.0) dc37677 (v1.14.2)
sigstore/gh-action-sigstore-python 5b79a39 (v3.4.0) 790bc6b (v3.5.0)

Touches pytest.yaml, pyright.yaml, ruff.yaml, and publish-to-pypi.yaml.

sigstore/gh-action-sigstore-python runs only in github-release, which needs: publish-to-pypi and is therefore gated behind if: startsWith(github.ref, 'refs/tags/') — this PR does not exercise it.

pypa/gh-action-pypi-publish is exercised. publish-to-testpypi has no tag guard and the workflow triggers on push, so v1.14.2 ran on this branch and reached the upload step. That surfaced a long-standing red check, fixed here — see below.

Both sit on the supply-chain path for the published artifact and are worth a reviewer's eye.

🛡️ Security findings accounted for

No open Dependabot alerts on this repo at time of writing:

gh api repos/github/annotated-logger/dependabot/alerts?state=open  ->  []

This PR is routine maintenance patching, not a vulnerability remediation.

🔧 Lint repair (not a dependency change)

Bumping ruff to 0.16.1 broke lint in two independent ways. Both are fixed in pyproject.toml config only — no source or documentation content was rewritten.

1. Two preview rules stabilized into ALL (20 findings across 19 files):

Rule Findings Why it is ignored
CPY001 missing-copyright-notice 19 This project does not use per-file copyright headers; it ships a top-level LICENSE.txt.
PLR0917 too-many-positional-arguments 1 AnnotatedLogger.__init__ (annotated_logger/__init__.py:273) takes 6 positional args. This is the public constructor of a published package — changing its signature is a breaking API change and does not belong in a dependency-patch PR.

2. The formatter began reformatting Markdown. ruff 0.16 formats Python code blocks embedded in Markdown files, and CI runs ruff format --check .. README.md's ```python blocks deliberately show sample JSON log output underneath the source:

{"created": 1708476277.102495, "levelname": "INFO", ... "annotated": true}

Those lines parse as valid Python expressions, so the formatter rewrote each one into a multi-line dict literal — turning a realistic one-line log sample into something that no longer resembles the tool's actual output. Since this package's entire purpose is demonstrating log shape, that diff destroys the documentation.

Markdown is therefore excluded from the formatter rather than accepting the rewrite:

[tool.ruff.format]
exclude = ["*.md"]

ruff check still lints normally; only the formatter is scoped. README.md is byte-for-byte unchanged in this PR.

Validation

All run locally against Python 3.12.4 on the combined branch, with requirements.txt + requirements/requirements-dev.txt installed as pinned:

Command Result
ruff check . (0.16.1) ✅ All checks passed
ruff format --check . (0.16.1) ✅ 19 files already formatted
pytest ✅ 76 passed, 100.00% coverage (required: 100%)
pytest on 3.10 and 3.14 (matrix bounds) ✅ 76 passed, 100.00% coverage on each
pyright ✅ 0 errors, 0 warnings, 0 informations

Remote CI runs the suite across Python 3.10 – 3.14 and is the final gate.

⚠️ The remote matrix does not actually provide that coverage, and this PR does not change that. pytest.yaml declares a 3.10–3.14 matrix but pins the setup step to python-version: '3.x', so all 15 jobs run one interpreter. Copilot raised this in review and I did apply the one-line binding (91eac8c) — but it surfaced a pre-existing failure unrelated to dependency patching: on macos-latest + 3.11, hatch env create dev fails with Environment `dev` has unknown type: pip-compile, reproducibly across two runner allocations, while the identical command and the full suite pass locally on macOS arm64 / CPython 3.11.14. With no fail-fast: false, that one job cancels the other 14. I reverted the binding in 8818bb0 to keep this PR scoped, and filed #156 with the full evidence and a suggested order of work.

🔧 Fixed a permanently-red publish job. Publish to TestPyPI had been failing on every PR in this repo, including on main (confirmed against the last four main runs). publish-to-testpypi runs on every push, but the project version only changes at release time, so each run rebuilt the current version and re-uploaded a file TestPyPI already had:

Uploading annotated_logger-1.3.4-py3-none-any.whl
400 File already exists ('annotated_logger-1.3.4-py3-none-any.whl', ...)

6324a9a sets skip-existing: true on that step — the canonical input on pypa/gh-action-pypi-publish at the pinned SHA dc37677 (skip_existing is the deprecated alias). Verified against the action's action.yml at that exact SHA rather than assumed. It is deliberately not set on the real publish-to-pypi job, where a duplicate upload means someone re-released an existing version and should keep failing loudly.

This PR is now fully green: 23 checks pass, 0 fail. The two skipping entries are the tag-gated PyPI and Sigstore release jobs, correctly inactive on a branch push.

Deployment monitoring

Not applicable. annotated-logger is a shared library published to PyPI and consumed by other services in the platform (vulnerability-aggregator, scan-engine, vuln-notifier, wiz-therapy, and others). It has no config/moda/ directory and is not deployed to a Kubernetes namespace, so there is no staging/production rollout to baseline.

Downstream exposure only happens when a consuming service re-resolves its own lockfile and picks up a new release — and this PR does not cut a release or bump the package version.

No Splunk baseline was captured, and none is claimed.

Isolation / not touched

This PR changes requirements.txt, requirements/requirements-dev.txt, four workflow files, and pyproject.toml.

It does not modify:

  • any runtime source under annotated_logger/ — no behavior change
  • any file under example/ or test/ — no test or assertion was altered
  • README.md or any documentation content (explicitly protected from the formatter, see above)
  • the public API surface, including AnnotatedLogger.__init__'s signature
  • the package version, release configuration, or changelog
  • the publish-to-testpypi tag guard — the job still runs on every push; only its duplicate-upload handling changed
  • release semantics for the real PyPI index — publish-to-pypi still fails on a duplicate upload
  • the pytest.yaml version matrix — binding it exposes a pre-existing macOS/3.11 environment failure, tracked in Pytest matrix runs a single interpreter; binding it exposes a macOS/3.11 hatch env failure #156
  • coverage thresholds (still 100%)
  • workflow triggers, permissions, or job structure

Beyond the dependency pins, there are exactly two non-dependency edits:

  1. pyproject.toml — two rules appended to the existing curated lint.ignore array, plus a new [tool.ruff.format] section with a single exclude key (13 lines).
  2. .github/workflows/publish-to-pypi.yamlskip-existing: true on the TestPyPI upload step only (6324a9a), fixing a permanently-failing check.

dependabot Bot and others added 4 commits August 2, 2026 21:03
…with 3 updates

Bumps the dev-dependencies group with 3 updates in the / directory: [actions/setup-python](https://github.com/actions/setup-python), [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) and [sigstore/gh-action-sigstore-python](https://github.com/sigstore/gh-action-sigstore-python).


Updates `actions/setup-python` from 6 to 7
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v6...v7)

Updates `pypa/gh-action-pypi-publish` from 1.14.0 to 1.14.2
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@cef2210...dc37677)

Updates `sigstore/gh-action-sigstore-python` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/sigstore/gh-action-sigstore-python/releases)
- [Changelog](https://github.com/sigstore/gh-action-sigstore-python/blob/main/CHANGELOG.md)
- [Commits](sigstore/gh-action-sigstore-python@5b79a39...790bc6b)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dev-dependencies
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.14.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: sigstore/gh-action-sigstore-python
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
… 8 updates

Bumps the dev-dependencies group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [certifi](https://github.com/certifi/python-certifi) | `2026.6.17` | `2026.7.22` |
| [coverage](https://github.com/coveragepy/coveragepy) | `7.15.1` | `7.15.4` |
| [filelock](https://github.com/tox-dev/py-filelock) | `3.29.7` | `3.32.2` |
| [packaging](https://github.com/pypa/packaging) | `26.2` | `26.3` |
| [platformdirs](https://github.com/tox-dev/platformdirs) | `4.10.0` | `4.11.0` |
| [pre-commit](https://github.com/pre-commit/pre-commit) | `4.6.0` | `4.6.1` |
| [ruff](https://github.com/astral-sh/ruff) | `0.15.21` | `0.16.1` |
| [virtualenv](https://github.com/pypa/virtualenv) | `21.6.1` | `21.7.1` |



Updates `certifi` from 2026.6.17 to 2026.7.22
- [Commits](certifi/python-certifi@2026.06.17...2026.07.22)

Updates `coverage` from 7.15.1 to 7.15.4
- [Release notes](https://github.com/coveragepy/coveragepy/releases)
- [Changelog](https://github.com/coveragepy/coveragepy/blob/main/CHANGES.rst)
- [Commits](coveragepy/coveragepy@7.15.1...7.15.4)

Updates `filelock` from 3.29.7 to 3.32.2
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](tox-dev/filelock@3.29.7...3.32.2)

Updates `packaging` from 26.2 to 26.3
- [Release notes](https://github.com/pypa/packaging/releases)
- [Changelog](https://github.com/pypa/packaging/blob/main/CHANGELOG.rst)
- [Commits](pypa/packaging@26.2...26.3)

Updates `platformdirs` from 4.10.0 to 4.11.0
- [Release notes](https://github.com/tox-dev/platformdirs/releases)
- [Changelog](https://github.com/tox-dev/platformdirs/blob/main/docs/changelog.rst)
- [Commits](tox-dev/platformdirs@4.10.0...4.11.0)

Updates `pre-commit` from 4.6.0 to 4.6.1
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](pre-commit/pre-commit@v4.6.0...v4.6.1)

Updates `ruff` from 0.15.21 to 0.16.1
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.15.21...0.16.1)

Updates `virtualenv` from 21.6.1 to 21.7.1
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](pypa/virtualenv@21.6.1...21.7.1)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2026.7.22
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: coverage
  dependency-version: 7.15.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: filelock
  dependency-version: 3.32.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: packaging
  dependency-version: '26.3'
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: platformdirs
  dependency-version: 4.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: pre-commit
  dependency-version: 4.6.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: ruff
  dependency-version: 0.16.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: virtualenv
  dependency-version: 21.7.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
ruff 0.16 stabilized CPY001 (missing-copyright-notice) and PLR0917
(too-many-positional-arguments) out of preview, pulling both into this
repo's "ALL" selector. Added them to lint.ignore: the project does not
use per-file copyright headers, and the public AnnotatedLogger
constructor keeps its positional signature for backwards compatibility.

ruff 0.16 also began formatting Python code blocks embedded in Markdown.
README.md's ```python blocks deliberately show sample JSON log output
beneath the source, which the formatter rewrites into multi-line dict
literals and destroys. Markdown is excluded from the formatter instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88ca26ce-88a6-4da4-a026-1e55f37076bc
@sophiagavrila
sophiagavrila requested a review from a team as a code owner August 14, 2026 17:07
Copilot AI balanced review requested due to automatic review settings August 14, 2026 17:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Consolidates routine dependency updates and adjusts Ruff configuration for 0.16.1 compatibility.

Changes:

  • Updates eight Python dependency pins.
  • Refreshes three GitHub Actions dependencies.
  • Excludes Markdown formatting and suppresses two newly stabilized Ruff rules.
Show a summary per file
File Description
requirements/requirements-dev.txt Updates development dependency pins.
requirements.txt Updates runtime certifi.
pyproject.toml Adjusts Ruff configuration.
.github/workflows/ruff.yaml Upgrades setup-python.
.github/workflows/pytest.yaml Upgrades setup-python.
.github/workflows/pyright.yaml Upgrades setup-python.
.github/workflows/publish-to-pypi.yaml Updates setup and publishing actions.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 6/7 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread .github/workflows/pytest.yaml
Comment thread .github/workflows/publish-to-pypi.yaml
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

The pytest job declares a 3.10-3.14 matrix, but the setup step pinned
python-version to '3.x', so all 15 matrix jobs installed the same
interpreter while their names implied version-specific coverage. Bind
the input to matrix.python-version so the stated compatibility gate is
real.

Verified locally: the suite passes at 100% coverage on both ends of the
matrix (3.10 and 3.14).

Raised by Copilot review on #155.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88ca26ce-88a6-4da4-a026-1e55f37076bc
91eac8c bound setup-python to matrix.python-version so the declared
3.10-3.14 matrix would stop running a single interpreter. The binding is
correct, but it exposes a pre-existing environment defect unrelated to
this dependency PR: on macos-latest with Python 3.11, `hatch env create
dev` fails with "Environment `dev` has unknown type: pip-compile",
reproducibly across two runner allocations, while the same command and
the full suite succeed locally on macOS arm64 / CPython 3.11.14
(76 passed, 100% coverage).

Because the matrix has no fail-fast: false, that single job cancels the
other 14 and turns the PR red. Restoring '3.x' keeps this PR scoped to
dependency patching; the matrix fix and the underlying hatch plugin
resolution failure are tracked in a follow-up issue.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88ca26ce-88a6-4da4-a026-1e55f37076bc
publish-to-testpypi has no tag guard and the workflow triggers on push,
so it runs on every branch push and PR. The project version only changes
at release time, so almost every run rebuilds the current version and
re-uploads a file TestPyPI already has:

  Uploading annotated_logger-1.3.4-py3-none-any.whl
  400 File already exists ('annotated_logger-1.3.4-py3-none-any.whl', ...)
  ERROR HTTPError: 400 Bad Request from https://test.pypi.org/legacy/

That has made this job a permanent red check on every PR, including on
main, which trains reviewers to ignore a failing publish job.

Set skip-existing: true so already-present files are skipped rather than
failing the upload. This is the canonical input on
pypa/gh-action-pypi-publish at the pinned SHA dc37677 (skip_existing is
the deprecated alias).

Deliberately NOT set on the publish-to-pypi job: a duplicate upload to
the real index means someone re-released an existing version, and that
should keep failing loudly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88ca26ce-88a6-4da4-a026-1e55f37076bc
@sophiagavrila
sophiagavrila merged commit 166fe94 into main Aug 14, 2026
26 checks passed
@sophiagavrila
sophiagavrila deleted the deps-update_2026-08-14 branch August 14, 2026 19:28
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.

3 participants