docs(oracle): first Dapper three-way — the Infer# trio is ownership-transfer (precision win)#27
Merged
Merged
Conversation
…rship-transfer Verified the 3 Infer# leak-class findings from the first real run against Dapper's source: all are `WrappedBasicReader`/`DbWrappedReader` whose ownership is transferred to the caller (`ExecuteReader*` returns `DbWrappedReader.Create(...)`; the `GetRowParser`/`GetDbDataReader` adapter wraps the caller's own reader). The wrapper's `Dispose()` forwards to `_reader.Dispose()` — it's the holder's disposal handle. So Infer# over-reports on the returns-IDisposable pattern, exactly the escape/ ownership-transfer case Own.NET's model treats as not-a-leak: our 0 is correct, Infer#'s 3 are likely false positives (a precision data-point, not a recall gap). CodeQL's 2 (`cs/dispose-not-called-on-throw`) are exception-path disposal, which we don't model by design. `own-only 0` also reflects coverage (async/interprocedural we under-analyse) — motivates the extractor `--stats`. Docs-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What the first Dapper three-way actually showed
Follow-up to #26: I verified the 3 Infer# leak-class findings from the first real three-way run against Dapper's source, and wrote the result into
docs/notes/oracle.mdas a worked example.Verdict: the Infer# trio is ownership-transfer — i.e. Infer# false positives, not our recall gap.
All three are
WrappedBasicReader/DbWrappedReaderinSqlMapper:WrappedBasicReader.Dispose()forwards to_reader.Dispose()— it's a caller-owned disposal handle.ExecuteReader*doesreturn DbWrappedReader.Create(cmd, reader)— the reader is handed to the caller (who disposes it).GetRowParser/GetDbDataReaderadapter wraps the caller's own reader — disposing it would close the caller's reader.So Infer# flags "not closed" exactly on the returns-
IDisposablepattern — the escape / ownership-transfer case Own.NET's model deliberately treats as not a leak. Our0is the correct verdict here; Infer#'s3look like over-reports. The oracle surfaced a precision strength, not a weakness.(CodeQL's 2 —
cs/dispose-not-called-on-throw— are exception-path disposal, which we don't model by design. Andown-only 0also reflects coverage we under-analyse — async/interprocedural — which is why the section reiterates the case for the extractor--stats.)Docs-only; no code/workflow change.
🤖 Generated with Claude Code
Generated by Claude Code