Skip to content

Harden PyCharm red-lane proof - #118

Merged
cbusillo merged 1 commit into
mainfrom
fix/pycharm-red-lane-proof
Jun 21, 2026
Merged

Harden PyCharm red-lane proof#118
cbusillo merged 1 commit into
mainfrom
fix/pycharm-red-lane-proof

Conversation

@cbusillo

Copy link
Copy Markdown
Owner

Summary

  • replace the PyCharm red-lane fixture with a deterministic unresolved-reference inspection
  • add PyCharm Pro/Community RedLane proof targets, .py fallback files, and suspicious-empty-model fail-closed handling
  • update script/unit contracts so PyCharm RedLane cannot silently regress to false GREEN

Why

Issue #117 showed PyCharm 2026.1 could run the maintained RedLane fixture and report GREEN/0. The route, profile, session, indexing, and cleanup were coherent; the weak PyStatementEffectInspection fixture simply did not produce a descriptor, and the plugin only had WebStorm-specific proof-lane guards.

This patch makes PyCharm use PyUnresolvedReferencesInspection on definitely_missing_symbol() and gives PyCharm the same proof-lane shape WebStorm already needed: expected target tool tracking, targeted InspectionEngine.runInspectionOnFile fallback, and capture-incomplete/UNKNOWN instead of clean when an empty model appears in the proof lane.

Validation

./scripts/test-red-lane-smoke-script.sh
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew :test --tests com.shiny.inspectionmcp.InspectionSnapshotStateTest
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew buildPlugin

Commit hook also ran broader checks successfully:

JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew :test
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew :inspection-core:test
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew :mcp-server-jvm:test
JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew buildPlugin

Live IDE proof after installing the patched plugin and restarting IDEs:

IntelliJ: status=ok bucket=red_confirmed verdict=RED total=1 cleanup=closed product=IU fingerprint=91ace601dbf7-dirty
PyCharm:  status=ok bucket=red_confirmed verdict=RED total=1 cleanup=closed product=PY fingerprint=91ace601dbf7-dirty
WebStorm: status=ok bucket=red_confirmed verdict=RED total=2 cleanup=closed product=WS fingerprint=91ace601dbf7-dirty

PyCharm finding evidence:

{
  "inspectionType": "PyUnresolvedReferencesInspection",
  "severity": "error",
  "description": "Unresolved reference 'definitely_missing_symbol'",
  "source": "inspection_context"
}

Note: the first local PyCharm run after installing the zip still served the old in-memory plugin fingerprint and stayed GREEN/0. After restarting PyCharm, it loaded the patched plugin and produced RED. That is expected JetBrains plugin lifecycle behavior for local validation.

Refs #117
Refs #113
Refs #114

@cbusillo
cbusillo merged commit 0ace7cd into main Jun 21, 2026
4 checks passed
@cbusillo
cbusillo deleted the fix/pycharm-red-lane-proof branch June 21, 2026 15:04
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