Skip to content

fix(iOS): classify CFNetwork as a system framework in the header include-health ratchet#57565

Closed
cipolleschi wants to merge 1 commit into
mainfrom
cipolleschi/fix-header-ratchet-cfnetwork
Closed

fix(iOS): classify CFNetwork as a system framework in the header include-health ratchet#57565
cipolleschi wants to merge 1 commit into
mainfrom
cipolleschi/fix-header-ratchet-cfnetwork

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Summary

After the SwiftPM stack landed (#57332), the prebuild_react_native_core / compose-xcframework jobs (Debug and Release) went red on the "Verify composed headers" step (headers-verify.js), not on the XCFramework compile:

include-health ratchet: 2 NEW unresolvable include(s) in shipped headers
(work in source builds via pod header maps, break the packaged layout):
  unresolved CoreModules/RCTInspectorWebSocketReporter.h -> CFNetwork/CFNetwork.h
  unresolved React/RCTInspectorWebSocketReporter.h -> CFNetwork/CFNetwork.h

React/CoreModules/RCTInspectorWebSocketReporter.h (added in #57543, "Add CDP support for WebSocket events (iOS)") does #import <CFNetwork/CFNetwork.h> because it uses CFHTTPMessageRef. The include-health ratchet classifies any include whose first path segment isn't in the SDK_PREFIXES allowlist in headers-inventory.js as unresolved. CFNetwork was missing from that allowlist — even though it's a genuine Apple system framework that's always available in the SDK, exactly like CoreFoundation, Security, and Network, which are already listed. (Two offenders because the same header ships under two natural paths, CoreModules/ and React/.)

Fix

Add CFNetwork to SDK_PREFIXES. This is the accurate classification (it's a system framework), so no baseline change is required.

Changelog:

[INTERNAL] [FIXED] - Classify CFNetwork as a system framework in the prebuilt-header include-health ratchet

Test Plan

  • Ran the include-health stage locally against the source tree + committed headers-include-baseline.json: CFNetwork is no longer flagged, 0 new offenders, 0 baseline entries to shrink.
  • ios-prebuild unit suite: 56/56 pass.

…ude-health ratchet

The compose-xcframework job's "Verify composed headers" step failed the
include-health ratchet with two NEW unresolvable includes:

  unresolved CoreModules/RCTInspectorWebSocketReporter.h -> CFNetwork/CFNetwork.h
  unresolved React/RCTInspectorWebSocketReporter.h -> CFNetwork/CFNetwork.h

RCTInspectorWebSocketReporter.h (#57543) imports <CFNetwork/CFNetwork.h>
for CFHTTPMessageRef. CFNetwork is a real Apple system framework, always
available in the SDK, but it was missing from the SDK_PREFIXES allowlist
in headers-inventory.js, so the ratchet classified the include as
unresolvable. Adding it alongside CoreFoundation/Security/Network fixes
the classification; no baseline change is needed.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2026
@meta-codesync

meta-codesync Bot commented Jul 15, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D112115176.

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in 724fbdd Jul 15, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 15, 2026
@meta-codesync

meta-codesync Bot commented Jul 15, 2026

Copy link
Copy Markdown

@cipolleschi merged this pull request in 724fbdd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants