From f1cd330539b8704568454aa7c82c8c503c8e47d8 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Wed, 8 Jul 2026 10:29:42 +0300 Subject: [PATCH 1/4] chore(planning): swap index.py and templates for convention 2.0.0 Drop the plan.md template per the 2.0.0 APPLY.md flow (change/design templates now cover the flat single-file change format). Co-Authored-By: Claude Opus 4.8 (1M context) --- planning/_templates/change.md | 4 +- planning/_templates/design.md | 34 +- planning/_templates/plan.md | 46 - ...2026-06-03.01-faststream-0.7-migration.md} | 0 .../plan.md | 1128 ----------------- ....01-faststream-0.7.1-testbroker-typing.md} | 0 .../plan.md | 249 ---- ....md => 2026-06-09.01-mkdocs-gh-actions.md} | 0 .../2026-06-09.01-mkdocs-gh-actions/plan.md | 614 --------- ...design.md => 2026-06-26.01-timer-store.md} | 0 .../changes/2026-06-26.01-timer-store/plan.md | 231 ---- ...sign.md => 2026-06-26.02-poll-schedule.md} | 0 .../2026-06-26.02-poll-schedule/plan.md | 120 -- ...2026-06-29.01-python-3.11-3.12-support.md} | 0 .../plan.md | 270 ---- planning/index.py | 150 +-- 16 files changed, 84 insertions(+), 2762 deletions(-) delete mode 100644 planning/_templates/plan.md rename planning/changes/{2026-06-03.01-faststream-0.7-migration/design.md => 2026-06-03.01-faststream-0.7-migration.md} (100%) delete mode 100644 planning/changes/2026-06-03.01-faststream-0.7-migration/plan.md rename planning/changes/{2026-06-04.01-faststream-0.7.1-testbroker-typing/design.md => 2026-06-04.01-faststream-0.7.1-testbroker-typing.md} (100%) delete mode 100644 planning/changes/2026-06-04.01-faststream-0.7.1-testbroker-typing/plan.md rename planning/changes/{2026-06-09.01-mkdocs-gh-actions/design.md => 2026-06-09.01-mkdocs-gh-actions.md} (100%) delete mode 100644 planning/changes/2026-06-09.01-mkdocs-gh-actions/plan.md rename planning/changes/{2026-06-26.01-timer-store/design.md => 2026-06-26.01-timer-store.md} (100%) delete mode 100644 planning/changes/2026-06-26.01-timer-store/plan.md rename planning/changes/{2026-06-26.02-poll-schedule/design.md => 2026-06-26.02-poll-schedule.md} (100%) delete mode 100644 planning/changes/2026-06-26.02-poll-schedule/plan.md rename planning/changes/{2026-06-29.01-python-3.11-3.12-support/design.md => 2026-06-29.01-python-3.11-3.12-support.md} (100%) delete mode 100644 planning/changes/2026-06-29.01-python-3.11-3.12-support/plan.md diff --git a/planning/_templates/change.md b/planning/_templates/change.md index d4c8962..5aa7e81 100644 --- a/planning/_templates/change.md +++ b/planning/_templates/change.md @@ -5,8 +5,8 @@ summary: One line — shown in the generated index. Written at creation; finaliz # Change: One-line capitalized title **Lane:** lightweight — ≲30 LOC net, ≤2 files, no new file, no public-API -change, a single straightforward test. If it outgrows this, split into -`design.md` + `plan.md`. +change, a single straightforward test. If it outgrows this, rewrite it from +the design template. ## Goal diff --git a/planning/_templates/design.md b/planning/_templates/design.md index d63e22d..17dbee1 100644 --- a/planning/_templates/design.md +++ b/planning/_templates/design.md @@ -4,6 +4,10 @@ summary: One line — shown in the generated index. Written at creation; finaliz # Design: One-line capitalized title + + ## Summary One paragraph. What changes, at the level a reader needs to decide if this @@ -12,37 +16,23 @@ spec is worth reading in full. ## Motivation Why now. What is broken or missing. Concrete observations / numbers, not -abstract complaints. Link to memory entries or earlier specs when relevant. - -## Non-goals - -What is deliberately out of scope and (when nontrivial) why. Each item is -a sentence; one line each. +abstract complaints. ## Design -### 1. - What changes, in enough detail that a reader who has not seen the codebase -can follow. Code samples / diagrams welcome. +can follow. Sketches and interface fragments welcome; never the full +diff-to-be. Reference rejected alternatives in `decisions/` instead of +retelling them. -### 2. - -... - -## Operations - -Out-of-repo steps (DNS, infra, external account changes). Omit if none. - -## Out of scope +## Non-goals -Already covered above under Non-goals if appropriate. Repeat-list of -explicitly-excluded follow-ups belongs here when the list is long. +What is deliberately out of scope and (when nontrivial) why. One line each. ## Testing -How we know it landed correctly. New pytest? Smoke check on live URL? -Lint pass? Be specific. +How we know it landed correctly. Be specific: the command and the expected +signal. ## Risk diff --git a/planning/_templates/plan.md b/planning/_templates/plan.md deleted file mode 100644 index 132d720..0000000 --- a/planning/_templates/plan.md +++ /dev/null @@ -1,46 +0,0 @@ -# — implementation plan - -> **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. - -**Goal:** One sentence — what shipping this plan achieves. No design -rationale; link to the spec for that. - -**Spec:** [`design.md`](./design.md) - -**Branch:** `feat/my-change` (or `fix/`, `chore/`, etc.) - -**Commit strategy:** Per-task commits / single commit / squash on merge. -Whichever fits. - ---- - -### Task 1: - -**Files:** -- Modify: `path/to/file.py` -- Create: `path/to/new.py` - -One sentence on what this task accomplishes. No deeper reasoning — that's -in the spec. - -- [ ] **Step 1: ** - - Run / edit / verify command. Expected output. - -- [ ] **Step 2: ** - - ... - -- [ ] **Step 3: Commit** - - ```bash - git add path/to/file.py - git commit -m ": " - ``` - ---- - -### Task 2: ... diff --git a/planning/changes/2026-06-03.01-faststream-0.7-migration/design.md b/planning/changes/2026-06-03.01-faststream-0.7-migration.md similarity index 100% rename from planning/changes/2026-06-03.01-faststream-0.7-migration/design.md rename to planning/changes/2026-06-03.01-faststream-0.7-migration.md diff --git a/planning/changes/2026-06-03.01-faststream-0.7-migration/plan.md b/planning/changes/2026-06-03.01-faststream-0.7-migration/plan.md deleted file mode 100644 index 8b618b8..0000000 --- a/planning/changes/2026-06-03.01-faststream-0.7-migration/plan.md +++ /dev/null @@ -1,1128 +0,0 @@ -# FastStream 0.7 migration — PR1 (defensive pin + planning scaffold) Implementation Plan - -> **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. - -**Goal:** Tighten the FastStream pin to `>=0.6,<0.7`, adopt `--cov-fail-under=100`, and scaffold the `planning/` workflow directory mirroring `faststream-outbox`. Lands the PR2 design doc in the same commit so PR2 has a home. - -**Architecture:** Pure config + docs change. No runtime code touched. Single commit on `chore/pin-faststream-pre-0.7`. The coverage gate is conditional: if `just test` is not at 100% today, the gate addition gets reverted and deferred to PR2 (recorded as decision in commit body). - -**Tech Stack:** `pyproject.toml`, `uv`, `pytest-cov`, markdown. - -**Related spec:** `planning/specs/2026-06-03-faststream-0.7-migration-design.md`. - ---- - -## Task 1: Create the working branch - -**Files:** None (git operation). - -- [ ] **Step 1: Confirm clean tree** - -Run: `git status` -Expected: `nothing to commit, working tree clean` (a fresh `planning/` dir from the brainstorming session is acceptable; we'll stage it later). - -- [ ] **Step 2: Create branch** - -Run: `git switch -c chore/pin-faststream-pre-0.7` -Expected: `Switched to a new branch 'chore/pin-faststream-pre-0.7'` - -## Task 2: Establish coverage baseline (precondition for gate adoption) - -**Files:** None (read-only test run). - -The spec's R8 flags that adopting `--cov-fail-under=100` in PR1 requires the suite to already hit 100%. This task discovers the baseline. - -- [ ] **Step 1: Run full suite via Justfile** - -Run: `just test` -Expected: All tests pass. Final coverage line at bottom of output shows total `%` covered. - -- [ ] **Step 2: Record baseline** - -Note the total coverage percentage from the report. There are three branches: - -- **If `100%`:** Continue to Task 3 — gate adoption is safe. -- **If `<100%` AND missing lines are trivially testable:** Continue to Task 3 but write the backfill tests in Task 3a (insert before Task 4) before adding the gate. -- **If `<100%` AND gaps are non-trivial:** Skip the gate adoption entirely; remove "adopt `--cov-fail-under=100`" from this PR's scope; record decision in commit body; gate moves to PR2 where the orphaned-branch removal naturally lifts coverage. - -## Task 3: Tighten the FastStream pin - -**Files:** -- Modify: `pyproject.toml` (line 12) - -- [ ] **Step 1: Read current dependencies block** - -Run: `sed -n '9,14p' pyproject.toml` -Expected output: -``` -requires-python = ">=3.13,<4" -license = "MIT" -dependencies = [ - "faststream~=0.6", - "redis>=5.0", -] -``` - -- [ ] **Step 2: Edit the pin** - -Change `"faststream~=0.6"` to `"faststream>=0.6,<0.7"` on line 12. - -- [ ] **Step 3: Verify edit** - -Run: `grep -n "faststream" pyproject.toml | grep -v module` -Expected: `12: "faststream>=0.6,<0.7",` - -## Task 4: Adopt `--cov-fail-under=100` (conditional on Task 2) - -**Files:** -- Modify: `pyproject.toml` (line 67) - -**Skip this task if Task 2 step 2 selected the third branch (`<100%`, non-trivial gaps).** - -- [ ] **Step 1: Read current pytest config** - -Run: `sed -n '66,70p' pyproject.toml` -Expected output: -``` -[tool.pytest.ini_options] -addopts = "--cov=. --cov-report term-missing" -asyncio_mode = "auto" -asyncio_default_fixture_loop_scope = "function" -``` - -- [ ] **Step 2: Append the coverage gate to addopts** - -Change `addopts = "--cov=. --cov-report term-missing"` to `addopts = "--cov=. --cov-report term-missing --cov-fail-under=100"`. - -- [ ] **Step 3: Verify edit** - -Run: `grep -n "addopts" pyproject.toml` -Expected: `addopts = "--cov=. --cov-report term-missing --cov-fail-under=100"` - -## Task 5: Regenerate lockfile - -**Files:** -- Touched (gitignored, not committed): `uv.lock` - -`uv.lock` is gitignored in this repo, so the file is local-only. The regeneration confirms the resolver is happy with the tightened pin. - -- [ ] **Step 1: Regenerate lock** - -Run: `uv lock` -Expected: `Resolved N packages in