Skip to content

fix(checks): exempt a package-root testing-conventions.toml from changelog-gate - #990

Merged
thekevinscott merged 5 commits into
mainfrom
cc/nice-lovelace-7db4qt
Aug 20, 2026
Merged

thekevinscott merged 5 commits into
mainfrom
cc/nice-lovelace-7db4qt

Conversation

@thekevinbot

@thekevinbot thekevinbot commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #974

What

changelog_gate/decide.py::_is_exempt treats every non-test file under a package as source, so editing packages/python/testing-conventions.toml or packages/ts/testing-conventions.toml (narrowing an [e2e] scope, nudging a coverage floor) reds the gate unless the author remembers a skip-changelog: line — #971 needed exactly that on both commits.

Gate config fails the maintainer's ship-in-the-artifact test from #932: the maturin wheel carries only the dirsql package and packages/ts/.npmignore keeps the tarball to built output, so a package-root testing-conventions.toml reaches no user and no user-facing change can ever follow from editing one. That puts it with changelog.d/ and e2e-attestations/, both already exempt.

One clause in _is_exempt, plus the docstring sentence that explains it.

Deviations from the issue's sketch

Two, both deliberate:

  1. The issue's snippet is rf"packages/{p}/testing-conventions\.toml", but pkg is already root-qualified (packages/python), so that pattern would only ever match packages/packages/python/…. The clause is rf"{p}/testing-conventions\.toml".
  2. That makes it root-agnostic, so plugins/dirsql-plugin-embeddings/testing-conventions.toml is exempt too. Every other clause in _is_exempt is root-agnostic, and the rationale carries: the plugin's config is CI configuration a user never executes. The issue's open question about the sibling repo-tooling configs (internals/checks/testing-conventions.toml, the root one) is untouched — they sit outside packages//plugins/, so the gate never sees them.

Package-root only, as specified: packages/python/dirsql/testing-conventions.toml and packages/ts/my-testing-conventions.toml still count as source, asserted in the same test so unit mutation has both directions to kill against (it tested 1 mutant on the new line and killed it).

Red/green

Red pushed first (4a80067) and observed red in CI for the right reason — unit coverage failed on false_for_the_package_root_gate_config (assert not True where True = code_touched(['packages/python/testing-conventions.toml'], 'packages/python'), 1 failed / 329 passed) and the integration job on it_passes_when_only_the_package_gate_config_changes (assert 1 == 0, printing the very "no changelog fragment was added" error this issue is about). The e2e-verify red on that commit was the expected stale attestation; refreshed in the last commit. Implementation is 20aaabf.

Manual verification

Real dirsql-checks CLI against a scratch git repo, both directions:

$ dirsql-checks changelog-gate --base-sha $BASE --head-sha $HEAD   # only packages/python/testing-conventions.toml changed
exit=0                                                            # (silent pass, same as any exempt-only change)

$ dirsql-checks changelog-gate --base-sha $BASE --head-sha $HEAD   # packages/python/dirsql/testing-conventions.toml changed
::error::packages/python has code changes but no changelog fragment was added. Add packages/python/changelog.d/YYYY-MM-DD-<slug>.md ...
exit=1

E2E Verification

  • Ran e2e suites locally for every affected SDK
  • Python SDK e2e: N/A — package untouched
  • TypeScript SDK e2e: N/A — package untouched
  • Rust core e2e (if applicable): N/A — package untouched
  • packages/python/e2e-attestation.json refreshed if packages/python changed — N/A, package untouched
  • packages/ts/e2e-attestation.json refreshed if packages/ts changed — N/A, package untouched
  • Command(s) run: uv run --project internals/checks dirsql-checks preflight --conventions .github/workflows/internals-checks-ci.yml (0 failing pairs, 0 skipped — colocated-test, unit-lint, integration-lint, unit-coverage, mutation, e2e-verify, declared-deps); uv run python -m pytest src tests/integration tests/e2e -q in internals/checks
  • Result summary: 384 passed. The changed package's own e2e attestation (internals/checks/e2e-attestations/cc-nice-lovelace-7db4qt.json) is refreshed as the last commit, ce4aedf.

No SDK package changes, so no SDK e2e suite is affected.

Changelog / Migrations

  • Changelog fragment added under <root>/<pkg>/changelog.d/ for each changed package — not required: internals/checks sits outside packages/ and plugins/, the only roots the gate scopes.
  • Migration fragment added under <root>/<pkg>/migrations.d/ — not required: no public API change.

PARITY.md untouched — no SDK public API surface changes.

claude added 3 commits August 20, 2026 20:03
A gate config at a package root is CI configuration, not source: it reaches
no user through the maturin wheel or the npm tarball, so no changelog entry
can ever follow from editing one. Today changelog-gate counts it as source
and demands a fragment, making `skip-changelog:` a standing requirement for
a file class that is never changelog-worthy.

Red across all three tiers: the colocated predicate test, the integration
gate run over a real repo, and the e2e CLI spawn. The companion assertion
that a nested or differently-named config still counts as source passes
already and must keep passing.

Refs #974
…gate

The gate now treats a package's own testing-conventions.toml the way it
already treats changelog.d/ and e2e-attestations/: CI machinery rather than
source. Package root only, so a config nested deeper still counts.

The clause is root-agnostic like every other one, so a plugin's config is
exempt on the same reasoning. The repo-tooling configs outside packages/ and
plugins/ are unaffected -- the gate never scoped them.

Fixes #974
claude added 2 commits August 20, 2026 20:18
The test comment restated the test name, and the docstring entry had grown
an artifact-layout aside the rest of the clause list does without.
@thekevinscott
thekevinscott merged commit ab504ae into main Aug 20, 2026
9 checks passed
@thekevinscott
thekevinscott deleted the cc/nice-lovelace-7db4qt branch August 20, 2026 20:29
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.

changelog-gate: package-root testing-conventions.toml demands a fragment it can never warrant

3 participants