Skip to content

ObjC: a message send keeps its receiver as the call qualifier (Part of #5639) - #5777

Merged
squid-protocol merged 3 commits into
mainfrom
churn/5639-20261020T2032Z
Oct 20, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/5639-20261020T2032Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5639

What

#5689 already records Objective-C message sends by selector (unary, keyword, nested, [super x], inside a C call) and decided that @selector(x:) is not a call. This slice finishes the one open item of the first-slice acceptance: the receiver is kept as the call's qualifier.

calls_out groups are now (C callee, receiver chain, selector). The detector records self, super, Foo, obj.view (-> reads as .), a cast receiver as its name ([(Foo *)obj bar:1] -> obj), and <expr> for a receiver that is itself a send or a call. C calls keep the bare "" qualifier.

Design decision: the resolver still looks objc up by selector name (call_resolver._resolve_one drops the qualifier for objective-c). Objc units carry no owner, so a receiver cannot narrow a lookup, and a qualifier alone made resolution worse: doom-ios objective-c scoped 105 -> 13, external 178 -> 275. With the resolver bypass the resolution rates are byte-identical to main (table below). The qualifier is data (SQLite calls_out_qualifiers) until objc units get owners.

Changes (5 hand-written files)

  • languages/objectivec.py: receiver capture group; top-level calls_out_message_receivers flag.
  • core/detector.py: the C-style qualified branch also runs for that flag; _message_receiver().
  • core/call_resolver.py: objc ignores the qualifier (4 lines, reason in the comment).
  • test_calls_out_objc_messages_5639.py: 11 qualifier shapes (self/super/class/ivar chain/->/cast/nested/call/dedupe/C call).
  • test_objectivec_strict.py: group count 3.

Class table

Shape Status
unary, keyword, nested, in C call, [super x], @selector (not a call) handled in #5689
receiver as qualifier: name chain, self, super, class, ->, cast, nested/call (<expr>) handled here
qualifier used by the resolver not done (no owner on objc units)
call receiver with keyword selector [f(x) a:1] gap (#5689)

Evidence

fcall_rate_data objective-c row, scan of doom-ios and chocolate-doom on main vs this branch (GALAXYSCOPE_MAX_WORKERS=1):

repo main (scoped/unique/ambiguous/external/total) branch
doom-ios 105/84/1/178/368 105/84/1/178/368
chocolate-doom 32/9/11/126/178 32/9/11/126/178

Without the resolver bypass: doom-ios 13/71/9/275/368. doom-ios awakeFromNib row now stores calls_out_qualifiers = ["self"].

Gates: pr_gates --fast 6/6; --ratchets 8/8 pass (0 skipped); golden masters: crucible_check.py --update --yes reports no drift on both legs (fixtures do not record qualifiers); tree-wide guards + the three objc test files 321 passed. Local audit_check.py mypy step flags the shared venv's missing stubs; pr_gates audits (CI mypy 2.4.0) pass.

Lessons for agents

  • tests/tools/box/heavy-run.sh resets PYTHONPATH to its own checkout: a baseline scan from a second worktree must call that worktree's heavy-run.sh with env PYTHONPATH=<it>, or both runs silently use your branch.
  • ~/.cache/gitgalaxy/ruff-0.16.10 is a directory; the binary is .../bin/ruff.
  • crucible_check.py needs LANGUAGE_CRUCIBLE_PATH=/srv/storage_16tb/projects/gitgalaxy/language-crucible exported in a worktree.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 20, 2026 16:41
… of #5639)

calls_out groups are now (C callee, receiver chain, selector); the detector
records self / super / Foo / obj.view (-> reads as .) and <expr> for a nested
send or call receiver. The resolver still looks objc up by selector name
(methods carry no owner; a receiver qualifier alone dropped scoped links on
doom-ios 105 -> 13).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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 20, 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 20, 2026 21:00
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol enabled auto-merge (squash) October 20, 2026 21:06
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5777 @ c203eef: 2 failed check(s)

== Call resolution (Level 2, vs pyan3) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39496766102/job/118883724842
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-20 21:06:05,445 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:07,649 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:08,108 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:11,848 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:15,187 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:18,068 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:18,069 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:18,071 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:18,073 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:18,243 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:18,247 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:19,075 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:19,077 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:19,078 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:19,080 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:19,081 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:19,082 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:19,083 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:06:19,162 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:06:22,864 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:29,584 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:29,857 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:30,150 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:30,411 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:06:31,754 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:*.AssertionError>
... 69 more
log tail:
"overload_blind_precision_pct": 99.7
},
"recall_all_kinds_pct": 76.4,
"resolution_recall_pct": 97.7,
"named_pyan_edges": 1748,
"pyan_edges": 3592,
"wrong_examples": [
"fastapi: fastapi/routing.py:app -> fastapi/exceptions.py:45 (pyan3: fastapi/exceptions.py:213)",
"fastapi: tests/test_arbitrary_types.py:test_typeadapter -> tests/test_arbitrary_types.py:20 (pyan3: tests/test_arbitrary_types.py:59)"
],
"external_examples": [],
"reference_version": "2.9.0",
"lang": "python"
}
}
| language | reference | confident precision | ambiguous precision | recall | resolution recall |
|---|---|---|---|---|---|
| python | pyan3 | 99.9% (1829 judged) | 60.0% | 50.9% | 97.7% |
decorator edges (not gated): precision 100.0% (575 judged); recall with decorators 66.9%
reference edges (not gated): precision 99.7% (345 judged); recall, all kinds 76.4%
call_graph_resolution: WARNING -- pyan3 2.9.0 is not the pinned 2.8.1; numbers are not comparable to the baseline
call_graph_resolution: REGRESSION
python: recall_pct 51.7 -> 50.9
##[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/a602fa1f-707c-4848-af44-96c13635aa39' 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

== graph-accuracy-audit (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39496766102/job/118889112862
repro: python tests/tools/pr_gates.py --fast
errors:
##[error]Process completed with exit code 1.
log tail:
Version: 20261012.601
Commit: f3dc54e1fb89da6852db922499a0233137369e1d
Build Date: 2026-10-12T17:48:21Z
Worker ID: {853f3caa-9214-4b57-ab4a-f83d097cd799}
Region: westus3
Cloud: Azure
##[endgroup]
##[group]Operating System
Ubuntu
24.04.5
LTS
##[endgroup]
##[group]Runner Image
Image: ubuntu-24.04
Version: 20261012.334.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu24/20261012.334/images/ubuntu/Ubuntu2404-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20261012.334
##[endgroup]
##[group]GITHUB_TOKEN Permissions
Contents: read
Metadata: read
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: graph-accuracy-audit
##[group]Run echo "gate results: $RESULTS"
echo "gate results: $RESULTS"
for r in $RESULTS; do
[ "$r" = "success" ] || { echo "a gate finished as: $r"; exit 1; }
done
shell: /usr/bin/bash -e {0}
env:
RESULTS: success failure success success success
##[endgroup]
gate results: success failure success success success
a gate finished as: failure
##[error]Process completed with exit code 1.
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 20, 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 20, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5777 @ 822553b: 1 failed check(s)

== Call resolution (Level 2, vs pyan3) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39501183615/job/118898781753
repro: python tests/tools/pr_gates.py --fast
errors:
2026-10-20 21:45:12,099 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:14,212 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:14,664 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:18,541 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:21,690 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:24,808 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:24,810 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:24,812 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:24,814 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:25,016 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:25,018 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:25,950 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:25,952 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:25,954 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:25,955 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:25,957 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:25,958 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:25,959 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:.AssertionError>
2026-10-20 21:45:26,046 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:
.AssertionError>
2026-10-20 21:45:30,261 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:37,284 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:37,563 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:37,868 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:38,130 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
2026-10-20 21:45:39,516 [INFO] [pyan.analyzer] New edge added for Use from to Name <Node ???:*.AssertionError>
... 68 more
log tail:
"overload_blind_precision_pct": 99.7
},
"recall_all_kinds_pct": 76.4,
"resolution_recall_pct": 97.7,
"named_pyan_edges": 1748,
"pyan_edges": 3592,
"wrong_examples": [
"fastapi: fastapi/routing.py:app -> fastapi/exceptions.py:45 (pyan3: fastapi/exceptions.py:213)",
"fastapi: tests/test_arbitrary_types.py:test_typeadapter -> tests/test_arbitrary_types.py:20 (pyan3: tests/test_arbitrary_types.py:59)"
],
"external_examples": [],
"reference_version": "2.9.0",
"lang": "python"
}
}
| language | reference | confident precision | ambiguous precision | recall | resolution recall |
|---|---|---|---|---|---|
| python | pyan3 | 99.9% (1829 judged) | 60.0% | 50.9% | 97.7% |
decorator edges (not gated): precision 100.0% (575 judged); recall with decorators 66.9%
reference edges (not gated): precision 99.7% (345 judged); recall, all kinds 76.4%
call_graph_resolution: WARNING -- pyan3 2.9.0 is not the pinned 2.8.1; numbers are not comparable to the baseline
call_graph_resolution: REGRESSION
python: recall_pct 51.7 -> 50.9
##[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/e2de8b60-0498-494d-9d15-c35425b6d678' 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

Copy link
Copy Markdown
Owner Author

No description provided.

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