Skip to content

C/C++: DEFINE_PROPERTY / DEFINE_MAP_OPTION / DEFINE_CLASS_PROPERTY name their first argument (Part of #5461) - #5545

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5461-define-property
Oct 18, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5461-define-property

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5461 (slice 2; slice 1 = #5483).

What

The macro-introduced-definition name rule: the identifier argument is not always the second. C_MACRO_FIRST_ARG_NAMES (_shared_patterns.py) lists the macros that name their FIRST argument: DEFINE_PROPERTY(name, Type, Class), DEFINE_INFO_PROPERTY, DEFINE_CLASS_PROPERTY, DEFINE_MAP_OPTION(name, true). Exact names only: DEFINE_CLASS_PROPERTY_PREFIX(prefix, name, Type, Class) keeps the general rule (second arg, already right) and DEFINE_PROPERTYKEY is ;-terminated. DEFINE_CLASS_PROPERTY* is exempted from the class-like (*CLASS*) exclusion, which wrongly dropped it. Before: DEFINE_PROPERTY(accuracy, I, Actor) { was named I, and DEFINE_MAP_OPTION(aircontrol, true) was named true.
Files: _shared_patterns.py, test_c_macro_funcs_5461.py (+18 cases, C and C++: each shape, the PREFIX neighbour, _NATIVE neighbour, PROPERTYKEY). No other file changed; the shared source feeds c.py, cpp.py and detector.py.

Class table (macro-introduced definitions)

member status
DEFINE_PROPERTY, DEFINE_INFO_PROPERTY, DEFINE_CLASS_PROPERTY, DEFINE_MAP_OPTION handled here (name = 1st arg)
DEFINE_CLASS_PROPERTY_PREFIX handled (general rule, 2nd arg; tested)
slice-1 members (CCMD, DEFINE_ACTION_FUNCTION*, CUSTOM_CVAR[D], BEGIN_COMMAND, TEST[_F], FUNC...) handled in #5483

Rescan evidence (worktree engine; scratch scans of doom-study/repos/)

Functions whose start line is a column-0 MACRO(; first-arg family named correctly vs wrongly:

port macro-line functions: r2 scan (585c243) -> now first-arg family right/wrong: r2 -> now FUNC handlers now
odamex 500 -> 688 n/a 188
zandronum 1574 -> 1777 0/219 -> 219/0 203
gzdoom 2090 -> 2327 0/148 -> 148/0 237
Counts are by source-line match (a MACRO( on the start line or the line above it); the r2 scans predate #5483 on a different engine, so only the first-arg naming and FUNC columns are attributable to a single change. Top handlers now (gzdoom): DEFINE_ACTION_FUNCTION_NATIVE 705, DEFINE_ACTION_FUNCTION 613, CCMD 307, FUNC 237, CUSTOM_CVAR 231, DEFINE_MAP_OPTION 80, DEFINE_PROPERTY 44.

Gates

Goldens (golden-lock.sh crucible_check.py --update --yes): both fixtures zero drift. tree_sitter_accuracy_audit --lang c/cpp --ci: OK. pr_gates --fast 6/6, --ratchets 8/8. tests/extraction/languages: 9651 passed. Tree-wide guards + new test file: 254 passed.

Sibling gaps

🤖 Generated with Claude Code

…me their first argument (Part of #5461)

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

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 18, 2026 23:04
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 18, 2026 23:04
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5545 @ 177d9dd: 1 failed check(s)

== graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39174944407/job/117815569068
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
2026-10-18 23:07:17,369 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:19,198 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:19,653 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:23,736 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:26,875 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:29,702 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:29,703 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:29,705 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:29,706 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:29,883 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:29,885 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:29,887 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:29,888 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:29,889 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:29,890 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:29,891 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:30,681 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:30,684 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:07:30,872 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:07:35,345 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:41,983 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:42,231 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:42,533 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:07:42,790 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
... 70 more
log tail:
| m4 | 39 | 0 | 0.0% |
| makefile | 71 | 0 | 0.0% |
| matlab | 23 | 0 | 0.0% |
| objective-c | 154 | 0 | 0.0% |
| perl | 936 | 0 | 0.0% |
| php | 1722 | 0 | 0.0% |
| pli | 46 | 0 | 0.0% |
| powershell | 73 | 0 | 0.0% |
| python | 4310 | 0 | 0.0% |
| rexx | 115 | 0 | 0.0% |
| ruby | 261 | 0 | 0.0% |
| rust | 2127 | 0 | 0.0% |
| scala | 541 | 0 | 0.0% |
| scheme | 9 | 0 | 0.0% |
| shell | 647 | 0 | 0.0% |
| solidity | 105 | 0 | 0.0% |
| swift | 132 | 0 | 0.0% |
| tcl | 291 | 0 | 0.0% |
| typescript | 7375 | 0 | 0.0% |
| yacc | 1301 | 0 | 0.0% |
| yaml | 19 | 0 | 0.0% |
| zig | 3462 | 0 | 0.0% |
span_anchor_audit: OK -- 50 language(s) measured, none rose beyond tolerance.
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/1b552371-bb23-4d93-acb4-c2c7b81d5734' 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-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Opus rescue: the only red check, graph-accuracy-audit, is the main-wide regression #5525, not this PR. #5512 (aperture foreign-license rule) marks gson's own gson/ directory as vendored. Every PR that has run this job since 18:08 UTC fails with the same numbers (java: recall_pct 64.9 -> 2.7, confident_precision_pct 99.8 -> 90.5, resolution_recall_pct 66.5 -> 31.1), including #5465, #5467 and #5503. This PR changes only the C/C++ func_start pattern and cannot affect Java call resolution.

Merged origin/main (no rebase). Main brought only mutation/case data, no engine change. Local: pr_gates --fast 6/6; test_c_macro_funcs_5461 + C/C++ strict tests 245 passed, run against this worktree. The earlier zero-drift golden bless and the C/C++ tree-sitter audit were not re-run; main has no parser change since. Recommend merging once #5525 lands, or merging past the check with that justification.

@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol squid-protocol removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 18, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5545 @ 3591a68: 1 failed check(s)

== graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39176379810/job/117819801890
repro: python tests/tools/pr_gates.py --fast
errors:
fail-on-cache-miss: false
2026-10-18 23:32:13,658 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:15,443 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:15,876 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:19,832 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:22,852 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:25,541 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:25,543 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:25,545 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:25,547 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:25,718 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:25,719 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:25,721 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:25,723 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:25,724 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:25,725 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:25,726 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:26,512 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:26,516 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-18 23:32:26,691 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-18 23:32:31,030 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:37,490 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:37,736 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:38,033 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-18 23:32:38,285 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
... 76 more
log tail:
| m4 | 39 | 0 | 0.0% |
| makefile | 71 | 0 | 0.0% |
| matlab | 23 | 0 | 0.0% |
| objective-c | 154 | 0 | 0.0% |
| perl | 936 | 0 | 0.0% |
| php | 1722 | 0 | 0.0% |
| pli | 46 | 0 | 0.0% |
| powershell | 73 | 0 | 0.0% |
| python | 4310 | 0 | 0.0% |
| rexx | 115 | 0 | 0.0% |
| ruby | 261 | 0 | 0.0% |
| rust | 2127 | 0 | 0.0% |
| scala | 541 | 0 | 0.0% |
| scheme | 9 | 0 | 0.0% |
| shell | 647 | 0 | 0.0% |
| solidity | 105 | 0 | 0.0% |
| swift | 132 | 0 | 0.0% |
| tcl | 291 | 0 | 0.0% |
| typescript | 7375 | 0 | 0.0% |
| yacc | 1301 | 0 | 0.0% |
| yaml | 19 | 0 | 0.0% |
| zig | 3462 | 0 | 0.0% |
span_anchor_audit: OK -- 50 language(s) measured, none rose beyond tolerance.
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/263eb22c-ae59-45c3-a595-ad88170d3a5e' 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-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 18, 2026
@squid-protocol
squid-protocol merged commit 2721b9f into main Oct 18, 2026
55 of 56 checks passed
@squid-protocol
squid-protocol deleted the churn/5461-define-property branch October 18, 2026 23:47
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 shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant