Skip to content

feat(trials): one registered forecast per trial over the declared eligible set (Part of #8321) - #8664

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8321-20261119T1203Z
Nov 19, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8321-20261119T1203Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8321. First slice: the mechanical enforcement (item 4) plus the data model for items 1-3.

What changed

  • tests/tools/trial.py: a trial now carries exactly one forecast: {over, declared, figures}. figures holds a [low, high] program-count range for each of FORECAST_FIGURES (whole at first contact, whole at close-out, accounted at close-out, first-try proof). over is the eligible count and declared is the declaration hash, so the forecast is bound to the eligible set it was made over.
  • trial.py start takes --forecast FIGURE=LOW-HIGH (one per figure) and refuses without all four, before any scan. Order: draw, scan, eligibility, declare, forecast (rehearse the counts with preview). The forecast is written in the same ledger save as the declaration.
  • trial.py check (via validate) fails a trial with no forecast, with two (forecasts key or a list), with a basis other than its declared eligible set, or with a range outside 0..over.
  • trial-001 (blind 1, started 2026-11-09) is grandfathered by FORECAST_REQUIRED_FROM = 2026-11-19; its history is unchanged.
  • tests/cobol_mainframe/test_trials.py: the two start calls pass forecasts; a new test covers refusal and each check failure.

Gates

  • pytest tests/cobol_mainframe/test_trials.py: 61 passed. tests/test_source_reads.py and test_change_classifier.py: pass.
  • trial.py check: valid, report current. ruff format (pinned 0.16.10) applied to both files.
  • audit_check.py: dead-key, doc-refs, ast-accuracy and signal-coverage OK. mypy lists pre-existing findings in other files (cobol_to_java_uow_forge.py, det/stmt.py), none in the touched files. I did not run pr_gates --ratchets; no parser, golden or ledger-score file changed.

Class / Sibling gaps

Class: a blind-trial figure reported without exactly one forecast registered over the declared eligible set. Members: whole at first contact, whole at close-out, accounted at close-out, first-try proof. All four are enforced here by start and check. Sibling gaps: the pre-registration document still states the old forecast text (estate4_preregistration.md), and it should name trials.json as the one place a forecast lives; the report page (fresh_estate_trials.md) does not yet print forecast vs result. Neither needs a different mechanism, only the file cap.

Remaining slices

  1. Docs: docs/language_status/estate4_preregistration.md (point to the ledger forecast as the only one, label Blind estate trial 1 (#3803): ibm/example-health-apis -- COMPLETE: 0/29 first contact, 25/29 whole, 28/28 cased, first-try det proof 23/28 (82%) #8073's number a mid-trial note) and the blind-draw skill checklist.
  2. trial.py render / trial_page: show each forecast range beside the measured figure (regenerates the report page and estate pages).

Lessons for agents

None.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 19, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 19, 2026 12:08
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 19, 2026 12:09
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 19, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant