Skip to content

Commit 98bee51

Browse files
committed
docs: add Python v0.7.1 implementation plan
1 parent f3309b8 commit 98bee51

1 file changed

Lines changed: 158 additions & 0 deletions

File tree

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Python 0.7.1 Stable Specification Pin Implementation Plan
2+
3+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4+
5+
**Goal:** Release Python adapter `0.7.1` with stable, exact provenance for specification `v0.3.0`.
6+
7+
**Architecture:** Keep the provenance values centralized in `src/openstatspec/sql/capabilities.py`; tests and capability declarations consume those values. CI and release-readiness documentation pin the same immutable specification commit, while the package version changes only in packaging metadata.
8+
9+
**Tech Stack:** Python 3.11–3.14, pytest, GitHub Actions, `python -m build`, Twine, PyPI Trusted Publishing.
10+
11+
## Global Constraints
12+
13+
- Specification commit: `cd8f198c68b849eb8ed018a894670a0904c2181d`.
14+
- Specification status: `stable`.
15+
- Specification release: `v0.3.0`.
16+
- Package version: `0.7.1`.
17+
- Keep the SPSS engine pin, companion package pin, SQL profile matrix, and runtime behavior unchanged.
18+
- Do not publish or change the normative specification package in this task.
19+
20+
---
21+
22+
### Task 1: Update provenance contract tests first
23+
24+
**Files:**
25+
- Modify: `tests/test_cli.py:44-48`
26+
- Modify: `tests/test_sql_profiles.py:32-40`
27+
28+
**Interfaces:**
29+
- Consumes: public `openstatspec.capability_matrix()` and SQL profile declarations.
30+
- Produces: executable expectations for stable `v0.3.0` provenance.
31+
32+
- [ ] **Step 1: Change the assertions to the stable identity**
33+
34+
Replace the candidate expectations with:
35+
36+
```python
37+
assert matrix["specification_status"] == "stable"
38+
assert matrix["specification_release"] == "v0.3.0"
39+
assert matrix["specification_commit"] == "cd8f198c68b849eb8ed018a894670a0904c2181d"
40+
```
41+
42+
Apply the same three values to each profile declaration assertion.
43+
44+
- [ ] **Step 2: Run the focused tests and confirm the expected red state**
45+
46+
Run:
47+
48+
```bash
49+
python -m pytest -q tests/test_cli.py::test_capability_matrix_is_public_and_cli_matches_engine_boundary tests/test_sql_profiles.py::test_profile_declarations_publish_specification_candidate_provenance
50+
```
51+
52+
Expected: both tests fail because production constants still expose the old release-candidate identity.
53+
54+
- [ ] **Step 3: Commit the failing-test update**
55+
56+
```bash
57+
git add tests/test_cli.py tests/test_sql_profiles.py
58+
git commit -m "test: expect stable specification v0.3.0"
59+
```
60+
61+
### Task 2: Bind production provenance and release metadata
62+
63+
**Files:**
64+
- Modify: `src/openstatspec/sql/capabilities.py:20-23`
65+
- Modify: `pyproject.toml:7`
66+
- Modify: `.github/workflows/ci.yml:23`
67+
- Modify: `.github/workflows/release.yml:51`
68+
- Modify: `docs/release-readiness.md:1,116-123`
69+
- Modify: `CHANGELOG.md` after the `Unreleased` section
70+
71+
**Interfaces:**
72+
- Consumes: the exact specification commit from the published `v0.3.0` tag.
73+
- Produces: capability output and release automation identifying `stable`, `v0.3.0`, and `cd8f198c...`.
74+
75+
- [ ] **Step 1: Update the centralized capability constants**
76+
77+
Set the declarations to:
78+
79+
```python
80+
SPECIFICATION_COMMIT = "cd8f198c68b849eb8ed018a894670a0904c2181d"
81+
SPECIFICATION_STATUS = "stable"
82+
SPECIFICATION_RELEASE: str | None = "v0.3.0"
83+
```
84+
85+
- [ ] **Step 2: Bump the package and CI fixture pin**
86+
87+
Set `project.version` in `pyproject.toml` to `0.7.1`. Replace the old specification checkout ref in both workflows with the exact commit `cd8f198c68b849eb8ed018a894670a0904c2181d`; leave the companion package ref unchanged.
88+
89+
- [ ] **Step 3: Update release documentation and changelog**
90+
91+
Rename the readiness heading to `0.7.1 release readiness`, change its specification checklist to the stable commit/release identity, and add a dated `0.7.1` entry explaining that the adapter now pins published specification `v0.3.0`.
92+
93+
- [ ] **Step 4: Run focused tests and confirm green**
94+
95+
Run the focused command from Task 1. Expected: both tests pass.
96+
97+
- [ ] **Step 5: Commit the implementation and metadata**
98+
99+
```bash
100+
git add src/openstatspec/sql/capabilities.py pyproject.toml .github/workflows/ci.yml .github/workflows/release.yml docs/release-readiness.md CHANGELOG.md
101+
git commit -m "release: pin Python adapter to specification v0.3.0"
102+
```
103+
104+
### Task 3: Verify the complete Python release candidate
105+
106+
**Files:**
107+
- Verify: all tracked files in the Python repository.
108+
109+
- [ ] **Step 1: Check the diff and stale current references**
110+
111+
Run:
112+
113+
```bash
114+
git diff --check
115+
rg -n 'f2fdf687d8cb32b944ca55a3e9e7215ffc603019|specification_status.*release_candidate|specification_release.*None|version = "0\.7\.0"' src tests .github docs pyproject.toml
116+
```
117+
118+
Expected: no stale current references; historical changelog entries may retain their original release evidence.
119+
120+
- [ ] **Step 2: Run the non-service test suite**
121+
122+
```bash
123+
python -m pytest -m "not services"
124+
```
125+
126+
Expected: zero failures.
127+
128+
- [ ] **Step 3: Build and smoke-test the package**
129+
130+
```bash
131+
rm -rf /tmp/openstatspec-v071-dist /tmp/openstatspec-v071-smoke
132+
python -m build --outdir /tmp/openstatspec-v071-dist
133+
python -m twine check /tmp/openstatspec-v071-dist/*
134+
python -m venv /tmp/openstatspec-v071-smoke
135+
/tmp/openstatspec-v071-smoke/bin/python -m pip install ./openstatspec-pyspssio
136+
/tmp/openstatspec-v071-smoke/bin/python -m pip install /tmp/openstatspec-v071-dist/openstatspec-0.7.1-*.whl
137+
/tmp/openstatspec-v071-smoke/bin/openstatspec capabilities
138+
```
139+
140+
Expected: build and Twine checks pass, and capabilities reports `stable`, `v0.3.0`, and the exact commit.
141+
142+
### Task 4: Review, publish, and release
143+
144+
- [ ] **Step 1: Run the local review loop and fix every actionable finding**
145+
146+
Review the complete branch diff against `origin/main`; repeat the tests after each fix until no actionable findings remain.
147+
148+
- [ ] **Step 2: Push the branch and open a draft PR**
149+
150+
Push `agent/stable-spec-v071` to `OpenStatSpec/python`, open a PR targeting `main`, mark it ready for review, and add `@codex review`.
151+
152+
- [ ] **Step 3: Iterate on GitHub review and CI**
153+
154+
Inspect every Codex review finding and failing check, fix actionable issues locally, push, and repeat until the review and required checks are clean.
155+
156+
- [ ] **Step 4: After merge, create and push annotated tag `v0.7.1`**
157+
158+
Verify the tag targets the merge commit and wait for tag-context CI to pass before relying on the existing PyPI workflow.

0 commit comments

Comments
 (0)