You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python: args regex has no cdef/cpdef alternative -- reports 0 for every Cython function with a C return type #2238
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Found during a tri-comparison ledger sweep of python/function/existence/agree[gitgalaxy]_vs[ctags,tree_sitter].
Confirmed real, currently-reproducing GitGalaxy defect, distinct from the (already-fixed, #1999) existence-side Cython recall issue.
Every Cython function declared with a C return type before the name — e.g. cdef char *get_item_pointer(memoryview self, index: tuple) except NULL (cython/MemoryView.pxd:77) or cdef void *copy_data_to_temp({{memviewslice_name}} *src, ...) (cython/MemoryView.pyx:1191) — gets args=0 from GitGalaxy, when the real counts (confirmed via ctags) are 1–8.
Root cause:language_standards.py's python args rule only matches literal def/lambda — it has no cdef/cpdef alternative at all. A bare cdef name(...) with NO return type (e.g. cdef is_slice(self, obj)) happens to get the correct count purely by accident, because the regex's literal def matches the substring inside cdef itself and lands directly on the real name(...). The instant a return-type token (char, void, a Tempita {{...}} placeholder, etc.) sits between cdef/cpdef and the name, that accidental adjacency breaks, the regex search fails, and the args count falls back to its 0 default.
Confirmed corpus-wide, not just the sample: 37 real functions in cython/MemoryView.pyx/.pxd alone show args=0 in GitGalaxy vs. ctags' correct nonzero counts, including memoryview_copy_contents, array_cwrapper, memoryview_check, transpose_memslice, _unellipsify, _copy_strided_to_strided, slice_assign_scalar, and ~30 more.
Suggested fix: mirror func_start's own cdef/cpdef return-type-skipping structure (already correct, per #1999) in the args rule, so it can locate the real (...) parameter list past an intervening return-type token instead of relying on def's accidental substring adjacency.
bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginethreat: false-negativeAccuracy tuning: Engine missed a bypass or vulnerability
Activity
docs: full tri-comparison ledger sweep -- 49 shapes resolved, 0 unval…
fix(typescript): recognize negation-body arrows, optional method sign…
fix(python): recognize cdef/cpdef return-type functions in args count…
chore: rebless golden masters after merging main
chore: rebless golden masters after merging main
fix(c/cpp): macro shield no longer excludes a real function redefined…
fix(ruby): scope block-parameter args fallback to define_method's own…
fix(perl): strip POD documentation blocks before structural scanning (#…