First, we need to clarify one point.
The JF-17 project, a Sino-Pakistani cooperation, refers to the fighter jet itself. It does not include subsystems.
Specifically, the source code of the JF-17's flight control system may fall within the scope of the cooperation framework between the two sides, or it may be a separate matter. I am not clear on the specifics.
However, it is certain that the AESA radar of the JF-17B3 fighter jet is definitely not within this cooperation framework.
Normally, CETC is only the radar provider for this project. Unless there is a separate cooperation agreement between Pakistan and CETC, Pakistan certainly cannot access the radar's underlying source code.
Leaving aside the Sino-Pakistani cooperation issue, even if Pakistan fully possessed all the source code of the JF-17 fighter jet, including the radar and all other subsystems, the JF-17B3 fighter jet would not be able to enable Turkish missiles to reach level 4.
This source code is top-level national military security classified information and will not be disclosed to anyone. In simple terms, Pakistan will not release the fighter jet's source code to Turkey, and Turkey will not release the weapon's source code to Pakistan. At most, both parties can provide a "black box interface".
Considering Pakistan had to fight tooth and nail for basic documentation created by CAC to get the ability to integrate third party systems such as radios, EW and health monitoring systems - it does now have access to the majority of the aircraft’s mission computer and bus architecture source.
However, your assertion that the source code is needed for optimal weapons performance is wrong.
Modern integration frameworks are designed specifically
to avoid needing access to a weapon’s or aircraft’s proprietary software.
A weapon’s internal algorithms (like guidance or fuzing logic) operate autonomously once the correct data is provided via these interfaces. As long as the aircraft feeds accurate target coordinates, attitude, and timing signals, the missile performs as designed.
The Indian Su-30MKI fires Israeli and French weapons, and Eurofighter Typhoon loads Israeli decoys and none of these required full software source code but relied on ICDs and modular integration software.
Easy to use and useable are not reliant on source code - they are related to
seamless mission computer integration, pilot interface, accurate threat symbology, and smooth datalink updates and not necessarily algorithm-level integration.
The limiting factor is often documentation and interface access, not inaccessible source code. If the weapon manufacturer supplies a full Interface Control Document, you can integrate effectively even with a closed “black box.” Claiming it was "embarrassing" because Level 4 access wasn’t granted ignores that nearly all mixed-origin fighter integrations (including Western ones) operate effectively at Level 3 or 3.5. If Azerbaijan has not been able to integrate weapons yet it can be due to
limited cooperation from OEM, inconsistent software documentation, or rushed integration timelines.