Skip to content

Commit 9349efa

Browse files
committed
chore: archive v1.9 milestone
1 parent 483a04d commit 9349efa

31 files changed

Lines changed: 2878 additions & 125 deletions

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*"
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install package and build tooling
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install ".[dev]" build
28+
29+
- name: Run tests
30+
run: python -m pytest
31+
32+
- name: Build distributions
33+
run: python -m build
34+
35+
- name: Upload release artifacts
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: python-package-distributions
39+
path: dist/*
40+
41+
publish-testpypi:
42+
name: Publish to TestPyPI
43+
runs-on: ubuntu-latest
44+
needs: build
45+
if: github.event_name == 'workflow_dispatch'
46+
environment: testpypi
47+
permissions:
48+
contents: read
49+
id-token: write
50+
steps:
51+
- name: Download release artifacts
52+
uses: actions/download-artifact@v4
53+
with:
54+
name: python-package-distributions
55+
path: dist
56+
57+
- name: Publish distribution to TestPyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
repository-url: https://test.pypi.org/legacy/
61+
62+
publish-pypi:
63+
name: Publish to PyPI
64+
runs-on: ubuntu-latest
65+
needs: build
66+
if: startsWith(github.ref, 'refs/tags/v')
67+
environment: pypi
68+
permissions:
69+
contents: read
70+
id-token: write
71+
steps:
72+
- name: Download release artifacts
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: python-package-distributions
76+
path: dist
77+
78+
- name: Publish distribution to PyPI
79+
uses: pypa/gh-action-pypi-publish@release/v1

.planning/MILESTONES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Milestones
22

3+
## v1.9 PyPI Distribution and Release Readiness (Shipped: 2026-05-15)
4+
5+
**Phases completed:** 4 phases, 11 plans, 27 tasks
6+
7+
**Key accomplishments:**
8+
9+
- PyPI metadata now uses Hatchling dynamic versioning, with tests enforcing the single-source version contract and the required discoverability fields.
10+
- Source and wheel artifacts now include the release files we need, and the package test suite verifies the built outputs when they exist.
11+
- README installation instructions now lead with PyPI commands, and the built artifacts pass `twine check` with the new long-description content.
12+
- A gated venv-based harness now proves the built wheel installs cleanly without optional dependencies and keeps the install tests opt-in for normal runs.
13+
- The built wheel now installs all declared extras in isolated venvs, and the Qdrant wrapper surface resolves from the `corpulse[qdrant]` extra.
14+
- Optional dependency failures now tell users exactly what to install, and the full phase verification suite passes against the rebuilt wheel.
15+
- Exact post-publish PyPI smoke checks for `corpulse` and `corpulse[qdrant]`, with tests pinning the release checklist wording
16+
17+
**Known deferred items at close:** 3 old quick-task placeholders already tracked in `.planning/STATE.md`.
18+
19+
---
20+
321
## v1.8 Workload Observability and Replay Feasibility (Shipped: 2026-05-05)
422

523
**Phases completed:** 6 phases, 21 plans, 61 tasks

.planning/PROJECT.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,22 @@ A Python library that tracks and analyzes RAG corpus health for RAG teams. It de
88

99
RAG teams can point corpulse at their vector DB and immediately understand what's wrong with their corpus without manual audits.
1010

11-
## Completed Milestone: v1.8 Workload Observability and Replay Feasibility
11+
## Completed Milestone: v1.9 PyPI Distribution and Release Readiness
1212

13-
**Goal:** Research and, where feasible, implement a first-class workload observability layer that extends corpulse from corpus health into RAG request traces, serving diagnostics, session analytics, and replay-ready exports.
13+
**Goal:** Make corpulse installable from PyPI with verified optional extras and a repeatable release path.
1414

1515
**Target features:**
16-
- Feasibility research for RAG workload trace schema, storage implications, and replay boundaries
17-
- Structured `log_rag_request()` / `alog_rag_request()` APIs with sessions, prompt components, token counts, timings, errors, and content hashes
18-
- JSONL import/export for privacy-preserving workload traces
19-
- Workload, latency, and session reports that summarize traffic shape and serving behavior
20-
- Dependency-free callable replay proof on top of captured/imported traces; endpoint adapters and benchmark export remain future work
16+
- PyPI-ready package metadata, README rendering, package contents, license inclusion, and version consistency
17+
- Verified install surfaces for `pip install corpulse`, `pip install corpulse[qdrant]`, and existing optional extras
18+
- GitHub Actions release automation using PyPI Trusted Publishing for TestPyPI and PyPI
19+
- Documentation updated from GitHub install syntax to PyPI install syntax
20+
- Release checklist covering build artifacts, clean-environment installs, imports, extras, and Qdrant wrapper availability
21+
22+
## Current Milestone
23+
24+
None. Start the next milestone with `$gsd-new-milestone`.
25+
26+
The next milestone should start from fresh requirements. Candidate directions include release-note maturity, signed artifacts, PyPI adoption reporting, or the next integration adapter.
2127

2228
## Requirements
2329

@@ -67,12 +73,16 @@ RAG teams can point corpulse at their vector DB and immediately understand what'
6773
- ✓ Workload and serving reports over captured/imported traces — Phase 30
6874
- ✓ Session analytics and repeated-context reuse signals — Phase 31
6975
- ✓ Replay feasibility and dependency-free callable replay proof — Phase 32
76+
- ✓ PyPI-ready package metadata, README rendering, package contents, license inclusion, and version consistency — v1.9
77+
- ✓ Verified install surfaces for `pip install corpulse`, `pip install corpulse[qdrant]`, and existing optional extras — v1.9
78+
- ✓ GitHub Actions release automation using PyPI Trusted Publishing for TestPyPI and PyPI — v1.9
79+
- ✓ PyPI-first installation documentation and release checklist with post-publish smoke checks — v1.9
7080

7181
### Active
7282

7383
<!-- Current scope. Building toward these. -->
7484

75-
- [ ] Define the next milestone with fresh requirements and roadmap.
85+
(None. Define fresh requirements with `$gsd-new-milestone`.)
7686

7787
### Out of Scope
7888

@@ -83,7 +93,6 @@ RAG teams can point corpulse at their vector DB and immediately understand what'
8393
- LangChain/LlamaIndex plugin — future milestone after wrapper pattern is proven
8494
- Standalone audit mode (crawl vector DB without runtime) — future milestone
8595
- CLI tool — future milestone
86-
- PyPI publishing — distributing via GitHub only for now
8796
- Web dashboard / UI — keep it library-first
8897
- **Faithfulness / Hallucination Rate** — requires LLM-as-judge to verify generated answer against retrieved context; not measurable from retrieval logs alone; use Ragas or TruLens for generation-layer evaluation
8998
- **Context Precision** — requires ground-truth relevance labels per query; corpulse has no label store and no annotation workflow; belongs in offline eval frameworks
@@ -92,17 +101,23 @@ RAG teams can point corpulse at their vector DB and immediately understand what'
92101

93102
## Current State
94103

104+
corpulse completed milestone `v1.9`, moving distribution readiness from GitHub-only installs to a PyPI-first release posture. The package metadata, source distribution, wheel contents, optional extras, release workflow, Trusted Publishing documentation, and install docs are now covered by static tests, build checks, and milestone verification artifacts.
105+
106+
The release workflow builds once, uploads the tested `dist/*` artifacts, publishes to TestPyPI on manual dispatch, and publishes to PyPI only from `v*` tags through OIDC Trusted Publishing. The production `pypi` GitHub environment approval gate and the live TestPyPI/PyPI smoke checks remain explicit manual release-time actions documented in `.github/RELEASE_CHECKLIST.md`.
107+
95108
corpulse completed milestone `v1.7`, adding a shared generic wrapping engine and migrating the Qdrant compatibility wrappers onto that architecture. The library now supports a documented advanced adapter path for future integrations while preserving lazy optional dependency behavior and Qdrant compatibility.
96109

97110
The shipped `v1.8` milestone was seeded by `.planning/research/RAGPULSE-COMPARISON-FEATURES.md`, which found that RAGPulse is most useful as a workload trace and replay reference rather than as a corpus-health competitor. corpulse kept its corpus-health core while adding an optional workload/serving layer for request composition, traffic shape, latency, sessions, and replayable exports.
98111

99112
Phase 27 completed the feasibility decision record and locked the MVP direction on an append-only request-trace schema. Phases 28-31 delivered trace capture, JSONL import/export, workload and serving reports, and session analytics with repeated-context reuse signals. Phase 32 validated that callable replay is feasible and delivered dependency-free sync/async replay helpers. v1.8 shipped on 2026-05-05. It did not add a built-in OpenAI endpoint client; richer benchmark export and endpoint adapters remain future work.
100113

114+
The v1.9 milestone moved distribution from GitHub-only to PyPI-ready. `pyproject.toml` uses Hatchling dynamic versioning, optional extras are verified from built artifacts, README is PyPI-first, and `.github/workflows/release.yml` implements the Trusted Publishing release path.
115+
101116
## Next Milestone Goals
102117

103-
- Start the next milestone with fresh requirements instead of extending v1.8 in place.
104-
- Keep future replay optional and dependency-light; avoid turning corpulse into a full evaluation framework or dashboard.
105-
- Consider future endpoint adapters and benchmark export only after the callable replay proof has real adopter feedback.
118+
- Define fresh requirements before starting implementation.
119+
- Consider release maturity: release notes, signed artifacts, and PyPI adoption reporting.
120+
- Consider the next integration adapter now that generic wrapping and distribution readiness are in place.
106121

107122
<details>
108123
<summary>Archived v1.7 milestone framing</summary>
@@ -184,7 +199,7 @@ Make the persistence layer pluggable so corpulse can use PostgreSQL in productio
184199

185200
- **Tech stack**: Python, SQLite for local persistence, PostgreSQL as the production backend target
186201
- **Dependencies**: numpy and scikit-learn are hard dependencies; pandas and tabulate remain optional; psycopg and asyncpg are optional extras
187-
- **Distribution**: GitHub-only for v1.x; no PyPI publishing yet
202+
- **Distribution**: v1.9 targets PyPI publication with GitHub source install kept as a fallback path
188203
- **Vector DB**: Qdrant remains the first wrapper target
189204
- **Compatibility**: Python 3.10+
190205
- **Backwards compat**: `Corpulse()` with no args must still work exactly as before
@@ -197,12 +212,14 @@ Make the persistence layer pluggable so corpulse can use PostgreSQL in productio
197212
| Decision | Rationale | Outcome |
198213
|----------|-----------|---------|
199214
| Qdrant as first wrapper | Growing production adoption in RAG pipelines; good Python client | Shipped |
200-
| GitHub-only distribution | Keep overhead low for v1; PyPI later when stable | Pending |
215+
| GitHub-only distribution | Keep overhead low before the first public package release | Superseded by v1.9 |
201216
| Wrapper-first over audit-first | Query-dependent features are the most actionable; wrapper enables them automatically | Shipped |
202217
| Keep manual API alongside wrapper | Existing API still useful for custom integrations; wrapper is additive | Shipped |
203218
| Pluggable backend interface | Service repo needs Postgres; library should support multiple backends | Shipped in v1.1 |
204219
| Explicit backend config over connection strings | More flexible and clearer than implicit string configuration | Shipped in v1.1 |
205220
| Narrow async facade for v1.1 | Async service integration was needed now; full async analytics parity was not yet justified | Shipped in v1.1 |
221+
| PyPI Trusted Publishing over API tokens | Avoid long-lived publishing credentials and keep release automation auditable | Shipped in v1.9 |
222+
| PyPI-first install docs with GitHub source fallback | PyPI is the user path; source install remains useful for unreleased fixes | Shipped in v1.9 |
206223
| Evidence-gated requirement closure | Milestone claims should match recorded verification, not just landed code | Shipped in v1.1 |
207224
| Structured-payload async reports | Avoids coupling `AsyncCorpulse` to stdout and keeps output consumable by services/tests; sync `report`/`cleanup_report` become a thin formatter over the same payload | Shipped in Phase 12 |
208225
| Pandas stays optional on async path | Keeps install footprint small for async service users who don't need DataFrames; mirrors sync behavior | Shipped in Phase 12 |
@@ -214,6 +231,7 @@ Make the persistence layer pluggable so corpulse can use PostgreSQL in productio
214231
| Qdrant remains first-class while the generic API serves advanced adapter authors | Keeps the common path simple for existing users while making future integrations cheaper to build | Shipped in v1.7 |
215232
| Workload observability is the v1.8 priority over a second vector DB adapter | RAGPulse comparison showed the bigger product gap is production request behavior, not another retrieval-client wrapper | Shipped through Phase 31 |
216233
| Callable replay over built-in endpoint replay | Current traces do not guarantee canonical messages, raw component content, tool payloads, streamed chunks, or response bodies; user callables can bridge private endpoint-specific payloads without new core dependencies | Shipped in Phase 32 |
234+
| PyPI Trusted Publishing over long-lived release tokens | OIDC avoids storing a long-lived PyPI API token in GitHub secrets and gives PyPI a verifiable source repository link | Pending in v1.9 |
217235

218236
## Evolution
219237

@@ -233,4 +251,4 @@ This document evolves at phase transitions and milestone boundaries.
233251
4. Update Context with current state
234252

235253
---
236-
*Last updated: 2026-05-05 after Phase 32 execution*
254+
*Last updated: 2026-05-15 after starting milestone v1.9*

.planning/ROADMAP.md

Lines changed: 15 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -11,97 +11,26 @@
1111
-**v1.6 — Generation Trace Capture** — completed 2026-04-20, archive: `.planning/milestones/v1.6-ROADMAP.md`
1212
-**v1.7 — Generic Integration Wrapping** — Phases 25-26 (completed 2026-04-22, archive: `.planning/milestones/v1.7-ROADMAP.md`)
1313
-**v1.8 — Workload Observability and Replay Feasibility** — Phases 27-32 (shipped 2026-05-05, archive: `.planning/milestones/v1.8-ROADMAP.md`)
14-
- **v1.9 — PyPI Distribution and Release Readiness** — Phases 33-36 (active)
14+
- **v1.9 — PyPI Distribution and Release Readiness** — Phases 33-36 (shipped 2026-05-15, archive: `.planning/milestones/v1.9-ROADMAP.md`)
1515

1616
## Current Status
1717

18-
- Latest shipped milestone: `v1.8Workload Observability and Replay Feasibility`
19-
- Active milestone: `v1.9 — PyPI Distribution and Release Readiness`
20-
- Next workflow step: `$gsd-execute-phase 35`
18+
- Latest shipped milestone: `v1.9PyPI Distribution and Release Readiness`
19+
- Active milestone: none
20+
- Next workflow step: `$gsd-new-milestone`
2121

22-
## Phases
22+
## Archived Milestone Details
2323

24-
### Phase 33: Package Metadata and Build Readiness
24+
Full shipped milestone roadmaps are archived under `.planning/milestones/`.
2525

26-
**Goal:** Make the package metadata, README, versioning, and build artifacts ready for PyPI.
27-
28-
**Requirements:** PKG-01, PKG-02, PKG-03
29-
30-
**Success Criteria:**
31-
1. `pyproject.toml` contains PyPI-ready metadata, URLs, classifiers, and license-file configuration.
32-
2. Runtime version and package metadata version have a single-source or verified consistency path.
33-
3. `python -m build` produces an sdist and wheel containing the intended package files, README, and license.
34-
4. Package metadata and README render cleanly for PyPI.
35-
36-
### Phase 34: Optional Extras Install Verification
37-
38-
**Goal:** Prove base and optional-extra installs behave correctly from built artifacts without bloating the core install.
39-
40-
**Requirements:** PKG-04, EXTRA-01, EXTRA-02, EXTRA-03, EXTRA-04
41-
42-
**Success Criteria:**
43-
1. A clean environment can install the base artifact and import `corpulse` without optional dependencies.
44-
2. A clean environment can install `corpulse[qdrant]` from the built artifact and import/instantiate the Qdrant wrapper surface.
45-
3. Existing optional extras install cleanly or have documented constraints.
46-
4. Optional integration failures produce actionable `pip install corpulse[...]` guidance.
47-
48-
### Phase 35: Trusted Publishing Release Automation
49-
50-
**Goal:** Add GitHub Actions release automation that builds once and publishes through PyPI Trusted Publishing.
51-
52-
**Requirements:** REL-01, REL-02, REL-03, REL-04
53-
54-
**Success Criteria:**
55-
1. CI builds and stores source and wheel artifacts after tests pass.
56-
2. TestPyPI publishing uses `pypa/gh-action-pypi-publish@release/v1` with OIDC Trusted Publishing.
57-
3. PyPI publishing is tag-gated and uses OIDC Trusted Publishing, not a long-lived PyPI token.
58-
4. The PyPI publish job uses a protected environment or equivalent explicit release gate.
59-
60-
### Phase 36: User Install Docs and Release Validation
61-
62-
**Goal:** Make PyPI install instructions the user-facing path and validate the first release end to end.
63-
64-
**Requirements:** DOC-01, DOC-02, DOC-03, VAL-01, VAL-02
65-
66-
**Success Criteria:**
67-
1. README/docs show `pip install corpulse` as the primary installation command.
68-
2. README/docs show `pip install corpulse[qdrant]` as the primary Qdrant integration command.
69-
3. Release checklist documents version bump, build, TestPyPI validation, PyPI publish, and post-publish smoke checks.
70-
4. Published PyPI package installs in a clean environment.
71-
5. Published `corpulse[qdrant]` extra installs in a clean environment and exposes the Qdrant wrapper surface.
72-
73-
## Progress
74-
75-
| Phase | Milestone | Plans Complete | Status | Completed |
76-
| --- | --- | --- | --- | --- |
77-
| 33. Package Metadata and Build Readiness | v1.9 | 3/3 | Complete | 2026-05-15 |
78-
| 34. Optional Extras Install Verification | v1.9 | 3/3 | Complete | 2026-05-15 |
79-
| 35. Trusted Publishing Release Automation | v1.9 | 0/0 | Not Started ||
80-
| 36. User Install Docs and Release Validation | v1.9 | 0/0 | Not Started ||
81-
82-
## Coverage
83-
84-
v1.9 maps 17/17 requirements to phases in `.planning/REQUIREMENTS.md`.
85-
86-
| Requirement | Phase |
87-
|-------------|-------|
88-
| PKG-01 | Phase 33 |
89-
| PKG-02 | Phase 33 |
90-
| PKG-03 | Phase 33 |
91-
| PKG-04 | Phase 34 |
92-
| EXTRA-01 | Phase 34 |
93-
| EXTRA-02 | Phase 34 |
94-
| EXTRA-03 | Phase 34 |
95-
| EXTRA-04 | Phase 34 |
96-
| REL-01 | Phase 35 |
97-
| REL-02 | Phase 35 |
98-
| REL-03 | Phase 35 |
99-
| REL-04 | Phase 35 |
100-
| DOC-01 | Phase 36 |
101-
| DOC-02 | Phase 36 |
102-
| DOC-03 | Phase 36 |
103-
| VAL-01 | Phase 36 |
104-
| VAL-02 | Phase 36 |
26+
| Milestone | Archive |
27+
|-----------|---------|
28+
| v1.1 | `.planning/milestones/v1.1-ROADMAP.md` |
29+
| v1.2 | `.planning/milestones/v1.2-ROADMAP.md` |
30+
| v1.6 | `.planning/milestones/v1.6-ROADMAP.md` |
31+
| v1.7 | `.planning/milestones/v1.7-ROADMAP.md` |
32+
| v1.8 | `.planning/milestones/v1.8-ROADMAP.md` |
33+
| v1.9 | `.planning/milestones/v1.9-ROADMAP.md` |
10534

10635
---
107-
*Last updated: 2026-05-15 after milestone v1.9 roadmap creation*
36+
*Last updated: 2026-05-15 after v1.9 milestone completion*

0 commit comments

Comments
 (0)