GitNexus/.github
Parafee41 7916c315f0
ci: fail tree-sitter summary parse drift (#2246)
* ci: fail tree-sitter summary parse drift

* docs(ci): cross-reference readiness regexes to their test mirror

The two report.match() literals in the upsert-issue github-script step are
duplicated as _ISSUE_READY_RE / _ISSUE_BLOCKER_RE in
test_check_tree_sitter_upgrade_readiness.py, and only the Python copy is
asserted against the rendered report. Since a stale regex now throws via
requireMatch (instead of the old silent '?' fallback), add a reciprocal
keep-in-sync note at the workflow site so a future prose edit can't desync
the JS literal from the asserted mirror undetected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(ci): route read-phase network failures to fetch_failed, not a crash

npm_view_json and fetch_text caught only (URLError, HTTPError[, JSONDecodeError]).
urllib wraps connect-phase OSErrors into URLError, but a failure during
resp.read() AFTER urlopen returns (ConnectionResetError, ssl.SSLError,
socket.timeout, http.client.IncompleteRead) is not a URLError subclass — it
escaped the helper, crashed main(), and left stdout empty. main() is unguarded
(the only top-level except wraps just stdout.reconfigure), and the report print
is its last statement, so an empty report then makes the workflow's requireMatch
throw on a non-drift scheduled run.

Broaden both except tuples with OSError + http.client.IncompleteRead so a
transient mid-body network blip yields None, routing the grammar to the existing
fetch_failed blocker bucket (a complete report) — preserving the fail-loud intent
for real drift while removing the crash-to-empty-stdout path. JSONDecodeError
stays explicit (it is a ValueError, not an OSError). Adds read-phase regression
tests that fail on the old narrow tuple.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(ci): document the regex-contract assertion counts

test_issue_update_summary_regex_matches_current_report asserts hardcoded
capture groups ("9","10") and "2" with no explanation. Document the
derivation from _render_report()'s mock corpus — 9 of 10 npm grammars Ready
(tree-sitter-cpp is the intentional pin), 2 blockers (pinned tree-sitter-cpp +
held vendored tree-sitter-c) — so a future grammar or pin change is an obvious
two-step update (mock + counts) rather than a mystery failure. Assertions
unchanged; comment only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci: name _Resp method receivers 'self' to clear py/not-named-self

The _Resp stub inside _patch_urlopen named its method receivers
`self_inner`, which CodeQL flags as py/not-named-self (PEP 8) — three
alerts on this PR's merge ref (lines 230/233/236). _patch_urlopen is a
@staticmethod, so there is no outer `self` to collide with; rename the
receivers to the conventional `self`. Pure rename, no behavior change.

All 25 tests in test_check_tree_sitter_upgrade_readiness still pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 20:45:09 +01:00
..
actions fix(security): Pin Docker Node base images, remove runtime package-manager CVE surface, verify Trivy on PRs, and harden Dependabot policy (#1455) 2026-05-09 16:55:31 +01:00
ISSUE_TEMPLATE docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
prompts feat(review): add PR reviewer swarm agents (#1851) 2026-05-29 18:24:16 +01:00
scripts ci: fail tree-sitter summary parse drift (#2246) 2026-06-20 20:45:09 +01:00
workflows ci: fail tree-sitter summary parse drift (#2246) 2026-06-20 20:45:09 +01:00
CODEOWNERS docs: clarify local development setup in CONTRIBUTING (#2024) 2026-06-04 09:13:27 +01:00
dependabot.yml fix(security): Pin Docker Node base images, remove runtime package-manager CVE surface, verify Trivy on PRs, and harden Dependabot policy (#1455) 2026-05-09 16:55:31 +01:00
FUNDING.yml process maps and funding.yml 2026-01-28 13:14:16 +05:30
PULL_REQUEST_TEMPLATE.md docs: agent development framework, GitHub templates, eval refactor (#479) 2026-03-25 06:48:41 +00:00
release-drafter.yml ci: standardize workflow concurrency and automate release-note labeling (#837) 2026-04-15 13:24:53 +01:00
release.yml feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
vendored-grammars.json fix(ci): align tree-sitter readiness + grammar-update workflows on a shared manifest (#858) (#2187) 2026-06-13 16:15:49 +01:00
zizmor.yml refactor(ci): unify release pipeline under publish.yml (#1610) 2026-05-16 07:46:56 +01:00