Skip to content

CodeQL quality suites: measured before any setup change; keep default setup (plan M4) - #450

Merged
seathatflowsinourveins merged 4 commits into
mainfrom
claude/codeql-quality-measure-20260927
Sep 28, 2026
Merged

seathatflowsinourveins merged 4 commits into
mainfrom
claude/codeql-quality-measure-20260927

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Scope

  • Measures the CodeQL quality suites before any setup change (plan M4), and records the decision: keep default setup, do not switch to advanced security-and-quality now, keep the PATCH to extended deferred, and leave the ruleset unchanged.
  • No workflow file or repository setting changes.
  • Base commit: ba1700ad; main merged in at f508ffba per the docs/lanes.md hot-file protocol.
  • Lane: lane:foundation.
  • Owned paths:
    • docs/decisions/2026-09-27-codeql-quality-suites.md
    • evidence/artifacts/codeql-quality-measure-20260927/
    • manifests/evidence.json

SOTA sources

  • https://github.com/github/codeql-action release codeql-bundle-v2.27.1. It is the CLI version the live default setup used at ba1700ad, and it was verified with the API digest, the checksum asset and gh release verify-asset.
  • https://github.com/github/codeql query suites python/javascript/actions *-code-quality.qls and *-security-and-quality.qls.
  • GitHub docs on CodeQL query suites, default setup and Code Quality availability. The paid Code Quality product is Team/Enterprise only, so it does not apply to this user-owned repository.

Evidence-class table

Claim Evidence class Command / receipt
Local default-suite SARIF equals live default setup at ba1700a (python 16=16, js 1=1, actions 0=0) native_proven evidence/artifacts/codeql-quality-measure-20260927/
Result counts: code-quality python 979, js 188, actions 0 (0 queries selected); security-and-quality python 1072 native_proven same receipt
20-alert stratified sample: 8 false positive, 8 real and actionable (7 hygiene, 1 reliability), 4 real but not actionable source_review triage table in receipt
Recommendation and overturn condition decision docs/decisions/2026-09-27-codeql-quality-suites.md

Local commands run

$ codeql database create/analyze (2.27.1) for python, javascript-typescript, actions; 4 suites each
$ gh release verify-asset codeql-bundle-v2.27.1 codeql-bundle-linux64.tar.gz --repo github/codeql-action
exit 0 (negative control fails)
$ python3 scripts/validate.py
passed

Decision record

docs/decisions/2026-09-27-codeql-quality-suites.md. It records:

  • the alternatives: switch to advanced security-and-quality; PATCH the default setup to extended; keep as is;
  • the measured signal: the quality gate would add about 1,250 open alerts, mostly noise or hygiene that the gate ignores;
  • the overturn condition.

The 8 real actionable findings are listed for follow-up. They are not fixed here.

Review

  • Claude evidence-reviewer: no changes needed. Minor residuals are recorded in the receipt.
  • Cross-family GPT-6 review (codex exec -s read-only -m gpt-6-astra, effort max, on 90dbf097, 2026-09-28): changes-needed.
    • P2: alternative 4 claimed the same gate effect as security-and-quality, but it omits 43 Python results, including 30 error-level py/uninitialized-local-variable.
    • P2: a bare wait in run.sh let a replay exit 0 with ALL DONE after failed steps.
  • Repair round (8424dc33):
    • Alternative 4 now states the measured difference.
    • run.sh waits on each PID and stops the analysis loop on a failed step. It was probed with a stub codeql.
    • The retained logs show that every step of the recorded run exited 0, so the recorded counts stand.
    • A Claude stack-verifier re-ran the probes, including an exact 12-SARIF comparison: pass.
  • Residual: with no argument, set -u stops run.sh before it clears steps.tsv. This predates the change.

Checklist

  • No Actions changed.
  • No secrets.
  • No paid hosting.
  • Peer files preserved.

🤖 Generated with Claude Code

Scout and others added 2 commits September 27, 2026 22:37
Measure the CodeQL quality suites with the CLI version live default setup
uses (2.27.1, from the verified codeql-bundle-v2.27.1 release of
github/codeql-action) at ba1700a for python, javascript-typescript and
actions: the default, security-extended, code-quality and
security-and-quality suites. The local default-suite SARIF matches the live
default-setup SARIF of the same commit exactly.

A stratified 20-alert code-quality sample judged against source gives
8 false positives, 8 real and actionable (7 hygiene, 1 reliability) and
4 real but not actionable (captured pages under evidence/). None of the
6 error-level sampled alerts is actionable. A 6-alert supplement of
gate-relevant rules that only the broader suites add is 6/6 false positive.

The decision record keeps default setup and the ruleset unchanged, keeps
the PATCH to extended deferred, and states the overturn condition. No
workflow file or repository setting is changed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Hash-list the ten files of evidence/artifacts/codeql-quality-measure-20260927/
and docs/decisions/2026-09-27-codeql-quality-suites.md through
host_receipts.register_file, as the hot-file protocol in docs/lanes.md
prescribes. This is the branch's last commit so a rebase can take main's
manifests/evidence.json and re-register these eleven paths.
component_matrix.py --check and new_host_grand_list.py --check both pass,
so the generated reports need no rewrite.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 28, 2026
Scout and others added 2 commits September 28, 2026 03:20
The cross-family review of PR #450 found two P2 defects. Both reproduced.

Alternative 4 (security-extended plus code-quality.qls) is not equivalent
to security-and-quality. In counts.json, Python omits 43 results: overlap
.python security_and_quality_results_in_neither_default_nor_code_quality
= 77, less overlap["python:extended"].extended_results_not_in_default = 34.
per_rule gives 30 py/uninitialized-local-variable (error), 11
py/cyclic-import (note) and 2 py/unnecessary-delete (warning).
error_level_non_security is 60 for code-quality and 90 for
security-and-quality. JavaScript is 13 = 13 with no omitted result. Source
for why the rules miss code-quality, from the bundle: suite-helpers 1.0.58
code-quality-selectors.yml requires precision high or very-high and the
quality tag. In python-queries 1.8.11, Variables/UninitializedLocal.ql has
@precision medium, and Imports/CyclicImport.ql and
Statements/UnnecessaryDelete.ql lack the quality tag. The decision now
states the measured difference and gives option 4 its own rejection reason.

run.sh waited with a bare `wait`, which "waits for all running background
jobs ... and the return status is zero" (bash(1) 5.2, SHELL BUILTIN
COMMANDS, wait; `help wait`). Its analysis loop also ignored failed steps.
It now keeps each pipeline's $!, waits on each PID and stops a pipeline at
its first failed step. It writes ALL DONE and exits 0 only when all three
pipelines succeed; otherwise it appends a FAILED line and exits 1. The
CodeQL argv is unchanged: the control-case argv diff is empty. Replay with
a stub codeql that returns 23:
- before: all creates failing gave exit 0 with ALL DONE; a failing middle
  analysis gave exit 0 after 12 steps;
- after: the same cases give exit 1 with FAILED, after 3 and 9 steps.

The recorded run was unaffected. The retained <dl>/steps.tsv has 15 step
lines, each with exit 0. Each create-*.err ends "Successfully created
database at <dl>/db/<language>.", all 12 analyze-*.err end "Exported
results to SARIF (<n>ms).", and the 12 SARIF files match
sarif_sha256.local. receipt.json records this under run_integrity, with
the sha256 of the run.sh that was used.

Checks: scripts/validate.py passed. python3 -m unittest
tests.test_evidence_manifest tests.test_validate tests.test_host_receipts
tests.test_adoption_docs_consistency ran 280 tests: OK, 1 skipped.
shellcheck is not installed on this host; bash -n passes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e protocol

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant