Skip to content

C/C++: a backslash-continued directive is blanked to its last line (Part of #6266) - #6793

Merged
squid-shepherd[bot] merged 3 commits into
mainfrom
churn/6266-20261027T1227Z
Oct 27, 2026
Merged

squid-shepherd[bot] merged 3 commits into
mainfrom
churn/6266-20261027T1227Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6266 (DOOM-rosetta check 7, callgraph).

What

Fix location: engine (gitgalaxy/core/detector.py, _apply_literal_shield). The shield treats # / // as a line comment ending at the first newline, so a backslash-continued #define kept its 2nd..nth lines live and every call in the macro body leaked into the enclosing function's call list. For C/C++/Objective-C a directive or // comment now ends at the first newline not escaped by \; the blanked span keeps its newlines, so line numbers do not move.

This was the largest remaining scored shape class: engine-only macro edges (~46 across srb2, doomsday, odamex, doom3-bfg).

Tests

tests/extraction/languages/test_c_family_continued_directive_6266.py (5 tests): continued define blanked, line numbers preserved, lone backslash not a continuation, CRLF continuation (C), and a plain single-line define unchanged.

Golden re-bless (both fixtures, golden-lock.sh crucible_check.py --update --yes)

Drift is only this leak: 19 call pairs drop (165324 -> 165305) in cpython ceval.c/compile.c, godot object.cpp/gdscript_vm.cpp, racket eval.c (defined, Py_STRINGIFY, _PyObject_ASSERT_FAILED_MSG, SCHEME_*, ...). Both fixtures move identically; no other section changed.

Verification

pr_gates --fast 9/9, pr_gates --ratchets 9 pass, tree-wide guard tests + new tests 334 passed. Merge with main is clean.

Class / Sibling gaps

Class: a C-family directive or comment whose continuation the shield does not follow.

  • Other continuation forms (a \-continued // comment is covered here; /* */ is handled by the prism splitter).
  • No port reaches 0/0 callgraph yet, so expected_fails is unchanged. Remaining misses per port (burned-estate program needing each: none, DOOM ports are not mainframe): srb2 absent 14 (hw_main.c:356 HWR_RenderPlane, lua_hudlib.c:878 libd_drawString) and unparsed (win_dbg.c, p_user.c FixedAngle); doomsday ~35 misses / 28 absent; odamex ~21 / 27; gzdoom ~22; eternity ~12; doom3-bfg ~12; kocoa-doom not examined.

Remaining slices

  • absent class (srb2, doomsday, odamex): next largest scored class.
  • unparsed misses (functions the engine does not open).
  • Fresh re-measure of macro engine-only counts and callgraph_baseline.json refresh (not done here; no baseline row was hand-edited).

Checklist: partial [c:0254d813] -- continued-define macro class fixed; absent/unparsed classes and the per-port 0/0 + expected_fails drops remain.

Lessons for agents

  • git diff --stat on golden-master JSON shows Bin/- (diff attribute unset): use git diff -a -U0 to read the real drift.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 27, 2026 08:32
… local multi-line #define no longer leaks calls (Part of #6266)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e bodies drop (Part of #6266)

Drift is only the continued-directive leak fixed in the previous commit:
cpython ceval.c/compile.c, godot object.cpp/gdscript_vm.cpp, racket eval.c lose
macro-body callees (defined, Py_STRINGIFY, SCHEME_*). 165324 -> 165305 call
pairs; both fixtures move identically.

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 27, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 27, 2026 12:50
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 27, 2026 12:50
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6793 @ f54a551: 1 failed check(s)

== call-graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40506986610/job/122198841416
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-27 12:53:40,322 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
##[error]Process completed with exit code 1.
log tail:
FN: [('foreach', 46), ('forEach', 45), ('handle', 30), ('synchronized', 24), ('map', 22), ('completedFuture', 20), ('ArrayBuffer', 15), ('Map', 12)]
swift FP: [('doNotRetryWithError', 1), ('request', 1), ('resumeData', 1)]
FN: [('write', 27), ('async', 23), ('forEach', 5), ('$0', 3), ('indentingNewlines', 3), ('requestModifier', 3), ('map', 2), ('mapError', 1)]
lua FP: [('f', 3), ('assert', 2), ('write', 2), ('format', 1), ('f2', 1), ('x', 1), ('add', 1), ('012345678901234567890123456789012345678901234567890123456789', 1)]
FN: [('collectgarbage', 6), ('assert', 3), ('error', 2), ('dummy', 1), ('print', 1), ('f', 1), ('getlocal', 1), ('exit', 1)]
zig FP: [('volatile', 10), ('intCast', 5), ('assert', 4), ('get', 4), ('parseInt', 3), ('tagName', 3), ('as', 3), ('resolveType', 3)]
FN: [('import', 62), ('await', 9), ('ensureUnusedCapacity', 2), ('header', 2), ('tagName', 2), ('assert', 2), ('slice', 2), ('field', 2)]
dart FP: [('identical', 6), ('StatefulElement', 3), ('
', 2), ('constructor', 2), ('ScrollEndNotification', 1), ('ScrollNotification', 1), ('ScrollStartNotification', 1), ('MapEntry', 1)]
FN: [('objectRuntimeType', 8), ('describeIdentity', 4), ('debugGetCreatorChain', 3), ('toStringShort', 2), ('join', 1), ('contains', 1), ('_stringify', 1), ('shortHash', 1)]
haskell FP: [('Just', 6), ('null', 4), ('map', 4), ('Para', 4), ('break', 3), ('Str', 3), ('go', 3), ('maybe', 2)]
FN: [('Str', 4), ('String', 3), ('Just', 2), ('intercalate', 2), ('throwIO', 1), ('any', 1), ('null', 1), ('createDirectoryIfMissing', 1)]
perl FP: [('undef', 154), ('grep', 16), ('map', 6), ('x', 6), ('E', 5), ('ord', 4), ('G', 3), ('Group', 3)]
FN: [('new', 12), ('print', 9), ('-f', 5), ('join', 5), ('name', 4), ('say', 4), ('warn', 4), ('-d', 4)]
solidity FP: [('address', 10), ('bytes32', 4), ('gas', 3), ('add', 3), ('mload', 3), ('bytes', 3), ('GovernorDisabledDeposit', 3), ('onlyRole', 2)]
FN: [('call', 2), ('require', 1)]
apex FP: [('COUNT', 6), ('runAs', 4), ('SUM', 1), ('AND', 1)]
FN: [('List', 4), ('Map', 3)]
powershell FP: [('Name', 6), ('Url', 6), ('Output', 4), ('PSModuleRestore', 4), ('ForMinimalSize', 4), ('Configuration', 4), ('Runtime', 4), ('Ignored', 4)]
FN: [('Join-Path', 127), ('Test-Path', 121), ('Get-Content', 57), ('ForEach-Object', 55), ('new', 44), ('Split-Path', 44), ('Where-Object', 36), ('Select-Object', 32)]
tcl FP: [('set', 219), ('expr', 41), ('regexp', 26), ('msgcat::mc', 17), ('registry::entry', 16), ('variants', 13), ('lappend', 7), ('revision', 7)]
FN: [('return', 176), ('variable', 58), ('mc', 35), ('for', 24), ('format', 17), ('error', 16), ('entry', 15), ('switch', 14)]
call_graph_accuracy: REGRESSION
cpp: recall_pct 99.7 -> 99.0
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.0
Temporarily overriding HOME='/home/runner/work/_temp/0eca6dd2-1617-4240-a475-bb1fed65a342' 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 Oct 27, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 27, 2026
@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 27, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6793 @ d21906f: 1 failed check(s)

== call-graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40507911592/job/122202435989
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-27 13:03:01,288 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
##[error]Process completed with exit code 1.
log tail:
FN: [('foreach', 46), ('forEach', 45), ('handle', 30), ('synchronized', 24), ('map', 22), ('completedFuture', 20), ('ArrayBuffer', 15), ('Map', 12)]
swift FP: [('doNotRetryWithError', 1), ('request', 1), ('resumeData', 1)]
FN: [('write', 27), ('async', 23), ('forEach', 5), ('$0', 3), ('indentingNewlines', 3), ('requestModifier', 3), ('map', 2), ('mapError', 1)]
lua FP: [('f', 3), ('assert', 2), ('write', 2), ('format', 1), ('f2', 1), ('x', 1), ('add', 1), ('012345678901234567890123456789012345678901234567890123456789', 1)]
FN: [('collectgarbage', 6), ('assert', 3), ('error', 2), ('dummy', 1), ('print', 1), ('getlocal', 1), ('f', 1), ('exit', 1)]
zig FP: [('volatile', 10), ('intCast', 5), ('assert', 4), ('get', 4), ('parseInt', 3), ('tagName', 3), ('as', 3), ('resolveType', 3)]
FN: [('import', 62), ('await', 9), ('ensureUnusedCapacity', 2), ('assert', 2), ('header', 2), ('items', 2), ('slice', 2), ('field', 2)]
dart FP: [('identical', 6), ('StatefulElement', 3), ('
', 2), ('constructor', 2), ('ScrollEndNotification', 1), ('ScrollStartNotification', 1), ('ScrollNotification', 1), ('MapEntry', 1)]
FN: [('objectRuntimeType', 8), ('describeIdentity', 4), ('debugGetCreatorChain', 3), ('toStringShort', 2), ('join', 1), ('contains', 1), ('_stringify', 1), ('shortHash', 1)]
haskell FP: [('Just', 6), ('null', 4), ('map', 4), ('Para', 4), ('break', 3), ('Str', 3), ('go', 3), ('maybe', 2)]
FN: [('Str', 4), ('String', 3), ('Just', 2), ('intercalate', 2), ('writeFile', 1), ('createDirectoryIfMissing', 1), ('optEol', 1), ('optLogFile', 1)]
perl FP: [('undef', 154), ('grep', 16), ('map', 6), ('x', 6), ('E', 5), ('ord', 4), ('G', 3), ('Group', 3)]
FN: [('new', 12), ('print', 9), ('-f', 5), ('join', 5), ('name', 4), ('say', 4), ('warn', 4), ('-d', 4)]
solidity FP: [('address', 10), ('bytes32', 4), ('add', 3), ('gas', 3), ('mload', 3), ('bytes', 3), ('GovernorDisabledDeposit', 3), ('onlyRole', 2)]
FN: [('call', 2), ('require', 1)]
apex FP: [('COUNT', 6), ('runAs', 4), ('SUM', 1), ('AND', 1)]
FN: [('List', 4), ('Map', 3)]
powershell FP: [('Name', 6), ('Url', 6), ('Output', 4), ('PSModuleRestore', 4), ('ForMinimalSize', 4), ('Configuration', 4), ('Runtime', 4), ('Success', 4)]
FN: [('Join-Path', 127), ('Test-Path', 121), ('Get-Content', 57), ('ForEach-Object', 55), ('Split-Path', 44), ('new', 44), ('Where-Object', 36), ('Select-Object', 32)]
tcl FP: [('set', 219), ('expr', 41), ('regexp', 26), ('msgcat::mc', 17), ('registry::entry', 16), ('variants', 13), ('lappend', 7), ('revision', 7)]
FN: [('return', 176), ('variable', 58), ('mc', 35), ('for', 24), ('format', 17), ('error', 16), ('entry', 15), ('switch', 14)]
call_graph_accuracy: REGRESSION
cpp: recall_pct 99.7 -> 99.0
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/54435375-8337-4837-a807-3f983c612bf9' 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 Oct 27, 2026
@squid-shepherd
squid-shepherd Bot merged commit e3a3c84 into main Oct 27, 2026
69 of 74 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6266-20261027T1227Z branch October 27, 2026 13:20
squid-shepherd Bot pushed a commit that referenced this pull request Oct 27, 2026
…ter #6793 (Part of #6266) (#6799)

* Call-graph accuracy baseline: accept the C++ destructor-name and conversion-operator decisions (Part of #6266)

cpp recall 99.7 -> 99.0 (FN 24 -> 77), precision 96.6 -> 98.2 (FP 271 -> 137). Bisected on the
language-crucible: 25 -> 38 FN at #6762 (x->~T() is the unit ~T, tree-sitter says T), 38 -> 77 at #6776
(String(operator Vector2()) names a conversion operator, not the Vector2 type; read in godot variant.cpp).
Neither PR refreshed this baseline; #6793 does not move it (the pre-#6793 parent measures the same 99.0).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Re-bless DOOM-rosetta: #6793 continued-define leak lowers engine-only callgraph on 6 ports (Part of #6266)

Only callgraph fields move: woof, odamex, doom3-bfg, srb2, doomsday, nugget-doom gain precision
(nugget-doom unscored 21 -> 0, srb2 55 -> 27). Cost: 4 misses (srb2 2 -> 4, odamex 21 -> 23) where a macro
defined inside a function is invoked in it (HWR_RenderPlane SETUP3DVERT, md5_process H): the oracle credits the
body to the invoking function, the engine no longer does. Macro expansion is a sibling gap.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Re-bless DOOM-rosetta: #6796 dead_code prose/URL fix drops 1-2 DEAD_CODE findings on 4 ports (Part of #6266)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Re-bless DOOM-rosetta: #6796 dead_code fix drops 1 DEAD_CODE finding on chocolate-doom, crispy-doom, doo-cr (Part of #6266)

Full 44-port doom_rosetta_check at this head: only these three drift,
summary counts only (by_level, by_rule, sarif_total); the other 41 match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* affected gate: run the pytest on PATH when the interpreter has none (precheck 6 s red on #6799)

Churn's precheck runs pr_gates under /usr/bin/python3, which has no pytest, so
`sys.executable -m pytest` failed `affected` in 6 s on every branch whose change
reaches a test; under the selfscan venv it passed, so earlier runs could not
reproduce it. Fall back to the `pytest` on PATH with this checkout first on
PYTHONPATH (the same trap pr_gates' _tool_bin_dir closes for ruff). Part of #6266.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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