Skip to content

eval: corpus recall 3/9 → 4/9 — self-contained loaded-subscription fixture (P-012)#51

Merged
PhysShell merged 1 commit into
mainfrom
claude/recall-loaded-subscription
Jun 20, 2026
Merged

eval: corpus recall 3/9 → 4/9 — self-contained loaded-subscription fixture (P-012)#51
PhysShell merged 1 commit into
mainfrom
claude/recall-loaded-subscription

Conversation

@PhysShell

@PhysShell PhysShell commented Jun 20, 2026

Copy link
Copy Markdown
Owner

What

Ratchets the corpus benchmark recall 3/9 → 4/9 by fixing a fixture that was understating our own strongest class.

screentogif-loaded-subscription is a subscription leak — the class the extractor is best at — yet it scored a miss. The cause wasn't the extractor: the reduction's before.cs subscribed to _viewModel.ShowErrorRequested but never declared VideoSourceViewModel, so the type-aware extractor couldn't bind the += to an event and honestly emitted OWN050 (unresolved) — a note, not a verdict. The fixture, not the analyzer, was the problem.

Making the reduction self-contained (a minimal VideoSourceViewModel with the three events + a StatusBand stub, mirrored in after.cs) lets the extractor resolve it and flag the leak — warning-tier, an injected DataContext source it can't prove outlives the window — exactly as it does on the full ScreenToGif repo. The matching -= in after.cs's Window_Closing keeps the fix silent.

The proof (benchmark scorecard, CI)

screentogif-loaded-subscription  before[caught: OWN001]  after[clean]
...
benchmark: 4/9 bugs caught in real C# · 9/9 fixes clean · 0 false positive(s) on fixes (recall floor 4)

loaded-subscription flipped MISSED → caught: OWN001; specificity stays perfect (9/9 clean, 0 FP). The corpus-benchmark floor is raised to --min-recall 4 so it can't regress.

Lesson recorded

A benchmark fixture that references an undeclared type silently degrades to OWN050; self-contained fixtures (like the samples) measure honestly. Documented in corpus-benchmark.md + P-012.

The remaining 5 misses are genuine frontend extraction gaps — pool double-return (OWN003) / use-after-return (OWN002), the interprocedural ownership-handoff, a cross-method use-after-dispose, and a region-escape shape — the tracked recall backlog the floor ratchets up to as each lands.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED


Generated by Claude Code

Summary by CodeRabbit

  • Chores

    • Raised the benchmark precision/recall threshold for real-C# corpus testing.
  • Tests

    • Updated benchmark test fixtures to ensure self-contained validation and improved result accuracy from 3/9 to 4/9 recall.
  • Documentation

    • Updated benchmark documentation to reflect improved test results and clarify remaining extraction gaps.

…(P-012)

The benchmark scored screentogif-loaded-subscription a miss, but it is a
*subscription* leak — our strongest class. The cause was the fixture, not the
extractor: before.cs subscribed to `_viewModel.ShowErrorRequested` but never
declared VideoSourceViewModel, so the type-aware extractor could not bind the `+=`
to an event and honestly emitted OWN050 (unresolved) — a note, not a verdict. The
reduction was understating our own detection.

Make it self-contained (a minimal VideoSourceViewModel with the three events +
a StatusBand stub, mirrored in after.cs) so the extractor resolves it and flags
the leak (warning-tier: an injected DataContext source) exactly as it does on the
full ScreenToGif repo; the matching `-=` in after.cs's Window_Closing keeps the
fix silent. Recall is now 4/9 and the corpus-benchmark floor is raised to match.

Lesson recorded (corpus-benchmark.md + P-012): a benchmark fixture that references
an undeclared type silently degrades to OWN050; self-contained fixtures, like the
samples, measure honestly. The remaining 5 misses are genuine frontend extraction
gaps (pool double-return/use-after-return, interprocedural handoff, a cross-method
use-after-dispose, a region-escape shape) — the tracked recall backlog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e75f4bb-c6c9-420a-b852-e95bce6be639

📥 Commits

Reviewing files that changed from the base of the PR and between d7069ec and 7224bd3.

📒 Files selected for processing (5)
  • .github/workflows/ci.yml
  • corpus/real-world/screentogif-loaded-subscription/after.cs
  • corpus/real-world/screentogif-loaded-subscription/before.cs
  • docs/notes/corpus-benchmark.md
  • docs/proposals/P-012-bug-corpus-mining.md

📝 Walkthrough

Walkthrough

The screentogif-loaded-subscription corpus fixture gains minimal in-file stubs for VideoSourceViewModel and StatusBand in both before.cs and after.cs, making it self-contained so the extractor can bind the event subscription and produce a verdict. The CI --min-recall gate is then ratcheted from 3 to 4, and corpus-benchmark.md and P-012-bug-corpus-mining.md are updated to reflect the new 4/9 recall result.

Changes

Corpus fixture fix and recall gate ratchet

Layer / File(s) Summary
Corpus fixture: add self-contained type stubs
corpus/real-world/screentogif-loaded-subscription/before.cs, corpus/real-world/screentogif-loaded-subscription/after.cs
Both before.cs and after.cs receive minimal in-file stand-ins for VideoSourceViewModel (event declarations: ShowErrorRequested, HideErrorRequested, CloseRequested) and StatusBand (stub Error/Hide methods), eliminating the unresolved external type dependency that previously caused OWN050 instead of a real verdict.
CI gate ratchet and documentation update
.github/workflows/ci.yml, docs/notes/corpus-benchmark.md, docs/proposals/P-012-bug-corpus-mining.md
--min-recall is raised from 3 to 4 in the corpus-benchmark job. Both documentation files are updated to reflect the new 4/9 recall, explain the fixture-driven ratchet, and enumerate the remaining 5 genuine frontend extraction gaps.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PhysShell/Own.NET#50: Modifies the same corpus-benchmark CI job's scripts/benchmark.py invocation by setting the --min-recall gate to 3, which this PR ratchets up to 4.

Poem

🐇 A stub here, a stub there,
The ViewModel's events now declared with care.
OWN050 no more — the leak is found!
From three-of-nine to four, recall is sound.
The gate is raised, the benchmark proud,
This bunny hops and cheers out loud! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: increasing corpus recall from 3/9 to 4/9 by fixing the screentogif-loaded-subscription fixture to be self-contained, with explicit reference to the proposal (P-012).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/recall-loaded-subscription

Comment @coderabbitai help to get the list of available commands and usage tips.

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