Skip to content

docs(ops)+test(benchmarks): pin and clarify 200k A/B 0.574x figure (Pro slower) - #231

Merged
FabioLeitao merged 3 commits into
mainfrom
cursor/sre-agent-protocol-7ed1
Apr 27, 2026
Merged

FabioLeitao merged 3 commits into
mainfrom
cursor/sre-agent-protocol-7ed1

Conversation

@cursor

@cursor cursor Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Description

Operator handoff (Slack) flagged that the 200k A/B benchmark confirms the Pro profile is 0.574x mais lento than OpenCore and asked the agent to consider that when refining manifests. This PR is the evidence + reading-guide echo for that handoff: it adds a regression guard that pins the recorded JSON, and it clarifies in the lab-lessons hub + sprint post-mortem how to read the figure so executive copy and manifests cannot accidentally flip the sign.

No measurement is rerun. The artifact tests/benchmarks/official_benchmark_200k.json is unchanged from the 2026-04-25 lab session (opencore_seconds=0.252242, pro_seconds=0.439419, speedup_vs_opencore=0.574, opencore_hits == pro_hits == 100000).

The math, plainly (Julia Evans-style)

  • The JSON stores speedup_vs_opencore = OpenCore_time / Pro_time = 0.574.
  • That means Pro runs at 0.574× the speed of OpenCore in this profile, i.e. Pro takes roughly 1 / 0.574 ≈ 1.74× the OpenCore wall-clock.
  • The operator's phrasing "0.574x mais lento" agrees on direction (Pro slower) and uses the same numeric anchor; the only trap is to double-invert it (e.g. claim Pro is 1.74× faster) when copying the figure into a deck.

Why this matters for the project

docs/ops/SPRINT_GREAT_LEAP_POSTMORTEM.md already separates verified vs aspirational numbers. Without a machine-readable echo, future executive material could quote ~15x for Pro+ (the aspirational row) while the only artifact in-tree shows the opposite direction. The guard added here is the seatbelt.

Defensive Architecture posture

  • Zero impact on database locks. The new test (tests/test_official_benchmark_200k_evidence.py) only parses a JSON file. No SQLite connection, no scan, no shared lock — safe to run while a host is doing real audit work.
  • Detection coverage first. The test asserts opencore_hits == pro_hits before any performance ratio. If the Pro path ever drops findings, that fails loudly even if it becomes faster.
  • Direction, not magnitude. Performance assertions check pro_seconds > opencore_seconds and speedup < 1.0 (rather than pinning exact times) so a future reproducible profile that flips the result fails intentionally, prompting the operator to update prose + JSON together.

Resilience / fallback posture

  • The guard does not force a regeneration: if the artifact is missing, it raises a clear message pointing at tests/benchmarks/run_official_bench.py so the operator decides whether to rerun or restore from git.
  • An additional arithmetic check (recorded ≈ opencore_seconds / pro_seconds) catches hand-edits that drift the JSON away from its own numbers.

Lab-lessons archive contract

Per the situational rule (.cursor/rules/lab-lessons-learned-archive.mdc) and ADR 0042, the 2026-04-25 dated snapshot is not rewritten. A new dated file docs/ops/lab_lessons_learned/LAB_LESSONS_LEARNED_2026_04_27.md is added as an erratum / reading-guide; the hub gains a row pointing at it; the post-mortem (EN + pt-BR) gains a "direction vs ratio" note.

Type of change

  • Bug fix (clarification of how to read an existing figure; prevents executive copy regression)
  • Documentation
  • Test / regression guard

Files

Path Change
tests/test_official_benchmark_200k_evidence.py New read-only regression guard (4 tests).
docs/ops/LAB_LESSONS_LEARNED.md Adds reading-guide callout + new archive row.
docs/ops/SPRINT_GREAT_LEAP_POSTMORTEM.md Direction-vs-ratio note + sharper benchmark row.
docs/ops/SPRINT_GREAT_LEAP_POSTMORTEM.pt_BR.md pt-BR mirror of the same clarification.
docs/ops/lab_lessons_learned/LAB_LESSONS_LEARNED_2026_04_27.md New dated erratum snapshot.

Checklist

  • Tests pass locally (uv run pytest tests/test_official_benchmark_200k_evidence.py tests/test_docs_pt_br_locale.py tests/test_docs_external_no_plan_links.py tests/test_docs_markdown.py — 165 tests passing).
  • Lint passes (uv run ruff check tests/test_official_benchmark_200k_evidence.py; ruff format --check).
  • Pre-commit hooks ran on each commit (markdown lint, pt-BR locale, commercial guard, external plan-link guard, PII guard, PII history guard).
  • No behaviour change in the scanner; no schema or runtime impact.
  • No secrets, no LAN specifics, no PII; tracked files only contain public-safe metrics.

Related

  • Slack handoff (operator → agent automation, 2026-04-27).
  • Frozen 2026-04-25 evidence: docs/ops/lab_lessons_learned/LAB_LESSONS_LEARNED_2026_04_25.md.
  • Verified-vs-aspirational table: docs/ops/SPRINT_GREAT_LEAP_POSTMORTEM.md.
  • Lab-lessons archive contract: ADR 0042, .cursor/rules/lab-lessons-learned-archive.mdc.

Inspired in form (clear repro, direction stated, defensive checks first, fallback note) by community bug-fix issues such as linuxmint/live-installer#177 and #178.

Open in Web View Automation 

cursoragent and others added 3 commits April 27, 2026 15:24
Read-only regression guard for tests/benchmarks/official_benchmark_200k.json
that pins direction and findings parity for the 2026-04-25 lab session:

- benchmark shape provenance (rows=200000, workers=8, official_pro_v1)
- Pro path is slower than OpenCore in this profile (pro_seconds > opencore_seconds)
- recorded speedup_vs_opencore matches opencore_seconds / pro_seconds
- detection parity: opencore_hits == pro_hits (defensive coverage first)

The guard parses JSON only, no SQLite, no scan side-effect; safe for hosts
running active scans. Surfaces drift between the artifact and prose if a
future profile flips direction.

Co-authored-by: Fabio Tavares Leitão <[email protected]>
Operator handoff phrased the result as 'Pro is 0.574x mais lento que o
OpenCore'. The artifact tests/benchmarks/official_benchmark_200k.json
records speedup_vs_opencore = 0.574 (= t_open / t_pro), so Pro takes
roughly 1 / 0.574 ~= 1.74x the OpenCore wall-clock. Both phrasings agree
on direction (Pro slower); only the inverse trap risks flipping the sign
in executive copy.

Changes (no measurement change):
- LAB_LESSONS_LEARNED.md: reading-guide callout + link to regression test
- SPRINT_GREAT_LEAP_POSTMORTEM.md (+ pt-BR): direction-vs-ratio note
- lab_lessons_learned/LAB_LESSONS_LEARNED_2026_04_27.md: dated erratum
  snapshot per the archive contract; the 2026-04-25 frozen file stays
  unchanged

Co-authored-by: Fabio Tavares Leitão <[email protected]>
@FabioLeitao
FabioLeitao marked this pull request as ready for review April 27, 2026 15:43
@FabioLeitao
FabioLeitao merged commit 91b0f29 into main Apr 27, 2026
1 check passed
@FabioLeitao
FabioLeitao deleted the cursor/sre-agent-protocol-7ed1 branch April 27, 2026 15:46
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