Skip to content

docs: add P-014 (semantic resolution) and P-015 (config surface) prop…#12

Merged
PhysShell merged 2 commits into
mainfrom
claude/p014-p015-doc-proposals
Jun 16, 2026
Merged

docs: add P-014 (semantic resolution) and P-015 (config surface) prop…#12
PhysShell merged 2 commits into
mainfrom
claude/p014-p015-doc-proposals

Conversation

@PhysShell

@PhysShell PhysShell commented Jun 16, 2026

Copy link
Copy Markdown
Owner

…osals

P-014 — project-local SemanticModel for the C# extractor. Fixes the OWN001 event-leak false positives where a syntax-only += match flags numeric accumulation as event subscriptions (32% FP on a real WPF codebase: sum += value, x.Qty += y.Qty, even for(...; i += step)). Tier A builds one CSharpCompilation over all inputs with TPA framework references (zero-config, no MSBuild), classifies a += as a subscription only when the LHS binds to an IEventSymbol, and emits an honest OWN050 "leakage analysis skipped" warning for unresolved external types instead of guessing. Includes the incremental rollout (event fact first), versioning/anti-drift analysis, and a Tier A build plan.

P-015 — stub for a linter-style configuration surface (check selection + per-category severity, e.g. own.toml). Generalises P-014's --event-leaks gate.

Also fix the stale proposals index (docs/proposals/README.md), which was missing P-013 entirely; add P-013/P-014/P-015 rows.

Summary by CodeRabbit

  • Documentation
    • Added proposal documentation for type-aware semantic resolution improvements in the C# extractor.
    • Added a new draft proposal defining a project-wide configuration surface for check categories.
    • Updated the proposals index to include the new entries.
    • Added a new note outlining an incremental diagnostics computation plan and when it may be revisited.

…osals

P-014 — project-local SemanticModel for the C# extractor. Fixes the OWN001
event-leak false positives where a syntax-only `+=` match flags numeric
accumulation as event subscriptions (32% FP on a real WPF codebase: `sum +=
value`, `x.Qty += y.Qty`, even `for(...; i += step)`). Tier A builds one
CSharpCompilation over all inputs with TPA framework references (zero-config,
no MSBuild), classifies a `+=` as a subscription only when the LHS binds to an
IEventSymbol, and emits an honest OWN050 "leakage analysis skipped" warning for
unresolved external types instead of guessing. Includes the incremental rollout
(event fact first), versioning/anti-drift analysis, and a Tier A build plan.

P-015 — stub for a linter-style configuration surface (check selection +
per-category severity, e.g. own.toml). Generalises P-014's `--event-leaks` gate.

Also fix the stale proposals index (docs/proposals/README.md), which was missing
P-013 entirely; add P-013/P-014/P-015 rows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 16, 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: 9d7d0cac-7cb7-4a13-a16a-a914a861dbdb

📥 Commits

Reviewing files that changed from the base of the PR and between 1a05376 and 5ec5d9b.

📒 Files selected for processing (1)
  • docs/notes/incremental-computation.md

📝 Walkthrough

Walkthrough

Adds three new documents to docs/proposals/ and docs/notes/: P-014 specifies a SemanticModel-based += discriminator for the C# extractor with tiered compilation strategy and OWN050 diagnostic; P-015 is a draft configuration-surface proposal; and a discovery note evaluates incremental computation and defers it pending interprocedural analysis gates. The proposals README index is updated to register P-013 through P-015.

Changes

Semantic resolution and configuration proposals

Layer / File(s) Summary
P-014 core design: motivation, tiers, and OWN050 plumbing
docs/proposals/P-014-semantic-resolution.md
Establishes proposal header and status, describes v0 false-positive motivation from arithmetic misclassification and unresolved external types, specifies Tier A (single compilation using TRUSTED_PLATFORM_ASSEMBLIES only) and Tier B (opt-in MSBuildWorkspace or DLL metadata references), and documents that unresolved symbols must not fall back to syntactic guessing but instead emit OWN050 through a _di_findings-style Finding channel to bypass ERROR-only filtering.
P-014 rollout scope, build plan, constraints, and spec alignment
docs/proposals/P-014-semantic-resolution.md
Defines event-only-first rollout scope, the T0–T6 incremental build plan (dependency prep, single-compilation refactor, semantic discriminator plus OWN050, --event-leaks gate, core wiring, spec/prose anti-drift, corpus tests), non-goals, versioning rules for the additive OWN050 channel, resolved decisions, and open questions around monorepo scoping and performance.
P-015 configuration surface stub and proposals index
docs/proposals/P-015-configuration-surface.md, docs/proposals/README.md
Adds the P-015 draft covering check-category enable/disable, per-category severity overrides, nearest-file discovery/precedence model, core-side enforcement constraints aligned with "one checker" discipline, severity plumbing mapping, and open questions. Updates the README index to add P-013, P-014, and P-015 rows and extends the strategy-hub range reference from P-012 to P-015.

Incremental computation planning

Layer / File(s) Summary
Incremental computation evaluation and decision
docs/notes/incremental-computation.md
Outlines the incremental-diagnostics delta idea, evaluates fit against current intraprocedural scope, documents reasons DDlog is deferred (archived status, separate Rust engine violates "one checker" constraint), defines interprocedural whole-program analysis and live IDE feedback as gates for revisiting, proposes candidate maintained alternatives (Salsa, differential-dataflow, Soufflé), enforces the "identical verdicts"/"one checker" guardrail, and concludes with a "Park it" decision to defer incremental infrastructure beyond the current file-hash cache.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 Hop, hop — proposals three arrive,
Semantic resolution comes alive!
OWN050 skips the guess,
Incremental waits in progress.
From P-twelve the docs expand to P-fifteen,
The cleanest planning a bunny's seen! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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: adding documentation for two proposals (P-014 and P-015) and updating the proposals index, which aligns with all files modified in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/p014-p015-doc-proposals

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/proposals/P-014-semantic-resolution.md (1)

206-207: ⚡ Quick win

Clarify whether unresolved-marker facts persist in OwnIR or are ephemeral intermediates.

Line 206–207 (T2) describes emitting an "unresolved marker fact (e.g. resource: "unresolved-subscription")," while line 282–285 (Versioning) states the implementation "introduces no new OwnIR input fact at all." The tension suggests the marker is an intermediate artifact (emitted by the extractor, processed by the core to produce the OWN050 Finding), but this is not explicit. Clarify whether the marker is:

  • Ephemeral (extractor → core only, not persisted), or
  • Persisted in OwnIR but does not require a version bump.
💡 Suggested clarification for the T2 description

Revise line 206–207 to:

-  - unresolved (`Symbol == null` / error-typed receiver) → emit an **unresolved
-    marker** fact (e.g. `resource: "unresolved-subscription"`) for the OWN050
-    channel. **Do not** fall back to the old syntactic guess.
+  - unresolved (`Symbol == null` / error-typed receiver) → emit an **unresolved
+    marker** (e.g. as an intermediate signal tagged `resource: "unresolved-subscription"`)
+    to the core's OWN050 channel. This marker is not persisted in OwnIR; the core
+    converts it to a Finding in T4 (see *Versioning*). **Do not** fall back to the
+    old syntactic guess.

Also applies to: 282-285

🤖 Prompt for 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.

In `@docs/proposals/P-014-semantic-resolution.md` around lines 206 - 207, The
documentation creates ambiguity about whether the unresolved marker fact
described in lines 206–207 (T2 section) is an ephemeral intermediate or
persisted in OwnIR, contradicting the statement in lines 282–285 (Versioning
section) that no new OwnIR input fact is introduced. Explicitly clarify in the
T2 section (lines 206–207) whether the unresolved marker fact is ephemeral
(extracted, processed by the core to generate OWN050 Finding, then discarded) or
persisted in OwnIR but does not require a version bump. Ensure this
clarification is consistent with the Versioning section (lines 282–285) by
either confirming no OwnIR persistence occurs or adjusting the Versioning
language to acknowledge the marker's presence without triggering a version
change.
🤖 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/proposals/P-014-semantic-resolution.md`:
- Around line 273-280: Update the cross-proposal reference citation in the text
discussing the P-013 "one checker" rule. Locate the phrase that currently reads
"P-013:19-21" within the context of "its governing constraint is the ROADMAP
'one checker' rule" and change the line range from "19-21" to "18-20" to
correctly point to where the "one checker" rule is actually defined in proposal
P-013.

---

Nitpick comments:
In `@docs/proposals/P-014-semantic-resolution.md`:
- Around line 206-207: The documentation creates ambiguity about whether the
unresolved marker fact described in lines 206–207 (T2 section) is an ephemeral
intermediate or persisted in OwnIR, contradicting the statement in lines 282–285
(Versioning section) that no new OwnIR input fact is introduced. Explicitly
clarify in the T2 section (lines 206–207) whether the unresolved marker fact is
ephemeral (extracted, processed by the core to generate OWN050 Finding, then
discarded) or persisted in OwnIR but does not require a version bump. Ensure
this clarification is consistent with the Versioning section (lines 282–285) by
either confirming no OwnIR persistence occurs or adjusting the Versioning
language to acknowledge the marker's presence without triggering a version
change.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b3b599c0-76b4-4b6f-bda6-1a9ba27f7dfe

📥 Commits

Reviewing files that changed from the base of the PR and between 575a47d and 1a05376.

📒 Files selected for processing (3)
  • docs/proposals/P-014-semantic-resolution.md
  • docs/proposals/P-015-configuration-surface.md
  • docs/proposals/README.md

Comment on lines +273 to +280
`OWNIR_VERSION` bump. `OWNIR_VERSION = 0`, bumped only "whenever the fact
vocabulary changes incompatibly" (ownir.py:77-81); the existing additive precedent
is explicit — "the resource/type fields are additive and optional, so they do NOT
bump `ownir_version`" (ownir.py:48-51). `load()` rejects only a mismatched integer
and treats an absent field as current (ownir.py:200-208). This discipline
originates in **P-001:93-97** and the `ownir.py` docstring — *not* P-013 (an
earlier draft mis-cited P-013, which contains no version rule; its governing
constraint is the ROADMAP "one checker" rule, P-013:19-21).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify P-013 file exists and contains the cited passage.
if [ -f docs/proposals/P-013-*.md ]; then
  rg -n 'one checker' docs/proposals/P-013-*.md -B 2 -A 2 | head -20
else
  echo "P-013 file not found in docs/proposals/"
fi

Repository: PhysShell/Own.NET

Length of output: 563


🏁 Script executed:

#!/bin/bash
# Check P-013 for version-related content
echo "=== Checking for version/versioning content in P-013 ==="
rg -i 'version' docs/proposals/P-013-*.md -n | head -20

echo ""
echo "=== Full context around lines 18-21 in P-013 ==="
sed -n '15,25p' docs/proposals/P-013-*.md | cat -n

Repository: PhysShell/Own.NET

Length of output: 682


Correct the line number citation for the P-013 "one checker" rule.

The cross-proposal reference is substantively correct: P-013 does contain the "one checker" rule that governs the versioning constraint, and P-013 contains no version rule. However, the rule spans lines 18–20, not 19–21. Update the citation to: "its governing constraint is the ROADMAP 'one checker' rule, P-013:18-20."

🤖 Prompt for 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.

In `@docs/proposals/P-014-semantic-resolution.md` around lines 273 - 280, Update
the cross-proposal reference citation in the text discussing the P-013 "one
checker" rule. Locate the phrase that currently reads "P-013:19-21" within the
context of "its governing constraint is the ROADMAP 'one checker' rule" and
change the line range from "19-21" to "18-20" to correctly point to where the
"one checker" rule is actually defined in proposal P-013.

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.

1 participant