Skip to content

fix: share string-aware comment masking across core previews - #35

Merged
bewaterhere-coder merged 4 commits into
mainfrom
fix/shared-string-aware-comment-scanner
Nov 1, 2026
Merged

bewaterhere-coder merged 4 commits into
mainfrom
fix/shared-string-aware-comment-scanner

Conversation

@bewaterhere-coder

Copy link
Copy Markdown
Owner

Summary

  • Extract the existing bounded C# and Lua comment masker into a shared Core helper.
  • Reuse it in both Semantic Rule evaluation and generic professional guidance previews.
  • Keep .asmdef files as JSON rather than applying C# comment rules to JSON string values.
  • Add Unity and Skynet regression tests where comment markers inside strings must not hide later source signals.

Why

The C# and Lua string-aware fix in Semantic Rules left a duplicate regex in professional_preview. That meant the generic Core preview path still produced false negatives for strings containing https:// or -- before a real code signal. Maintaining two scanners also risked future behavior drift.

Boundaries

  • Core-only shared source preprocessing; no engine-specific check logic added.
  • The scanner remains bounded and is not a full language parser.
  • .asmdef is treated as JSON, not C# source.
  • Findings remain advisory and non-blocking.
  • No public API or schema version change.

Validation

Python 3.10–3.13, MCP stdio E2E and Sample Project Advisory.

@bewaterhere-coder
bewaterhere-coder merged commit 6107362 into main Nov 1, 2026
6 checks passed
@bewaterhere-coder
bewaterhere-coder deleted the fix/shared-string-aware-comment-scanner branch November 1, 2026 01:40
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