Skip to content

Commit 6292436

Browse files
docs: add release procedure (#42)
* docs: add release procedure to CONTRIBUTING.md Documents the full release workflow: validation gates, version update locations, changelog guidelines, GitHub release creation, PyPI verification, and what not to do. Fixes Python version requirement (3.10+ not 3.11+). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: address Gemini review findings on release procedure - Clarify `.patch` slot is reserved for Python-only fixes (upstream patches sync via minor bump, so no collision) - Document `verify_test_fidelity.py` needs `$TS_ROOT` (else silently passes — a release-blocking foot-gun) - Mark deprecated releases instead of deleting them (preserve history, avoid breaking external links) - Tighten "no alpha for sync releases" wording so it doesn't contradict the `0.4.26a1` example in the version-scheme section * docs: standardize pre-release terminology (CodeRabbit nit) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b1a9562 commit 6292436

1 file changed

Lines changed: 70 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Thanks for your interest in contributing! This guide covers the essentials.
55
## Dev Environment Setup
66

77
```bash
8-
# Clone and install (requires Python 3.11+ and uv)
8+
# Clone and install (requires Python 3.10+ and uv)
99
git clone https://github.com/Chinchill-AI/chat-sdk-python.git
1010
cd chat-sdk-python
1111
uv sync --group dev
@@ -50,6 +50,75 @@ All PRs must pass `ruff check` with zero errors.
5050
- Reference the issue number in your PR description (e.g., `Fixes #42`).
5151
- For large changes, open an issue first to discuss the approach.
5252

53+
## Release Procedure
54+
55+
### Version scheme
56+
57+
`0.{upstream_major}.{upstream_minor}[.patch]` — our version embeds the upstream
58+
Vercel Chat version. See [UPSTREAM_SYNC.md](docs/UPSTREAM_SYNC.md#version-mapping).
59+
60+
- `0.4.25` = synced to upstream `4.25.0`
61+
- `0.4.25.1` = Python-only fix on top of `4.25.0`
62+
- `0.4.26a1` = alpha while porting upstream `4.26.0`
63+
64+
> **Upstream patch releases**: Vercel Chat has historically gone straight to
65+
> minor bumps, but if upstream ships a patch (e.g. `4.25.1`) we sync it by
66+
> bumping to the next minor (`0.4.26`). We don't reuse the `.patch` slot for
67+
> upstream patches — it's reserved for Python-only fixes so the two can't
68+
> collide.
69+
70+
### Steps
71+
72+
1. **Full validation** (must all pass):
73+
```bash
74+
uv run ruff check src/ tests/ scripts/
75+
uv run ruff format --check src/ tests/ scripts/
76+
uv run python scripts/audit_test_quality.py
77+
# verify_test_fidelity.py needs the upstream TS repo at $TS_ROOT (default
78+
# /tmp/vercel-chat). Without it, the script silently skips checks and exits
79+
# 0, so releases can ship unverified. Clone once:
80+
# git clone https://github.com/vercel/chat.git /tmp/vercel-chat
81+
uv run python scripts/verify_test_fidelity.py
82+
uv run pytest tests/ --tb=short -q
83+
```
84+
85+
2. **Update version** in all locations:
86+
- `pyproject.toml``version = "0.4.26"`
87+
- `README.md` → status line
88+
- `CLAUDE.md` → version reference
89+
- `src/chat_sdk/__init__.py``UPSTREAM_PARITY = "4.26.0"` (for upstream syncs)
90+
- `CHANGELOG.md` → new entry with public-facing release notes
91+
92+
3. **Changelog guidelines**:
93+
- Lead with what users need to do (upgrading section, breaking changes)
94+
- Group by impact (new features, bug fixes, internals)
95+
- Don't list internal engineering details (phantom absorber counts, etc.)
96+
- Link to upstream release for sync releases
97+
98+
4. **Create PR**, get CI green, merge.
99+
100+
5. **Create GitHub release**:
101+
```bash
102+
gh release create v0.4.26 --target main --title "v0.4.26 — Synced to Vercel Chat 4.26.0"
103+
```
104+
- Tag format: `v{version}` (e.g., `v0.4.26`)
105+
- Use the pre-release flag for alpha versions (`v0.4.26a1``--prerelease`)
106+
- This triggers the `publish.yml` workflow → PyPI
107+
108+
6. **Verify on PyPI**: `pip install chat-sdk=={version}`
109+
110+
7. **Cleanup**: mark yanked/superseded GitHub releases as deprecated in their
111+
description — don't delete them (deleting removes history and breaks any
112+
external links that reference the tag).
113+
114+
### What NOT to do
115+
116+
- Don't publish without CI green on all 4 Python versions (3.10-3.13)
117+
- Don't skip the fidelity check for test changes
118+
- Don't use alpha tags for *final* sync releases — alpha tags (`0.4.26a1`) are
119+
only for work-in-progress ports while syncing a new upstream version
120+
- Don't amend published releases — create a patch instead
121+
53122
## License
54123

55124
By contributing you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)