Skip to content

Commit edbf203

Browse files
committed
oracle: confirm self-owned-property fix on protobuf, trim baseline + restore scaffolding
Live protobuf oracle re-run confirms PropertyReturnsOwnedMember clears the CommandLineOptions XsltMessageEncountered self-cycle FP at the source: own-only 0, the finding absent from both own-only and the baselined section. Delete its baseline entry (protobuf baseline 5 -> 4 findings) and document the fix landed (root-cause #3 PARTLY FIXED). Restore the dev scaffolding: oracle-target.txt back to the systemevents-console fixture, remove the branch from the oracle.yml push filter. Newtonsoft serializer.Error stays baselined as an honest 'may outlive' warning (its source escapes and the handler is a parameter's delegate — non-leak is unprovable without lifetime modelling). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019846YSZ35c7CdkWQ1qX5gm
1 parent 3359edf commit edbf203

4 files changed

Lines changed: 37 additions & 22 deletions

File tree

‎.github/workflows/oracle.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ on:
4545
push:
4646
branches:
4747
- claude/zen-pasteur-76hfs1
48-
- claude/mos-ownership-summary-n3q3j4
4948
paths:
5049
- corpus/oracle-target.txt
5150

‎corpus/oracle-fp-baseline.txt‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
# --- protobuf-net/protobuf-net --------------------------------------------------
3434
protobuf-net/protobuf-net | ProtoWriter.BufferWriter.cs | OWN001 | _nullWriter | intentional null-object kept attached for pooled reuse; Dispose() documents "don't cascade dispose to the null one"
3535
protobuf-net/protobuf-net | ProtoTranscoder.cs | OWN001 | 'sync' | non-product (protobuf 'assorted' sample/extension tree); NetTranscoder is a long-lived singleton holding one ReaderWriterLockSlim for app lifetime
36-
# [fix-pending experiment] CommandLineOptions XsltMessageEncountered is cleared by the
37-
# PropertyReturnsOwnedMember fix — the source `XsltOptions` is a get-only property over a
38-
# constructed field, a self-cycle. Disabled here to confirm on a live protobuf oracle run
39-
# that it no longer fires; if confirmed it is deleted, if it resurfaces it is restored.
40-
# protobuf-net/protobuf-net | CommandLineOptions.cs | OWN001 | XsltMessageEncountered | non-product (assorted/ProtoGen) + self-subscription: publisher (xsltOptions) and the lambda subscriber are both owned by the same CommandLineOptions, co-lifetimed
36+
# CommandLineOptions XsltMessageEncountered was here (self-cycle: source `XsltOptions` is
37+
# a get-only property over a constructed XsltArgumentList field, handler captures `this`).
38+
# Now fixed at the source by PropertyReturnsOwnedMember — confirmed cleared on a live
39+
# protobuf oracle run (own-only 0, the finding absent from own-only and baselined) — deleted.
4140
protobuf-net/protobuf-net | Page.xaml.cs | OWN001 | local 'timer' | non-product (assorted/ Silverlight sample); the timer is disposed by an enclosing `using (timer) { ... }` the extractor missed
4241

4342
# --- JamesNK/Newtonsoft.Json ----------------------------------------------------

‎corpus/oracle-target.txt‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@
1313
# differentiation, on real cross-tool output rather than the selftest's fixtures.
1414
# Expect: #1 Own.NET-only (now OWN014), #2/#3/#4 dispose leaks in "Agree", 0
1515
# oracle-only.
16-
# [temporary] pointed at protobuf-net to confirm PropertyReturnsOwnedMember clears the
17-
# CommandLineOptions XsltMessageEncountered self-cycle FP; restored after the run.
18-
protobuf-net/protobuf-net
19-
include_tests=false
16+
local:corpus/fixtures/systemevents-console
17+
build=SystemEventsLeak.csproj

‎docs/notes/oracle-known-fps.md‎

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,28 @@ reason: we and the oracles occupy orthogonal niches.
2323

2424
| disposition | count | what happens on re-run |
2525
|---|---:|---|
26-
| **Fixed in the extractor** | 5 | no longer fire (all NLog `WaitForDispose` timers — see below) |
27-
| **Baselined FP** | 7 | moved to "Known FP (baselined)", out of the triage queue |
26+
| **Fixed in the extractor** | 6 | no longer fire (5 NLog `WaitForDispose` timers + protobuf `XsltOptions` self-cycle — see below) |
27+
| **Baselined FP** | 6 | moved to "Known FP (baselined)", out of the triage queue |
2828
| **Non-product (path filter)** | 2 | dropped by `--exclude-tests` (`unittest` rule) |
2929
| **True positive — kept visible** | 4 | stays in "Own.NET only" (real catch, oracle can't express) |
3030
| **True-but-benign — kept, baselined-as-sample** | 2 | (protobuf `assorted/` samples) baselined as non-product |
3131

32-
The 7 baselined FPs + the 2 non-product-sample reals = 9 findings, covered by
33-
**8 rules** in `corpus/oracle-fp-baseline.txt` (the two `NetTranscoder` copies
32+
The 6 baselined FPs + the 2 non-product-sample reals = 8 findings, covered by
33+
**7 rules** in `corpus/oracle-fp-baseline.txt` (the two `NetTranscoder` copies
3434
share one basename-keyed rule); the 2 test-base findings are the `--exclude-tests`
3535
drops; the 4 true positives are deliberately **not** suppressed.
3636

37+
**Update (extractor fix landed — protobuf self-cycle).** `CommandLineOptions.XsltOptions.
38+
XsltMessageEncountered` — a `this`-capturing handler subscribed to an event on
39+
`XsltOptions`, a get-only property over a constructed field the class owns — is now
40+
**fixed at the source** by `PropertyReturnsOwnedMember` (the self-owned-source exemption
41+
now covers a property receiver, not just `this`/fields/locals). A live protobuf re-run
42+
confirmed it: own-only **0**, the finding absent from own-only and baselined. See
43+
root-cause #3. Corpus fixture: `subscription-self-owned-property`. Newtonsoft's
44+
`serializer.Error` stays baselined — its source escapes (a returned `Create()` result)
45+
and the handler is a parameter's delegate, so proving non-leak needs lifetime modelling;
46+
the "may outlive" warning is honest, not a clear FP.
47+
3748
**Update (extractor fix landed — all NLog timers).** All 5 of the original NLog
3849
`WaitForDispose` timer FPs are now **fixed at the source**, baseline entries deleted.
3950
Four (`AsyncTaskTarget._taskTimeoutTimer`/`_lazyWriterTimer`,
@@ -147,14 +158,22 @@ entry and let the oracle re-confirm clean.
147158
structurally a no-op AND not worth surfacing. Revisit whether benign-managed
148159
field leaks should be downgraded as a class.
149160

150-
3. **Lifetime-unaware subscription** *(protobuf `XsltOptions`, Newtonsoft
151-
`serializer.Error` self-subscriptions; CsvHelper process-lived host).* OWN014's
152-
premise — a long-lived source outlives a shorter-lived subscriber — fails when
153-
publisher and subscriber are **co-lifetimed** (same owner, or both freshly
154-
created in one call) or the subscriber is **itself process-lived**. *Fix:*
155-
compare subscriber vs. source lifetime (extend the `source: "self"` handling to
156-
co-created locals and to process-lived hosts) rather than keying on "source is
157-
static/injected". See [`subscription-leaks-and-profiles.md`](subscription-leaks-and-profiles.md).
161+
3. **Lifetime-unaware subscription — PARTLY FIXED** *(was protobuf `XsltOptions`,
162+
Newtonsoft `serializer.Error`; CsvHelper process-lived host).* OWN014's premise —
163+
a long-lived source outlives a shorter-lived subscriber — fails when publisher and
164+
subscriber are **co-lifetimed** or the subscriber is **itself process-lived**.
165+
**Shipped fix:** `PropertyReturnsOwnedMember` extends the self-owned-source exemption
166+
to a **property** receiver — `this.OwnedProp.Event += handler`, where `OwnedProp` is a
167+
get-only property over a member the class constructs, is the same collectable
168+
self-cycle as the owned field directly (get-only required: a settable property could
169+
be reassigned to an injected object). Cleared protobuf `XsltOptions` on a live re-run
170+
(own-only 0); corpus fixture `subscription-self-owned-property`. **Still open:**
171+
Newtonsoft `serializer.Error` — the source is a returned `Create()` result (escapes)
172+
and the handler is a parameter's delegate; the source's lifetime relative to the
173+
handler is genuinely unprovable syntactically, so the "may outlive" warning is honest
174+
(baselined, not a clear FP). CsvHelper's process-lived host needs a "subscriber is
175+
itself process-lived" signal — still open. See
176+
[`subscription-leaks-and-profiles.md`](subscription-leaks-and-profiles.md).
158177

159178
4. **Non-product trees** *(protobuf `assorted/`, CsvHelper `docs-src/`, protobuf
160179
`BuildToolsUnitTests/`).* Sample/extension/doc-generator code that was never

0 commit comments

Comments
 (0)