Commit 75a9fce
[FEATURE] GraphQL Escape Sequence Lint Gap and Untested Mutation Syntax (#4073)
## Summary
Two invalid Python escape sequences (`\$`) in `_cmd_rpc_issues.py` emit
`SyntaxWarning` on Python 3.13 and will become `SyntaxError` in a future
Python release. The fix corrects the escape sequences, adds ruff `W605`
(invalid-escape-sequence) and pytest `filterwarnings` gates, introduces
runtime structural validation for GraphQL mutation variable
declarations, and strengthens existing test assertions with
forward-looking structural checks.
This is a four-step immunity approach: (1) fix the `\$` escapes at lines
293 and 303, (2) add lint and pytest warning gates to pyproject.toml and
guard infrastructure, (3) add runtime structural validation for mutation
variable declarations, and (4) strengthen existing test assertions to
validate variable declaration syntax and absence of backslash artifacts.
## Requirements
`autoskillit order` sessions print compile-time warnings to the user's
terminal on first import:
```
.../autoskillit/recipe/_cmd_rpc_issues.py:293: SyntaxWarning: invalid escape sequence '\$'
f"{alias}: createIssue(input: \$i{idx}) {{ issue {{ number url }} }}"
.../autoskillit/recipe/_cmd_rpc_issues.py:303: SyntaxWarning: invalid escape sequence '\$'
+ ",".join(f"\$i{k}: CreateIssueInput!" for k in range(len(chunk)))
```
`\$` is not a valid Python escape sequence. The backslash is silently
dropped on current Python so the GraphQL is accidentally valid at
runtime, but the code is formally incorrect and on a deprecation path to
hard failure.
Scope of fix:
1. Replace `\$` with `$` at both sites (lines 293 and 303).
2. Add `W605` to ruff `select` in pyproject.toml to catch invalid escape
sequences.
3. Add `filterwarnings = ["error"]` for headless test gates.
4. Add runtime structural validation for mutation variable declarations.
5. Strengthen `test_batch_create_issues_constructs_graphql_mutation`
with structural assertions for variable declaration/reference syntax.
## Implementation Plan
Plan file:
`/home/talon/projects/autoskillit-runs/remediation-20260611-105557-432256/.autoskillit/temp/rectify/rectify_graphql_escape_lint_gap_2026-06-11_110500.md`
Closes #4062
🤖 Generated with [Claude Code](https://claude.com/claude-code) via
AutoSkillit
<!-- autoskillit:pipeline-signature
steps=prepare_pr,run_arch_lenses,compose_pr,annotate_pr_diff,review_pr
-->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 829904e commit 75a9fce
3 files changed
Lines changed: 93 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | | - | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
118 | 135 | | |
119 | 136 | | |
120 | 137 | | |
| |||
290 | 307 | | |
291 | 308 | | |
292 | 309 | | |
293 | | - | |
| 310 | + | |
294 | 311 | | |
295 | 312 | | |
296 | 313 | | |
| |||
300 | 317 | | |
301 | 318 | | |
302 | 319 | | |
303 | | - | |
| 320 | + | |
304 | 321 | | |
305 | 322 | | |
306 | 323 | | |
307 | 324 | | |
| 325 | + | |
308 | 326 | | |
309 | 327 | | |
310 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
| 446 | + | |
| 447 | + | |
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
| |||
597 | 600 | | |
598 | 601 | | |
599 | 602 | | |
| 603 | + | |
600 | 604 | | |
601 | 605 | | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
602 | 609 | | |
603 | 610 | | |
604 | 611 | | |
| |||
608 | 615 | | |
609 | 616 | | |
610 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
611 | 631 | | |
612 | 632 | | |
613 | 633 | | |
| |||
693 | 713 | | |
694 | 714 | | |
695 | 715 | | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
702 | 729 | | |
703 | 730 | | |
704 | 731 | | |
| |||
1326 | 1353 | | |
1327 | 1354 | | |
1328 | 1355 | | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
0 commit comments