From 36884966f1973502b90dbdd40051d79e1eff1e93 Mon Sep 17 00:00:00 2001 From: Youssef Aitousarrah Date: Thu, 9 Apr 2026 23:50:55 -0700 Subject: [PATCH] =?UTF-8?q?docs(spec):=20fix=20hypothesis=20capacity=20?= =?UTF-8?q?=E2=80=94=20running=20experiments=20never=20paused?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pending hypotheses queue by priority and promote when a slot opens, rather than pausing a running experiment mid-streak. Co-Authored-By: Claude Sonnet 4.6 --- .../2026-04-09-hypothesis-backtesting-design.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/superpowers/specs/2026-04-09-hypothesis-backtesting-design.md b/docs/superpowers/specs/2026-04-09-hypothesis-backtesting-design.md index 6fa943f6..042bb796 100644 --- a/docs/superpowers/specs/2026-04-09-hypothesis-backtesting-design.md +++ b/docs/superpowers/specs/2026-04-09-hypothesis-backtesting-design.md @@ -61,8 +61,8 @@ The `active.json` file lives on `main`. Each hypothesis branch (`hypothesis/-` — unique, used for branch and file names | -| `status` | `running` / `paused` / `concluded` | -| `priority` | 1–10 (higher = more important); auto-pause lowest when at capacity | +| `status` | `running` / `pending` / `concluded` | +| `priority` | 1–9 (higher = more important); determines queue order for `pending` hypotheses | | `hypothesis_type` | `statistical` (answer from existing data) or `implementation` (requires branch + forward testing) | | `min_days` | Minimum picks days before conclusion analysis runs | | `picks_log` | Dates when the runner collected picks on this branch | @@ -83,12 +83,14 @@ The `active.json` file lives on `main`. Each hypothesis branch (`hypothesis/.md`). Done — no branch created. 3. **Implementation path:** - a. Read `active.json`. If `running` count < 5, proceed. If at 5, auto-pause the entry with the lowest `priority` (set `status: "paused"`, keep branch alive). + a. Read `active.json`. If `running` count < 5, start immediately. If all 5 slots are occupied by running experiments, add the new hypothesis as `status: "pending"` — running experiments are never interrupted (pausing mid-experiment breaks the picks streak and invalidates the statistical comparison). b. Create branch `hypothesis/-` from `main`. c. Implement the minimal code change on the branch. d. Open a draft PR: title `hypothesis(): `, body describes the hypothesis, expected impact, and `min_days`. - e. Write new entry to `active.json` on `main` with `status: "running"`. - f. Print summary: branch name, PR number, expected conclusion date. + e. Write new entry to `active.json` on `main` with `status: "running"` (or `"pending"` if at capacity). + f. Print summary: branch name, PR number, expected start date (if pending), expected conclusion date (if running). + +**Pending → running promotion:** At the end of each daily runner cycle, after any experiments conclude, the runner checks for `pending` entries and promotes the highest-priority one to `running` if a slot opened up. **Priority scoring** (set at creation time): @@ -175,7 +177,7 @@ New "Hypotheses" tab in the Streamlit dashboard. | Hypothesis | Scanner | Status | Days | Picks | Expected Ready | Priority | |---|---|---|---|---|---|---| | Scan 3 expirations | options_flow | running | 3/14 | 4 | 2026-04-23 | 8 | -| ITM-only filter | options_flow | paused | 1/14 | 1 | — | 5 | +| ITM-only filter | options_flow | pending | 0/14 | 0 | waiting for slot | 5 | **Concluded experiments table:**