You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/dashboard_engine.py:655 contains a backslash inside an f-string expression part ({...}), which is a SyntaxError on Python 3.11 and earlier. This silently breaks the dashboard command on Python 3.11 (CI's quality-gate (3.11) runtime).
Root cause
Line 655:
{"<button onclick=\"showSection('compare')\">Compare</button>" if comparison else ""}
The \" inside the {...} expression is the backslash. Python 3.11 disallows backslashes in f-string expression parts. Python 3.12 (PEP 701) relaxed this rule, so the file imports fine on 3.12 but fails on 3.11.
Replace the backslash-escaped quotes with a triple-quoted string inside the expression (no backslash needed). The current line 655 uses escaped double-quotes inside the f-string expression; swap to single-quote triple-quoted string inside the expression to avoid the backslash entirely.
Using single-quote triple-quoted string inside the double-quote triple-quoted f-string body avoids both the backslash and the delimiter conflict.
Acceptance criteria
uv run --python 3.11 python3 -c "import dashboard_engine" succeeds
codelens dashboard appears in codelens --help on Python 3.11
Summary
scripts/dashboard_engine.py:655contains a backslash inside an f-string expression part ({...}), which is aSyntaxErroron Python 3.11 and earlier. This silently breaks thedashboardcommand on Python 3.11 (CI'squality-gate (3.11)runtime).Root cause
Line 655:
The
\"inside the{...}expression is the backslash. Python 3.11 disallows backslashes in f-string expression parts. Python 3.12 (PEP 701) relaxed this rule, so the file imports fine on 3.12 but fails on 3.11.Evidence
CI log from PR #71 quality-gate (3.11) job:
Python 3.11 reports the error at line 1331 (the closing triple-quote of the f-string), but the actual backslash is at line 655.
Local repro:
Impact
dashboardcommand broken on Python 3.11 — module fails to import, auto-import catches the exception silently (see [BUG-09] Command auto-import silently drops broken modules — registry missing commands with no CI signal #39), command missing from registry.quality-gateworkflow red for ALL PRs — blocks merge of unrelated PRs (fix: consolidate _default_db_path to utils.py — closes #40 #71, feat: rule-validate + rule-test commands — closes #51 #72, etc.).codelens dashboard.Fix
Replace the backslash-escaped quotes with a triple-quoted string inside the expression (no backslash needed). The current line 655 uses escaped double-quotes inside the f-string expression; swap to single-quote triple-quoted string inside the expression to avoid the backslash entirely.
Using single-quote triple-quoted string inside the double-quote triple-quoted f-string body avoids both the backslash and the delimiter conflict.
Acceptance criteria
uv run --python 3.11 python3 -c "import dashboard_engine"succeedscodelens dashboardappears incodelens --helpon Python 3.11quality-gate (3.11)passes on fix PRquality-gate (3.11)passes on PR fix: consolidate _default_db_path to utils.py — closes #40 #71 and feat: rule-validate + rule-test commands — closes #51 #72 after fix mergesRelated