Skip to content

ci: derive proof-policy epochs from proof-system squashes and report the Phase B gate inputs #3270

Closed

Description

@schlessera

Part of #2934 (Phase A). Implements question 4 of the #2938 ruling.

Blocked by #3268

Context

The maintainer ruled that each merged proof-system change opens a new proof-policy epoch, derived automatically from the path set at merge, and that scripts/ci-timings.ts reports it. Today the throughput report states that mixed policy epochs confound comparisons (docs/process/ci-throughput.md:71-76) but has no epoch field. The #2934 Phase B gate (7 consecutive days within one epoch, first-main green at or above 80%, every red incident attributed) cannot be evaluated without one.

Scope

  • scripts/ci-timings.ts derives epochs from main history. Every squash that ci: define proof-system changes in one path-set file with a deterministic timeout-change check #3268 classifies as proof-system starts a new epoch, identified by that squash SHA and its commit time.
  • Report output gains each delivery's epoch and per-epoch metrics: merges, first-main green rate among known outcomes, and the epoch's duration.
  • A report section states, for the current epoch, how many consecutive days it has run and its first-main green rate. These are the two numeric inputs of the Phase B gate. Incident attribution stays a separate, explicitly unknown input unless recorded.

Out of scope

  • Deciding that the gate is met; this only reports its numeric inputs.
  • The lane (separate task).

Acceptance criteria

  • With fixture history containing two proof-system squashes, the report assigns each delivery to the correct epoch and splits per-epoch first-main green correctly. Proven by a test that fails before the change.
  • A squash whose classification cannot be computed makes its epoch boundary unknown, never silently continuous.
  • The current-epoch section reports days and green rate, and labels incident attribution as unknown when not recorded.
  • docs/process/ci-throughput.md documents the epoch fields.

Verification

Focused ci-timings tests plus a restored mutation receipt (for example, ignoring the classification) that makes the named test fail.

Contract impact

None.

Activity

  1. added
    type: chore
    area: ci
    priority: p1
    agent-ready
    blocked
    on Nov 2, 2026
  2. removed
    blocked
    on Nov 2, 2026
  3. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    2026-11-02: blocker #3268 is delivered (PR #3276, squash b228b1f21c4758ee712e922d12ebbe77cf4b3512 on main), so blocked is removed. The Blocked by #3268 line stays as history.

    Use import { classify } from "./proof-system": classify(base, head, { cwd?, pathSet? }) returns { schemaVersion, base, head, proofSystem, reasons } and throws when the diff cannot be computed, so an error never reads as false. matchProofSystemPath(path) gives a path-only check. The CLI is bun scripts/proof-system.ts classify --base <sha> --head <sha> [--json]. The timeout check flags changed timeouts in rewritten existing test lines and file-wide setDefaultTimeout changes, not new tests that set their own timeout (see the PR for the reasoning).

  4. self-assigned this
    on Nov 4, 2026
  5. schlessera commented on Nov 4, 2026

    @schlessera
    OwnerAuthor

    Claiming (token wi-3270-epochs-7f3a). Branch: chore/3270-proof-policy-epochs from origin/main 5c9b23d.

    Collision check for scripts/ci-timings.ts and docs/process/ci-throughput.md: no path reports; only closure reports from open PRs whose test discovery reaches tests/ci-timings*.test.ts. This is a proof-system change, so it lands one at a time: it will not be confirmed until the in-flight proof-system work on #3302/#3303 has merged.

  6. added this to the 0.45.0 milestone on Nov 4, 2026
  7. schlessera commented on Nov 4, 2026

    @schlessera
    OwnerAuthor

    Implementation is in draft PR #3572 (head 43b6154718bf, check:pr receipt in the body, failing-first and three mutation receipts recorded). Milestone 0.45.0 is on the PR and this issue.

    Not confirmed yet, on purpose. This is a proof-system change and lands one at a time, so it waits until the #3302 and #3303 fixes have merged. The #3303 fix (#3571) also edits docs/decisions/ci-utility.md, so #3572 will be rebased onto main after it lands, before integrate.ts confirm.

  8. added 3 commits that reference this issue on Nov 4, 2026
    223a770
    f33ed73
    c8ef1d5
  9. schlessera commented on Nov 6, 2026

    @schlessera
    OwnerAuthor

    Delivered by #3572, squash ee352a52442cac4d494c39b5b838666aa891550b (parent 3046bf02a, tree fb452bebf). The tree is identical to candidate run 41920545814's checkout 0cab8c98c, which passed every selected job. It merged through integrate.ts confirm. Main push run 41924357391 on the squash passed.

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

Metadata

Metadata

Assignees

Labels

agent-readyarea: cipriority: p1type: chore

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions