docs(runtime): give the retention witness its section, and take back the comment that outlived its method - #335
Draft
PhysShell wants to merge 1 commit into
Draft
docs(runtime): give the retention witness its section, and take back the comment that outlived its method#335PhysShell wants to merge 1 commit into
PhysShell wants to merge 1 commit into
Conversation
…the comment that outlived its method The remainder PR #280 left behind (#334). Three items, no code restored. **1. A doc comment outlived its method.** `0753a45` extracted the witness "minus the dominator tree" and removed the method but kept its `<summary>`, which C# then bound to the next member regardless of the blank line. `Dispose()` was documented as *"the dominator tree of the whole live graph, with retained sizes"* — the file advertising the one capability the extraction removed. Deleted. **2. `RetentionPath` was the only runtime tool with no README section**, while `README.md:27` kept advertising *"Heap analysis (retained, duplicates, retention paths) — ClrMD"* in the stack table. It now has one, covering what the two verbs answer and why the split matters: `census` first, because `ClrHeap.EnumerateObjects()` returns uncollected garbage too and a big heap is not evidence of a leak; then `roots`, with the field names that turn "this object is alive" into "this field is holding it". Including the parts that constrain trust rather than advertise: shares are shares of the RESOLVED SAMPLE and never of the population; the verdict is computed over every instance so no display budget can move it; a `[stack]` root is liveness, not retention; the type matcher deliberately refuses `System.Func<…GTDGoody…>` because it once confidently reported a 2-hop path to the wrong object. Plus the exit-code table and why exit 2 is a tier of its own. The Layout block and the Status list were both missing the tool as well; both now name it, and Status records the dominator tree under **Deferred** rather than leaving it unmentioned. **3. The dangling pointer.** `Heap.cs:34` told the reader "See the README" about the dominator tree, and the README had nothing to see. It now points at the section that exists, says plainly that dominance is NOT implemented here, and sends anyone who wants the reasoning to #334 — where the extracted implementation's argument is recorded. `Dominators.cs` is not restored, per the issue. The comment in the csproj that names the exclusion stays; it is the record of a decision, and the only thing wrong with it was that everything it pointed at was missing. One correction to #334 itself: it located the dangling pointer in `Program.cs`. It is in `Heap.cs:34`. `Program.cs` mentions the dominator tree too, but as an aside without a cross-reference, so it needed nothing. Verified: build 0 warnings / 0 errors, classifier selftest 16/16, ingest selftest 26/26, tests/run_tests.py wpf 28/28. Checked that all four runtime tools now have a README section, and that no dominator code came back. Closes #334. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Lmcv3X9PoELp8CGDfNc9m
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes #334 — the remainder carved out when PR #280 was closed as superseded. Independent of #333: different branch, no shared files, mergeable in any order.
Dominators.csis not restored, per the issue.Что и зачем
0753a45приземлил свидетеля «minus the dominator tree» — решение осознанное и записанное в csproj. Но три вещи остались висеть:<summary>про доминаторы пережил свой метод и стал документацией кDispose();RetentionPathоказался единственным из четырёх runtime-инструментов без секции в README, хотя таблица его возможность обещает; и указатель «See the README» вёл в пустоту. Здесь всё три закрыты, кода не возвращено.1. A doc comment outlived its method
The extraction removed the method and kept its
<summary>, which C# then binds to the next member regardless of the blank line:So the file advertised, on
Dispose(), precisely the capability the extraction had removed. Deleted.2.
RetentionPathhad no README sectionIt was the only one of the four runtime tools without one, while
README.md:27kept advertising "Heap analysis (retained, duplicates, retention paths) — ClrMD" in the stack table:LeakHarnessDuplicateDetectorPropertyChangedStormRetentionPathThe new section covers what the two verbs answer and why the order matters —
censusfirst, becauseClrHeap.EnumerateObjects()returns uncollected garbage too and a big heap is not evidence of a leak; thenroots, with the field names that turn "this object is alive" into "this field is holding it".Deliberately weighted toward the parts that constrain trust rather than advertise:
--sample,--max-hops) can move the diagnosis or the exit code;[stack]root is liveness, not retention;System.Func<…GTDGoody…>because it once confidently reported a 2-hop path to the wrong object;Plus the exit-code table and why exit 2 is a tier of its own, cross-linked to
docs/runtime-witness-operations.md.LayoutandStatuswere missing the tool too; both now name it, andStatusrecords the dominator tree under Deferred instead of leaving it unmentioned.3. The dangling pointer
Heap.cs:34said "See the README" about the dominator tree and the README had nothing to see. It now points at a section that exists, states plainly that dominance is not implemented here, and sends anyone wanting the reasoning to #334, where the extracted implementation's argument is recorded.Одна поправка к самому #334
Issue поместил dangling pointer в
Program.cs. Он вHeap.cs:34.Program.csтоже упоминает dominator tree, но как ремарку без перекрёстной ссылки, поэтому править там нечего. Записываю, потому что issue писал я, и ошибка в нём — моя.Тип изменения
Как проверено
dotnet build audit/runtime/RetentionPath -c Release→ 0 warnings, 0 errorsRetentionPath selftest→ 16/16python audit/runtime/ingest.py --selftest→ 26/26python tests/run_tests.py→ exit 0, wpf 28/28Dominators.csне вернулсяСвязанные issue
Closes #334. Refs #280 (closed as superseded), #309,
0753a45.Чеклист
Generated by Claude Code