fix: keep autocomplete artifact version stamp correct at tag time - #25
Merged
Conversation
artifacts/autocomplete-types.ts is committed so consumers can fetch it at a tagged ref, but it was only ever corrected by a follow-up push to main. The v0.8.0 tag was cut at the version-bump commit and the regenerated artifact landed after it, so that tag permanently carries the 0.8.0 method set stamped 0.7.0. Tags are immutable, so the fixup can never reach it. Add --check to the generator (regenerate in memory, diff against the committed file, exit 1 with the diff if stale) and wire it in two places: - generate-autocomplete.yml gains a verify job on PRs, so a bump that forgets to regenerate fails review instead of being repaired after tagging. - python-publish.yml verifies before building, so a mislabeled artifact can never be published. It runs in release-build, which pypi-publish needs. Also drop the release:published trigger from the generate job. It regenerated from a detached tag checkout and pushed to the branch, which could never move the tag it was meant to fix. Bump to 0.8.1 to publish a correctly stamped tag; the method set is unchanged from 0.8.0 (89 methods), only the version stamp differs. Fixes #24 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Follow-up once this merges: tag Deliberately not cutting a release: the Worth a reviewer's eye on two judgement calls in here:
|
lhotovy
approved these changes
Jul 16, 2026
AminChirazi
added a commit
that referenced
this pull request
Jul 28, 2026
Version 0.8.1 -> 0.9.0. A minor bump rather than a patch: this adds surface, it does not fix anything. Also completes the previous commit, which had a real gap. Every other resource is reachable BOTH as `client.sets.get_sets()` and as `client.get_sets()`, but plans and masking policies were only wired as properties. Two consequences: they read differently from every other resource, and - the part that actually matters - `artifacts/autocomplete-types.ts` is generated from the facade, so they were invisible to the editor autocomplete that ships to users. The artifact went from 89 methods to 98 once the facade methods existed. The artifact is regenerated here rather than left to a follow-up push, which is the hygiene #25 established: it is committed so consumers can fetch it at a tagged ref, and a tag cut at the bump commit permanently carries whatever artifact was in the tree at that moment. 69 tests pass, 24 skipped. `ruff check --select F,E9` reports 7 findings across the package, identical to the count on main - all pre-existing, none from this change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Fixes #24.
Problem
artifacts/autocomplete-types.tsis committed so consumers can fetch it at a tagged ref, but it was only ever corrected by a follow-up push to main. Thev0.8.0tag was cut at the bump commit (ada2251), and the regeneration commit (ea13b0d) landed after it:Tags are immutable, so that fixup can never reach
v0.8.0— it ships the 0.8.0 method set labelledSDK_VERSION = "0.7.0". This is what blocked pinning the runtime fetch to a tag in automators-com/loop#2825.It's a race rather than a systematic off-by-one:
v0.7.0happens to be self-consistent. It breaks whenever the bump and the regeneration land in separate commits with the tag cut between them, which means a future release could come out clean by luck and mask the bug.Fix
Make the stamp correct at tag time instead of repairing it afterwards.
--checkin the generator — regenerates in memory, diffs against the committed file, exits 1 with the diff if stale. One source of truth for both guards below.generate-autocomplete.yml) — a bump that forgets to regenerate now fails review, forcing the artifact into the same commit the tag will point at.python-publish.yml) — verifies before building. It runs inrelease-build, whichpypi-publishneeds, so a mislabeled artifact can never reach PyPI.release: publishedtrigger from the generate job — it regenerated from a detached tag checkout and pushed to the branch, so it could never move the tag it was meant to fix.Also fixed
get_version()to resolvepyproject.tomlagainst the repo root rather than CWD; it would silently stampunknownwhen run from elsewhere, and--checknow hard-fails on that instead.0.8.1
Bumped to publish a correctly stamped tag, since
v0.8.0can't be corrected in place. The method set is unchanged from 0.8.0 — 89 methods both sides; the entire artifact diff is the two stamp lines:Verification
--checkexits 1 on a simulated stale artifact (bumped pyproject, un-regenerated file) and prints the offending diff; exits 0 on a clean tree.Leaves open whether to retag/yank 0.8.0 — it's a published release, so that's a judgement call rather than something to fold into this PR.
🤖 Generated with Claude Code