Skip to content

ratchet: an unstable spec file has no honest row, so a flake is either a red build or a silently raised bar #887

Open

Description

@tannevaled

The ratchet has no notion of an unstable file, so a flake is either a red build or a silently raised bar

Promised in the body of #885.

What happened

core/random/bytes_spec.rb passes 8 or 9 examples depending on the run. On
2026-11-03 the baseline was re-recorded on the pinned runner and happened to
observe 9. The very next ordinary run on main reported:

core/random/bytes_spec.rb: 8 passing, baseline 9 (-1)

and #883 went red for a reason that had nothing to do with its change. #885
pinned the row to 8 — the floor — and the gate became deterministic again.

The gap

That fix is a value in a file, not a property of the tool. ratchet models a
spec file as one integer, so an unstable file has no honest representation:

  • record the draw you saw and the gate goes red on an ordinary run,
  • record the floor and nothing in the repository says why that row is lower
    than what the file can do, so the next -update quietly re-banks the high
    draw and re-arms the same red build,
  • and -absorb is the wrong instrument: it exists to stamp a real regression,
    not to describe a file that was never stable.

The floor is also unverified. 8 is the lowest value observed so far, not a
measured minimum; if the file can draw 7 the gate will go red again and the
next reflex will be to lower the row by one, which is the ratchet absorbing a
flake one draw at a time.

What would close it

A row that can declare a range rather than a point, e.g.

core/random/bytes_spec.rb 8..9 flaky

with the gate refusing anything below the low end, -update refusing to
narrow a declared range on its own, and the sweep reporting how many files
carry the marker — a count that must stay small and visible, because "flaky"
is the one word in a conformance gate that can be used to make any failure go
away.

Measuring the real floor is part of the work: N repeated runs of that one file
on the pinned runner, with the distribution recorded in the issue rather than
asserted.

Not in scope here

Why the file is unstable at all. core/random/bytes_spec.rb exercising a PRNG
is a plausible story and it is only a story; it has not been looked at, and
this issue is about the gate's vocabulary, not about that file.

🤖 Generated with Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions