loopmath 0.2.5__tar.gz → 0.2.7__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.
- {loopmath-0.2.5/src/loopmath.egg-info → loopmath-0.2.7}/PKG-INFO +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/README.md +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/pyproject.toml +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/__init__.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/atrium.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/bb.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/omp_types.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/orca.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/otel_genai_types.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/paseo.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/commands.py +26 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/design.py +18 -9
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/fit.py +67 -11
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/forest.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/outcome.py +21 -8
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/pricing.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/priors.py +18 -18
- loopmath-0.2.7/src/loopmath/belief/rules.py +139 -0
- loopmath-0.2.7/src/loopmath/builder/__init__.py +1 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/builder/context.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/builder/predict.py +5 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/cli_registry.py +24 -6
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/cli_support.py +28 -37
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/arms.py +19 -22
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/figures.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit.py +36 -44
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit_assembly.py +7 -7
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit_predict.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit_pricing.py +9 -9
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit_transfer.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/grade.py +5 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/grade_support.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/dataset_build.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/dataset_core.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/extract.py +14 -14
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_common.py +33 -10
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_costcurve.py +7 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_force.py +7 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_swimlanes.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labels.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/launch.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/launch_origin.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/ocp_support.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/scan.py +5 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/schema.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/__init__.py +13 -15
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/base.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/claude_code.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/codex.py +13 -13
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/codex_support.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/artifacts.py +10 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/clip.py +35 -21
- loopmath-0.2.7/src/loopmath/logmatch/codex_window.py +164 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/match.py +3 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/settle.py +18 -11
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/tariff.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/migrate.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/onboard/commands.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/onboard/history.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/onboard/label.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/onboard/usual.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/output.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/price.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/prices.toml +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/__init__.py +5 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/benchmarks.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/benchmarks.toml +114 -115
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/build.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/commands.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/e0.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/history.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/lanes.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/ocpdoc.py +10 -10
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/registry.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/rq1.py +22 -22
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/show.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/sweep.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/validate.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/receipts.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/commands.py +21 -20
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/curve.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/engine.py +12 -12
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/message.py +7 -7
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/receipts.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/storeread.py +6 -6
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/terminal.py +10 -12
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/terminal_read.py +5 -6
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/share/commands.py +15 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/share/export.py +10 -10
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/share/import_.py +17 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/doctor.py +7 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/install.py +9 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/loopmath-record-run/SKILL.md +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/reference.md +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/commands.py +75 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/config.py +129 -6
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/finish.py +243 -46
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/fitjob.py +6 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/home.py +17 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/ids.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/record.py +55 -14
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/report.py +12 -3
- loopmath-0.2.7/src/loopmath/store/rule_change.py +137 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/runs.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/status.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/surface.py +6 -7
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/surface_bootstrap.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/surface_estimation.py +15 -16
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/surface_frame.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/surface_presentation.py +7 -8
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/surface_support.py +4 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/taskmodel.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/types.py +2 -2
- loopmath-0.2.7/src/loopmath/views/__init__.py +4 -0
- loopmath-0.2.7/src/loopmath/views/assets/README.md +1 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/base.css +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/builder.css +1 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/builder.js +55 -18
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/common.js +40 -8
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/estimates.js +7 -7
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/graph.css +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/graph.js +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/plans.css +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/plans.js +23 -23
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/results.css +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/results.js +12 -12
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/runs.js +25 -8
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/viz.css +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/viz.js +7 -7
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/common.py +9 -16
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/plans.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/posterior.py +49 -26
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/runs.py +74 -22
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/__init__.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/candidates.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/commands.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/graphview.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/ids.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/models.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/ocp.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7/src/loopmath.egg-info}/PKG-INFO +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath.egg-info/SOURCES.txt +6 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_atrium.py +8 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_bb.py +14 -9
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_omp.py +8 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_orca.py +6 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_otel_genai.py +20 -15
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_paseo.py +6 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapters.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_analyze_cli.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_arms.py +11 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_graph.py +9 -9
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_help_lists.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_prices.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_fit.py +6 -6
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_grade.py +6 -6
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_artifacts.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_cache.py +38 -38
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_codexio.py +4 -4
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_dataset.py +12 -12
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_extract.py +8 -8
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_glue.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_html.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_launch.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_ocp.py +15 -15
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ingest.py +17 -22
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ingest_claude_code.py +3 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ingest_codex.py +8 -8
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ingest_ocp.py +5 -3
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_price.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_receipts.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_release_paths.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_research_cli.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_scoring.py +5 -5
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_starting_prior.py +2 -2
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_surface.py +20 -20
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_taskmodel_features.py +1 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_terminal.py +36 -40
- loopmath-0.2.7/tests/test_v027_p3.py +106 -0
- loopmath-0.2.7/tests/test_v027_small_fixes.py +181 -0
- loopmath-0.2.5/src/loopmath/builder/__init__.py +0 -1
- loopmath-0.2.5/src/loopmath/views/__init__.py +0 -4
- loopmath-0.2.5/src/loopmath/views/assets/README.md +0 -1
- {loopmath-0.2.5 → loopmath-0.2.7}/LICENSE +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/setup.cfg +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/spec/ocp-v0.2.schema.json +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/spec/ocp-v0.schema.json +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/spec/ocp_conformance.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/__main__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapter_host.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/base.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/bb_support.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/omp.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/omp_facts.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/omp_links.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/omp_parse.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/opencode.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/opencode_store.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/otel_genai.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/otel_genai_graph.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/otel_genai_parse.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/otel_genai_usage.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/pi.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/pi_support.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/adapters/registry.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/block.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/check_pymc.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/compose.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/features.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/gaussian.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/lookahead.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/belief/state.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/builder/cli.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/builder/server.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/cli.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/cli_graph.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/cli_e0.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/estimate.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/estimate_rework.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/io.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/e0/verb.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/explain.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit_bayes.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/fit_masks.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/gaps.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/gitwalk.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/artifact_git.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/artifact_join.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/artifact_kinds.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/artifacts.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/bashparse.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/bashread_ops.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/bashwrite_ops.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/bashwrites.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/cache.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/codexio.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/codexio_parse.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/codexio_scan.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/dataset.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/dataset_edges.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/dataset_nodes.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_css.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_data.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/html_render.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_cli.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_common.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_parse.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_pricing.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_build.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_dispatch.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_evidence.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_node.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_records.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_result.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_session.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_tools.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_validation.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_prompt_workflow.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_report.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/labeler_score.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/ocp.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/ocp_emit.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/render.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/runfile.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/runfile_export.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/runfile_finish.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/graph/token_completeness.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/claude_code_support.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/ocp.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/ocp_analysis.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/ocp_artifact.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/ocp_common.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/ocp_convert.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ingest/ocp_projection.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/logmatch/costs.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/canonical.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/commands.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/conformance.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/contractv3.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/emit.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/graph_contract.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/membership.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/schema/ocp-v0.2.schema.json +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/schema/ocp-v0.3.schema.json +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/schema/ocp-v0.schema.json +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/ocp/version.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/onboard/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/pool.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/price_validation.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/bundle/README.md +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/bundle/e0.jsonl.gz +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/bundle/lanes.jsonl.gz +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/bundle/manifest.json +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/bundle/rq1.jsonl.gz +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/bundle/sweep.jsonl.gz +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/priors/reduce.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/backlog.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/gain.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/search.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/recommend/stats.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/eligibility.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/html.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/terminal_exclusions.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/report/terminal_format.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/research_defaults.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/research_paths.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/scoring.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/scoring_comparisons.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/scoring_predictive.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/share/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/commands.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/loopmath/SKILL.md +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/loopmath-import-runs/SKILL.md +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/loopmath-onboard/SKILL.md +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/loopmath-plan-task/SKILL.md +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/skill/skills/loopmath-update-fit/SKILL.md +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/__init__.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/budget.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/lock.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/run_names.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/store/verify.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/builder.html +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/views/assets/estimates.css +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/catalog/best_of_n.toml +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/catalog/implement_review.toml +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/catalog/plan_implement.toml +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/catalog/plan_implement_review.toml +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/catalog/solo.toml +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/catalog/swarm.toml +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/diff.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/format.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/infer.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath/workflows/shapes.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath.egg-info/dependency_links.txt +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath.egg-info/entry_points.txt +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath.egg-info/requires.txt +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/src/loopmath.egg-info/top_level.txt +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_opencode.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_opencode_output_tokens.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapter_services.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_adapters_pi.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_labeler.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_main_module.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_plan_hidden.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_cli_startup.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_color_proof.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_duplicate_guards.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_estimate.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_explain.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_gaps.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_gitwalk.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_artifact_recording.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_bashwrites.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_labeler.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_labeler_evidence_matrix.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_render.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_runfile.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_graph_schema.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_home_guard.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_html.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_io.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_not_run_summary.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ocp_conformance.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ocp_golden.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ocp_open_enums.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_ocp_versioning.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_output_html_path.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_packaging_metadata.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_packaging_smoke.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_pool.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_preview_script.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_report_eligibility.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_runfile_privacy_n1b.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_split_rebindings.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_types_control.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_types_piece_prediction.py +0 -0
- {loopmath-0.2.5 → loopmath-0.2.7}/tests/test_v01_scaffold.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: loopmath
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Plan agent workflows, record how they went, and learn from your own Claude Code and Codex logs
|
|
5
5
|
Author: QKV Labs
|
|
6
6
|
License-Expression: MIT
|
|
@@ -118,7 +118,7 @@ loopmath run start --rec REC --choice goal --base-commit SHA --json # the h
|
|
|
118
118
|
loopmath run record --run RUN --session UUID --verified tests=pass --json # costs from the logs, the outcome, the receipt
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
With `--run`, a session that started before the run counts from the run's start (a Codex session counts whole
|
|
121
|
+
With `--run`, a session that started before the run counts from the run's start; a Codex session counts the usage it logged inside the window: each reading's increase at the reading's time, a reading on either edge included. A sub-agent or a Codex child thread counts in full when it started inside the window, and not at all when it started before it. A Codex reading lower than the one before it (a compaction reset) counts from zero. A Codex session that cannot be cut to the window counts whole, with a note that says why: a reading with no time, or increases inside the window that add up to less than zero. Give `--since TS` and `--until TS` when the task's work began or ended at another time; `--since` before `run start` moves the run's start back. When no commit is found after the base commit, the record says where it looked; pass `--commit SHA`. `loopmath run sessions` lists the recent Claude Code and Codex sessions in this folder with their ids, for `--session ID`. Outside a Claude Code tool shell, `--session self` uses the one Claude Code session in this folder active in the last 10 minutes.
|
|
122
122
|
|
|
123
123
|
The same loop step by step, for a tool of your own:
|
|
124
124
|
|
|
@@ -151,7 +151,7 @@ The usual workflow is the one most of your habit runs used: the runs onboard bro
|
|
|
151
151
|
|
|
152
152
|
A pair runs the goal workflow and an exploration pick from the same base commit, in separate worktrees. `loopmath run start --rec REC --choice pair` starts both, on a new slate. To start them one at a time, save the recommendation (`recommend ... --json > rec.json`) and start each run from it, so they share one task: `loopmath run start --task-file rec.json --config CFG --source alternative --new-slate` for the goal, then the same with the pick's configuration, `--source exploration` and `--slate SLT`. A blinded referee then picks the better change, which you record with `loopmath outcome --slate SLT --prefer RUN --judge referee --blinded`. `loopmath runs --slate SLT` says which run the referee preferred.
|
|
153
153
|
|
|
154
|
-
A run counts as a success when it is accepted under your rule. By default that means the task's tests pass. A rule can also be a score target: `loopmath recommend ... --target 'heldout_perf>=2400'` or `--target 'runtime_s<=200'` gives the expected score and the chance of reaching the target. Set standing rules and other options with `loopmath config set KEY VALUE` (`loopmath config get` lists every key, set or not,
|
|
154
|
+
A run counts as a success when it is accepted under your rule. By default that means the task's tests pass. A run that `onboard` brought in from your logs, or that `run import` stored, with no tests verdict but a review or accepted verdict, is judged by the review rule instead: a success when its latest review or accepted verdict is accept, approve or pass. `loopmath runs` lists other finished runs such a verdict could settle, with the command that moves them to the review rule, `loopmath outcome --rule review RUN...`. `loopmath outcome --undo-rule RUN...` undoes that, restoring each run's rule as it was; naming that rule (`tests` when it had none) does too, unless the run's own rule was also named review. A review verdict on a reviewer's last attempt then counts twice: as the review gate's pass, and as the run's success. A rule can also be a score target: `loopmath recommend ... --target 'heldout_perf>=2400'` or `--target 'runtime_s<=200'` gives the expected score and the chance of reaching the target. Set standing rules and other options with `loopmath config set KEY VALUE` (`loopmath config get` lists every key, set or not, `config set` refuses a key loopmath does not read, and `loopmath config unset KEY` returns a key to its default), and the spending cap with `loopmath budget --usd X --period month`. Spend counts your runs and onboard's labelling calls; runs onboard brought in from your logs are shown apart and not counted. A run you record with `--source habit` counts.
|
|
155
155
|
|
|
156
156
|
Runs recorded by another tool that writes OCP v0.3, such as an experiment runner, come in with `loopmath run import DIR --finish`: several files or a directory, with one refit at the end (`--no-fit` skips it). It says how many runs were new and how many were already in the store; importing finished runs into a store with no fit starts a fit. Runs in your store always count as yours, whatever source their documents name. `loopmath fit --without SOURCE` leaves out one shipped prior source, and `loopmath status` names the options of the current fit.
|
|
157
157
|
|
|
@@ -80,7 +80,7 @@ loopmath run start --rec REC --choice goal --base-commit SHA --json # the h
|
|
|
80
80
|
loopmath run record --run RUN --session UUID --verified tests=pass --json # costs from the logs, the outcome, the receipt
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
With `--run`, a session that started before the run counts from the run's start (a Codex session counts whole
|
|
83
|
+
With `--run`, a session that started before the run counts from the run's start; a Codex session counts the usage it logged inside the window: each reading's increase at the reading's time, a reading on either edge included. A sub-agent or a Codex child thread counts in full when it started inside the window, and not at all when it started before it. A Codex reading lower than the one before it (a compaction reset) counts from zero. A Codex session that cannot be cut to the window counts whole, with a note that says why: a reading with no time, or increases inside the window that add up to less than zero. Give `--since TS` and `--until TS` when the task's work began or ended at another time; `--since` before `run start` moves the run's start back. When no commit is found after the base commit, the record says where it looked; pass `--commit SHA`. `loopmath run sessions` lists the recent Claude Code and Codex sessions in this folder with their ids, for `--session ID`. Outside a Claude Code tool shell, `--session self` uses the one Claude Code session in this folder active in the last 10 minutes.
|
|
84
84
|
|
|
85
85
|
The same loop step by step, for a tool of your own:
|
|
86
86
|
|
|
@@ -113,7 +113,7 @@ The usual workflow is the one most of your habit runs used: the runs onboard bro
|
|
|
113
113
|
|
|
114
114
|
A pair runs the goal workflow and an exploration pick from the same base commit, in separate worktrees. `loopmath run start --rec REC --choice pair` starts both, on a new slate. To start them one at a time, save the recommendation (`recommend ... --json > rec.json`) and start each run from it, so they share one task: `loopmath run start --task-file rec.json --config CFG --source alternative --new-slate` for the goal, then the same with the pick's configuration, `--source exploration` and `--slate SLT`. A blinded referee then picks the better change, which you record with `loopmath outcome --slate SLT --prefer RUN --judge referee --blinded`. `loopmath runs --slate SLT` says which run the referee preferred.
|
|
115
115
|
|
|
116
|
-
A run counts as a success when it is accepted under your rule. By default that means the task's tests pass. A rule can also be a score target: `loopmath recommend ... --target 'heldout_perf>=2400'` or `--target 'runtime_s<=200'` gives the expected score and the chance of reaching the target. Set standing rules and other options with `loopmath config set KEY VALUE` (`loopmath config get` lists every key, set or not,
|
|
116
|
+
A run counts as a success when it is accepted under your rule. By default that means the task's tests pass. A run that `onboard` brought in from your logs, or that `run import` stored, with no tests verdict but a review or accepted verdict, is judged by the review rule instead: a success when its latest review or accepted verdict is accept, approve or pass. `loopmath runs` lists other finished runs such a verdict could settle, with the command that moves them to the review rule, `loopmath outcome --rule review RUN...`. `loopmath outcome --undo-rule RUN...` undoes that, restoring each run's rule as it was; naming that rule (`tests` when it had none) does too, unless the run's own rule was also named review. A review verdict on a reviewer's last attempt then counts twice: as the review gate's pass, and as the run's success. A rule can also be a score target: `loopmath recommend ... --target 'heldout_perf>=2400'` or `--target 'runtime_s<=200'` gives the expected score and the chance of reaching the target. Set standing rules and other options with `loopmath config set KEY VALUE` (`loopmath config get` lists every key, set or not, `config set` refuses a key loopmath does not read, and `loopmath config unset KEY` returns a key to its default), and the spending cap with `loopmath budget --usd X --period month`. Spend counts your runs and onboard's labelling calls; runs onboard brought in from your logs are shown apart and not counted. A run you record with `--source habit` counts.
|
|
117
117
|
|
|
118
118
|
Runs recorded by another tool that writes OCP v0.3, such as an experiment runner, come in with `loopmath run import DIR --finish`: several files or a directory, with one refit at the end (`--no-fit` skips it). It says how many runs were new and how many were already in the store; importing finished runs into a store with no fit starts a fit. Runs in your store always count as yours, whatever source their documents name. `loopmath fit --without SOURCE` leaves out one shipped prior source, and `loopmath status` names the options of the current fit.
|
|
119
119
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "loopmath"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.7"
|
|
8
8
|
description = "Plan agent workflows, record how they went, and learn from your own Claude Code and Codex logs"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -5,12 +5,12 @@ typed subagent-stop events whose subagent id may be empty. The stored facts are
|
|
|
5
5
|
``verified``, but runtime pane ids are not stable OCP task-node ids and the
|
|
6
6
|
closed OCP edge vocabulary has no neutral message or runtime-correlation edge.
|
|
7
7
|
This adapter therefore preserves them as typed metadata-only events under the
|
|
8
|
-
documented ``dev.
|
|
8
|
+
documented ``dev.loopmath.adapter.atrium`` extension and emits no core graph edge. It
|
|
9
9
|
does not infer a spawn relation from a subagent-stop record or infer acceptance
|
|
10
10
|
from segment closure, session end, or subagent stop.
|
|
11
11
|
|
|
12
12
|
The source has no token counts, cost, model, effort, stable task node, or
|
|
13
|
-
acceptance result.
|
|
13
|
+
acceptance result. Locally inspected data can be weeks stale, and
|
|
14
14
|
its pane-to-session coverage is sparse. SQL projection excludes prompt,
|
|
15
15
|
message, title, body, transcript, actor, and task text before rows reach
|
|
16
16
|
Python; none is retained or emitted.
|
|
@@ -35,7 +35,7 @@ from .registry import register
|
|
|
35
35
|
|
|
36
36
|
_DEFAULT_ROOT = Path.home() / ".atrium"
|
|
37
37
|
_STORE_NAMES = ("tasks.db", "timeline.db")
|
|
38
|
-
_NAMESPACE = "dev.
|
|
38
|
+
_NAMESPACE = "dev.loopmath.adapter.atrium"
|
|
39
39
|
_TIMELINE_KINDS = ("agent-message", "session-end", "subagent-stop")
|
|
40
40
|
_DIAGNOSTIC_REASONS = (
|
|
41
41
|
"timeline_kind_unsupported",
|
|
@@ -10,7 +10,7 @@ from typing import Any, Mapping
|
|
|
10
10
|
from .base import Usage
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
_EXT_NAMESPACE = "dev.
|
|
13
|
+
_EXT_NAMESPACE = "dev.loopmath.adapter.omp"
|
|
14
14
|
_KNOWN_MESSAGE_ROLES = {"assistant", "system", "toolResult", "user"}
|
|
15
15
|
_TOKEN_FIELDS = {
|
|
16
16
|
"input": "input_tokens",
|
|
@@ -39,7 +39,7 @@ from .registry import register
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
_DEFAULT_STORE = Path.home() / "Library" / "Application Support" / "orca" / "orchestration.db"
|
|
42
|
-
_NAMESPACE = "dev.
|
|
42
|
+
_NAMESPACE = "dev.loopmath.adapter.orca"
|
|
43
43
|
_MESSAGE_TYPES = ("decision_gate", "escalation", "merge_ready", "worker_done")
|
|
44
44
|
_DIAGNOSTIC_REASONS = (
|
|
45
45
|
"start_options_missing",
|
|
@@ -13,7 +13,7 @@ from typing import Any, Iterable, Mapping
|
|
|
13
13
|
from urllib.parse import quote
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
EXT = "dev.
|
|
16
|
+
EXT = "dev.loopmath.adapter.otel-genai"
|
|
17
17
|
_TRACE_ID = re.compile(r"[0-9a-fA-F]{32}")
|
|
18
18
|
_SPAN_ID = re.compile(r"[0-9a-fA-F]{16}")
|
|
19
19
|
_RFC3339 = re.compile(
|
|
@@ -9,7 +9,7 @@ evidence that the work was accepted.
|
|
|
9
9
|
The vendor-session join is mechanically supported when
|
|
10
10
|
``persistence.sessionId`` equals both available native corroborators,
|
|
11
11
|
``persistence.nativeHandle`` and ``runtimeInfo.sessionId``. The matching value
|
|
12
|
-
is emitted as ``attempt.session``.
|
|
12
|
+
is emitted as ``attempt.session``. A read-only inspection also
|
|
13
13
|
matched every local value to a Claude or Codex session filename without reading
|
|
14
14
|
transcripts. This is a verified identity correlation, not a graph relation.
|
|
15
15
|
Paseo records no distinct launcher or parent endpoint, so this adapter emits no
|
|
@@ -38,7 +38,7 @@ from .registry import register
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
_DEFAULT_STORE = Path.home() / ".paseo" / "agents"
|
|
41
|
-
_NAMESPACE = "dev.
|
|
41
|
+
_NAMESPACE = "dev.loopmath.adapter.paseo"
|
|
42
42
|
_TERMINAL = {"failed", "canceled", "settled_unverified"}
|
|
43
43
|
_STATUS = {
|
|
44
44
|
"working": "working",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"""Handler for `loopmath fit` (spec 02
|
|
1
|
+
"""Handler for `loopmath fit` (spec 02).
|
|
2
2
|
|
|
3
3
|
`loopmath fit [--background] [--full] [--no-prior] [--without SOURCE ...] [--home PATH] [--json]`
|
|
4
4
|
|
|
5
5
|
- Foreground: builds the belief (belief.fit.fit), waiting up to 30 s for a running fit to
|
|
6
6
|
finish (exit 4 after that), and prints a summary or `loopmath.fit/1` JSON.
|
|
7
7
|
- `--background`: detaches and returns at once through the store's fit trigger
|
|
8
|
-
(`store.fitjob.spawn_fit
|
|
8
|
+
(`store.fitjob.spawn_fit`), so a running fit queues one more fit instead of
|
|
9
9
|
racing it.
|
|
10
10
|
- A `--without` name that matches no source exits 2 and lists the known names; a fit
|
|
11
11
|
with nothing to fit writes nothing, leaves `fits/latest` where it was and exits 1.
|
|
@@ -74,6 +74,8 @@ def _summary(path: Path) -> dict:
|
|
|
74
74
|
"full": meta.get("full"),
|
|
75
75
|
"features": {k: v for k, v in (meta.get("features") or {}).items() if k != "declared"},
|
|
76
76
|
"horizons": meta.get("horizons") or {},
|
|
77
|
+
**({"receipts_rescored": meta["receipts_rescored"]} if meta.get("receipts_rescored") else {}),
|
|
78
|
+
**({"notes": meta["notes"]} if meta.get("notes") else {}),
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
|
|
@@ -85,6 +87,10 @@ def _print_summary(s: dict) -> None:
|
|
|
85
87
|
f = s["fit"]
|
|
86
88
|
n = f.get("n_runs") or {}
|
|
87
89
|
print(f"fit {f['id']} written to {s['path']} in {s.get('seconds')} s; recommend and posterior now read it")
|
|
90
|
+
rescored = s.get("receipts_rescored")
|
|
91
|
+
if rescored:
|
|
92
|
+
print(f"{rescored} receipt{'' if rescored == 1 else 's'} scored before 0.2.7 re-scored first: the run's rule is "
|
|
93
|
+
"read as the fit reads it (a note on each run)")
|
|
88
94
|
by_src = ", ".join(f"{k} {v}" for k, v in sorted(s["runs_by_source"].items(), key=lambda kv: -kv[1]))
|
|
89
95
|
labels = ", ".join(f"{k} {v}" for k, v in sorted((s.get("user_labels") or {}).items(), key=lambda kv: -kv[1]))
|
|
90
96
|
detail = "; ".join(x for x in (by_src, f"yours labelled {labels}" if labels else "") if x)
|
|
@@ -175,6 +181,9 @@ def fit(args: argparse.Namespace) -> int:
|
|
|
175
181
|
|
|
176
182
|
from .fit import FitBusy, NothingToFit, UnknownSource, fit as run_fit
|
|
177
183
|
|
|
184
|
+
notes = _config_notes(home)
|
|
185
|
+
for note in notes:
|
|
186
|
+
print(f"note: {note}", file=sys.stderr)
|
|
178
187
|
# --full: a failed compile makes pytensor print where it left the C code on stdout, which is for the result
|
|
179
188
|
quiet = contextlib.redirect_stdout(sys.stderr) if full else contextlib.nullcontext()
|
|
180
189
|
try:
|
|
@@ -192,8 +201,23 @@ def fit(args: argparse.Namespace) -> int:
|
|
|
192
201
|
raise
|
|
193
202
|
return _pymc_check_failed(home, exc)
|
|
194
203
|
summary = _summary(path)
|
|
204
|
+
if notes:
|
|
205
|
+
summary["notes"] = notes + summary.get("notes", []) # the fit printed its own on stderr
|
|
195
206
|
if as_json:
|
|
196
207
|
output.emit_json(SCHEMA, summary)
|
|
197
208
|
else:
|
|
198
209
|
_print_summary(summary)
|
|
199
210
|
return output.EXIT_OK
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def _config_notes(home: Path) -> list[str]:
|
|
214
|
+
"""A config.toml the fit cannot read leaves it on the built-in values; say so, as `runs` does (0.2.7)."""
|
|
215
|
+
from ..store.config import READ_ERRORS, Config, read_error
|
|
216
|
+
|
|
217
|
+
path = Path(home) / "config.toml"
|
|
218
|
+
try:
|
|
219
|
+
Config.load(path)
|
|
220
|
+
except READ_ERRORS as exc:
|
|
221
|
+
return [f"{read_error(path, exc)}; outcomes use the built-in q, and the fit the built-in features and "
|
|
222
|
+
"benchmark weights"]
|
|
223
|
+
return []
|
|
@@ -36,7 +36,7 @@ HEURISTIC_COST_WEIGHT = 0.7 # spec 04 section 2 and D27: allocated (heuristic)
|
|
|
36
36
|
USER_SOURCES = ("live", "backlog", "history", "user", "orchestrator", "onboard", "habit", "")
|
|
37
37
|
HORIZON_NODES = ("horizon:timebox", "horizon:log2h") # fixed terms of a timeboxed run (spec 04 section 1)
|
|
38
38
|
RQ1_EXT = "dev.loopmath.rq1" # loopmath-exp's ext key; its horizon_s is the fallback for older RQ1 runs
|
|
39
|
-
# 0.2.1 (
|
|
39
|
+
# 0.2.1 (spec 04 section 1): in the cost and tokens rows of a timeboxed task the terms a timebox caps (effort
|
|
40
40
|
# and shape) enter at this value, not 1. Set from the RQ1 2 h runs: open-ended effort terms gave max over low x2.64
|
|
41
41
|
# (solo luna) and x2.23 (solo sol) against x1.34 and x1.27 observed; ln 1.34 / ln 2.64 = ln 1.27 / ln 2.23 = 0.30.
|
|
42
42
|
TIMEBOX_EFFORT_COST = 0.3
|
|
@@ -465,7 +465,7 @@ def source_label(doc: dict) -> str:
|
|
|
465
465
|
share = ext.get("dev.loopmath.share")
|
|
466
466
|
if isinstance(share, dict):
|
|
467
467
|
# the importer writes `source` and `task.org` as `shared:<org_hash>` already: never prefix twice. With no
|
|
468
|
-
# org at all the source is `shared`, the name `fit --without shared` takes (0.2.3
|
|
468
|
+
# org at all the source is `shared`, the name `fit --without shared` takes (0.2.3)
|
|
469
469
|
org = (share.get("source") or share.get("org") or share.get("org_hash") or (run.get("task") or {}).get("org")
|
|
470
470
|
or "")
|
|
471
471
|
name = str(org).removeprefix("shared:")
|
|
@@ -640,7 +640,7 @@ def _ocp_fields(cost: dict) -> dict[str, float]:
|
|
|
640
640
|
|
|
641
641
|
def _price_split(split: dict, table) -> float | None:
|
|
642
642
|
"""Dollars for `{model: OCP token fields}`, each model at its own current rate, summed; None when any
|
|
643
|
-
part is unpriced or unlabelled (
|
|
643
|
+
part is unpriced or unlabelled (`price.price_model_tokens`)."""
|
|
644
644
|
from ..price import price_model_tokens
|
|
645
645
|
|
|
646
646
|
usd = price_model_tokens(split, table).get("usd")
|
|
@@ -720,14 +720,21 @@ def _check_name(a: dict, node: dict) -> str | None:
|
|
|
720
720
|
return str(gate.get("rule") or node.get("id") or a.get("node") or a.get("harness") or "check")
|
|
721
721
|
|
|
722
722
|
|
|
723
|
+
def run_evidence(doc: dict, rule: AcceptanceRule, *, now: datetime,
|
|
724
|
+
q_by_tier: dict[str, float] | None = None) -> Evidence:
|
|
725
|
+
"""The run's outcome as the fit reads it: `rules.evidence` under `rule` (None `q_by_tier`: the built-in q)."""
|
|
726
|
+
from . import rules
|
|
727
|
+
|
|
728
|
+
return rules.evidence(doc, rule, now=now, q_by_tier=q_by_tier)
|
|
729
|
+
|
|
730
|
+
|
|
723
731
|
def parse_run(doc: dict, *, now: datetime | None = None, rule: AcceptanceRule | None = None,
|
|
724
|
-
origin: str | None = None) -> ParsedRun:
|
|
732
|
+
origin: str | None = None, q_by_tier: dict[str, float] | None = None) -> ParsedRun:
|
|
725
733
|
"""Everything the fit needs from one finished OCP v0.3 run document. Raises Unusable.
|
|
726
734
|
|
|
727
|
-
`origin` is where the fit found the document (`data_source`); None reads its label.
|
|
735
|
+
`origin` is where the fit found the document (`data_source`); None reads its label. `q_by_tier` is
|
|
736
|
+
`outcome.q.<tier>` from config.toml, passed to `outcome_evidence` (None: the built-in q).
|
|
728
737
|
"""
|
|
729
|
-
from .outcome import outcome_evidence
|
|
730
|
-
|
|
731
738
|
run = doc.get("run") or {}
|
|
732
739
|
cfg = run.get("configuration")
|
|
733
740
|
if not isinstance(cfg, dict):
|
|
@@ -785,8 +792,10 @@ def parse_run(doc: dict, *, now: datetime | None = None, rule: AcceptanceRule |
|
|
|
785
792
|
streams))
|
|
786
793
|
|
|
787
794
|
gates = _gate_observations(doc, st, by_piece_round)
|
|
788
|
-
|
|
789
|
-
|
|
795
|
+
from .rules import resolve_rule
|
|
796
|
+
|
|
797
|
+
use_rule = rule or resolve_rule(doc) # one resolver for every reader (0.2.7); raises on a malformed score
|
|
798
|
+
evidence = run_evidence(doc, use_rule, now=now or datetime.now().astimezone(), q_by_tier=q_by_tier)
|
|
790
799
|
score_meta: dict[str, dict] = {}
|
|
791
800
|
for s in run.get("signals") or []:
|
|
792
801
|
if s.get("kind") == "score" and isinstance(s.get("value"), (int, float)) and not isinstance(s.get("value"), bool):
|
|
@@ -4,7 +4,7 @@ Spec 04 section 4. `fit()` reads finished OCP v0.3 runs (the store, the shipped
|
|
|
4
4
|
shared imports), builds the rows of every head, sets the level scales by empirical Bayes,
|
|
5
5
|
and writes `fits/<fit>.partial/{state.npz, meta.json, design.json}`, renamed to
|
|
6
6
|
`fits/<fit>/` when complete; `fits/latest` then points at it. A non-blocking `flock` on
|
|
7
|
-
`fits/.fit.lock` stops two fits running together (
|
|
7
|
+
`fits/.fit.lock` stops two fits running together (the store's fit trigger has its own job lock on
|
|
8
8
|
`fits/.lock`, so the two never wait on each other).
|
|
9
9
|
"""
|
|
10
10
|
|
|
@@ -136,7 +136,7 @@ def _nothing_to_fit(no_prior: bool, without: tuple[str, ...], dropped: dict[str,
|
|
|
136
136
|
# ---------------------------------------------------------------- reading documents
|
|
137
137
|
|
|
138
138
|
def store_docs(home: Path) -> Iterator[dict]:
|
|
139
|
-
"""Finished run documents in the store, through
|
|
139
|
+
"""Finished run documents in the store, through the store's reader (it decides what is finished)."""
|
|
140
140
|
from ..store.home import Store
|
|
141
141
|
|
|
142
142
|
yield from Store(home).finished_docs()
|
|
@@ -146,7 +146,7 @@ def _read_config(home: Path) -> dict:
|
|
|
146
146
|
path = Path(home) / "config.toml"
|
|
147
147
|
try:
|
|
148
148
|
return tomllib.loads(path.read_text(encoding="utf-8"))
|
|
149
|
-
except (OSError,
|
|
149
|
+
except (OSError, ValueError): # unreadable, not TOML, or not UTF-8: the built-in values (`fit` says so)
|
|
150
150
|
return {}
|
|
151
151
|
|
|
152
152
|
|
|
@@ -165,6 +165,8 @@ class HeadRows:
|
|
|
165
165
|
types: list[str] = field(default_factory=list)
|
|
166
166
|
not_repriced: int = 0 # cost rows on recorded dollars, not the current tariff
|
|
167
167
|
prices: dict = field(default_factory=dict) # cost head: the fit's price offsets (pricing.fit_offsets)
|
|
168
|
+
# success head, with a configured q only: each row's w under the built-in q, which the seed hashes (0.2.7)
|
|
169
|
+
seed_w: list[float] = field(default_factory=list)
|
|
168
170
|
|
|
169
171
|
def add(self, terms, y, w, run, source, ttype):
|
|
170
172
|
self.rows.append(terms)
|
|
@@ -183,7 +185,8 @@ def _excluded(source: str, without: tuple[str, ...]) -> bool:
|
|
|
183
185
|
|
|
184
186
|
|
|
185
187
|
def collect_rows(docs: Iterable[dict | tuple[str | None, dict]], *, without: tuple[str, ...] = (),
|
|
186
|
-
now: datetime | None = None, features: FeatureSet | None = None
|
|
188
|
+
now: datetime | None = None, features: FeatureSet | None = None,
|
|
189
|
+
q_by_tier: dict[str, float] | None = None):
|
|
187
190
|
"""Rows of every head from run documents, plus counts of what was used and dropped.
|
|
188
191
|
|
|
189
192
|
`docs` yields documents, or `(origin, document)` pairs from `fit()`: `user` for the store
|
|
@@ -199,11 +202,13 @@ def collect_rows(docs: Iterable[dict | tuple[str | None, dict]], *, without: tup
|
|
|
199
202
|
their document names, when that is not `user`. Features are read with `features` (the
|
|
200
203
|
built-ins by default); only admitted values keep their `feature:` terms, and `tally`
|
|
201
204
|
(features.FeatureTally) holds the support, the admitted values and the recorded horizons.
|
|
205
|
+
`q_by_tier` (`outcome.q.<tier>` from config.toml) reaches each run's outcome; None is the built-in q.
|
|
202
206
|
"""
|
|
203
207
|
now = now or datetime.now().astimezone()
|
|
204
208
|
features = features or FeatureSet()
|
|
205
209
|
tally = FeatureTally(features)
|
|
206
210
|
heads = {name: HeadRows(name, *HEAD_KIND[name]) for name in HEAD_KIND}
|
|
211
|
+
configured_q = custom_q(q_by_tier) is not None
|
|
207
212
|
score_raw: dict[str, list] = defaultdict(list)
|
|
208
213
|
score_meta: dict[str, Counter] = defaultdict(Counter)
|
|
209
214
|
score_info: dict[str, dict] = {}
|
|
@@ -232,7 +237,7 @@ def collect_rows(docs: Iterable[dict | tuple[str | None, dict]], *, without: tup
|
|
|
232
237
|
dropped[SHIPPED_COPY] += 1
|
|
233
238
|
continue
|
|
234
239
|
try:
|
|
235
|
-
pr = parse_run(doc, now=now, origin=origin)
|
|
240
|
+
pr = parse_run(doc, now=now, origin=origin, q_by_tier=q_by_tier)
|
|
236
241
|
except Unusable as exc:
|
|
237
242
|
dropped[str(exc)] += 1
|
|
238
243
|
continue
|
|
@@ -275,6 +280,8 @@ def collect_rows(docs: Iterable[dict | tuple[str | None, dict]], *, without: tup
|
|
|
275
280
|
ev = pr.evidence
|
|
276
281
|
if ev is not None and ev.z is not None:
|
|
277
282
|
heads["success"].add(row, float(ev.z), float(ev.q), pr.run_id, pr.source, ttype)
|
|
283
|
+
if configured_q: # z and the tier do not depend on q, so this read differs from `ev` in q only
|
|
284
|
+
heads["success"].seed_w.append(float(design_rows.run_evidence(doc, pr.rule, now=now).q))
|
|
278
285
|
for name, value in (ev.scores if ev else {}).items():
|
|
279
286
|
meta = pr.score_meta.get(name) or {}
|
|
280
287
|
score_meta[name][(meta.get("scale") or "linear", meta.get("better") or "higher", meta.get("unit"))] += 1
|
|
@@ -394,6 +401,16 @@ def _support(hr: HeadRows, X: sparse.csr_matrix, node_ids: list[str]) -> dict[st
|
|
|
394
401
|
return out
|
|
395
402
|
|
|
396
403
|
|
|
404
|
+
def custom_q(q_by_tier: dict[str, float] | None) -> dict[str, float] | None:
|
|
405
|
+
"""`outcome.q.<tier>` for every tier when it differs from the built-in q anywhere, else None."""
|
|
406
|
+
from .outcome import TIER_Q
|
|
407
|
+
|
|
408
|
+
if not q_by_tier:
|
|
409
|
+
return None
|
|
410
|
+
merged = {tier: float(q_by_tier.get(tier, q)) for tier, q in TIER_Q.items()}
|
|
411
|
+
return merged if merged != TIER_Q else None
|
|
412
|
+
|
|
413
|
+
|
|
397
414
|
def seed_for(fit_id: str, head: str) -> int:
|
|
398
415
|
"""A head's seed from the fit's `seed_key` (its fit id before 0.2.1)."""
|
|
399
416
|
return int.from_bytes(hashlib.sha256(f"{fit_id}/{head}".encode()).digest()[:4], "little")
|
|
@@ -402,7 +419,10 @@ def seed_for(fit_id: str, head: str) -> int:
|
|
|
402
419
|
def input_key(heads_rows: dict[str, HeadRows], specs: list, settings: dict) -> str:
|
|
403
420
|
"""The fit's `seed_key` (spec 04 section 3): the sha256 of the design version, the settings that change the
|
|
404
421
|
posterior, the prior factors and every head's rows (terms, response, weight, run, source), each head's rows
|
|
405
|
-
sorted, so the same data and settings seed the same draws whatever the store's reading order.
|
|
422
|
+
sorted, so the same data and settings seed the same draws whatever the store's reading order.
|
|
423
|
+
|
|
424
|
+
A success row's weight is its q. With `outcome.q` configured, the key takes each row's q under the built-in
|
|
425
|
+
map (`HeadRows.seed_w`), so setting q redraws nothing: only the success head's posterior moves (0.2.7)."""
|
|
406
426
|
h = hashlib.sha256()
|
|
407
427
|
h.update(repr((DESIGN_VERSION, design_rows.TIMEBOX_EFFORT_COST, design_rows.TIMEBOX_LEVELS,
|
|
408
428
|
sorted(settings.items()))).encode())
|
|
@@ -411,7 +431,8 @@ def input_key(heads_rows: dict[str, HeadRows], specs: list, settings: dict) -> s
|
|
|
411
431
|
for name in sorted(heads_rows):
|
|
412
432
|
hr = heads_rows[name]
|
|
413
433
|
h.update(f"\n{name}:{len(hr.rows)}".encode())
|
|
414
|
-
|
|
434
|
+
weights = hr.seed_w or hr.w
|
|
435
|
+
for line in sorted(repr((t, y, w, r, src)) for t, y, w, r, src in zip(hr.rows, hr.y, weights, hr.runs, hr.sources)):
|
|
415
436
|
h.update(line.encode())
|
|
416
437
|
return h.hexdigest()
|
|
417
438
|
|
|
@@ -511,12 +532,38 @@ def point_latest(fits: Path, fit_id: str) -> None:
|
|
|
511
532
|
os.replace(tmp, fits / "latest")
|
|
512
533
|
|
|
513
534
|
|
|
535
|
+
def _settle_receipts(home: Path) -> tuple[list[str], str | None]:
|
|
536
|
+
"""Receipts `run finish` scored before 0.2.7 under a rule it read otherwise than the fit are re-scored before
|
|
537
|
+
every fit of the store, foreground or background (`store.finish.settle_rule_receipts`). A receipt that could
|
|
538
|
+
not be read, re-scored or written, or a run file that could not be written, is named in a note on stderr, and the
|
|
539
|
+
next fit does what is left. Returns the receipts re-scored and the note, if any."""
|
|
540
|
+
import sys
|
|
541
|
+
|
|
542
|
+
from ..store.finish import settle_rule_receipts
|
|
543
|
+
from ..store.home import Store
|
|
544
|
+
|
|
545
|
+
try:
|
|
546
|
+
out = settle_rule_receipts(Store(home))
|
|
547
|
+
except Exception as exc: # the fit goes on; the receipts wait for the next one
|
|
548
|
+
note = f"receipts scored before 0.2.7 were not re-scored: {type(exc).__name__}: {exc}"[:300]
|
|
549
|
+
print(f"note: {note}", file=sys.stderr)
|
|
550
|
+
return [], note
|
|
551
|
+
failed = out["failed"]
|
|
552
|
+
if not failed:
|
|
553
|
+
return out["rescored"], None
|
|
554
|
+
shown = "; ".join(failed[:3]) + (f"; and {len(failed) - 3} more" if len(failed) > 3 else "")
|
|
555
|
+
note = f"receipts scored before 0.2.7 are not all settled yet; the next fit does what is left: {shown}"
|
|
556
|
+
print(f"note: {note}", file=sys.stderr)
|
|
557
|
+
return out["rescored"], note
|
|
558
|
+
|
|
559
|
+
|
|
514
560
|
def fit(home: Path, *, no_prior: bool = False, without: tuple[str, ...] = (), full: bool = False,
|
|
515
561
|
now: datetime | None = None, docs: Iterable[dict] | None = None, bundle_dir: Path | None = None,
|
|
516
562
|
benchmarks: Path | None = None, eb: bool = True, wait_s: float = 0.0) -> Path:
|
|
517
|
-
"""Build the belief and write `fits/<fit>/`; returns its path.
|
|
563
|
+
"""Build the belief and write `fits/<fit>/`; returns its path. A fit of the store's own runs (`docs` None)
|
|
564
|
+
first settles the receipts scored before 0.2.7 (`_settle_receipts`).
|
|
518
565
|
|
|
519
|
-
Raises FitBusy, or UnknownSource / NothingToFit before
|
|
566
|
+
Raises FitBusy, or UnknownSource / NothingToFit before any fit file is written.
|
|
520
567
|
"""
|
|
521
568
|
home = Path(home)
|
|
522
569
|
fits = home / "fits"
|
|
@@ -525,6 +572,7 @@ def fit(home: Path, *, no_prior: bool = False, without: tuple[str, ...] = (), fu
|
|
|
525
572
|
without = tuple(without)
|
|
526
573
|
with fit_lock(home, wait_s):
|
|
527
574
|
remove_partials(home)
|
|
575
|
+
settled, settle_note = _settle_receipts(home) if docs is None else ([], None)
|
|
528
576
|
config = _read_config(home)
|
|
529
577
|
raw_weight = config.get("benchmark_prior_weight") # unset: each benchmark's own weight (spec 04 section 5)
|
|
530
578
|
weight = None if raw_weight is None else float(raw_weight)
|
|
@@ -532,6 +580,11 @@ def fit(home: Path, *, no_prior: bool = False, without: tuple[str, ...] = (), fu
|
|
|
532
580
|
features, features_error = FeatureSet.from_config(config.get("features")), None
|
|
533
581
|
except FeatureConfigError as exc: # a hand-edited config.toml: fit with the built-ins, say why
|
|
534
582
|
features, features_error = FeatureSet(), str(exc)
|
|
583
|
+
from ..store.config import Config
|
|
584
|
+
from .outcome import TIER_Q
|
|
585
|
+
|
|
586
|
+
# `outcome.q.<tier>`, read as `run finish` reads it; unset, the built-in q (0.2.6, fix (1))
|
|
587
|
+
q_by_tier = {tier: Config(home / "config.toml", config).q_for_tier(tier) for tier in TIER_Q}
|
|
535
588
|
|
|
536
589
|
def all_docs() -> Iterator[dict | tuple[str | None, dict]]:
|
|
537
590
|
if docs is not None:
|
|
@@ -544,7 +597,7 @@ def fit(home: Path, *, no_prior: bool = False, without: tuple[str, ...] = (), fu
|
|
|
544
597
|
yield from prior_data.shared_docs(home)
|
|
545
598
|
|
|
546
599
|
(heads_rows, score_info, dropped, runs_by_source, config_support, checks, overlap,
|
|
547
|
-
labels, tally) = collect_rows(all_docs(), without=without, now=now, features=features)
|
|
600
|
+
labels, tally) = collect_rows(all_docs(), without=without, now=now, features=features, q_by_tier=q_by_tier)
|
|
548
601
|
removed = {k[len("without "):] for k in dropped if k.startswith("without ")}
|
|
549
602
|
unknown, known = unknown_sources(without, set(runs_by_source) | removed, bundle_dir)
|
|
550
603
|
if unknown:
|
|
@@ -603,7 +656,10 @@ def fit(home: Path, *, no_prior: bool = False, without: tuple[str, ...] = (), fu
|
|
|
603
656
|
_atomic_json(partial / "design.json", design)
|
|
604
657
|
meta = {
|
|
605
658
|
"fit": fit_id, "created_at": now.isoformat(timespec="seconds"), "code_version": _code_version(),
|
|
606
|
-
"seed_key": seed_key, "
|
|
659
|
+
"seed_key": seed_key, **({"outcome_q": custom_q(q_by_tier)} if custom_q(q_by_tier) else {}),
|
|
660
|
+
**({"receipts_rescored": len(settled)} if settled else {}),
|
|
661
|
+
**({"notes": [settle_note]} if settle_note else {}),
|
|
662
|
+
"timebox_effort": design_rows.TIMEBOX_EFFORT_COST,
|
|
607
663
|
"timebox_terms": list(design_rows.TIMEBOX_LEVELS),
|
|
608
664
|
"options": {"no_prior": no_prior, "without": list(without), "full": full, "eb": eb,
|
|
609
665
|
"benchmark_prior_weight": weight, "benchmark_weights": bench_weights},
|
|
@@ -85,7 +85,7 @@ ROLE_WORDS = ("planner", "implementer", "reviewer", "tester", "referee", "worker
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
def canonical_role(role: str | None) -> str:
|
|
88
|
-
"""Fold a role word into the types.py vocabulary through `workflows.normalize_role()
|
|
88
|
+
"""Fold a role word into the types.py vocabulary through `workflows.normalize_role()`;
|
|
89
89
|
no role is `worker`."""
|
|
90
90
|
return _canonical_role(str(role or "").strip().lower())
|
|
91
91
|
|
|
@@ -107,7 +107,7 @@ _GPT_RE = re.compile(r"^gpt-(\d+(?:\.\d+)?)(?:-(.+))?$")
|
|
|
107
107
|
def canonical_model_id(model: str | None) -> str:
|
|
108
108
|
"""One spelling per model: `claude-opus-5-5`, `claude-haiku-4-5`, `gpt-6-astra`.
|
|
109
109
|
|
|
110
|
-
Passes through `ingest.base.canonical_model` first (
|
|
110
|
+
Passes through `ingest.base.canonical_model` first (it owns the aliases), then
|
|
111
111
|
rewrites Claude ids to the `claude-<family>-<major>[-<minor>]` form of spec 04.
|
|
112
112
|
"""
|
|
113
113
|
from ..ingest.base import canonical_model
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
with reason `late:<name>`.
|
|
10
10
|
- `q` comes from the weakest tier used: verified 0.98, reported 0.95, heuristic 0.8, asserted 0.7.
|
|
11
11
|
- `scores`: every measured score, raw, whatever the rule is.
|
|
12
|
-
- D22: a shared run (`run.ext["dev.loopmath.share"]`) returns the sender's carried
|
|
12
|
+
- D22: a shared run (`run.ext["dev.loopmath.share"]`) returns the sender's carried outcome; a share that
|
|
13
|
+
carries no q takes the tier's q from `q_by_tier`.
|
|
13
14
|
"""
|
|
14
15
|
|
|
15
16
|
from __future__ import annotations
|
|
@@ -60,17 +61,29 @@ def _last(signals: list[dict]) -> dict | None:
|
|
|
60
61
|
return indexed[-1][1]
|
|
61
62
|
|
|
62
63
|
|
|
63
|
-
def
|
|
64
|
-
|
|
64
|
+
def _shared_scores(raw: Any) -> dict[str, float]:
|
|
65
|
+
"""A share's scores: the list `share` writes (`{name, value, ...}`), or an object of name to value."""
|
|
66
|
+
if isinstance(raw, list):
|
|
67
|
+
pairs = [(s.get("name"), s.get("value")) for s in raw if isinstance(s, dict)]
|
|
68
|
+
elif isinstance(raw, dict):
|
|
69
|
+
pairs = list(raw.items())
|
|
70
|
+
else:
|
|
71
|
+
return {}
|
|
72
|
+
return {str(k): float(v) for k, v in pairs if k is not None and _is_number(v)}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _shared_evidence(share: dict, qmap: dict[str, float]) -> Evidence | None:
|
|
76
|
+
"""The outcome a shared run carries: `outcome` as `share` writes it, else an `evidence` object or z and q
|
|
77
|
+
at the top of the ext (older shapes). With no carried q, `qmap` gives the tier's q, as for a local run."""
|
|
78
|
+
ev = next((share[k] for k in ("outcome", "evidence") if isinstance(share.get(k), dict)), share)
|
|
65
79
|
if "z" not in ev and "q" not in ev:
|
|
66
80
|
return None
|
|
67
81
|
z = ev.get("z")
|
|
68
82
|
tier = _tier(ev.get("tier"))
|
|
69
83
|
q = ev.get("q")
|
|
70
|
-
scores = share.get("scores") if
|
|
71
|
-
return Evidence(z=None if z is None else float(z), q=float(q) if q is not None else
|
|
72
|
-
scores=
|
|
73
|
-
reasons=("shared",))
|
|
84
|
+
scores = share.get("scores") if share.get("scores") is not None else ev.get("scores")
|
|
85
|
+
return Evidence(z=None if z is None else float(z), q=float(q) if q is not None else float(qmap[tier]), tier=tier,
|
|
86
|
+
scores=_shared_scores(scores), reasons=("shared",))
|
|
74
87
|
|
|
75
88
|
|
|
76
89
|
def outcome_evidence(run_doc: dict, rule: AcceptanceRule, *, now: datetime,
|
|
@@ -79,7 +92,7 @@ def outcome_evidence(run_doc: dict, rule: AcceptanceRule, *, now: datetime,
|
|
|
79
92
|
run = run_doc.get("run") or {}
|
|
80
93
|
share = (run.get("ext") or {}).get("dev.loopmath.share")
|
|
81
94
|
if isinstance(share, dict):
|
|
82
|
-
carried = _shared_evidence(share)
|
|
95
|
+
carried = _shared_evidence(share, qmap)
|
|
83
96
|
if carried is not None:
|
|
84
97
|
return carried
|
|
85
98
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""The price offset on the cost head (spec 04 section 2, 0.2.2
|
|
1
|
+
"""The price offset on the cost head (spec 04 section 2, 0.2.2).
|
|
2
2
|
|
|
3
3
|
A model's run cost moves with its list price. Every cost row of a model version `m` (not the tokens, gate,
|
|
4
4
|
success or score rows) carries the fixed term `price:offset` with the value
|