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
dart func_start: constructors with very long (>~2000 char) parameter lists still not found (e.g. ThemeData.raw) #1493
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
Follow-up from #1479/PR (link once opened). After that fix, flutter/theme_data.dart's const ThemeData.raw({ ... }) constructor -- whose parameter list spans ~140 lines
(hundreds of required this.xxx, entries) -- is still not found by GitGalaxy, despite the
regex itself matching it correctly in isolation.
Root cause
gitgalaxy/core/detector.py's _slice_by_braces computes a per-match search_limit = min(next_match_start, start_idx + 2000) (a 2000-character window from the
match's own start). The new dart-specific terminator scan (added by #1479's fix) first finds
the parameter list's real closing ) via _find_balanced_end, which has its own much larger HANDSHAKE_LOOKAHEAD_LIMIT (50000 chars) -- so for a constructor whose parameter list alone
exceeds ~2000 characters, params_end_idx lands pastsearch_limit, and the terminator scan
(while pos < search_limit) never runs at all, immediately returning "not found" and rejecting
the whole match.
Confirmed repro
language-crucible/data/dart/flutter/theme_data.dart:700: const ThemeData.raw({ -- parameter
list is long enough to exceed the 2000-char search_limit. Also affects the unnamed factory ThemeData({...}) constructor at line 265 (similarly long parameter list).
Suggested fix shape
Either give the dart-specific branch its own larger search_limit (matching or derived from HANDSHAKE_LOOKAHEAD_LIMIT rather than the generic per-match 2000-char window meant for
simpler brace-search cases), or compute search_limit for dart from params_end_idx itself
(e.g. params_end_idx + 2000) instead of start_idx + 2000, so the window is anchored to
where the terminator scan actually begins rather than where the whole match started.
Scope note
Low priority / narrow: affects only constructors with pathologically long parameter lists
(large widget-style classes with many named/required parameters), not the common case. Real
extraction gap in production scans of dart code (epic #813 scope), not a measurement artifact.
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
fix(dart): long-param constructors not found + assert() false-positiv…
docs(skill): record pool-of-5 round-3 gotchas -- watch-exit vs merge-…