Skip to content

Python/Kotlin branch: match/case/when count only as statements, not method calls (#8034) - #8104

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8034-20261108T1333Z
Nov 8, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8034-20261108T1333Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #8034

What changed

Python branch counted match and case anywhere (re.match(...), self.p.match(t), match.group(1), case = 1). They are soft keywords, so they now count only as a statement: line start after indentation, a subject (not = : . , ) ]), and a : on the line. Same change in embedded_python.py (identical rule). Kotlin branch no longer counts a .when( method call ((?<!\.)).

Class / Sibling gaps

Class: a branch keyword that is also a legal identifier or method name is counted as a branch. Members handled here: Python match/case (python + embedded_python, same rule), Kotlin .when(. Each has positive and negative tests (statement forms, method calls, assignments, annotations, dict keys, the _has_generator_banner shape from the issue giving exactly 5 hits).
Sibling gaps (no burned-estate program needs any; all are (?<!\.)-style fixes plus tests, sweep scope):

  • JS/TS .default / .case / .switch property names (javascript.py, typescript.py).
  • C, Objective-C, Groovy, ACS, ZScript, YACC default/case as identifiers or member names.
  • Go default/select as identifiers.
  • F# match/when (fsharp.py).
  • Shell select as a word in arguments.
    Limitation: a match subject continued past the line, or a statement after ;, is not counted.

Golden masters

Blessed via golden-lock.sh crucible_check.py --update --yes (both legs): 65 files, 58 insertions. Drift is the Python/Kotlin branch drop plus its knock-on through risk scores, archetypes and the 3D layout coordinates (the layout is global, so languages not touched also shift by float noise; scope_check.py --expect python,embedded_python,kotlin shows that rollup).

Gates

Strict tests for python, kotlin and embedded python pass (235); audit_check.py all clear; ruff format --check clean. Not run locally: pr_gates --ratchets, tri-comparison and tree-sitter audits (left to CI).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 8, 2026 13:48
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 8, 2026 13:50
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot disabled auto-merge November 8, 2026 14:11
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

PR #8104 @ ef70caa: 3 failed check(s)

== shard 1 (1670027 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42486743803/job/128750371544
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[chocolate-doom] tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[fastdoom] tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[nugget-doom] tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[chocolate-doom] - AssertionError:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[fastdoom] - AssertionError:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[nugget-doom] - AssertionError:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
file doom_server.py: func_hash 'c632ca84bb8ca500' -> '8338382f6513ff15'
file scripts/mp_rotation_check.py: func_hash '8c11147746d962f0' -> '748a8cc49763d714'
file scripts/spectator_check.py: func_hash '1eb97c0537e46fd0' -> 'edf1f8ad42dfceef'
file wad_loader.py: func_hash 'd57f329acfca81a7' -> '7383172d42e0736c'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "sqldoom: 4 difference(s) from the golden\n file doom_server.py: func_hash 'c632ca84bb8ca500' -> '8338382f6513ff15'\n...ash '1eb97c0537e46fd0' -> 'edf1f8ad42dfceef'\n file wad_loader.py: func_hash 'd57f329acfca81a7' -> '7383172
4 failed, 7 passed, 26 deselected in 229.17s (0:03:49)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 1 (1670027 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: agentic-cobol-doom-cc,chocolate-doom,doo-cr,doomf77,doomsday,fastdoom,kocoa-doom,managed-doom,nugget-doom,prboom-plus,sqldoom
T0: 1794146109
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/69840e51-d618-4d68-8425-439eb78dcb44' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== shard 3 (1670389 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42486743803/job/128750371614
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[puredoom] tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[woof]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[woof] - AssertionError:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[puredoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
assert not "woof: 2 difference(s) from the golden\n file man/docgen: func_hash '843146583a184491' -> '703ce1b61c9276fd'\n file man/simplecpp: func_hash '8e846fcfea4e2a6f' -> '91a8ec6ae40cbb07'"
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[puredoom] - AssertionError:
puredoom: 1 difference(s) from the golden
file tools/gen_single_header.py: func_hash '1fbc242ef4da1c22' -> '59d950b9e1ed100a'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "puredoom: 1 difference(s) from the golden\n file tools/gen_single_header.py: func_hash '1fbc242ef4da1c22' -> '59d950b9e1ed100a'"
2 failed, 9 passed, 26 deselected in 229.62s (0:03:49)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 3 (1670389 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: cssdoom,doom-ascii,doom-ios,doom-scheme,doom-wasm,doom3-bfg,doom3do,dsda-doom,eternity,puredoom,woof
T0: 1794146114
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/f1b80f49-8c41-42df-ba9c-1b42ccd02884' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== shard 4 (1669847 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/42486743803/job/128750371649
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[crispy-doom] tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[freedoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[crispy-doom] - AssertionError:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[freedoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
file lumps/textures/build-textures: func_hash '70a198c98aefe925' -> '054b27dffc20213f'
file scripts/map-color-index: func_hash '084ce39c2d14da3c' -> '586e5ece7f00e5a0'
file scripts/simplecpp: func_hash '96067a8667dc7a2e' -> 'bbbcf8bcf322e578'
file scripts/test-vanilla-compliance: func_hash '066fd4228d5b1b05' -> '6454a0b078a1ce4f'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "freedoom: 6 difference(s) from the golden\n file graphics/text/smtextgen: func_hash '1a9922cad14253b2' -> '5db70c2f1...a2e' -> 'bbbcf8bcf322e578'\n file scripts/test-vanilla-compliance: func_hash '066fd4228d5b1b05' -> '6454a0b
2 failed, 9 passed, 26 deselected in 224.10s (0:03:44)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 4 (1669847 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: crispy-doom,doom-fx,doomretro,freedoom,fsharp-doom,gore,helion,inter-doom,linuxdoom,mochadoom,srb2
T0: 1794146133
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/9b79871c-406a-42dd-bebc-1e0711ca1c5b' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 8, 2026
…h( branch hits (Part of #8034)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (d564b22) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 8, 2026 14:25
@squid-shepherd squid-shepherd Bot added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Nov 8, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 8, 2026 14:30
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 8, 2026 14:31
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd
squid-shepherd Bot merged commit c0ce837 into main Nov 8, 2026
138 of 176 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8034-20261108T1333Z branch November 8, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python branch rule counts the .match( method call as a match statement

1 participant