agentpace 0.12.2__tar.gz → 0.12.4__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.12.2 → agentpace-0.12.4}/CHANGELOG.md +21 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/CITATION.cff +1 -1
- {agentpace-0.12.2 → agentpace-0.12.4}/PKG-INFO +1 -1
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/DESIGN.md +13 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/cli.md +1 -1
- agentpace-0.12.4/experiments/model_offset/PROTOCOL.md +49 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/__init__.py +1 -1
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/schema.py +14 -11
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/share.py +10 -2
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_ingest.py +18 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_share_validate.py +82 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.gitattributes +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/ISSUE_TEMPLATE/ingest-found-nothing.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/ISSUE_TEMPLATE/remove-my-rows.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/dependabot.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/pull_request_template.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/workflows/ci.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/workflows/publish.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.github/workflows/validate-data.yml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/.gitignore +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/CODE_OF_CONDUCT.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/CONTRIBUTING.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/LICENSE +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/README.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/SECURITY.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/data/LICENSE +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/data/README.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/data/runs/4546788e7930eccd-2026-W40-2026-W45.jsonl +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/data/runs/4546788e7930eccd-2026-W44-2026-W45.jsonl +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/.nojekyll +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/assets/backtest-coverage.svg +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/assets/hero.webp +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/assets/run-ranges.svg +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/assets/social-preview.png +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/backtest.json +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/backtest.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/index.html +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/releasing.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/robots.txt +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/sitemap.xml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/docs/verify-adapter.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/examples/plan.json +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/examples/quote-plan.json +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/pyproject.toml +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/schema/run.schema.json +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/schema/turn.schema.json +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/skills/agentpace/SKILL.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/skills/agentpace/assets/portable-prompt.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/skills/agentpace/references/method.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/skills/pace-estimate/SKILL.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/skills/pace-log/SKILL.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/skills/pace-share/SKILL.md +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/__main__.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/__init__.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/base.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/claude_code.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/cline.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/codex.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/gemini_cli.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/adapters/opencode.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/backtest.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/cache.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/charts.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/claims.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/classify.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/cli.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/estimate.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/forecasts.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/ingest.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/paths.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/pseudonym.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/py.typed +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/render.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/report.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/site.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/turns.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/src/agentpace/validate.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/__init__.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/fixtures/__init__.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/fixtures/cline_tasks.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/fixtures/gemini_cli.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/fixtures/opencode.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/synthetic.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_backtest.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_claims.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_classify.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_cli.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_cline.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_codex.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_counts.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_docs.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_estimate.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_forecasts.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_frozen_method.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_gemini_cli.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_labels.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_opencode.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_outcomes.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_plan_risk.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_review_capacity.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_schema.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_site.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_skills.py +0 -0
- {agentpace-0.12.2 → agentpace-0.12.4}/tests/test_turns.py +0 -0
|
@@ -4,6 +4,27 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) an
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.12.4 - 2026-11-09
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- A rows file that is not UTF-8 is refused as `<file>: file is not UTF-8` with exit 2, instead of the codec's message.
|
|
12
|
+
- `share --write` into a folder it cannot write says so, leaves everything as it was and exits 2, instead of a traceback.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- `docs/cli.md` says to run `ingest` by hand when the quiet hook stops producing rows: it prints what the hook could not, such as a store line that is not valid JSON.
|
|
17
|
+
|
|
18
|
+
No published number moved.
|
|
19
|
+
|
|
20
|
+
## 0.12.3 - 2026-11-09
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- `model-offset-v1`, a challenger registered before any 2026-W46 row was seen, scored only on the locked holdout under a frozen win rule (DESIGN sections 6 and 11; `experiments/model_offset/PROTOCOL.md`). It applies only where the lookup stops at an unseen model under a recorded kind and risk. The five-candidate selection stays closed, and a win could ship only by re-registration in a minor release. Nothing in the estimator changes.
|
|
25
|
+
|
|
26
|
+
No published number moved.
|
|
27
|
+
|
|
7
28
|
## 0.12.2 - 2026-11-09
|
|
8
29
|
|
|
9
30
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentpace
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.4
|
|
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
|
|
@@ -214,6 +214,8 @@ for each draw:
|
|
|
214
214
|
|
|
215
215
|
**Pre-registered selection (E2).** There are at most five candidates: session-weighted shrinkage, unweighted shrinkage, a back-off table, a per-kind table, and global quantiles. The primary metric is session-weighted pinball loss summed over 0.5, 0.8 and 0.9 on the time split. Ties inside the session-bootstrap interval go to the simpler model. The winner ships as the task-level default, and all losses print regardless. The session effect and `P_eff` stay in every case, because baselines cannot produce totals.
|
|
216
216
|
|
|
217
|
+
*Challengers (2026-11-09).* The five-candidate selection is closed and its winner is the incumbent. A challenger is a method registered by name, definition, streams and win rule in `experiments/` before any row from the weeks it is scored on exists. It is scored only on the locked holdout, against the incumbent, never on selection folds, and its forecasts come from streams of its own, so no published number moves. It ships only by re-registration in `CHANGELOG.md` and this section, as a minor release. One is registered: `model-offset-v1` (section 11).
|
|
218
|
+
|
|
217
219
|
**Plan-level test.** Each held-out session is treated as a plan and predicted from earlier data only. The actual value is the span of its runs on the session clock: `max(offset_s + duration_s) - min(offset_s)`. This is the only direct test of the total, the number users actually care about, and it needs D2. It is labeled "oracle-structure" for two reasons: real dependencies are not recorded, so `CP` falls back to the longest single run, and the session's observed peak concurrency stands in for its cap even though that is itself an outcome. So it tests the throughput and session-effect terms, not dependency planning, and the report must say so.
|
|
218
220
|
|
|
219
221
|
**Idle-cap sensitivity.** The 900 s cap is `ingest --idle-cap`. Published rows cannot be re-clipped without the raw transcripts, so this check runs locally with `ingest --idle-cap` and `backtest --data`, and is not a README claim. The results are in section 11.
|
|
@@ -509,6 +511,17 @@ Fable 5.1 ruled on 2026-11-09, with an independent opinion from Codex (gpt-6-ast
|
|
|
509
511
|
- **Cleanup (0.12.1, 0.12.2):** count messages agree in number, documentation corrections, and clean errors for a bad rows line and a contribution file another program holds open.
|
|
510
512
|
- The W46 data change takes the next patch when that week ends, and waits for nothing.
|
|
511
513
|
|
|
514
|
+
### Ruling for the 0.13 round
|
|
515
|
+
|
|
516
|
+
Fable 5.1 ruled on 2026-11-09, with an independent opinion from Codex (gpt-6-astra), both at the highest effort; the master verified every code claim in the opinion first.
|
|
517
|
+
|
|
518
|
+
- **A challenger is registered, the estimator is not changed.** The rows show a model × kind interaction (Opus over Sonnet by about 40 on features, 4.5 on other work, 2 on research, 0.7 on reviews), confounded with what each model was given, and an unseen model under a seen kind × risk still takes that cell's mean. `model-offset-v1`, a ridge-shrunk crossed model offset applied only at that unseen node, with its uncertainty added to the cell variance, is registered in `experiments/` before any 2026-W46 row was seen. It is scored on the locked holdout only, against `shrunk`, with its own streams and a win rule frozen in `experiments/model_offset/PROTOCOL.md` (paired session-bootstrap pinball below zero on all and on affected Claude Code sessions; coverage within 5 points; plan and Codex loss within 5%; at least 10 affected sessions and 50 affected rows; one decision per data change; sunset at the W52 data change). The five-candidate selection stays closed; a win ships only by re-registration in a minor release.
|
|
519
|
+
- **Declined:** restating a data fact beside the README example outside a claim marker; applying the offset to thin seen cells; session-weighting the offset.
|
|
520
|
+
- **Distribution:** the repository is a Claude Code plugin marketplace through `.claude-plugin/marketplace.json`, with no bundled hook and no version field; the route is advertised only after a recorded real install (section 8).
|
|
521
|
+
- **Presentation and contributors:** a plain first screen with a "Reading the output" list and the example output intact; one install location; contributors install from PyPI, preview before any clone, and clone only to write and validate, because `share` dedupes against the output folder alone.
|
|
522
|
+
- **Cleanup:** the quiet hook keeps its contract and the manual `ingest` is the documented recovery; a non-UTF-8 rows file and an unwritable destination are clean exit-2 refusals; the skill templates leave `risk` out except for research.
|
|
523
|
+
- The W46 data change takes the next patch when that week ends, and waits for nothing.
|
|
524
|
+
|
|
512
525
|
## 12. Sources
|
|
513
526
|
|
|
514
527
|
Repos, audited at: `kiloloop/agent-estimate@8857979`, `MMMProd-Org/claude-eta@5448ae4` (the `mmmprod/claude-eta` URL redirects there), `ZhangHanDong/agent-estimation@71a4697`, `ecappa/web-dev-estimation@c61fb1c`, `MedAdemBHA/mythical-agent-month@b60165f`.
|
|
@@ -63,7 +63,7 @@ Reads a harness's local history and merges the rows into the store. Only timesta
|
|
|
63
63
|
| `--out` | `~/.agentpace/runs.jsonl` | The rows file to merge into. |
|
|
64
64
|
| `--idle-cap` | `900` | Seconds an idle gap may contribute, inside a run's duration and between runs on the session clock. A non-default cap neither reads nor writes the cache. |
|
|
65
65
|
| `--kind-map NAME=KIND` | none | Map one of your agent types to a task kind. Repeatable. |
|
|
66
|
-
| `--hook` | off | Read a Claude Code `SubagentStop` payload on stdin and ingest that session quietly. Prints nothing and always exits 0. Gives up after 5 s if the store is busy. |
|
|
66
|
+
| `--hook` | off | Read a Claude Code `SubagentStop` payload on stdin and ingest that session quietly. Prints nothing and always exits 0. Gives up after 5 s if the store is busy. Because it cannot report, run `agentpace ingest` by hand when runs stop appearing: it prints what the hook could not, such as a store line that is not valid JSON. |
|
|
67
67
|
|
|
68
68
|
stdout: nothing. stderr: a note when the source is experimental, then the report (files seen, read from cache, rows produced, empty runs, unreadable files, unparsed lines, zero-duration, still running, and skipped files or runs when there are any), then `store now holds: N rows`.
|
|
69
69
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# `model-offset-v1`: registration protocol
|
|
2
|
+
|
|
3
|
+
**Status:** registered, frozen. **Registered:** 2026-11-09, on `main` at `ed9f597` (agentpace 0.12.2), before any run row from ISO week 2026-W46 or later existed in `data/runs/`. **Ruled by:** Fable 5.1, with an independent opinion from Codex (gpt-6-astra), both at the highest effort (DESIGN section 11, "Ruling for the 0.13 round").
|
|
4
|
+
|
|
5
|
+
This file is the registration. Its definition, streams, gates and decision rule do not change after it is pushed: any change is `model-offset-v2`, registered before the weeks it is scored on. DESIGN section 6 ("Challengers") states how a challenger relates to the closed five-candidate selection.
|
|
6
|
+
|
|
7
|
+
**Why.** The rows show a model × kind interaction, confounded with what each model was given, and the shipped estimator's lookup stops at an unseen model under a seen `kind × risk`, taking that cell's mean whatever the model. `model-offset-v1` asks whether model information carried across kinds forecasts that case better. It changes nothing in the shipped estimator.
|
|
8
|
+
|
|
9
|
+
## Where
|
|
10
|
+
|
|
11
|
+
`experiments/model_offset/PROTOCOL.md` (this file), `experiments/__init__.py`, `experiments/model_offset/__init__.py`, `experiments/model_offset/offset.py`, `experiments/model_offset/__main__.py`, and generated `report.md` and `report.json` beside them. mypy `files` gains `experiments`; ruff already covers `.`; the wheel is untouched.
|
|
12
|
+
|
|
13
|
+
## Fit, per fold, on `fold.train`
|
|
14
|
+
|
|
15
|
+
Rows from every harness through `est._usable`. `base = est.fit(fold.train, "shrunk")`. Groups `g = (task_kind, risk)`; `y_i = ln duration_s`; `ȳ_g` the unweighted group mean; `z_i = y_i − ȳ_g`; `K` models seen in training; `p_g` the model proportions in `g`; `x_i = e_{m_i} − p_g`. `A = Σ x_i x_iᵀ + 30·I`; `β = A⁻¹ Σ x_i z_i` (Gauss-Jordan, stdlib); `s² = Σ (z_i − x_iᵀβ)² / N`; `C = s²·A⁻¹`. Groups with one model contribute zero rows of information automatically.
|
|
16
|
+
|
|
17
|
+
## Query
|
|
18
|
+
|
|
19
|
+
`L = base.locate(query)`. If `L.missing != "model"` or the model is not among the `K`, return `L` unchanged. Otherwise `q = e_model − p_g` for the query's group, `mu' = L.mu + qᵀβ`, `v' = L.v + qᵀCq`, every other field unchanged, via `dataclasses.replace`. Implemented as `class OffsetModel(est.Model)` overriding `locate`, built from `base` plus `β`, `C`, `p_g`, model index.
|
|
20
|
+
|
|
21
|
+
## Forecasts
|
|
22
|
+
|
|
23
|
+
Task: `backtest._candidate`'s loop repeated with `offset_model` in place of `est.fit(...)`: the same query `{task_kind, risk, model, size}`, `est.cell_quantiles(offset_model, query, backtest.CELL_DRAWS, rng)` called once per distinct query per fold and reused for that fold's other completed rows with the same query, for every fold in `[*time, *locked]`, `rng = random.Random(f"{backtest.SEED}:model-offset-v1:False")`, one stream in fold order. `time` and `locked` are `backtest.time_folds` over every row of `data/runs/`, split at `backtest.SELECTION_LAST_WEEK` as `backtest.run` splits them. Incumbent: `backtest._forecast_folds([*time, *locked], False, backtest.SEED)["shrunk"]`, the report's own forecasts. Plan: the `plan_forecasts` loop repeated with `est.estimate(offset_model, tasks, cap, backtest.PLAN_DRAWS, backtest.SEED)` on locked Claude Code sessions with 5+ completed runs; incumbent from `backtest.plan_forecasts(locked, "shrunk", SEED, "claude-code")`. Selection folds are forecast so the stream is consumed in order, and never scored or printed.
|
|
24
|
+
|
|
25
|
+
## Affected
|
|
26
|
+
|
|
27
|
+
A held-out row whose challenger `Located` differs from the incumbent's. A session is affected when any of its rows is.
|
|
28
|
+
|
|
29
|
+
## Win rule
|
|
30
|
+
|
|
31
|
+
- G0, gates: `docs/backtest.json` `locked.status == "ok"`, at least 10 affected Claude Code sessions, at least 50 affected Claude Code rows.
|
|
32
|
+
- G1: `backtest.intervals({"shrunk": ours, "model-offset-v1": theirs}, "shrunk", ["model-offset-v1"], random.Random(f"{SEED}:model-offset-v1:intervals"))["rival_minus_ours"]["model-offset-v1"]` has its upper end below zero, on all Claude Code locked forecasts and again on the affected sessions' forecasts (a second `Random` with suffix `:affected`).
|
|
33
|
+
- G2: challenger session-weighted P80 and P90 coverage on Claude Code locked rows at least the incumbent's minus 5 points.
|
|
34
|
+
- G3: plan pinball (row-weighted, oracle-structure) at most 1.05 times the incumbent's, point estimate.
|
|
35
|
+
- G4: with at least 50 Codex locked rows, row-weighted Codex task pinball at most 1.05 times the incumbent's; fewer rows: "not evaluable", recorded, not blocking.
|
|
36
|
+
- Decision: at each data change, if G0 holds, decide once: "win" when G1-G4 hold; "lose" when G1's lower end is above zero; "not shown" otherwise; both close the experiment. If G0 has not held by the data change that closes 2026-W52, close as "not testable". Any change to the definition is `model-offset-v2`, registered before the weeks it is scored on.
|
|
37
|
+
- Promotion after a win is its own ruling and a minor release: a sixth `Method` appended last, `select` restricted to the first five, the pin test re-pinned by re-registration, a second frozen fixture, and the only change `locate` will have had since W45.
|
|
38
|
+
|
|
39
|
+
## Report
|
|
40
|
+
|
|
41
|
+
`report.md`, `report.json`, regenerated by `python -m experiments.model_offset`, checked by `--check` in CI's quality job after `claims --check`: protocol version and commit, `SELECTION_LAST_WEEK`, folds with train/test counts, affected rows and sessions by `kind × risk × model` (no pseudonyms), `β` per model with `sqrt(diag C)`, both weightings of P50/P80/P90 coverage, width and pinball for `shrunk` and the challenger, the two paired intervals, plan results labeled oracle-structure, the per-harness table, each gate as pass, fail or not evaluable, and the decision line ("awaiting the first qualifying data change" today). It is generated now, printing "no weeks after 2026-W45 yet" with zero counts, so the pipeline is proven before W46 data lands. No number from it enters README, site or a claim.
|
|
42
|
+
|
|
43
|
+
## Tests
|
|
44
|
+
|
|
45
|
+
`tests/test_model_offset.py`: on synthetic rows, an additive effect (+1.0 log for model B in two kinds) is recovered within 0.1; a pure interaction (+1.0 in one kind, −1.0 in another, equal n) gives `|β_B − β_A| < 0.1` and a challenger `mu'` within 0.1 of the incumbent with `v' > v`; unaffected, unknown-model, unseen-kind and unseen-risk queries return the incumbent's `Located` exactly; a canary model present only in `fold.test` has no `β` entry; `src/agentpace` never names `experiments` (AST); `--check` round-trips. Master checks: `git diff main -- src` empty, `backtest --check`, `site --check`, `claims --check`, `test_frozen_method` and the pin test green untouched.
|
|
46
|
+
|
|
47
|
+
## What this changes and what it does not
|
|
48
|
+
|
|
49
|
+
Nothing in `src/agentpace` changes: `fit`, `_fit_means`, `locate`, `METHODS`, `DEFAULT_METHOD`, `SELECTION_LAST_WEEK`, `SELECTION_HARNESS`, `POOL_MIN`, the pin test and the frozen fixture stay as they are, and `src/` never imports `experiments`. The five existing streams do not move, so no published number moves. No experiment number enters the README, the site, a claim or `docs/backtest.*`. The ratios between models in the rows are never presented as model speed.
|
|
@@ -102,17 +102,20 @@ def dedupe_key(row: Row) -> tuple[str, str, int, int]:
|
|
|
102
102
|
def read_rows(path: Path) -> list[Row]:
|
|
103
103
|
"""Every row in `path`. A bad line is named by file and line number, never by its content."""
|
|
104
104
|
rows: list[Row] = []
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
try:
|
|
106
|
+
with path.open(encoding="utf-8") as handle:
|
|
107
|
+
for number, line in enumerate(handle, start=1):
|
|
108
|
+
if not line.strip():
|
|
109
|
+
continue
|
|
110
|
+
try:
|
|
111
|
+
row = json.loads(line)
|
|
112
|
+
except ValueError:
|
|
113
|
+
raise ValueError(f"{path.name}:{number}: not valid JSON") from None
|
|
114
|
+
if not isinstance(row, dict):
|
|
115
|
+
raise ValueError(f"{path.name}:{number}: not a JSON object")
|
|
116
|
+
rows.append(row)
|
|
117
|
+
except UnicodeDecodeError:
|
|
118
|
+
raise ValueError(f"{path.name}: file is not UTF-8") from None
|
|
116
119
|
return rows
|
|
117
120
|
|
|
118
121
|
|
|
@@ -101,9 +101,17 @@ def write_contribution(path: Path, rows: Sequence[Row]) -> tuple[int, int]:
|
|
|
101
101
|
if old and not old.endswith(b"\n"):
|
|
102
102
|
old += b"\n"
|
|
103
103
|
new = "".join(schema.canonical(row) + "\n" for row in rows).encode("utf-8")
|
|
104
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
|
105
104
|
temporary = path.with_name(path.name + ".tmp")
|
|
106
|
-
|
|
105
|
+
try:
|
|
106
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
107
|
+
temporary.write_bytes(old + new)
|
|
108
|
+
except OSError as error:
|
|
109
|
+
with suppress(OSError):
|
|
110
|
+
temporary.unlink()
|
|
111
|
+
raise ValueError(
|
|
112
|
+
f"could not write {path.name} in {path.parent}: {error.strerror or error}. Nothing was"
|
|
113
|
+
" changed; choose a writable --out-dir and run share --write again"
|
|
114
|
+
) from None
|
|
107
115
|
try:
|
|
108
116
|
os.replace(temporary, path)
|
|
109
117
|
except OSError:
|
|
@@ -738,6 +738,24 @@ class Hook(TempRoot):
|
|
|
738
738
|
ingest.ingest(ADAPTER, self.history, pseudonym.load_secret(home), cache=cache)
|
|
739
739
|
self.assertEqual(parse.call_count, 1) # only the other session's one transcript
|
|
740
740
|
|
|
741
|
+
def test_a_corrupt_store_is_silent_in_the_hook_and_named_by_a_manual_ingest(self):
|
|
742
|
+
self.store.parent.mkdir(parents=True)
|
|
743
|
+
self.store.write_bytes(schema.canonical(synthetic.row()).encode("utf-8") + b"\n{broken\n")
|
|
744
|
+
before = self.store.read_bytes()
|
|
745
|
+
self.assertEqual(self.hook(self.payload(self.paths[0])), (0, ""))
|
|
746
|
+
self.assertEqual(self.store.read_bytes(), before)
|
|
747
|
+
out, err = io.StringIO(), io.StringIO()
|
|
748
|
+
env = {"AGENTPACE_HOME": str(self.root / "home")}
|
|
749
|
+
with (
|
|
750
|
+
mock.patch.dict(os.environ, env),
|
|
751
|
+
contextlib.redirect_stdout(out),
|
|
752
|
+
contextlib.redirect_stderr(err),
|
|
753
|
+
):
|
|
754
|
+
code = cli.main(["ingest", str(self.history)])
|
|
755
|
+
self.assertEqual(code, 2)
|
|
756
|
+
self.assertEqual(err.getvalue(), "agentpace: runs.jsonl:2: not valid JSON\n")
|
|
757
|
+
self.assertEqual(self.store.read_bytes(), before)
|
|
758
|
+
|
|
741
759
|
|
|
742
760
|
class StoreLock(TempRoot):
|
|
743
761
|
def test_a_second_writer_waits_then_gives_up(self):
|
|
@@ -360,6 +360,16 @@ class ValidateCommand(Temp):
|
|
|
360
360
|
with contextlib.redirect_stderr(io.StringIO()), contextlib.redirect_stdout(io.StringIO()):
|
|
361
361
|
self.assertEqual(cli.main(["validate", str(bad)]), 1)
|
|
362
362
|
|
|
363
|
+
def test_a_file_that_is_not_utf8_stays_a_finding(self):
|
|
364
|
+
path = self.root / NAME
|
|
365
|
+
path.write_bytes(b"\xff\xfe\x00")
|
|
366
|
+
out, err = io.StringIO(), io.StringIO()
|
|
367
|
+
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(err):
|
|
368
|
+
code = cli.main(["validate", str(path)])
|
|
369
|
+
self.assertEqual(code, 1)
|
|
370
|
+
self.assertIn("file is not UTF-8", out.getvalue() + err.getvalue())
|
|
371
|
+
self.assertNotIn("agentpace: ", err.getvalue())
|
|
372
|
+
|
|
363
373
|
|
|
364
374
|
class BadRowLines(Temp):
|
|
365
375
|
"""A rows file with a bad line is refused by file name and line number, never content."""
|
|
@@ -406,6 +416,14 @@ class BadRowLines(Temp):
|
|
|
406
416
|
self.assertIsNone(caught.exception.__cause__)
|
|
407
417
|
self.assertTrue(caught.exception.__suppress_context__)
|
|
408
418
|
|
|
419
|
+
def test_a_file_that_is_not_utf8_is_refused_by_name(self):
|
|
420
|
+
path = self.root / NAME
|
|
421
|
+
path.write_bytes(b"\xff\xfe\x00")
|
|
422
|
+
code, out, err = self.estimate(path)
|
|
423
|
+
self.assertEqual(code, 2)
|
|
424
|
+
self.assertEqual(out, "")
|
|
425
|
+
self.assertEqual(err, f"agentpace: {NAME}: file is not UTF-8\n")
|
|
426
|
+
|
|
409
427
|
|
|
410
428
|
class ReplaceRefused(Temp):
|
|
411
429
|
"""`share --write` when another program holds the contribution file open."""
|
|
@@ -484,6 +502,70 @@ class ReplaceRefused(Temp):
|
|
|
484
502
|
self.assertEqual(code, 2)
|
|
485
503
|
self.assertEqual(err, f"agentpace: {NAME}:2: not valid JSON\n")
|
|
486
504
|
|
|
505
|
+
def test_an_out_dir_holding_a_file_that_is_not_utf8_is_refused_by_name(self):
|
|
506
|
+
self.out.mkdir()
|
|
507
|
+
self.path.write_bytes(b"\xff\xfe\x00")
|
|
508
|
+
for flags in ((), ("--write",)):
|
|
509
|
+
with self.subTest(flags=flags):
|
|
510
|
+
code, out, err = self.run_cli(*flags)
|
|
511
|
+
self.assertEqual(code, 2)
|
|
512
|
+
self.assertEqual(out, "")
|
|
513
|
+
self.assertEqual(err, f"agentpace: {NAME}: file is not UTF-8\n")
|
|
514
|
+
self.assertEqual(self.path.read_bytes(), b"\xff\xfe\x00")
|
|
515
|
+
|
|
516
|
+
def refuse(self, method, target):
|
|
517
|
+
"""Patch one `Path` method to fail with a permission error on `target` alone."""
|
|
518
|
+
real = getattr(Path, method)
|
|
519
|
+
|
|
520
|
+
def refused(path, *args, **kwargs):
|
|
521
|
+
if path == target:
|
|
522
|
+
raise PermissionError(13, "Permission denied")
|
|
523
|
+
return real(path, *args, **kwargs)
|
|
524
|
+
|
|
525
|
+
return mock.patch.object(Path, method, refused)
|
|
526
|
+
|
|
527
|
+
def assert_write_refused(self, code, out, err):
|
|
528
|
+
# The privacy notice comes first; the refusal is the last line and the only error.
|
|
529
|
+
refusal = err.splitlines(keepends=True)[-1]
|
|
530
|
+
self.assertEqual(code, 2)
|
|
531
|
+
self.assertEqual(err.count("agentpace:"), 1)
|
|
532
|
+
self.assertTrue(refusal.startswith("agentpace: could not write"), err)
|
|
533
|
+
self.assertEqual(
|
|
534
|
+
refusal,
|
|
535
|
+
f"agentpace: could not write {NAME} in {self.out}: Permission denied. Nothing was"
|
|
536
|
+
" changed; choose a writable --out-dir and run share --write again\n",
|
|
537
|
+
)
|
|
538
|
+
for said in (out, err):
|
|
539
|
+
self.assertNotIn("wrote", said)
|
|
540
|
+
self.assertNotIn("added", said)
|
|
541
|
+
self.assertNotIn("Traceback", said)
|
|
542
|
+
|
|
543
|
+
def test_an_unwritable_folder_leaves_a_new_file_unmade(self):
|
|
544
|
+
self.out.mkdir()
|
|
545
|
+
temporary = self.path.with_name(NAME + ".tmp")
|
|
546
|
+
with self.refuse("write_bytes", temporary):
|
|
547
|
+
code, out, err = self.run_cli("--write")
|
|
548
|
+
self.assert_write_refused(code, out, err)
|
|
549
|
+
self.assertEqual(list(self.out.iterdir()), [])
|
|
550
|
+
|
|
551
|
+
def test_an_unwritable_folder_leaves_an_existing_file_as_it_was(self):
|
|
552
|
+
self.assertEqual(self.run_cli("--write")[0], 0)
|
|
553
|
+
first = self.path.read_bytes()
|
|
554
|
+
stored = schema.read_rows(paths.local_runs())
|
|
555
|
+
schema.write_rows(paths.local_runs(), [*stored, row(offset_s=50)])
|
|
556
|
+
temporary = self.path.with_name(NAME + ".tmp")
|
|
557
|
+
with self.refuse("write_bytes", temporary):
|
|
558
|
+
code, out, err = self.run_cli("--write")
|
|
559
|
+
self.assert_write_refused(code, out, err)
|
|
560
|
+
self.assertEqual(self.path.read_bytes(), first)
|
|
561
|
+
self.assertEqual(sorted(p.name for p in self.out.iterdir()), [NAME])
|
|
562
|
+
|
|
563
|
+
def test_a_folder_that_cannot_be_made_is_refused_the_same_way(self):
|
|
564
|
+
with self.refuse("mkdir", self.out):
|
|
565
|
+
code, out, err = self.run_cli("--write")
|
|
566
|
+
self.assert_write_refused(code, out, err)
|
|
567
|
+
self.assertFalse(self.out.exists())
|
|
568
|
+
|
|
487
569
|
|
|
488
570
|
class NoNetwork(unittest.TestCase):
|
|
489
571
|
"""The package contains no way to send anything anywhere."""
|
|
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
|