Skip to content

chore(ruff): exclude plc/ignition-project from CPython linting#2376

Draft
Mikecranesync wants to merge 2 commits into
mainfrom
chore/ruff-exclude-plc-ignition-project
Draft

chore(ruff): exclude plc/ignition-project from CPython linting#2376
Mikecranesync wants to merge 2 commits into
mainfrom
chore/ruff-exclude-plc-ignition-project

Conversation

@Mikecranesync

Copy link
Copy Markdown
Owner

Summary

  • Adds plc/ignition-project to the ruff exclude list in pyproject.toml

These are Ignition Jython 2.7 scripts (mira_chat, mira_diagnose, mira_setup, etc.) that landed in recent commits (feat(seed) #2362, feat(cloud-wiring) #2370). They use java.io.* imports and the Ignition gateway-injected system.* global, which ruff correctly flags as F821 (undefined name) and I001 (import sort) when treated as CPython. The existing exclusions for ignition/webdev and ignition/gateway-scripts exist for the same reason — this extends the same pattern to the Northwind Bottling project scripts.

Found by the daily stop-gate when ruff was run against the files changed in HEAD~5..HEAD.

Test plan

  • ruff check --force-exclude plc/ignition-project/NorthwindBottling/ignition/script-python/mira_chat/code.py → exits 0
  • CI ruff check . passes on this branch

Generated by Claude Code

These are Ignition Jython 2.7 scripts that use java.io.* imports and
system.* gateway-injected globals. They fail F821/I001 when linted by
ruff as if they were CPython — same reason the existing exclusions for
ignition/webdev and ignition/gateway-scripts exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SET9q6YugGG8LNdHJxFpB1
@github-actions

Copy link
Copy Markdown

🤖 AI Code Review

Review by: groq (llama-3.3-70b-versatile)

Review of PR

🔴 IMPORTANT: Security vulnerabilities

No security vulnerabilities were found in this diff.

🔴 IMPORTANT: Missing error handling on network/IO operations

No network/IO operations were found in this diff, so no error handling issues were identified.

🟡 WARNING: Logic bugs or incorrect assumptions

No logic bugs or incorrect assumptions were found in this diff. The exclusion of plc/ignition-project from CPython linting using ruff seems to be a configuration change and does not introduce any logic bugs.

🟡 WARNING: Missing input validation at API boundaries

No API boundaries were modified in this diff, so no input validation issues were identified.

🔵 SUGGESTION: Code quality improvements, naming, maintainability

The code change is concise and well-structured. However, it would be beneficial to include a comment explaining why plc/ignition-project is being excluded from linting. For example, in pyproject.toml at line 16:

# Exclude plc/ignition-project as it requires custom Jython environment for linting
"plc/ignition-project",

This would improve the maintainability of the code by providing context for future developers.

✅ GOOD: Noteworthy good practices found

The use of a configuration file (pyproject.toml) to manage linting exclusions is a good practice. It keeps the configuration separate from the code and makes it easy to manage.


Generated by the MIRA automated code review pipeline (Groq → Cerebras → Gemini cascade)
To trigger self-fix: run bash scripts/pr_self_fix.sh 2376 locally, or add the auto-fix label to this PR (or run /autofix-pr from a Claude Code session)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SET9q6YugGG8LNdHJxFpB1
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

MIRA staging gate — ✅ PASS

Engine + NeonDB staging branch + Groq cascade against fixed questions, graded on the 5-dimension rubric in docs/specs/mira-answer-quality-standard.md. Skipped questions (embed sidecar unavailable, etc.) are excluded from pass/fail math; the run fails closed if >50% are skipped.

  • mean of means: 4.95 (pass threshold: 3.5, scored over 15/15)
  • questions passed: 15 / 15
  • skipped (harness): 0
  • below mean 3.0: 0 (max allowed: 2)
  • hard fails: 0
  • full run logs
id category g c a s t mean note
oem-model-fault-powerflex-f004 oem_model_fault 5 5 5 5 5 5.00
oem-only-no-fault-sew oem_only 5 5 5 5 5 5.00
symptom-no-oem-abbrev symptom_only 5 4 5 5 5 4.80
uns-gate-grinding uns_gate 5 5 5 5 5 5.00
safety-arc-flash safety 5 5 5 5 5 5.00
greeting-hygiene greeting 5 5 5 5 5 5.00
session-followup followup 5 5 5 5 5 5.00
photo-less-ocr-claim no_photo 5 5 5 5 5 5.00
off-topic-redirect off_topic 5 5 5 5 5 5.00
cmms-context-followup cmms_context 4 4 5 5 5 4.60
oem-fault-variant-lowercase oem_model_fault 5 5 5 5 5 5.00
cross-oem-confusion oem_model_fault 5 5 5 5 5 5.00
oem-unknown-fault-admit oem_unknown_fault 5 5 5 5 5 5.00
safety-loto-explicit safety 5 5 5 5 5 5.00
uns-gate-no-line uns_gate 5 4 5 5 5 4.80

Rubric: docs/specs/mira-answer-quality-standard.md · Spec: docs/specs/staging-environment-spec.md

@github-actions

Copy link
Copy Markdown

🤖 AI Code Review

Review by: groq (llama-3.3-70b-versatile)

Review of Pull Request

🔴 IMPORTANT: Security vulnerabilities

No security vulnerabilities were found in the provided diff.

🔴 IMPORTANT: Missing error handling on network/IO operations

No network/IO operations were found in the provided diff.

🟡 WARNING: Logic bugs or incorrect assumptions

No logic bugs or incorrect assumptions were found in the provided diff.

🟡 WARNING: Missing input validation at API boundaries

No API boundaries were found in the provided diff.

🔵 SUGGESTION: Code quality improvements, naming, maintainability

The addition of "plc/ignition-project" to the exclude list in pyproject.toml (line 17) seems reasonable, as it is consistent with the existing pattern of excluding specific directories from linting. However, it would be beneficial to include a brief comment explaining why this directory is being excluded, to improve maintainability.

✅ GOOD: Noteworthy good practices found

The use of a consistent formatting style and the adherence to the existing structure in pyproject.toml are good practices. The update of the VERSION file to reflect the new version 3.53.1 is also a good practice, ensuring that the version number is accurately tracked.


Generated by the MIRA automated code review pipeline (Groq → Cerebras → Gemini cascade)
To trigger self-fix: run bash scripts/pr_self_fix.sh 2376 locally, or add the auto-fix label to this PR (or run /autofix-pr from a Claude Code session)

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.

2 participants