Repository navigation
docs: WPF audit coverage matrix + net472 string-canonicalization design note - #15
Conversation
A standalone, self-contained HTML view over the new engines, separate from
viz/build_dashboard.py so neither refactors the other. Computes straight from the
stand artifacts via the engine modules:
- graph.json -> coupling map (Instability vs Abstractness on the main sequence, or
Ce/Ca bars when no is_abstract flag) + architecture findings by rule + a per-namespace
Ca/Ce/I/A/D table.
- drift.json -> drift risk buckets + a risk-tagged "what moved" table.
- findings.json + runtime.json -> runtime correlation donut (confirmed / static-only /
blind spot) + a confirmed-and-unpredicted-leaks table with confidence.
Every section is optional and renders a muted empty-state when its artifact is absent,
so it smokes in CI (no stand data) and lights up on the stand. XSS-safe (esc() before any
innerHTML, <>& escaped in the embedded JSON), Plotly vendored for a fully offline file.
Verified headless: 4 charts mount, drift/runtime tables populate, zero console errors;
empty-state renders cleanly. Wired into the CI dashboard smoke.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
… claim/unicode (Codex+CodeRabbit)
- _safe_json now distinguishes a MISSING artifact (-> None, empty-state) from a present-
but-malformed one (-> raise); the graph block lets Graph's schema ValueError propagate
instead of swallowing it, so a stale/corrupt graph.json fails loudly rather than
rendering as "not collected yet".
- runtime correlation accepts a list-shaped findings.json (top-level list) as well as the
usual {"findings": [...]} dict, so the section isn't silently empty.
- _plotly_tag keeps the CDN fallback (parity with build_dashboard.py + the gitignored
4.5MB vendor blob; fail-loud would break the CI smoke) but now WARNS on fallback, and the
docstrings no longer overclaim "self-contained/offline" — Plotly is inlined only when
vendored, else CDN.
- Ruff RUF001: replace ambiguous unicode in HTML copy with entities/ASCII
(3–5, static × heap, null-cell '-').
Re-verified headless: 4 charts, drift/runtime tables populate, zero console errors;
malformed/stale graph now raises; empty-state and list-findings paths both build.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
…CodeRabbit)
- build_arch_dashboard: a present-but-malformed drift.json (e.g. {}) or a
findings.json with a non-list "findings" / a non-object runtime.json now raise
instead of silently rendering as a missing-artifact empty-state; only an absent
file maps to empty-state. Consistent with the _safe_json fix.
- Both dashboards: SRI-pin the Plotly CDN fallback with
integrity="sha384-cCVCZkAj…" + crossorigin="anonymous" so the remote bundle
can't be swapped silently. The hash is of plotly-2.35.2.min.js, verified
byte-identical to the vendored viz/plotly.min.js.
Verified: bad drift/findings shapes raise; the SRI fallback tag is well-formed;
both dashboards still build (CI smoke); demo stays headless-clean (4 charts, 0
console errors).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
…gn note Capture two things so nothing on the wishlist is lost: - docs/wpf-audit-coverage.md: every WPF smell (event leaks, timers, binding, PropertyChanged hell, virtualization, Freezable, data duplication) mapped by detection technique (static-C# / static-XAML / runtime-heap / runtime-trace), status (have / small-rule / gap), and Avalonia-oracle mappability. Names the two unbuilt surfaces — a XAML analyzer and a runtime-trace collector — and the WPF-only tail (Freezable, DevExpress, CommandManager/DPD). Governing principle: suspect statically, confirm at runtime (phase-5 philosophy applied to perf). - docs/string-canonicalization.md: the net472 CLR string-dedup branch, framed in the project's analyzer-then-mutator terms. Phase A analyzer (ClrMD heap dup-string report: count/total/wasted bytes/retention + Roslyn birth sites) folds into phase 5. Phase B mutator (AdaptiveStringCanonicalizer + Cecil/Profiling-API+ReJIT/ Harmony) is opt-in, approved-sites-only, new-strings-only. Whole-heap reference rewrite explicitly rejected (breaks ReferenceEquals/lock(string)/identity caches/ unsafe — why dotnet/runtime's GC string dedup never shipped). Staged PoC plan + net472 specifics; analyzer is framework-agnostic so it's testable on the oracle. - own-net-auditor.md §4: cross-link both docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe PR adds a WPF audit coverage matrix, links it from the main auditor note, and adds a string-canonicalization design note covering analyzer, mutator, and test-scope details. ChangesAudit docs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/wpf-audit-coverage.md`:
- Around line 76-80: The coverage summary in the oracle/oracle-candidate
description is overstating current Avalonia coverage by listing heavy templates
and binding errors as already exercised. Update the wording in the WPF audit
coverage doc to either present those items as planned or partial coverage, or
restrict the “currently exercises” claim to the framework-agnostic core that is
actually covered today. Use the existing summary block and the terms “XAML
analyzer” and “runtime-trace collector” to keep the documented gaps aligned with
the claim.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1606cc55-4dad-4811-a224-18859fb81a9b
📒 Files selected for processing (3)
docs/own-net-auditor.mddocs/string-canonicalization.mddocs/wpf-audit-coverage.md
The summary listed heavy templates and binding errors as current oracle coverage, but the same doc marks the XAML analyzer and runtime-trace collector as unbuilt gaps. Reword into three honest buckets: today (framework-agnostic core), once the two gap surfaces exist (planned), and never (WPF/vendor-only tail). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLHz4cevQyXHKZnjzCqhoa
Что это
Два design-дока, чтобы ничего из требований не потерялось перед стройкой реальных .NET-кусков. Кода нет — только фиксация scope.
docs/wpf-audit-coverage.md— карта покрытия WPF-пакаКаждый смелл × техника детекта (static-C# / static-XAML / runtime-heap / runtime-trace) × статус (have / small-rule / gap) × маппинг на Avalonia-оракул. Покрывает весь список: event leaks, timers, binding, PropertyChanged hell, virtualization, Freezable, data duplication.
Главное, что заземляет:
docs/string-canonicalization.md— net472 string-dedupДублированный
System.Stringкак доминирующий случай оси data-duplication, в нашей рамке анализатор → точечный мутатор:AdaptiveStringCanonicalizer(неString.Intern) + Cecil/Profiling-API+ReJIT/Harmony — только approved hot sites, только новые строки.ReferenceEquals/lock(string)/identity-кэши/unsafe — ровно поэтому GC-string-dedup не въехал в dotnet/runtime). Зафиксировано, чтобы не пере-обсуждать.Плюс кросс-линк обоих из
own-net-auditor.md §4.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit