I3351 — A proof plan is a validated record in which each protocol is frozen by its own digest, so registering one test never stales another's records
Add apps/majordomus-cli/src/economics/proof.rs, declared from mod.rs, which loads and validates .ai/repo/benchmarks/proof-plan.yaml (schema proof-plan/v1): tests with id, title, question, settles (docs/CLAIMS.yaml ids), dimension (accepted_results, wall_time, human_interventions, ci_reruns, spend, recovery, onboarding), value_words, instrument (built, or planned with the issue ids that build it) and an optional protocol. A protocol has version, registered_at, changes and a decision of one of three kinds: paired (names an economics suite and the digest of that suite's registration block), trials (record fields with their classes, min_trials, min_successes, all_must_pass) or window (period, admitted work, a bound per field on its not-observed share). Each protocol carries registered_digest over its own canonical form, computed by one public digest function the suite registration also uses. The validator refuses a digest mismatch, an unknown dimension or decision kind, a duplicate id, a claim CLAIMS.yaml lacks, a paired protocol whose suite or registration digest does not resolve, and a version without a changes entry. Expose counts_toward(record, test): a record counts only when it carries its test's protocol digest and postdates registered_at. The plan file is a freshness input of no suite.
PŘIPRAVENO vlna 0 · p0 · profil implementation · bezpečné souběžně
Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I3351 bude přijato.
Cíl
Add apps/majordomus-cli/src/economics/proof.rs, declared from mod.rs, which loads and validates .ai/repo/benchmarks/proof-plan.yaml (schema proof-plan/v1): tests with id, title, question, settles (docs/CLAIMS.yaml ids), dimension (accepted_results, wall_time, human_interventions, ci_reruns, spend, recovery, onboarding), value_words, instrument (built, or planned with the issue ids that build it) and an optional protocol. A protocol has version, registered_at, changes and a decision of one of three kinds: paired (names an economics suite and the digest of that suite's registration block), trials (record fields with their classes, min_trials, min_successes, all_must_pass) or window (period, admitted work, a bound per field on its not-observed share). Each protocol carries registered_digest over its own canonical form, computed by one public digest function the suite registration also uses. The validator refuses a digest mismatch, an unknown dimension or decision kind, a duplicate id, a claim CLAIMS.yaml lacks, a paired protocol whose suite or registration digest does not resolve, and a version without a changes entry. Expose counts_toward(record, test): a record counts only when it carries its test's protocol digest and postdates registered_at. The plan file is a freshness input of no suite.
Proč
The owner's report of 2026-10-19 asks that T1 to T6 be decided by measurement, and T2 that the split be fixed in advance. A protocol written after its records can be fitted to them, so the plan must be a record a gate refuses loose. The critique of this plan showed that putting one shared plan file into every suite's freshness inputs would stale the T2 corpus whenever T4 or T5 registered later, so each protocol is frozen by its own digest and records carry it. A paired protocol references the suite's own registration block, so pre-registration exists once.
Aktuální stav
apps/majordomus-cli/src/economics/mod.rs:43-49 declares claims, context, model, report, runner, stats and usage. methodology.yaml:64-73 holds hypotheses whose status model.rs:311 says a person sets. suites/pilot.yaml lists its freshness_inputs, which bind every run of the suite to all of them.
Cílový stav
economics::proof::load(root) returns the validated plan or its findings, fail-closed; an absent file reads as no plan, never an empty valid plan; every public item has a rustdoc example.
Rozsah
- apps/majordomus-cli/src/economics
- apps/majordomus-cli/src/economics/mod.rs
- apps/majordomus-cli/tests/economics.rs
- docs/ECONOMICS.md
Mimo rozsah
- Writing the six tests (I3352)
- The trial record type (I3353)
- Computing a status (I3354)
- Any new statistics
- Changing methodology version 1
Závislosti
Žádné. Tento úkol je kořenem grafu.
Co na tom čeká
- I3352BLOCKED The six proof tests are registered, each with the claim it settles and its instrument, and none carries a protocol yet
- I3353BLOCKED A trial is a typed record that carries its protocol's digest, refuses what the protocol does not declare, and redacts what its publication basis does not permit
- I3354BLOCKED A pure scorecard function computes each proof test's status, counted sample, effect and losses from committed records, and withholds a verdict until the registered sample is complete
- I3367BLOCKED A suite can be registered: strata, outcomes, acceptance rule, analysis, MDE, a seeded interleaved run order and the stopping rule are declared data the load validates and the runner honours
Kritéria přijetí
- A fixture plan with all three decision kinds validates, and each refusal in the objective has its own fixture and finding text
- Changing one field of a registered protocol without updating registered_digest is refused, naming the test and both digests
- Registering a second test's protocol leaves counts_toward unchanged for every record of the first, proven by a fixture
- An absent plan yields a 'no proof plan is registered' finding
- Every new public item has a rustdoc example that runs
Validace
- cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test economics
- cargo test --manifest-path apps/majordomus-cli/Cargo.toml --doc economics::proof
- cargo fmt --manifest-path apps/majordomus-cli/Cargo.toml --check
Požadované důkazy
- test_proof_plan_validated
- test_protocol_digest_is_per_test
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I3351.yaml. Read it back with majordomus plan show I3351.