Skip to content

Raise the benchmark guard threshold to 25%: it's a tripwire, not an instrument - #187

Merged
Korijn merged 1 commit into
masterfrom
claude/observ-benchmark-threshold
Jul 9, 2026
Merged

Raise the benchmark guard threshold to 25%: it's a tripwire, not an instrument#187
Korijn merged 1 commit into
masterfrom
claude/observ-benchmark-threshold

Conversation

@Korijn

@Korijn Korijn commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to the discussion on #186 (closed): instead of adding retry machinery, reposition the guard honestly.

Why

The 10% threshold sat below the noise floor of GitHub-hosted runners. Even with the interleaved fastest-branch-vs-slowest-baseline gate, whole runs of identical code were observed to differ by 10–30%:

  • On Fully implement modern type hinting, checked with ty in CI #185, the same commit went fail → fail → pass across three attempts of the Benchmarks workflow, with different benchmarks flagged each time.
  • The failing runs flagged code paths the diff never touched — one untouched write-trap benchmark swung +31.7% within a single run set, another −13%.
  • Reproducing the exact gate methodology locally on an idle machine passed cleanly, and an isolated GC-disabled microbenchmark of the flagged hot path showed the branch at parity or slightly faster.

A gate below the noise floor doesn't catch regressions — it breeds re-run-until-green rituals that erode trust in the check (and waste the CI minutes it was meant to justify).

What this changes

  • --threshold 0.100.25 in the workflow, and the matching default in compare_runs.py.
  • Comments in both places now state plainly what the guard is and isn't: a tripwire for gross accidental regressions (an accidental copy in a hot path, an algorithmic slip) — not a precision instrument. Changes too small to trip it should be measured deliberately with repeated local runs of the bench suite, which is both quieter and more sensitive than CI ever was at 10%.

🤖 Generated with Claude Code

https://claude.ai/code/session_016fDq6fyKg6QscqyyN6CcwC


Generated by Claude Code

…nstrument

The 10% threshold sat below the noise floor of GitHub-hosted runners.
Even with the interleaved fastest-branch-vs-slowest-baseline gate,
whole runs of identical code were observed to differ by 10-30%: on a
recent PR the same commit went fail/fail/pass across three attempts,
each time flagging different benchmarks, including code paths the
diff never touched (one untouched write-trap benchmark swung +31.7%
within a single run set). Gating below the noise floor doesn't catch
regressions, it breeds re-run-until-green rituals that erode trust in
the check.

At 25% the guard is honest about what hosted runners can deliver: a
tripwire for gross accidental regressions (an accidental copy in a
hot path, an algorithmic slip), not a precision instrument. Changes
too small to trip it should be measured deliberately instead, with
repeated local runs of the bench suite on an idle machine - which is
also more sensitive than CI ever was at 10%.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016fDq6fyKg6QscqyyN6CcwC
@Korijn
Korijn merged commit 32c7cc9 into master Jul 9, 2026
11 checks passed
@Korijn
Korijn deleted the claude/observ-benchmark-threshold branch July 9, 2026 22:07
berendkleinhaneveld added a commit that referenced this pull request Jul 10, 2026
First stable release. Since v0.19.0, observ has had a broad performance
overhaul, gained full type-hint coverage and a new trigger_ref API, and
picked up a documentation site.

New features
- trigger_ref(): force-notify the watchers of a proxy, mirroring Vue's
  triggerRef (#188, closes #123).
- Fully typed: modern type hints throughout, a py.typed marker, and ty
  type-checking enforced in CI (#185, #184, closes #114).

Performance
- Reworked deep-watch traversal: plain leaf values are filtered out of the
  traverse stack at push time and raw targets are traversed directly.
  Traversing large flat/shallow structures is up to ~85% faster (#190).
- Lower per-operation trap overhead and proxies constructed with positional
  flags: reactive reads/writes and proxy creation are ~35-50% faster
  (#192, #193).
- proxy_db lifetimes are managed by reference counting instead of a gc hook,
  eliminating reference cycles and making cleanup deterministic (#177).
- Scheduler and dependency-bookkeeping micro-optimizations: in-place bisect
  insertion (#191), single-read/write flush counting (#196), a set
  difference in cleanup_deps (#194), and reading the arg count off the code
  object in weak() (#195).

Correctness
- Guarantees, with tests, that observ creates no reference cycles (#189).

Documentation
- New MkDocs site published to GitHub Pages (#176), with an Internals
  section (#179) and a rewritten README (#180).

Tooling
- Modernized CI workflows (#182) and a more robust benchmark guard
  (#181, #187).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants