Skip to content

Fix corrupted test file: restore proper newlines in test_kql_rules.py#81

Merged
TFT444 merged 2 commits into
devfrom
fix/test-file-corrupted-newlines
Jun 6, 2026
Merged

Fix corrupted test file: restore proper newlines in test_kql_rules.py#81
TFT444 merged 2 commits into
devfrom
fix/test-file-corrupted-newlines

Conversation

@TFT444
Copy link
Copy Markdown
Owner

@TFT444 TFT444 commented Jun 5, 2026

Summary

This is the root cause of all 6 PR CI failures.

tests/detection-rules/test_kql_rules.py was stored as a single-line file with literal \n escape sequences instead of real newlines. This was introduced in the previous session when the file was pushed using the MCP push_files tool, which encoded the content incorrectly.

Effect: Every branch based off dev fails CI with:

SyntaxError: unexpected character after line continuation character
tests/detection-rules/test_kql_rules.py:1:201

...because Python sees the entire 45KB file as a single line ending with \ characters mid-token.

Fix: Restored the 1,260-line properly formatted Python source by converting literal \n sequences to real newlines.


How to test

After merging:

  1. CI on this PR should show python-tests and python-lint passing
  2. Re-run CI on any of the failing PRs (Add UK incident reporting compliance assistant Logic App #75Add RetailShield capability matrix #80) — they should now pass those two jobs

Generated by Claude Code

The file was stored with literal \n escape sequences instead of real
newlines (caused by MCP push_files encoding in the previous session),
making it a single-line file that fails syntax parsing and flake8.
Restores the 1260-line properly formatted Python source.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
retail-shield Ready Ready Preview, Comment Jun 6, 2026 10:52am

@TFT444 TFT444 merged commit ba75a76 into dev Jun 6, 2026
8 checks passed
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