Repository navigation
fix(scripting): make native Python conversion boundaries explicit - #3786
Merged
Merged
Conversation
zackees
marked this pull request as ready for review
November 6, 2026 23:43
zackees
enabled auto-merge
November 6, 2026 23:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2625. Make four measured hand-written Python conversion boundaries explicit without changing behavior: a
uint64_ttimer multiplier, the existing hotkey-to-long longstorage conversion, and two nonnegative same-string pointer offsets tosize_t.32c396538: the extracted production statements fail GCC/Clang conversion-as-error compilation. GCC reports all four sites; Clang reports three (its unsigned timer multiplication is already clean).a6cd12afc: the regression compiles and executes with both compilers, checking negative/extreme timer milliseconds, zero/max/invalid hotkey round trips, and zero/nonzero path offsets. All 50 ratchet tests pass. Independentclud-reviewis clean.calldata_set_intparameter type; the existing cast back toobs_hotkey_idrestores the sentinel. Pointer searches establish nonnegative offsets inside the same string.No scripting opt-in is added. SWIG external runtime headers are textually included by four hand-written Lua/Python unity groups. Current-master strict replay still fails in those generated headers; positive translation-unit scoping cannot isolate them. The generated wrappers are separate targets, but excluding those targets alone does not resolve the runtime headers. Per assignment, leave opt-in pending the maintainer boundary decision. No generated/third-party edits, new suppression, negative pins, global-pin deletion, public headers, existing C tests, or WebSocket changes.
Validation baseline: master
96b0e63b194aa055b0392f564fcb139c00777981. Reconfigured native Linux with frontend, Lua and Python ON. Nix GCC 15.2.0, Clang 21.1.8, SWIG 4.4.1, LuaJIT 2.1.1774638290, Python 3.13.15. All 12 actual scripting inputs replayed from fresh compile commands without PCH loading or forced includes, keeping textual group headers. Clang forces conversion/sign/float/shorten as errors: hand-written errors 3 → 0; generated runtime/wrapper errors remain (23 occurrences total). GCC GREEN warning replay: 0 handwritten, 35 generated occurrences, no parse failures. This is not a passing full strict target build.Every input also compiled at
-O2 -g0 -S -emit-llvm, no PCH/forced includes, using a Clang VFS overlay for the master implementation. All 12 master/GREEN outputs compare byte-for-byte:b9edca35c845e1223bccba91654c497688727f4e985357a47d118269144573f3bc86f5367cb54545e1266b3f844759279ebb29701536040031c91b99e1b9d0557feb1c7320844786fb033cbf82ff57826f2af35bde545b34f48887e468afff6ea69e88ac873de25b86d7cea8ddf7e276ee4da5bd7162de086dde5429063236f4c3237b9787f46aa5b330cce1e4b7b3b81fff4f9dfe573d65240ff0e249172af6cf6a772e1cc73dea7a1c9302e941c05215849720c2c29c714d8ef9d6283ce380f093f814f6d78f5fd4b266737b55fc514a56a267fa4fb9fea109c0390a66d4cb9b3e64a98f0f66e6ab0758b9b67106c5fae27a74e69f150e8dc8d0a6a994bf4ab555ec4b2ccbeed9237ef63d0c7f7d2c7ab3f836db3c1fbcd4ee23795d13741a9b3e64a98f0f66e6ab0758b9b67106c5fae27a74e69f150e8dc8d0a6a994bf4ae3d47c8ac6c3f6031eb824de2792edcb10e3b344c6be0c4a20fa920e5653a30b9b3e64a98f0f66e6ab0758b9b67106c5fae27a74e69f150e8dc8d0a6a994bf4aEvidence:
/tmp/native-scripting-worker/{master,green}.json, commands, diagnostics, overlay, IR pairs and RED/GREEN test logs; CMake tree/tmp/scripting-scout/build.Lane limits: hosted Fast Gate/self-tests prove the extracted production boundary regression. The scripting-ON native GCC/Clang replay and IR comparison above are the local proof of the actual scripting inputs; no hosted scripting build is claimed. Native macOS/Windows, MSVC, script execution, full object/link builds, Tier 2, protocol, sanitizers and packaging were not run locally. This is a C warning-only change, no Rust port or protocol/ABI change; Rust port tiers do not apply. No user-visible behavior change or features ledger line.
Full local lint (
env SOLDR_PORCELAIN=0 ./lint) exited 1 with diagnostic state unknown. The prescribed bounded artifact continuation returnedunable to produce a complete safe report; no guard workaround or cause inferred. Hosted PR CI remains the merge gate. Artifact:/home/niteris/.clud/tmp/tool-output/local-test-private/local-test-ILDfIm.log.