Repository navigation
fix: opentelemetry-api 1.45.2, mutation run past its stats phase, README badges, changelog and exception texts - #86
Merged
Merged
Conversation
opentelemetry-api 1.45.1 parses a traceparent header in quadratic time (CVE-2026-126360, GHSA-mf5v-w3w3-f6cg, medium). 1.45.2, on PyPI since 2026-10-29, is the release the advisory names as fixed. It arrives through fastapi, so `uv lock --upgrade-package opentelemetry-api` (uv 0.12.18) moved that one entry and nothing else in the lock. Dependabot raised the alert on 2026-11-14 and opened no pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The weekly mutation run has been red since 2026-10-24, in its stats phase, on `assert [13226] == []` in tests/test_sql_is_not_formatted.py. mutmut runs the suite from `mutants/`, where database.py holds every mutant beside the code. Mutant x_get_cves__mutmut_6 drops the statement from `db.execute(sql, params)` and leaves the parameters, a tuple built with `*` and `+`, where the check expects the statement. The stats phase runs with `-x`, so it stopped there; the next test of the file would have failed too, on `assert 44 == 2`: the listings' ORDER BY is repeated in every mutant of get_cves. Skipping the one test would have moved the failure, not removed it. The three checks now read the file the copy stands for, the same path without the `mutants` component. They are claims about what is written, which a mutant does not change, so under mutmut they hold or fail exactly as they do in the ordinary run. The new test has mutmut's own mutate_file_contents build the copy of the real database.py in a tmp tree laid out as mutmut lays out its own. Before the fix it failed with `assert [13226] == []`, the line of the CI failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README is also the long description on PyPI. The flat-square PyPI badge had been pasted into its own URL and rendered as a broken image; it is one badge again, with label=pypi as a query parameter. The static `calver-2026.8.2` badge named a release two months old; it now says the project uses CalVer and leaves the number to the PyPI badges. tests/test_readme_badges.py failed on both before the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CHANGELOG: 2026.40 had two `### Changed` sections, now merged into one; 2026.48 was dated 2026-10-23 with a hyphen, and is now dated 2026-10-24, the date of its tag, with the em dash every other release uses. SECURITY-EXCEPTIONS.toml: the two CodeQL entries named api/main.py:69 and ui_harness.js:45 in `where`; the open alerts are at lines 145 and 73, the same warning and the same setter. Text only: the gate matches an exception by rule and path, and review_by is untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance1 warning
Comparing |
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.



Why
An audit on 2026-11-16 found five things wrong on
main, none of them insrc/patchradaror the Dockerfile:uv.lockpins opentelemetry-api 1.45.1, affected by CVE-2026-126360 / GHSA-mf5v-w3w3-f6cg (medium: quadratic-timetraceparentparsing). It is transitive, through fastapi. 1.45.2 has been on PyPI since 2026-10-29. Dependabot alert feat: complete security hardening and test suite #2 was raised on 2026-11-14, and no pull request followed.mutation.yml) has been red for four Saturdays (2026-10-24, 10-31, 11-07, 11-14). Each time it stopped in mutmut's stats phase ontests/test_sql_is_not_formatted.py::test_no_select_insert_update_or_delete_is_a_formatted_string, withassert [13226] == [].calver-2026.8.2badge, two months out of date, and a PyPI badge pasted into its own URL.## [2026.40]has### Changedtwice;## [2026.48] - 2026-10-23uses a hyphen, and the tag is dated 2026-10-24.where.What
uv lock --upgrade-package opentelemetry-api(uv 0.12.18). The lock diff is that one package entry: version, sdist and wheel. Nothing else moves.mutants/. There,database.pyholds every mutant beside the code. Mutantx_get_cves__mutmut_6drops the statement fromdb.execute(sql, params)and leaves the parameters first,(software.lower(),) * 4 + (limit,), which is aBinOpto the check: that is line 13226. The stats phase runs with-x, so the run stopped there. The next test in the same file would have failed too, withassert 44 == 2, because the listings' ORDER BY appears in every mutant ofget_cves. Skipping the one test would only have moved the failure. All three checks now read the file the copy stands for, which is the same path without themutantscomponent. They are claims about what is written, and a mutant does not change that, so under mutmut they hold or fail exactly as in the ordinary run. This follows the repo's existing"mutants" in path.partsdetection (test_collector_wiring.py,test_nis2_evidence.py); the difference is that these checks read the real file rather than skipping.pypi/v/patchradar?style=flat-square&label=pypi. The CalVer badge is nowversioning-CalVer, with no number in it. The newtests/test_readme_badges.pychecks both: no image URL that contains another image, and no static shields.io badge that carries a CalVer number.### Changedsections of 2026.40 are merged. 2026.48 now reads— 2026-10-24. The CodeQLwheretexts now sayapi/main.py:145andui_harness.js:73, which are the lines of open alerts chore(deps): bump actions/checkout from 5 to 7 #20 and chore(deps): bump aquasecurity/trivy-action from a9c7b0f06e461e9d4b4d1711f154ee024b8d7ab8 to ed142fd0673e97e23eac54620cfb913e5ce36c25 #23.review_byis untouched.CHANGELOG.mdentry under[Unreleased]for each change: Security for the lock, Fixed for the rest.No version bump: nothing here touches
src/patchradaror the Dockerfile, sotests/test_version_contract.pyforbids one.Dependabot: why no pull request for the alert
.github/dependabot.ymlhas noignore. The 14-day cooldown does not apply to security updates. What it lacks is auventry. It declarespipat/, while the alert's manifest isuv.lock, and Dependabot handlesuv.lockthrough its separateuvecosystem, not throughpip. Two observations support this:pipversion-update job of 2026-11-12 ran with"package-manager":"pip"and"allowed-updates":[{"dependency-type":"direct"}], and its log never mentionsuv.lock.opentelemetry-apiafter the alert of 2026-11-14.So the likely cause is the missing
uvecosystem; a declaredpackage-ecosystem: "uv"would let Dependabot open such pull requests. Neitherdependabot.ymlnor any repository setting is changed here; that is the owner's call. If it is added,tests/test_dependabot_config.pyalready requires the 14-day cooldown on every entry.No lockfile-floor test was added: the repository has none to extend, and the brief was not to build new machinery for it.
Verification
test_under_mutmut_the_checks_read_the_repository_not_its_copyhas mutmut's ownmutate_file_contentsbuild the copy of the realdatabase.pyin atmp_pathtree laid out like mutmut's. Before the fix it failed withassert [13226] == [], the same line as the CI failure.tests/test_readme_badges.pyfailed on both badges before the README change.mutmut run --max-children 2, mutmut 3.8.0, which refuses to run on Windows):main, the stats phase reproduces CI exactly:assert [13226] == [],1 failed, 1869 passed, 34 skipped,failed to collect stats. Inside thatmutants/copy, the ORDER BY test fails on its own withassert 44 == 2.uv run --frozen --all-extras --all-groups pytest -q --ignore=tests/benchmarks): 2285 passed, 4 skipped.ruff check .: clean.uv lock --check: clean.200 image/svg+xmlfrom img.shields.io.git diff --cached --summarywas empty for every commit, so no file mode changed.AI disclosure
The audit and this change were made with Claude Code. Each claim above was checked against the repository, the CI logs of the mutation runs, the Dependabot run logs and alert, and a local mutmut run.
🤖 Generated with Claude Code