agentpace 0.13.2__tar.gz → 0.13.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {agentpace-0.13.2 → agentpace-0.13.3}/CHANGELOG.md +15 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/CITATION.cff +1 -1
- {agentpace-0.13.2 → agentpace-0.13.3}/PKG-INFO +3 -3
- {agentpace-0.13.2 → agentpace-0.13.3}/README.md +2 -2
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/__init__.py +1 -1
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/claims.py +35 -2
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_claims.py +117 -1
- {agentpace-0.13.2 → agentpace-0.13.3}/.claude-plugin/marketplace.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.gitattributes +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/ISSUE_TEMPLATE/ingest-found-nothing.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/ISSUE_TEMPLATE/remove-my-rows.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/dependabot.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/pull_request_template.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/workflows/ci.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/workflows/publish.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.github/workflows/validate-data.yml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/.gitignore +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/CODE_OF_CONDUCT.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/CONTRIBUTING.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/LICENSE +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/SECURITY.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/data/LICENSE +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/data/README.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/data/runs/4546788e7930eccd-2026-W40-2026-W45.jsonl +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/data/runs/4546788e7930eccd-2026-W44-2026-W45.jsonl +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/data/runs/4546788e7930eccd-2026-W45-2026-W49.jsonl +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/.nojekyll +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/DESIGN.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/assets/backtest-coverage.svg +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/assets/hero.webp +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/assets/run-ranges.svg +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/assets/social-preview.png +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/backtest.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/backtest.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/cli.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/index.html +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/releasing.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/robots.txt +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/sitemap.xml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/skill-smoke.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/docs/verify-adapter.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/examples/plan.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/examples/quote-plan.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/__init__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/model_offset/PROTOCOL.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/model_offset/__init__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/model_offset/__main__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/model_offset/offset.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/model_offset/report.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/experiments/model_offset/report.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/pyproject.toml +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/schema/run.schema.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/schema/turn.schema.json +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/skills/agentpace/SKILL.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/skills/agentpace/assets/portable-prompt.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/skills/agentpace/references/method.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/skills/pace-estimate/SKILL.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/skills/pace-log/SKILL.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/skills/pace-share/SKILL.md +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/__main__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/__init__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/base.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/claude_code.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/cline.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/codex.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/gemini_cli.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/adapters/opencode.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/backtest.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/cache.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/charts.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/classify.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/cli.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/clock.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/estimate.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/forecasts.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/ingest.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/paths.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/pseudonym.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/py.typed +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/render.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/report.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/schema.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/share.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/site.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/turns.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/src/agentpace/validate.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/__init__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/fixtures/__init__.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/fixtures/cline_tasks.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/fixtures/gemini_cli.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/fixtures/opencode.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/synthetic.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_backtest.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_classify.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_cli.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_cline.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_clock.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_codex.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_counts.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_docs.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_estimate.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_forecasts.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_frozen_method.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_gemini_cli.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_ingest.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_labels.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_model_offset.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_opencode.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_outcomes.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_plan_risk.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_review_capacity.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_schema.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_share_validate.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_site.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_skills.py +0 -0
- {agentpace-0.13.2 → agentpace-0.13.3}/tests/test_turns.py +0 -0
|
@@ -4,6 +4,21 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) an
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.13.3 - 2026-12-06
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- README: the locked holdout's result beside its status, in seven generated claims. On 44 whole sessions from 2026-W46 to 2026-W49 the P80 covered 100% and the P90 100%; a single task's P80 covered 82.7% (CI 77.0% to 87.9%), and week by week it ran from 71% to 90%.
|
|
12
|
+
- **Fixed before any number was seen:** that sentence and "This is the forward test.", word for word, five claims.
|
|
13
|
+
- **Added after they were seen:** one sentence, two claims. Both whole-session figures came out above target, which is a miss on the cautious side, so the README prints the P50's coverage, 75%, and the typical P90 to P50 ratio, 3.3x (2.7x on the selection weeks).
|
|
14
|
+
- The whole-session figures carry no interval: the report holds none, and with every session inside its P80 a session bootstrap would print 100% to 100%.
|
|
15
|
+
- The 44 are the sessions with 5 or more completed runs. The single-task and weekly figures cover all 51 Claude Code sessions of those weeks, 1,199 runs.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- README: the time-split whole-session test is no longer called "the forward test of plan totals". It scores the weeks that chose the method; the forward test is the locked holdout. The report and DESIGN section 6 keep the old name until 0.14.0.
|
|
20
|
+
- No published number moves. `backtest.py`, `docs/backtest.json` and `docs/backtest.md` are unchanged.
|
|
21
|
+
|
|
7
22
|
## 0.13.2 - 2026-12-06
|
|
8
23
|
|
|
9
24
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentpace
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.3
|
|
4
4
|
Summary: Stop estimating agent work in human weeks. agentpace measures how long coding agents actually take: P50/P80/P90 ranges from real Claude Code and Codex runs, the human part stated apart, never derived. Open CC0 dataset, zero-dependency Python CLI, agent skill.
|
|
5
5
|
Project-URL: Homepage, https://mohamedzhioua.github.io/agentpace/
|
|
6
6
|
Project-URL: Repository, https://github.com/mohamedzhioua/agentpace
|
|
@@ -216,12 +216,12 @@ There is also a [leaderboard](https://mohamedzhioua.github.io/agentpace/) of med
|
|
|
216
216
|
|
|
217
217
|
Every number here comes from the published rows. `agentpace backtest` regenerates them, and CI fails if they drift. The headline scores Claude Code sessions, the population the method was chosen on. Codex is [scored on its own](docs/backtest.md#by-harness). The [full report](docs/backtest.md) has every split, every baseline and every loss.
|
|
218
218
|
|
|
219
|
-
Forecasts use only what is known before a run: model, kind and risk. Whole sessions are held out, so no run can leak into its own forecast. A session counts in the week it began, with every run it made later. These headline numbers come from the same time folds that chose the method, so treat them as slightly optimistic. Weeks after <!-- claim:selection_last_week -->2026-W45<!-- /claim --> form a locked holdout that never takes part in selection. Its status: <!-- claim:locked_status -->ok<!-- /claim -->. Every interval below is a 95% bootstrap interval that resamples whole sessions.
|
|
219
|
+
Forecasts use only what is known before a run: model, kind and risk. Whole sessions are held out, so no run can leak into its own forecast. A session counts in the week it began, with every run it made later. These headline numbers come from the same time folds that chose the method, so treat them as slightly optimistic. Weeks after <!-- claim:selection_last_week -->2026-W45<!-- /claim --> form a locked holdout that never takes part in selection. Its status: <!-- claim:locked_status -->ok<!-- /claim -->. On <!-- claim:locked_sessions -->44<!-- /claim --> whole sessions from those weeks the P80 covered <!-- claim:locked_plan_p80 -->100%<!-- /claim --> and the P90 <!-- claim:locked_plan_p90 -->100%<!-- /claim -->; a single task's P80 covered <!-- claim:locked_task_p80 -->82.7% (CI 77.0% to 87.9%)<!-- /claim -->, and week by week it ran from <!-- claim:locked_weekly_p80 -->71% to 90%<!-- /claim -->. This is the forward test. Coverage above target is also a miss, on the cautious side: on those sessions the P50 covered <!-- claim:locked_plan_p50 -->75%<!-- /claim -->, and the P90 was typically <!-- claim:locked_plan_width -->3.3x<!-- /claim --> the P50. Every interval below is a 95% bootstrap interval that resamples whole sessions.
|
|
220
220
|
|
|
221
221
|
<details>
|
|
222
222
|
<summary>Every number, with intervals and baselines</summary>
|
|
223
223
|
|
|
224
|
-
**Whole sessions.** Each of <!-- claim:plan_sessions -->64<!-- /claim --> later sessions with at least 5 completed runs was predicted from sessions that began in earlier weeks.
|
|
224
|
+
**Whole sessions.** Each of <!-- claim:plan_sessions -->64<!-- /claim --> later sessions with at least 5 completed runs was predicted from sessions that began in earlier weeks. These sessions come from the weeks that chose the method; the forward test above scores plan totals on the weeks after them. Another test, with whole projects held out, is listed under "Where it falls short" below.
|
|
225
225
|
|
|
226
226
|
| Forecast | Target | Got |
|
|
227
227
|
|---|---:|---:|
|
|
@@ -189,12 +189,12 @@ There is also a [leaderboard](https://mohamedzhioua.github.io/agentpace/) of med
|
|
|
189
189
|
|
|
190
190
|
Every number here comes from the published rows. `agentpace backtest` regenerates them, and CI fails if they drift. The headline scores Claude Code sessions, the population the method was chosen on. Codex is [scored on its own](docs/backtest.md#by-harness). The [full report](docs/backtest.md) has every split, every baseline and every loss.
|
|
191
191
|
|
|
192
|
-
Forecasts use only what is known before a run: model, kind and risk. Whole sessions are held out, so no run can leak into its own forecast. A session counts in the week it began, with every run it made later. These headline numbers come from the same time folds that chose the method, so treat them as slightly optimistic. Weeks after <!-- claim:selection_last_week -->2026-W45<!-- /claim --> form a locked holdout that never takes part in selection. Its status: <!-- claim:locked_status -->ok<!-- /claim -->. Every interval below is a 95% bootstrap interval that resamples whole sessions.
|
|
192
|
+
Forecasts use only what is known before a run: model, kind and risk. Whole sessions are held out, so no run can leak into its own forecast. A session counts in the week it began, with every run it made later. These headline numbers come from the same time folds that chose the method, so treat them as slightly optimistic. Weeks after <!-- claim:selection_last_week -->2026-W45<!-- /claim --> form a locked holdout that never takes part in selection. Its status: <!-- claim:locked_status -->ok<!-- /claim -->. On <!-- claim:locked_sessions -->44<!-- /claim --> whole sessions from those weeks the P80 covered <!-- claim:locked_plan_p80 -->100%<!-- /claim --> and the P90 <!-- claim:locked_plan_p90 -->100%<!-- /claim -->; a single task's P80 covered <!-- claim:locked_task_p80 -->82.7% (CI 77.0% to 87.9%)<!-- /claim -->, and week by week it ran from <!-- claim:locked_weekly_p80 -->71% to 90%<!-- /claim -->. This is the forward test. Coverage above target is also a miss, on the cautious side: on those sessions the P50 covered <!-- claim:locked_plan_p50 -->75%<!-- /claim -->, and the P90 was typically <!-- claim:locked_plan_width -->3.3x<!-- /claim --> the P50. Every interval below is a 95% bootstrap interval that resamples whole sessions.
|
|
193
193
|
|
|
194
194
|
<details>
|
|
195
195
|
<summary>Every number, with intervals and baselines</summary>
|
|
196
196
|
|
|
197
|
-
**Whole sessions.** Each of <!-- claim:plan_sessions -->64<!-- /claim --> later sessions with at least 5 completed runs was predicted from sessions that began in earlier weeks.
|
|
197
|
+
**Whole sessions.** Each of <!-- claim:plan_sessions -->64<!-- /claim --> later sessions with at least 5 completed runs was predicted from sessions that began in earlier weeks. These sessions come from the weeks that chose the method; the forward test above scores plan totals on the weeks after them. Another test, with whole projects held out, is listed under "Where it falls short" below.
|
|
198
198
|
|
|
199
199
|
| Forecast | Target | Got |
|
|
200
200
|
|---|---:|---:|
|
|
@@ -140,10 +140,42 @@ def values(
|
|
|
140
140
|
"project_plan_gap": f"{held_low:+.0f} to {held_high:+.0f}",
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
def spread(field: str) -> str:
|
|
144
|
-
values = [week[field] for week in
|
|
143
|
+
def spread(field: str, chosen: Sequence[dict[str, Any]] = weeks) -> str:
|
|
144
|
+
values = [week[field] for week in chosen]
|
|
145
145
|
return f"{min(values):.0f}% to {max(values):.0f}%"
|
|
146
146
|
|
|
147
|
+
# The forward test: the shipped method on weeks after selection, in the headline's formats.
|
|
148
|
+
# Its whole-session figures carry no interval in the report, so they print without one.
|
|
149
|
+
locked = report["locked"]
|
|
150
|
+
forward = dict.fromkeys(
|
|
151
|
+
(
|
|
152
|
+
"locked_sessions",
|
|
153
|
+
"locked_plan_p50",
|
|
154
|
+
"locked_plan_p80",
|
|
155
|
+
"locked_plan_p90",
|
|
156
|
+
"locked_plan_width",
|
|
157
|
+
"locked_task_p80",
|
|
158
|
+
"locked_weekly_p80",
|
|
159
|
+
),
|
|
160
|
+
"not available",
|
|
161
|
+
)
|
|
162
|
+
if locked["status"] == "ok":
|
|
163
|
+
locked_plan = locked["plans"]["agentpace"]
|
|
164
|
+
locked_ours = locked["tracks"]["pre-run"][winner]["session"]
|
|
165
|
+
locked_weeks = [w for w in report["splits"]["time"]["by_week"] if w["period"] == "locked"]
|
|
166
|
+
forward = {
|
|
167
|
+
# One whole-session forecast per qualifying session, so this counts the plan figures.
|
|
168
|
+
"locked_sessions": str(locked["qualifying_sessions"]),
|
|
169
|
+
"locked_plan_p50": f"{locked_plan['coverage50']:.0f}%",
|
|
170
|
+
"locked_plan_p80": f"{locked_plan['coverage80']:.0f}%",
|
|
171
|
+
"locked_plan_p90": f"{locked_plan['coverage90']:.0f}%",
|
|
172
|
+
"locked_plan_width": f"{locked_plan['width']:.1f}x",
|
|
173
|
+
"locked_task_p80": ci(
|
|
174
|
+
locked_ours["coverage80"], locked["intervals"]["coverage80"], 1, "%"
|
|
175
|
+
),
|
|
176
|
+
"locked_weekly_p80": spread("coverage80_session", locked_weeks),
|
|
177
|
+
}
|
|
178
|
+
|
|
147
179
|
def gap(name: str) -> str:
|
|
148
180
|
low, high = found["rival_minus_ours"][name]
|
|
149
181
|
return f"{low:+.0f} to {high:+.0f}"
|
|
@@ -197,6 +229,7 @@ def values(
|
|
|
197
229
|
"latest_week_sessions": str(latest["sessions"]),
|
|
198
230
|
"selection_last_week": report["selection"]["last_week"],
|
|
199
231
|
"locked_status": report["locked"]["status"],
|
|
232
|
+
**forward,
|
|
200
233
|
"project_p80": project_p80,
|
|
201
234
|
"project_top_harness": project_top_harness,
|
|
202
235
|
"project_top_sessions": project_top_sessions,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import contextlib
|
|
2
|
+
import copy
|
|
2
3
|
import io
|
|
3
4
|
import json
|
|
4
5
|
import re
|
|
@@ -362,9 +363,124 @@ class ProjectPlans(unittest.TestCase):
|
|
|
362
363
|
self.assertNotIn("one contributor", bullet)
|
|
363
364
|
self.assertIn("never chooses the method", bullet)
|
|
364
365
|
self.assertIn("docs/backtest.md#whole-sessions-projects-held-out-oracle-structure", bullet)
|
|
365
|
-
self.
|
|
366
|
+
self.assertNotIn("forward test of plan totals", self.readme)
|
|
366
367
|
self.assertNotIn("This is the only direct test of plan totals.", self.readme)
|
|
367
368
|
|
|
368
369
|
|
|
370
|
+
LOCKED_CLAIMS = (
|
|
371
|
+
"locked_sessions",
|
|
372
|
+
"locked_plan_p50",
|
|
373
|
+
"locked_plan_p80",
|
|
374
|
+
"locked_plan_p90",
|
|
375
|
+
"locked_plan_width",
|
|
376
|
+
"locked_task_p80",
|
|
377
|
+
"locked_weekly_p80",
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
# The forward test's sentence, fixed word for word, with each claim shown by its name.
|
|
381
|
+
FORWARD_TEST = (
|
|
382
|
+
"On {locked_sessions} whole sessions from those weeks the P80 covered {locked_plan_p80} "
|
|
383
|
+
"and the P90 {locked_plan_p90}; a single task's P80 covered {locked_task_p80}, and week by "
|
|
384
|
+
"week it ran from {locked_weekly_p80}. This is the forward test. Coverage above target is "
|
|
385
|
+
"also a miss, on the cautious side: on those sessions the P50 covered {locked_plan_p50}, "
|
|
386
|
+
"and the P90 was typically {locked_plan_width} the P50."
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
class LockedHoldout(unittest.TestCase):
|
|
391
|
+
"""The forward test reaches the README only through claims read from the locked holdout."""
|
|
392
|
+
|
|
393
|
+
@classmethod
|
|
394
|
+
def setUpClass(cls):
|
|
395
|
+
cls.rows = schema.read_dataset([paths.seed_dir()])
|
|
396
|
+
cls.report = json.loads((REPO / "docs" / "backtest.json").read_text(encoding="utf-8"))
|
|
397
|
+
cls.readme = (REPO / "README.md").read_text(encoding="utf-8")
|
|
398
|
+
|
|
399
|
+
def known(self, locked, locked_weeks=()):
|
|
400
|
+
found = copy.deepcopy(self.report)
|
|
401
|
+
found["locked"] = locked
|
|
402
|
+
by_week = [w for w in found["splits"]["time"]["by_week"] if w["period"] != "locked"]
|
|
403
|
+
found["splits"]["time"]["by_week"] = by_week + list(locked_weeks)
|
|
404
|
+
return claims.values(self.rows, found)
|
|
405
|
+
|
|
406
|
+
def test_values_follow_the_report(self):
|
|
407
|
+
# Not today's values, so a claim that stopped reading the report would fail here.
|
|
408
|
+
winner = self.report["selection"]["winner"]
|
|
409
|
+
locked = {
|
|
410
|
+
"status": "ok",
|
|
411
|
+
"qualifying_sessions": 23,
|
|
412
|
+
"plans": {
|
|
413
|
+
"agentpace": {
|
|
414
|
+
"coverage50": 52.17,
|
|
415
|
+
"coverage80": 78.26,
|
|
416
|
+
"coverage90": 91.3,
|
|
417
|
+
"width": 2.84,
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"tracks": {"pre-run": {winner: {"session": {"coverage80": 76.54}}}},
|
|
421
|
+
"intervals": {"coverage80": [70.12, 83.98]},
|
|
422
|
+
}
|
|
423
|
+
weeks = [
|
|
424
|
+
{"week": "2027-W01", "period": "locked", "coverage80_session": 64.4},
|
|
425
|
+
{"week": "2027-W02", "period": "locked", "coverage80_session": 93.6},
|
|
426
|
+
]
|
|
427
|
+
known = self.known(locked, weeks)
|
|
428
|
+
self.assertEqual(
|
|
429
|
+
[known[name] for name in LOCKED_CLAIMS],
|
|
430
|
+
["23", "52%", "78%", "91%", "2.8x", "76.5% (CI 70.1% to 84.0%)", "64% to 94%"],
|
|
431
|
+
)
|
|
432
|
+
# The selection weeks still set the headline spread.
|
|
433
|
+
self.assertEqual(known["weekly_p80"], claims.values(self.rows, self.report)["weekly_p80"])
|
|
434
|
+
|
|
435
|
+
def test_values_match_the_published_report(self):
|
|
436
|
+
locked = self.report["locked"]
|
|
437
|
+
self.assertEqual(locked["status"], "ok")
|
|
438
|
+
winner = self.report["selection"]["winner"]
|
|
439
|
+
ours = locked["tracks"]["pre-run"][winner]["session"]
|
|
440
|
+
weeks = [
|
|
441
|
+
w["coverage80_session"]
|
|
442
|
+
for w in self.report["splits"]["time"]["by_week"]
|
|
443
|
+
if w["period"] == "locked"
|
|
444
|
+
]
|
|
445
|
+
known = claims.values(self.rows, self.report)
|
|
446
|
+
self.assertEqual(known["locked_sessions"], str(locked["qualifying_sessions"]))
|
|
447
|
+
plan = locked["plans"]["agentpace"]
|
|
448
|
+
self.assertEqual(known["locked_plan_p50"], f"{plan['coverage50']:.0f}%")
|
|
449
|
+
self.assertEqual(known["locked_plan_p80"], f"{plan['coverage80']:.0f}%")
|
|
450
|
+
self.assertEqual(known["locked_plan_p90"], f"{plan['coverage90']:.0f}%")
|
|
451
|
+
self.assertEqual(known["locked_plan_width"], f"{plan['width']:.1f}x")
|
|
452
|
+
low, high = locked["intervals"]["coverage80"]
|
|
453
|
+
self.assertEqual(
|
|
454
|
+
known["locked_task_p80"],
|
|
455
|
+
f"{ours['coverage80']:.1f}% (CI {low:.1f}% to {high:.1f}%)",
|
|
456
|
+
)
|
|
457
|
+
self.assertEqual(known["locked_weekly_p80"], f"{min(weeks):.0f}% to {max(weeks):.0f}%")
|
|
458
|
+
|
|
459
|
+
def test_not_available_unless_it_ran(self):
|
|
460
|
+
locked = {
|
|
461
|
+
"status": "not enough data (12 of 20 sessions with 5+ runs)",
|
|
462
|
+
"folds": ["2027-W01"],
|
|
463
|
+
"min_sessions": 20,
|
|
464
|
+
"qualifying_sessions": 12,
|
|
465
|
+
}
|
|
466
|
+
weeks = [{"week": "2027-W01", "period": "locked", "coverage80_session": 50.0}]
|
|
467
|
+
known = self.known(locked, weeks)
|
|
468
|
+
self.assertEqual(known["locked_status"], locked["status"])
|
|
469
|
+
for name in LOCKED_CLAIMS:
|
|
470
|
+
with self.subTest(name=name):
|
|
471
|
+
self.assertEqual(known[name], "not available")
|
|
472
|
+
|
|
473
|
+
def test_the_readme_carries_the_markers_after_the_status(self):
|
|
474
|
+
paragraph = next(
|
|
475
|
+
line for line in self.readme.splitlines() if "<!-- claim:locked_status -->" in line
|
|
476
|
+
)
|
|
477
|
+
after = paragraph[paragraph.index("<!-- claim:locked_status -->") :]
|
|
478
|
+
for name in LOCKED_CLAIMS:
|
|
479
|
+
self.assertEqual(self.readme.count(f"<!-- claim:{name} -->"), 1, name)
|
|
480
|
+
self.assertIn(f"<!-- claim:{name} -->", after)
|
|
481
|
+
named = claims._MARKER.sub(lambda match: "{" + match.group(1) + "}", paragraph)
|
|
482
|
+
self.assertIn(f"Its status: {{locked_status}}. {FORWARD_TEST} Every interval below", named)
|
|
483
|
+
|
|
484
|
+
|
|
369
485
|
if __name__ == "__main__":
|
|
370
486
|
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|