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
The check command does not accept a positional workspace argument, but the CI quality-gate workflow calls it with . as a positional. This causes codelens.py: error: unrecognized arguments: . and exits with code 2, failing the quality-gate CI job for ALL pull requests.
Root cause
scripts/commands/check.pyadd_args() only defines optional flags:
--severity
--max-findings
--health-min
--sarif
--commands
It does NOT define a positional workspace argument (unlike most other CodeLens commands which use parser.add_argument("workspace", nargs="?", default=None)).
But .github/workflows/codelens-quality-gate.yml calls:
python3 scripts/codelens.py check . --severity high --sarif
The . is passed as a positional arg, which argparse rejects.
Evidence
CI log (quality-gate 3.11 job, repeated on every PR):
Summary
The
checkcommand does not accept a positionalworkspaceargument, but the CI quality-gate workflow calls it with.as a positional. This causescodelens.py: error: unrecognized arguments: .and exits with code 2, failing the quality-gate CI job for ALL pull requests.Root cause
scripts/commands/check.pyadd_args()only defines optional flags:--severity--max-findings--health-min--sarif--commandsIt does NOT define a positional
workspaceargument (unlike most other CodeLens commands which useparser.add_argument("workspace", nargs="?", default=None)).But
.github/workflows/codelens-quality-gate.ymlcalls:The
.is passed as a positional arg, which argparse rejects.Evidence
CI log (quality-gate 3.11 job, repeated on every PR):
Local repro:
Impact
quality-gateworkflow is red for ALL PRs - blocks merge of unrelated PRs.Fix
Two options:
Option A (recommended): Add positional workspace to check command
In
scripts/commands/check.pyadd_args():This matches the convention of all other CodeLens commands and makes the CI workflow work as-is.
Option B: Fix the CI workflow
In
.github/workflows/codelens-quality-gate.yml, change:python3 scripts/codelens.py check . --severity high --sarifto:
python3 scripts/codelens.py check --severity high --sarif(Remove the
.-checkwill auto-detect workspace from cwd.)Option A is recommended because it makes
checkconsistent with all other commands and allows explicit workspace specification.Acceptance criteria
python3 scripts/codelens.py check . --severity high --sarifworks (accepts positional workspace)quality-gate (3.11)job passes on the fix PR (assuming [BUG-01] scan: pr.store_scan_result(result) calls non-existent method — SQLite analysis_cache never populated #31 is also fixed)checkcommand without positional still works (auto-detect from cwd)Files
scripts/commands/check.py(Option A).github/workflows/codelens-quality-gate.yml(Option B, if chosen)Related