Skip to content

C import graph: system-header includes resolve on the include path for Objective-C and more system dirs (Part of #7827) - #8365

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7827-20261112T1640Z
Nov 12, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7827-20261112T1640Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7827.

What

The issue's case (<sys/types.h> -> include/curl/types.h, <sys/time.h> -> include/internal/time.h) was already fixed for C and C++ by #8161 (system-header includes resolve only on the repo's include path). Re-checked on current main with a fixture shaped like curl's ares/: no false edge for c / cpp. Two same-mechanism gaps remained and are fixed here:

  1. objective-c was missing from C_INCLUDE_ROOT_LANGS, so .m/.mm importers still got both false edges.
  2. _SYSTEM_DIRS lacked machine/, os/, netinet6/, net80211/, so <machine/types.h> etc. still hit a same-named repo header from every C-family importer.

A repo that really owns the prefixed path (include/sys/types.h) keeps its edge, and a bare "types.h" keeps today's basename fallback. The issue's narrower rule (system-dir prefix -> exact relative path only) is therefore what the engine now does; openssl's build-linked and .h.in edges are untouched.

Class / Sibling gaps

Class: a C-family #include of a platform header spelled with a system-directory prefix resolves to an unrelated repo file that shares only the basename. Members (importers c, cpp, objective-c x prefixes sys, machine, os, netinet6, net80211): all handled and tested in tests/core_engine/test_c_system_header_includes_8161.py.
Sibling gaps: none in the engine. Other BSD/kernel prefixes (i386/, x86/, arm/, uapi/, dev/) are ambiguous with real project directories and were left out on purpose; no burned estate needs them.
Remaining slices: teach import_graph_accuracy that a .h.in template or a build-linked header (openssl 1.0.2 include/openssl/) is not a plain false positive (tests/tools/import_graph_accuracy.py; scoring only, no engine change).

Gates

  • New tests plus test_typosquat_radar_4547.py and tests/tools/test_import_graph_accuracy.py: 89 passed.
  • import_graph_accuracy.py --ci: OK, 33 languages, baseline unchanged (the c row, libuv/hiredis, is 100/100 either way), so no regeneration.
  • audit_check.py: all clear.
  • crucible_check.py (both legs, after sync-pins.sh): PASS, zero golden drift, no re-bless.
  • Not run: the curl 7.10.8 snapshot itself (no clone on the box); the fixture stands in for it.

🤖 Generated with Claude Code

…r Objective-C and more BSD system dirs (Part of #7827)

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

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 12, 2026 16:49
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 12, 2026 16:56
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit e6c45d3 into main Nov 12, 2026
103 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/7827-20261112T1640Z branch November 12, 2026 17:14
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.

1 participant