diff --git a/gitgalaxy/standards/language_standards.py b/gitgalaxy/standards/language_standards.py index d1c0ca21c1..667d10cb3b 100644 --- a/gitgalaxy/standards/language_standards.py +++ b/gitgalaxy/standards/language_standards.py @@ -568,10 +568,19 @@ class PrismConfigSchema(TypedDict): # FIX 2 (Control Flow Shield): `while (i < 10) {` structurally mimics a method. # Injected `(?!(?:if|for|while|switch|catch|return)\b)` to prevent reserve words # from being mapped as method names. + # FIX 3 (Quadratic Blowup Shield): The arrow-function branch's identifier + # match used an unbounded `[\w$]*`. On a long line with no `=>` at all + # (e.g. a single massive minified/obfuscated line), the engine retried the + # greedy-then-backtrack identifier match at every starting position, + # producing O(n^2) time (empirically: ~3.5s at 20,000 chars, scaling + # quadratically from there). Bounded to {0,100} -- real identifiers don't + # get remotely that long -- per this doc's own "strict numeric clamps" + # rule; possessive quantifiers (`*+`) would be cleaner but aren't + # available until Python 3.11, and this package supports 3.9+. # ===================================================================== r"(?:" r"\b(?:async[ \t\n]+)?function[ \t\n]*\w*[ \t\n]*\([^)]*\)|" - r"(?:\([^)]*\)|[a-zA-Z_$][\w$]*)[ \t\n]*=>|" + r"(?:\([^)]*\)|[a-zA-Z_$][\w$]{0,100})[ \t\n]*=>|" r"^[ \t]*(?:static[ \t\n]+)?(?:async[ \t\n]+)?(?:get[ \t\n]+|set[ \t\n]+)?(?!(?:if|for|while|switch|catch|return)\b)(?:#?[a-zA-Z_$][\w$]*)[ \t\n]*\([^)]*\)(?=[ \t\n]*\{)" r")", re.M, @@ -844,8 +853,14 @@ class PrismConfigSchema(TypedDict): ), # 2. args (Parameters / Coupling) # CRITICAL FIX: Added negative lookahead for control flow, and `[^=;{]*` to support TypeScript return types. + # QUADRATIC BLOWUP FIX: the bare-identifier-before-arrow branch's + # `[\w$]*` was unbounded. On a long line with no `=>` at all, the + # engine retried the greedy-then-backtrack identifier match at + # every starting position -- O(n^2) (same bug found and fixed in + # javascript's near-identical args rule). Bounded to {0,100}; + # real identifiers never get remotely that long. "args": re.compile( - r"function\s+\w*(?:<[^>]*>)?\s*\([^)]*\)|\([^)]*\)[^=;{]*=>|[a-zA-Z_$][\w$]*[ \t]*=>|^[ \t]*(?:(?:public|private|protected|static|override|abstract)[ \t]+){0,3}(?:async[ \t]+)?(?:get\s+|set[ \t]+)?(?!(?:if|for|while|switch|catch)\b)[a-zA-Z_$][\w$]*\s*\([^)]*\)", + r"function\s+\w*(?:<[^>]*>)?\s*\([^)]*\)|\([^)]*\)[^=;{]*=>|[a-zA-Z_$][\w$]{0,100}[ \t]*=>|^[ \t]*(?:(?:public|private|protected|static|override|abstract)[ \t]+){0,3}(?:async[ \t]+)?(?:get\s+|set[ \t]+)?(?!(?:if|for|while|switch|catch)\b)[a-zA-Z_$][\w$]*\s*\([^)]*\)", re.M, ), # 3. linear (Sequential Boundaries) @@ -1127,6 +1142,12 @@ class PrismConfigSchema(TypedDict): # Branch 1: Standard Methods MUST have a return type. # Branch 2: Constructors MUST be anchored to `{` or `throws`. # Branch 3: Standard lambdas and method references `::`. + # QUADRATIC BLOWUP FIX: Branch 3's bare-identifier lambda form + # (`[a-zA-Z_$][\w_$]*` with no \b anchor, unlike Branches 1/2 + # which are `^`-anchored) got retried at every position in a + # long `->`-less line, backtracking O(n) per position for + # O(n^2) total (same bug found and fixed in javascript's args). + # Bounded to {0,100}; real identifiers don't get that long. # ===================================================================== r"(?:" # 1. Standard Methods @@ -1134,7 +1155,7 @@ class PrismConfigSchema(TypedDict): # 2. Constructors r"^[ \t]*(?:@[\w.]+(?:\([^)]*\))?[ \t\n]*){0,5}(?:(?:public|protected|private|static)[ \t\n]+)?[A-Z]\w*[ \t\n]*\([^)]*\)[ \t\n]*(?:throws[ \t\n]+[\w., \t\n]+)?[{]|" # 3. Lambdas & Method Refs - r"(?:\([^)]*\)|[a-zA-Z_$][\w_$]*)[ \t\n]*->|::" + r"(?:\([^)]*\)|[a-zA-Z_$][\w_$]{0,100})[ \t\n]*->|::" r")", re.M, ), @@ -1376,6 +1397,12 @@ class PrismConfigSchema(TypedDict): # Branch 2: Constructors lack return types, so they MUST be anchored to `:` or `{`. # Branch 3: Standard fat-arrow lambdas. # Upgraded all spaces to `[ \t\n]+` to support Pathological vertical parameters. + # QUADRATIC BLOWUP FIX: Branch 3's bare-identifier lambda form + # (`[a-zA-Z_$][\w_$]*` with no \b anchor, unlike Branches 1/2 + # which are `^`-anchored) got retried at every position in a + # long `=>`-less line, backtracking O(n) per position for + # O(n^2) total (same bug found and fixed in javascript's args). + # Bounded to {0,100}; real identifiers don't get that long. # ===================================================================== r"(?:" # 1. Standard Methods @@ -1383,7 +1410,7 @@ class PrismConfigSchema(TypedDict): # 2. Constructors r"^[ \t]*(?:(?:public|private|protected|internal|static|unsafe)[ \t\n]+)?[A-Z]\w*[ \t\n]*\([^)]*\)[ \t\n]*(?::[ \t\n]*(?:base|this)|[{])|" # 3. Lambdas - r"(?:\([^)]*\)|[a-zA-Z_$][\w_$]*)[ \t\n]*=>" + r"(?:\([^)]*\)|[a-zA-Z_$][\w_$]{0,100})[ \t\n]*=>" r")", re.M, ), @@ -2709,8 +2736,12 @@ class PrismConfigSchema(TypedDict): "api": re.compile(r"\b(public)\b|#\[(?:ApiResource|Route|Get|Post|Put|Delete|Patch)[^\]]*\]"), # 11. flux (State Mutation) # Mutation of state. Variable reassignments and array mutators. + # QUADRATIC BLOWUP FIX: the optional `(?:\w+)?` before the + # required-but-often-absent `->`/`::` was unbounded with no + # preceding \b anchor -- O(n^2) on a long run of word characters + # with neither token present. Bounded to {1,100}. "state_mutation": re.compile( - r"\$[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*\s*(?:[-+*./%&|])?=|&\$|\bglobal\s+\$|(?:\w+)?(?:->|::)[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*[ \t]*=|array_(?:push|pop|shift|unshift|splice)\b|(?:\+\+|--)" + r"\$[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*\s*(?:[-+*./%&|])?=|&\$|\bglobal\s+\$|(?:\w{1,100})?(?:->|::)[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*[ \t]*=|array_(?:push|pop|shift|unshift|splice)\b|(?:\+\+|--)" ), # 12. dead_code (Commented Logic / Deprecated Trails) "dead_code": re.compile( @@ -3190,8 +3221,14 @@ class PrismConfigSchema(TypedDict): "api": re.compile(r"^[ \t]*export\s+[a-zA-Z_]\w*", re.M), # 11. flux (State Mutation) # Mutation of state via assignment or arithmetic. + # QUADRATIC BLOWUP FIX: the arithmetic-expansion branch's two + # `[^)]*` quantifiers were unbounded -- on a long run of unclosed + # `(` characters, each opening pair is a candidate match start + # scanning to the end looking for the required operator + `))`, + # for O(n^2) total. Bounded to {0,200} each; real `(( ... ))` + # arithmetic expressions don't get remotely that long. "state_mutation": re.compile( - r"^[ \t]*[a-zA-Z_]\w*(?:\[[^\]]+\])?=(?![=~])|\b(?:let|declare)\s+[a-zA-Z_]\w*=|\[\+\]=|\(\([^)]*(?:\+\+|--|[-+*/%]=)[^)]*\)\)", + r"^[ \t]*[a-zA-Z_]\w*(?:\[[^\]]+\])?=(?![=~])|\b(?:let|declare)\s+[a-zA-Z_]\w*=|\[\+\]=|\(\([^)]{0,200}(?:\+\+|--|[-+*/%]=)[^)]{0,200}\)\)", re.M, ), # 12. dead_code (Commented Logic / Deprecated Trails) @@ -4902,8 +4939,22 @@ class PrismConfigSchema(TypedDict): # 11. flux (State Mutation) # Mutation of state. Variable assignments and standard memory manipulations. # Captures standard `=` (avoiding `==`, `<=`, etc.) + # TWO FIXES: + # 1. QUADRATIC BLOWUP: the unbounded `[A-Za-z0-9_%()]+` (no \b + # anchor) got retried at every position in a long `=`-less + # line, backtracking O(n) per position for O(n^2) total. + # Bounded to {0,199}; real Fortran variable/array-element + # expressions (even with subscripts) don't get remotely + # that long. + # 2. KIND=/LEN=/etc EXCLUSION WAS LEAKY: the negative lookahead + # only blocks a match starting exactly at "KIND", not one + # starting mid-word (e.g. "KIND = 5" still matched "IND = " + # starting at position 1, since \bKIND doesn't apply there). + # Added a real `\b` + explicit `[A-Za-z_]` first-char + # requirement so the match can only start at a genuine word + # boundary, where the exclusion lookahead actually applies. "state_mutation": re.compile( - r"(?!\b(?:KIND|LEN|UNIT|FMT|FILE|STATUS|ACTION)\s*=)[A-Za-z0-9_%\(\)]+[ \t]*=[^=>]", + r"(?!\b(?:KIND|LEN|UNIT|FMT|FILE|STATUS|ACTION)\s*=)\b[A-Za-z_][A-Za-z0-9_%\(\)]{0,199}[ \t]*=[^=>]", re.I, ), # 12. dead_code (Commented Logic / Deprecated Trails) @@ -6240,7 +6291,15 @@ class PrismConfigSchema(TypedDict): r"\b(?:List|Dict|Set|Tuple|Optional|Union|Any|Callable|Sequence|Iterable)\[[^\]]*\]|->" ), # 21. comprehensions (Iterators / Comprehensions) - "comprehensions": re.compile(r"\[[^\]]*\bfor\b[^\]]*\]|\{[^}]*\bfor\b[^}]*\}|\([^)]*\bfor\b[^)]*\)"), + # QUADRATIC BLOWUP FIX: the 3 negated-class quantifiers were + # unbounded -- on a long run of unclosed brackets/braces/parens + # (e.g. "((((((..."), each opening char is tried as a match + # start, and each attempt scans to the end of the string looking + # for "for" + closer, for O(n^2) total. Bounded to {0,500}; real + # comprehensions don't get remotely that long. + "comprehensions": re.compile( + r"\[[^\]]{0,500}\bfor\b[^\]]{0,500}\]|\{[^}]{0,500}\bfor\b[^}]{0,500}\}|\([^)]{0,500}\bfor\b[^)]{0,500}\)" + ), # 22. scientific (Numerical / Compute Libraries) # Math, complex arrays, and ulab (MicroPython's NumPy). "scientific": re.compile( @@ -6845,8 +6904,14 @@ class PrismConfigSchema(TypedDict): # 17. closures: Closures / Anonymous Functions. (Apex lacks true anonymous closures). "closures": None, # 18. globals: Global / Shared State. Custom Settings, Organization data, and User context. + # QUADRATIC BLOWUP FIX: the two `\w+` prefixes before the + # required-but-often-absent `__c.getInstance`/`__mdt.getInstance` + # suffixes were unbounded with no preceding \b anchor -- O(n^2) + # on a long run of word characters with neither suffix present. + # Bounded to {1,100}; real custom-object/metadata-type names + # don't get remotely that long. "globals": re.compile( - r"\b(UserInfo|System\.Label|Organization|Cache\.Org|Cache\.Session)\b|\w+__c\.getInstance\b|\w+__mdt\.getInstance\b", + r"\b(UserInfo|System\.Label|Organization|Cache\.Org|Cache\.Session)\b|\w{1,100}__c\.getInstance\b|\w{1,100}__mdt\.getInstance\b", re.I, ), # 19. decorators: Decorators / Annotations. Execution context annotations. @@ -9887,8 +9952,12 @@ class PrismConfigSchema(TypedDict): # Captures standard method arguments and Groovy closures (x, y ->) # CRITICAL FIX: Anchored the parenthesis capture to method signatures so it # doesn't hallucinate every standard method call or if-statement in the file. + # QUADRATIC BLOWUP FIX: the closure form's bare-identifier branch + # (`[a-zA-Z_$][\w_$]*` with no \b anchor) got retried at every + # position in a long `->`-less line -- O(n^2) (same bug found and + # fixed in javascript's args). Bounded to {0,100}. "args": re.compile( - r"^[ \t]*(?:(?:public|private|protected|static|final|def|abstract)[ \t]+){0,5}(?:[A-Z][a-zA-Z0-9_<>\[\]?]*[ \t]+){0,2}[A-Za-z_$][\w_$]*\s*\([^)]*\)|(?:\([^)]*\)|[a-zA-Z_$][\w_$]*)\s*->", + r"^[ \t]*(?:(?:public|private|protected|static|final|def|abstract)[ \t]+){0,5}(?:[A-Z][a-zA-Z0-9_<>\[\]?]*[ \t]+){0,2}[A-Za-z_$][\w_$]*\s*\([^)]*\)|(?:\([^)]*\)|[a-zA-Z_$][\w_$]{0,100})\s*->", re.M, ), # 3. linear (Sequential Boundaries) diff --git a/tests/core_engine/test_language_standards_strict.py b/tests/core_engine/test_language_standards_strict.py index 8b7af6edf9..52a39162af 100644 --- a/tests/core_engine/test_language_standards_strict.py +++ b/tests/core_engine/test_language_standards_strict.py @@ -463,3 +463,79 @@ def test_javascript_standard_block_redos_immunity_for_deeply_nested_jsdoc_generi pattern = JS_RULES["generics"] poison = "/**\n" + " * @template T\n" * 20000 + " */" assert_redos_immune(pattern, poison, timeout_sec=3.0) + + +# ============================================================================== +# CROSS-LANGUAGE REDOS SWEEP: "BARE IDENTIFIER BEFORE ARROW" FAMILY +# ============================================================================== +# All found by a systematic ReDoS sweep across every language's compiled +# patterns (not just the ones with an existing historical-bug comment): +# an unbounded identifier/word-run quantifier with no preceding \b anchor, +# immediately followed by a required-but-often-absent literal suffix +# (=>, ->, __c.getInstance, etc.). Because the leading character class has +# no boundary anchor, the engine retries the greedy-then-backtrack match at +# EVERY position in a long run of matching characters -- O(n^2) total, not +# exponential, but still a real DoS risk on a single pathologically long +# line (e.g. minified/obfuscated code). All bounded with numeric clamps +# instead of possessive quantifiers (`*+`), since those aren't available +# until Python 3.11 and this package supports 3.9+. +def test_java_args_lambda_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["java"]["rules"]["args"] + assert_redos_immune(pattern, "x" * 40000, timeout_sec=3.0) + assert pattern.search("x -> x + 1") + assert pattern.search("public void foo(int x) {") + + +def test_csharp_args_lambda_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["csharp"]["rules"]["args"] + assert_redos_immune(pattern, "x" * 40000, timeout_sec=3.0) + assert pattern.search("x => x + 1") + + +def test_groovy_args_closure_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["groovy"]["rules"]["args"] + assert_redos_immune(pattern, "x" * 40000, timeout_sec=3.0) + assert pattern.search("x -> x + 1") + + +def test_fortran_state_mutation_redos_immunity_and_kind_exclusion(): + """ + Two bugs, found together: the ReDoS sweep caught the quadratic blowup, + and fixing it (adding a real \\b anchor) also fixed a pre-existing leak + in the KIND=/LEN=/etc exclusion -- the original negative lookahead only + blocked a match starting exactly at "KIND", not one starting mid-word + ("KIND = 5" still matched "IND = " starting at its 2nd character, since + \\bKIND doesn't apply there). Confirmed this leak existed before the + ReDoS fix too, via the pattern's original (unbounded) form. + """ + pattern = LANGUAGE_DEFINITIONS["fortran"]["rules"]["state_mutation"] + assert_redos_immune(pattern, "x" * 40000, timeout_sec=3.0) + assert pattern.search("myvar = 5") + assert pattern.search("mystruct%field = 1") + assert not pattern.search("KIND = 5"), "Failed to exclude the KIND= false-positive trap" + assert not pattern.search("LEN = 10"), "Failed to exclude the LEN= false-positive trap" + + +def test_embedded_python_comprehensions_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["embedded_python"]["rules"]["comprehensions"] + assert_redos_immune(pattern, "(" * 40000, timeout_sec=3.0) + assert pattern.search("[x for x in range(10)]") + + +def test_php_state_mutation_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["php"]["rules"]["state_mutation"] + assert_redos_immune(pattern, "x" * 40000, timeout_sec=3.0) + assert pattern.search("$obj->prop = 1") + assert pattern.search("Foo::CONST_NAME = 1") + + +def test_shell_state_mutation_arithmetic_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["shell"]["rules"]["state_mutation"] + assert_redos_immune(pattern, "(" * 40000, timeout_sec=3.0) + assert pattern.search("((i++))") + + +def test_apex_globals_redos_immunity(): + pattern = LANGUAGE_DEFINITIONS["apex"]["rules"]["globals"] + assert_redos_immune(pattern, "x" * 40000, timeout_sec=3.0) + assert pattern.search("MyObject__c.getInstance()") diff --git a/tests/golden_master_audit.json b/tests/golden_master_audit.json index 4ac1f57acb..c21316280f 100644 --- a/tests/golden_master_audit.json +++ b/tests/golden_master_audit.json @@ -12,8 +12,8 @@ }, "Target Root Name": "data", "Absolute Project Path": "/home/joe/nyx_projects/language-crucible/data", - "Analysis ISO Timestamp": "2026-07-26T16:29:10.731659+00:00", - "Total Scan Duration": "26.11 seconds" + "Analysis ISO Timestamp": "2026-07-26T17:04:29.202876+00:00", + "Total Scan Duration": "24.98 seconds" }, "Source Control Footprint (Immutable Anchor)": { "Active Branch": "main", @@ -34,8 +34,8 @@ "repo_macro_species": { "name": "Cluster 3", "id": 3, - "z_score": 4.723, - "raw_drift": 0.629 + "z_score": 4.728, + "raw_drift": 0.63 }, "unparsable_files": { "ambig_file_count": 169, @@ -197,7 +197,7 @@ }, "health": { "avg_cognitive_load": 23.278, - "avg_safety_score": 22.616, + "avg_safety_score": 22.584, "avg_tech_debt": 25.691, "avg_documentation": 28.679 }, @@ -330,7 +330,7 @@ "fortran": { "files": 6, "loc": 18540, - "impact": 171620.8 + "impact": 170854.8 }, "java": { "files": 14, @@ -471,12 +471,12 @@ "ecosystem_fingerprint": { "ml_clusters": { "file_cluster_8": { - "count": 493, - "pct": 52.7 + "count": 494, + "pct": 52.8 }, "file_cluster_13": { - "count": 206, - "pct": 22.0 + "count": 205, + "pct": 21.9 }, "file_cluster_0": { "count": 79, @@ -1612,10 +1612,10 @@ }, "fortran/wrf": { "file_count": 14, - "total_mass": 186005.56, + "total_mass": 185239.56, "avg_exposures": { "cognitive_load": 65.02, - "safety_score": 71.49, + "safety_score": 69.38, "tech_debt": 29.84, "verification": 63.3, "api_exposure": 5.77, @@ -4138,8 +4138,8 @@ "typosquat_hits": 7, "Global Architectural Fingerprint": { "Active Execution Logic (ML Clusters)": { - "file_cluster_8": "52.7% (493 files)", - "file_cluster_13": "22.0% (206 files)", + "file_cluster_8": "52.8% (494 files)", + "file_cluster_13": "21.9% (205 files)", "file_cluster_0": "8.4% (79 files)", "file_cluster_4": "2.9% (27 files)", "file_cluster_16": "2.4% (22 files)", @@ -4158,7 +4158,7 @@ }, "Repository Ecosystem Baseline (Architecture)": { "Classification": "Cluster 3", - "Architectural Drift (Z-Score)": 4.723 + "Architectural Drift (Z-Score)": 4.728 } }, "3. Forensic Security & Vulnerability Audit": { @@ -9630,11 +9630,11 @@ } }, "fortran/wrf": { - "Directory Group Magnitude": 186005.56, + "Directory Group Magnitude": 185239.56, "File Count": 14, "Ecosystem Fingerprint (Archetypes)": { - "file_cluster_13": "35.7%", - "file_cluster_8": "21.4%", + "file_cluster_8": "28.6%", + "file_cluster_13": "28.6%", "file_cluster_12": "14.3%", "file_cluster_11": "14.3%", "Static: Literature & Documentation": "7.1%", @@ -9642,7 +9642,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "65.02%", - "Error & Exception Exposure": "71.49%", + "Error & Exception Exposure": "69.38%", "Tech Debt Exposure": "29.84%", "Testing Exposure": "63.3%", "API Exposure": "5.77%", @@ -11455,32 +11455,32 @@ "Identity Proof": "Single Indicator (Ext: .f)" }, "2. Topological Coordinates": { - "X": -3424.42, - "Y": 255.52, - "Z": -1511.87 + "X": -3423.94, + "Y": 255.43, + "Z": -1510.96 }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 13.369, + "Repository Drift (Z-Score)": 13.015, "Repository Fingerprint": { - "file_cluster_0": 14.0, - "file_cluster_1": 14.511, - "file_cluster_2": 14.426, - "file_cluster_3": 15.19, - "file_cluster_4": 14.164, - "file_cluster_5": 14.419, - "file_cluster_6": 14.271, - "file_cluster_7": 14.239, - "file_cluster_8": 13.888, - "file_cluster_9": 14.257, - "file_cluster_10": 14.95, - "file_cluster_11": 13.724, - "file_cluster_12": 14.02, - "file_cluster_13": 13.369, - "file_cluster_14": 17.361, - "file_cluster_15": 14.502, - "file_cluster_16": 14.473, - "file_cluster_17": 13.881 + "file_cluster_0": 13.662, + "file_cluster_1": 14.158, + "file_cluster_2": 14.085, + "file_cluster_3": 14.867, + "file_cluster_4": 13.841, + "file_cluster_5": 14.068, + "file_cluster_6": 13.935, + "file_cluster_7": 13.885, + "file_cluster_8": 13.52, + "file_cluster_9": 13.918, + "file_cluster_10": 14.63, + "file_cluster_11": 13.396, + "file_cluster_12": 13.673, + "file_cluster_13": 13.015, + "file_cluster_14": 17.091, + "file_cluster_15": 14.175, + "file_cluster_16": 14.132, + "file_cluster_17": 13.547 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -11488,7 +11488,7 @@ "Total LOC": 859, "Coding LOC": 564, "Documentation LOC": 171, - "Structural Magnitude": 1144.98, + "Structural Magnitude": 1063.98, "Control Flow Ratio": "54.7%", "Popularity Rank": 4, "Raw Churn Frequency": 0.0, @@ -11498,7 +11498,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "79.61%", - "Error & Exception Exposure": "66.01%", + "Error & Exception Exposure": "45.8%", "Tech Debt Exposure": "37.63%", "Testing Exposure": "80.0%", "API Exposure": "7.59%", @@ -11661,7 +11661,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 20, "Exposed API / Public Exports": 12, - "State Mutations / Variable Reassignments": 373, + "State Mutations / Variable Reassignments": 292, "Commented-out Code (Dead Logic)": 1, "Structured Documentation Blocks": 10, "Unit Test Assertions": 0, @@ -11781,26 +11781,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 15.394, + "Repository Drift (Z-Score)": 15.299, "Repository Fingerprint": { - "file_cluster_0": 15.47, - "file_cluster_1": 16.04, - "file_cluster_2": 15.971, - "file_cluster_3": 16.658, - "file_cluster_4": 15.674, - "file_cluster_5": 16.22, - "file_cluster_6": 15.706, - "file_cluster_7": 15.761, - "file_cluster_8": 15.49, - "file_cluster_9": 15.647, - "file_cluster_10": 16.477, - "file_cluster_11": 15.415, - "file_cluster_12": 16.041, - "file_cluster_13": 15.394, - "file_cluster_14": 18.609, - "file_cluster_15": 16.03, - "file_cluster_16": 16.014, - "file_cluster_17": 15.493 + "file_cluster_0": 15.375, + "file_cluster_1": 15.942, + "file_cluster_2": 15.876, + "file_cluster_3": 16.567, + "file_cluster_4": 15.583, + "file_cluster_5": 16.124, + "file_cluster_6": 15.612, + "file_cluster_7": 15.663, + "file_cluster_8": 15.388, + "file_cluster_9": 15.551, + "file_cluster_10": 16.387, + "file_cluster_11": 15.324, + "file_cluster_12": 15.948, + "file_cluster_13": 15.299, + "file_cluster_14": 18.531, + "file_cluster_15": 15.938, + "file_cluster_16": 15.919, + "file_cluster_17": 15.4 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -11808,7 +11808,7 @@ "Total LOC": 2988, "Coding LOC": 2128, "Documentation LOC": 546, - "Structural Magnitude": 9659.36, + "Structural Magnitude": 9510.36, "Control Flow Ratio": "50.1%", "Popularity Rank": 3, "Raw Churn Frequency": 0.0, @@ -11818,7 +11818,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "57.7%", - "Error & Exception Exposure": "95.82%", + "Error & Exception Exposure": "93.8%", "Tech Debt Exposure": "10.35%", "Testing Exposure": "80.0%", "API Exposure": "9.5%", @@ -12371,7 +12371,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 5, "Exposed API / Public Exports": 51, - "State Mutations / Variable Reassignments": 2347, + "State Mutations / Variable Reassignments": 2198, "Commented-out Code (Dead Logic)": 15, "Structured Documentation Blocks": 46, "Unit Test Assertions": 0, @@ -12490,26 +12490,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_11", - "Repository Drift (Z-Score)": 15.789, + "Repository Drift (Z-Score)": 15.753, "Repository Fingerprint": { - "file_cluster_0": 15.959, - "file_cluster_1": 16.479, - "file_cluster_2": 16.392, - "file_cluster_3": 17.055, - "file_cluster_4": 16.148, - "file_cluster_5": 16.701, - "file_cluster_6": 16.151, - "file_cluster_7": 16.2, - "file_cluster_8": 15.899, - "file_cluster_9": 16.111, - "file_cluster_10": 16.6, - "file_cluster_11": 15.789, - "file_cluster_12": 16.4, - "file_cluster_13": 15.885, - "file_cluster_14": 18.987, - "file_cluster_15": 16.373, - "file_cluster_16": 16.462, - "file_cluster_17": 15.987 + "file_cluster_0": 15.923, + "file_cluster_1": 16.442, + "file_cluster_2": 16.355, + "file_cluster_3": 17.02, + "file_cluster_4": 16.113, + "file_cluster_5": 16.664, + "file_cluster_6": 16.115, + "file_cluster_7": 16.162, + "file_cluster_8": 15.86, + "file_cluster_9": 16.074, + "file_cluster_10": 16.565, + "file_cluster_11": 15.753, + "file_cluster_12": 16.364, + "file_cluster_13": 15.848, + "file_cluster_14": 18.957, + "file_cluster_15": 16.338, + "file_cluster_16": 16.425, + "file_cluster_17": 15.952 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -12517,7 +12517,7 @@ "Total LOC": 9207, "Coding LOC": 6589, "Documentation LOC": 1197, - "Structural Magnitude": 50104.48, + "Structural Magnitude": 49921.48, "Control Flow Ratio": "84.3%", "Popularity Rank": 0, "Raw Churn Frequency": 0.0, @@ -12527,7 +12527,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "98.31%", - "Error & Exception Exposure": "96.54%", + "Error & Exception Exposure": "95.94%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "80.0%", "API Exposure": "8.03%", @@ -13000,7 +13000,7 @@ "High-Risk Execution Commands": 1, "I/O and Network Boundaries": 13, "Exposed API / Public Exports": 38, - "State Mutations / Variable Reassignments": 7103, + "State Mutations / Variable Reassignments": 6920, "Commented-out Code (Dead Logic)": 49, "Structured Documentation Blocks": 2, "Unit Test Assertions": 0, @@ -13128,26 +13128,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 14.564, + "Repository Drift (Z-Score)": 14.532, "Repository Fingerprint": { - "file_cluster_0": 14.862, - "file_cluster_1": 15.306, - "file_cluster_2": 15.277, - "file_cluster_3": 16.028, - "file_cluster_4": 15.059, - "file_cluster_5": 15.598, - "file_cluster_6": 15.098, - "file_cluster_7": 15.053, - "file_cluster_8": 14.667, - "file_cluster_9": 15.017, - "file_cluster_10": 15.846, - "file_cluster_11": 14.792, - "file_cluster_12": 15.398, - "file_cluster_13": 14.564, - "file_cluster_14": 18.036, - "file_cluster_15": 15.446, - "file_cluster_16": 15.349, - "file_cluster_17": 14.894 + "file_cluster_0": 14.83, + "file_cluster_1": 15.273, + "file_cluster_2": 15.244, + "file_cluster_3": 15.997, + "file_cluster_4": 15.028, + "file_cluster_5": 15.566, + "file_cluster_6": 15.067, + "file_cluster_7": 15.02, + "file_cluster_8": 14.632, + "file_cluster_9": 14.985, + "file_cluster_10": 15.815, + "file_cluster_11": 14.762, + "file_cluster_12": 15.367, + "file_cluster_13": 14.532, + "file_cluster_14": 18.01, + "file_cluster_15": 15.415, + "file_cluster_16": 15.317, + "file_cluster_17": 14.862 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -13155,7 +13155,7 @@ "Total LOC": 5751, "Coding LOC": 4602, "Documentation LOC": 555, - "Structural Magnitude": 36263.84, + "Structural Magnitude": 36210.84, "Control Flow Ratio": "43.2%", "Popularity Rank": 0, "Raw Churn Frequency": 0.0, @@ -13165,7 +13165,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "67.01%", - "Error & Exception Exposure": "37.4%", + "Error & Exception Exposure": "35.8%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "80.0%", "API Exposure": "6.92%", @@ -13388,7 +13388,7 @@ "High-Risk Execution Commands": 2, "I/O and Network Boundaries": 26, "Exposed API / Public Exports": 19, - "State Mutations / Variable Reassignments": 1964, + "State Mutations / Variable Reassignments": 1911, "Commented-out Code (Dead Logic)": 31, "Structured Documentation Blocks": 3, "Unit Test Assertions": 0, @@ -13617,26 +13617,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_11", - "Repository Drift (Z-Score)": 15.614, + "Repository Drift (Z-Score)": 15.59, "Repository Fingerprint": { - "file_cluster_0": 15.713, - "file_cluster_1": 16.26, - "file_cluster_2": 16.177, - "file_cluster_3": 16.862, - "file_cluster_4": 15.9, - "file_cluster_5": 16.367, - "file_cluster_6": 15.891, - "file_cluster_7": 16.003, - "file_cluster_8": 15.671, - "file_cluster_9": 15.848, - "file_cluster_10": 16.59, - "file_cluster_11": 15.614, - "file_cluster_12": 16.256, - "file_cluster_13": 15.677, - "file_cluster_14": 18.774, - "file_cluster_15": 16.248, - "file_cluster_16": 16.264, - "file_cluster_17": 15.736 + "file_cluster_0": 15.688, + "file_cluster_1": 16.233, + "file_cluster_2": 16.151, + "file_cluster_3": 16.837, + "file_cluster_4": 15.875, + "file_cluster_5": 16.341, + "file_cluster_6": 15.865, + "file_cluster_7": 15.977, + "file_cluster_8": 15.643, + "file_cluster_9": 15.822, + "file_cluster_10": 16.566, + "file_cluster_11": 15.59, + "file_cluster_12": 16.231, + "file_cluster_13": 15.651, + "file_cluster_14": 18.753, + "file_cluster_15": 16.223, + "file_cluster_16": 16.238, + "file_cluster_17": 15.711 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -13644,7 +13644,7 @@ "Total LOC": 5355, "Coding LOC": 3763, "Documentation LOC": 1013, - "Structural Magnitude": 73115.76, + "Structural Magnitude": 73055.76, "Control Flow Ratio": "51.3%", "Popularity Rank": 1, "Raw Churn Frequency": 0.0, @@ -13654,7 +13654,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "68.33%", - "Error & Exception Exposure": "88.08%", + "Error & Exception Exposure": "87.04%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "81.17%", "API Exposure": "4.17%", @@ -13737,7 +13737,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 96, "Exposed API / Public Exports": 5, - "State Mutations / Variable Reassignments": 3176, + "State Mutations / Variable Reassignments": 3116, "Commented-out Code (Dead Logic)": 42, "Structured Documentation Blocks": 1, "Unit Test Assertions": 0, @@ -13853,32 +13853,32 @@ "Identity Proof": "Single Indicator (Ext: .f)" }, "2. Topological Coordinates": { - "X": -3278.55, - "Y": 241.23, - "Z": -282.12 + "X": -3277.81, + "Y": 241.32, + "Z": -284.86 }, "3. Architectural Profile": { - "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 14.302, + "Repository Archetype": "file_cluster_8", + "Repository Drift (Z-Score)": 13.908, "Repository Fingerprint": { - "file_cluster_0": 14.508, - "file_cluster_1": 15.015, - "file_cluster_2": 14.908, - "file_cluster_3": 15.712, - "file_cluster_4": 14.692, - "file_cluster_5": 15.047, - "file_cluster_6": 14.763, - "file_cluster_7": 14.759, - "file_cluster_8": 14.311, - "file_cluster_9": 14.728, - "file_cluster_10": 15.426, - "file_cluster_11": 14.382, - "file_cluster_12": 15.051, - "file_cluster_13": 14.302, - "file_cluster_14": 17.784, - "file_cluster_15": 15.002, - "file_cluster_16": 15.002, - "file_cluster_17": 14.499 + "file_cluster_0": 14.136, + "file_cluster_1": 14.631, + "file_cluster_2": 14.533, + "file_cluster_3": 15.358, + "file_cluster_4": 14.335, + "file_cluster_5": 14.666, + "file_cluster_6": 14.393, + "file_cluster_7": 14.374, + "file_cluster_8": 13.908, + "file_cluster_9": 14.355, + "file_cluster_10": 15.073, + "file_cluster_11": 14.023, + "file_cluster_12": 14.684, + "file_cluster_13": 13.925, + "file_cluster_14": 17.482, + "file_cluster_15": 14.642, + "file_cluster_16": 14.63, + "file_cluster_17": 14.133 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -13886,7 +13886,7 @@ "Total LOC": 1200, "Coding LOC": 894, "Documentation LOC": 115, - "Structural Magnitude": 1332.38, + "Structural Magnitude": 1092.38, "Control Flow Ratio": "77.0%", "Popularity Rank": 0, "Raw Churn Frequency": 0.0, @@ -13896,7 +13896,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "72.97%", - "Error & Exception Exposure": "98.87%", + "Error & Exception Exposure": "94.79%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "80.0%", "API Exposure": "4.54%", @@ -13969,7 +13969,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 33, "Exposed API / Public Exports": 4, - "State Mutations / Variable Reassignments": 1142, + "State Mutations / Variable Reassignments": 902, "Commented-out Code (Dead Logic)": 3, "Structured Documentation Blocks": 0, "Unit Test Assertions": 0, diff --git a/tests/golden_master_zero_dep_audit.json b/tests/golden_master_zero_dep_audit.json index affa2f924e..aed6fa8d73 100644 --- a/tests/golden_master_zero_dep_audit.json +++ b/tests/golden_master_zero_dep_audit.json @@ -12,8 +12,8 @@ }, "Target Root Name": "data", "Absolute Project Path": "/home/joe/nyx_projects/language-crucible/data", - "Analysis ISO Timestamp": "2026-07-26T16:29:38.495925+00:00", - "Total Scan Duration": "24.2 seconds" + "Analysis ISO Timestamp": "2026-07-26T17:04:55.985182+00:00", + "Total Scan Duration": "23.27 seconds" }, "Source Control Footprint (Immutable Anchor)": { "Active Branch": "main", @@ -34,8 +34,8 @@ "repo_macro_species": { "name": "Cluster 3", "id": 3, - "z_score": 4.723, - "raw_drift": 0.629 + "z_score": 4.728, + "raw_drift": 0.63 }, "unparsable_files": { "ambig_file_count": 169, @@ -197,7 +197,7 @@ }, "health": { "avg_cognitive_load": 23.278, - "avg_safety_score": 22.616, + "avg_safety_score": 22.584, "avg_tech_debt": 25.691, "avg_documentation": 28.679 }, @@ -330,7 +330,7 @@ "fortran": { "files": 6, "loc": 18540, - "impact": 171620.8 + "impact": 170854.8 }, "java": { "files": 14, @@ -471,12 +471,12 @@ "ecosystem_fingerprint": { "ml_clusters": { "file_cluster_8": { - "count": 493, - "pct": 52.7 + "count": 494, + "pct": 52.8 }, "file_cluster_13": { - "count": 206, - "pct": 22.0 + "count": 205, + "pct": 21.9 }, "file_cluster_0": { "count": 79, @@ -1612,10 +1612,10 @@ }, "fortran/wrf": { "file_count": 14, - "total_mass": 186005.56, + "total_mass": 185239.56, "avg_exposures": { "cognitive_load": 65.02, - "safety_score": 71.49, + "safety_score": 69.38, "tech_debt": 29.84, "verification": 63.3, "api_exposure": 5.77, @@ -4138,8 +4138,8 @@ "typosquat_hits": 7, "Global Architectural Fingerprint": { "Active Execution Logic (ML Clusters)": { - "file_cluster_8": "52.7% (493 files)", - "file_cluster_13": "22.0% (206 files)", + "file_cluster_8": "52.8% (494 files)", + "file_cluster_13": "21.9% (205 files)", "file_cluster_0": "8.4% (79 files)", "file_cluster_4": "2.9% (27 files)", "file_cluster_16": "2.4% (22 files)", @@ -4158,7 +4158,7 @@ }, "Repository Ecosystem Baseline (Architecture)": { "Classification": "Cluster 3", - "Architectural Drift (Z-Score)": 4.723 + "Architectural Drift (Z-Score)": 4.728 } }, "3. Forensic Security & Vulnerability Audit": { @@ -9630,11 +9630,11 @@ } }, "fortran/wrf": { - "Directory Group Magnitude": 186005.56, + "Directory Group Magnitude": 185239.56, "File Count": 14, "Ecosystem Fingerprint (Archetypes)": { - "file_cluster_13": "35.7%", - "file_cluster_8": "21.4%", + "file_cluster_8": "28.6%", + "file_cluster_13": "28.6%", "file_cluster_12": "14.3%", "file_cluster_11": "14.3%", "Static: Literature & Documentation": "7.1%", @@ -9642,7 +9642,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "65.02%", - "Error & Exception Exposure": "71.49%", + "Error & Exception Exposure": "69.38%", "Tech Debt Exposure": "29.84%", "Testing Exposure": "63.3%", "API Exposure": "5.77%", @@ -11455,32 +11455,32 @@ "Identity Proof": "Single Indicator (Ext: .f)" }, "2. Topological Coordinates": { - "X": -3424.42, - "Y": 255.52, - "Z": -1511.87 + "X": -3423.94, + "Y": 255.43, + "Z": -1510.96 }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 13.369, + "Repository Drift (Z-Score)": 13.015, "Repository Fingerprint": { - "file_cluster_0": 14.0, - "file_cluster_1": 14.511, - "file_cluster_2": 14.426, - "file_cluster_3": 15.19, - "file_cluster_4": 14.164, - "file_cluster_5": 14.419, - "file_cluster_6": 14.271, - "file_cluster_7": 14.239, - "file_cluster_8": 13.888, - "file_cluster_9": 14.257, - "file_cluster_10": 14.95, - "file_cluster_11": 13.724, - "file_cluster_12": 14.02, - "file_cluster_13": 13.369, - "file_cluster_14": 17.361, - "file_cluster_15": 14.502, - "file_cluster_16": 14.473, - "file_cluster_17": 13.881 + "file_cluster_0": 13.662, + "file_cluster_1": 14.158, + "file_cluster_2": 14.085, + "file_cluster_3": 14.867, + "file_cluster_4": 13.841, + "file_cluster_5": 14.068, + "file_cluster_6": 13.935, + "file_cluster_7": 13.885, + "file_cluster_8": 13.52, + "file_cluster_9": 13.918, + "file_cluster_10": 14.63, + "file_cluster_11": 13.396, + "file_cluster_12": 13.673, + "file_cluster_13": 13.015, + "file_cluster_14": 17.091, + "file_cluster_15": 14.175, + "file_cluster_16": 14.132, + "file_cluster_17": 13.547 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -11488,7 +11488,7 @@ "Total LOC": 859, "Coding LOC": 564, "Documentation LOC": 171, - "Structural Magnitude": 1144.98, + "Structural Magnitude": 1063.98, "Control Flow Ratio": "54.7%", "Popularity Rank": 4, "Raw Churn Frequency": 0.0, @@ -11498,7 +11498,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "79.61%", - "Error & Exception Exposure": "66.01%", + "Error & Exception Exposure": "45.8%", "Tech Debt Exposure": "37.63%", "Testing Exposure": "80.0%", "API Exposure": "7.59%", @@ -11661,7 +11661,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 20, "Exposed API / Public Exports": 12, - "State Mutations / Variable Reassignments": 373, + "State Mutations / Variable Reassignments": 292, "Commented-out Code (Dead Logic)": 1, "Structured Documentation Blocks": 10, "Unit Test Assertions": 0, @@ -11781,26 +11781,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 15.394, + "Repository Drift (Z-Score)": 15.299, "Repository Fingerprint": { - "file_cluster_0": 15.47, - "file_cluster_1": 16.04, - "file_cluster_2": 15.971, - "file_cluster_3": 16.658, - "file_cluster_4": 15.674, - "file_cluster_5": 16.22, - "file_cluster_6": 15.706, - "file_cluster_7": 15.761, - "file_cluster_8": 15.49, - "file_cluster_9": 15.647, - "file_cluster_10": 16.477, - "file_cluster_11": 15.415, - "file_cluster_12": 16.041, - "file_cluster_13": 15.394, - "file_cluster_14": 18.609, - "file_cluster_15": 16.03, - "file_cluster_16": 16.014, - "file_cluster_17": 15.493 + "file_cluster_0": 15.375, + "file_cluster_1": 15.942, + "file_cluster_2": 15.876, + "file_cluster_3": 16.567, + "file_cluster_4": 15.583, + "file_cluster_5": 16.124, + "file_cluster_6": 15.612, + "file_cluster_7": 15.663, + "file_cluster_8": 15.388, + "file_cluster_9": 15.551, + "file_cluster_10": 16.387, + "file_cluster_11": 15.324, + "file_cluster_12": 15.948, + "file_cluster_13": 15.299, + "file_cluster_14": 18.531, + "file_cluster_15": 15.938, + "file_cluster_16": 15.919, + "file_cluster_17": 15.4 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -11808,7 +11808,7 @@ "Total LOC": 2988, "Coding LOC": 2128, "Documentation LOC": 546, - "Structural Magnitude": 9659.36, + "Structural Magnitude": 9510.36, "Control Flow Ratio": "50.1%", "Popularity Rank": 3, "Raw Churn Frequency": 0.0, @@ -11818,7 +11818,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "57.7%", - "Error & Exception Exposure": "95.82%", + "Error & Exception Exposure": "93.8%", "Tech Debt Exposure": "10.35%", "Testing Exposure": "80.0%", "API Exposure": "9.5%", @@ -12371,7 +12371,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 5, "Exposed API / Public Exports": 51, - "State Mutations / Variable Reassignments": 2347, + "State Mutations / Variable Reassignments": 2198, "Commented-out Code (Dead Logic)": 15, "Structured Documentation Blocks": 46, "Unit Test Assertions": 0, @@ -12490,26 +12490,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_11", - "Repository Drift (Z-Score)": 15.789, + "Repository Drift (Z-Score)": 15.753, "Repository Fingerprint": { - "file_cluster_0": 15.959, - "file_cluster_1": 16.479, - "file_cluster_2": 16.392, - "file_cluster_3": 17.055, - "file_cluster_4": 16.148, - "file_cluster_5": 16.701, - "file_cluster_6": 16.151, - "file_cluster_7": 16.2, - "file_cluster_8": 15.899, - "file_cluster_9": 16.111, - "file_cluster_10": 16.6, - "file_cluster_11": 15.789, - "file_cluster_12": 16.4, - "file_cluster_13": 15.885, - "file_cluster_14": 18.987, - "file_cluster_15": 16.373, - "file_cluster_16": 16.462, - "file_cluster_17": 15.987 + "file_cluster_0": 15.923, + "file_cluster_1": 16.442, + "file_cluster_2": 16.355, + "file_cluster_3": 17.02, + "file_cluster_4": 16.113, + "file_cluster_5": 16.664, + "file_cluster_6": 16.115, + "file_cluster_7": 16.162, + "file_cluster_8": 15.86, + "file_cluster_9": 16.074, + "file_cluster_10": 16.565, + "file_cluster_11": 15.753, + "file_cluster_12": 16.364, + "file_cluster_13": 15.848, + "file_cluster_14": 18.957, + "file_cluster_15": 16.338, + "file_cluster_16": 16.425, + "file_cluster_17": 15.952 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -12517,7 +12517,7 @@ "Total LOC": 9207, "Coding LOC": 6589, "Documentation LOC": 1197, - "Structural Magnitude": 50104.48, + "Structural Magnitude": 49921.48, "Control Flow Ratio": "84.3%", "Popularity Rank": 0, "Raw Churn Frequency": 0.0, @@ -12527,7 +12527,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "98.31%", - "Error & Exception Exposure": "96.54%", + "Error & Exception Exposure": "95.94%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "80.0%", "API Exposure": "8.03%", @@ -13000,7 +13000,7 @@ "High-Risk Execution Commands": 1, "I/O and Network Boundaries": 13, "Exposed API / Public Exports": 38, - "State Mutations / Variable Reassignments": 7103, + "State Mutations / Variable Reassignments": 6920, "Commented-out Code (Dead Logic)": 49, "Structured Documentation Blocks": 2, "Unit Test Assertions": 0, @@ -13128,26 +13128,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 14.564, + "Repository Drift (Z-Score)": 14.532, "Repository Fingerprint": { - "file_cluster_0": 14.862, - "file_cluster_1": 15.306, - "file_cluster_2": 15.277, - "file_cluster_3": 16.028, - "file_cluster_4": 15.059, - "file_cluster_5": 15.598, - "file_cluster_6": 15.098, - "file_cluster_7": 15.053, - "file_cluster_8": 14.667, - "file_cluster_9": 15.017, - "file_cluster_10": 15.846, - "file_cluster_11": 14.792, - "file_cluster_12": 15.398, - "file_cluster_13": 14.564, - "file_cluster_14": 18.036, - "file_cluster_15": 15.446, - "file_cluster_16": 15.349, - "file_cluster_17": 14.894 + "file_cluster_0": 14.83, + "file_cluster_1": 15.273, + "file_cluster_2": 15.244, + "file_cluster_3": 15.997, + "file_cluster_4": 15.028, + "file_cluster_5": 15.566, + "file_cluster_6": 15.067, + "file_cluster_7": 15.02, + "file_cluster_8": 14.632, + "file_cluster_9": 14.985, + "file_cluster_10": 15.815, + "file_cluster_11": 14.762, + "file_cluster_12": 15.367, + "file_cluster_13": 14.532, + "file_cluster_14": 18.01, + "file_cluster_15": 15.415, + "file_cluster_16": 15.317, + "file_cluster_17": 14.862 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -13155,7 +13155,7 @@ "Total LOC": 5751, "Coding LOC": 4602, "Documentation LOC": 555, - "Structural Magnitude": 36263.84, + "Structural Magnitude": 36210.84, "Control Flow Ratio": "43.2%", "Popularity Rank": 0, "Raw Churn Frequency": 0.0, @@ -13165,7 +13165,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "67.01%", - "Error & Exception Exposure": "37.4%", + "Error & Exception Exposure": "35.8%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "80.0%", "API Exposure": "6.92%", @@ -13388,7 +13388,7 @@ "High-Risk Execution Commands": 2, "I/O and Network Boundaries": 26, "Exposed API / Public Exports": 19, - "State Mutations / Variable Reassignments": 1964, + "State Mutations / Variable Reassignments": 1911, "Commented-out Code (Dead Logic)": 31, "Structured Documentation Blocks": 3, "Unit Test Assertions": 0, @@ -13617,26 +13617,26 @@ }, "3. Architectural Profile": { "Repository Archetype": "file_cluster_11", - "Repository Drift (Z-Score)": 15.614, + "Repository Drift (Z-Score)": 15.59, "Repository Fingerprint": { - "file_cluster_0": 15.713, - "file_cluster_1": 16.26, - "file_cluster_2": 16.177, - "file_cluster_3": 16.862, - "file_cluster_4": 15.9, - "file_cluster_5": 16.367, - "file_cluster_6": 15.891, - "file_cluster_7": 16.003, - "file_cluster_8": 15.671, - "file_cluster_9": 15.848, - "file_cluster_10": 16.59, - "file_cluster_11": 15.614, - "file_cluster_12": 16.256, - "file_cluster_13": 15.677, - "file_cluster_14": 18.774, - "file_cluster_15": 16.248, - "file_cluster_16": 16.264, - "file_cluster_17": 15.736 + "file_cluster_0": 15.688, + "file_cluster_1": 16.233, + "file_cluster_2": 16.151, + "file_cluster_3": 16.837, + "file_cluster_4": 15.875, + "file_cluster_5": 16.341, + "file_cluster_6": 15.865, + "file_cluster_7": 15.977, + "file_cluster_8": 15.643, + "file_cluster_9": 15.822, + "file_cluster_10": 16.566, + "file_cluster_11": 15.59, + "file_cluster_12": 16.231, + "file_cluster_13": 15.651, + "file_cluster_14": 18.753, + "file_cluster_15": 16.223, + "file_cluster_16": 16.238, + "file_cluster_17": 15.711 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -13644,7 +13644,7 @@ "Total LOC": 5355, "Coding LOC": 3763, "Documentation LOC": 1013, - "Structural Magnitude": 73115.76, + "Structural Magnitude": 73055.76, "Control Flow Ratio": "51.3%", "Popularity Rank": 1, "Raw Churn Frequency": 0.0, @@ -13654,7 +13654,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "68.33%", - "Error & Exception Exposure": "88.08%", + "Error & Exception Exposure": "87.04%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "81.17%", "API Exposure": "4.17%", @@ -13737,7 +13737,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 96, "Exposed API / Public Exports": 5, - "State Mutations / Variable Reassignments": 3176, + "State Mutations / Variable Reassignments": 3116, "Commented-out Code (Dead Logic)": 42, "Structured Documentation Blocks": 1, "Unit Test Assertions": 0, @@ -13853,32 +13853,32 @@ "Identity Proof": "Single Indicator (Ext: .f)" }, "2. Topological Coordinates": { - "X": -3278.55, - "Y": 241.23, - "Z": -282.12 + "X": -3277.81, + "Y": 241.32, + "Z": -284.86 }, "3. Architectural Profile": { - "Repository Archetype": "file_cluster_13", - "Repository Drift (Z-Score)": 14.302, + "Repository Archetype": "file_cluster_8", + "Repository Drift (Z-Score)": 13.908, "Repository Fingerprint": { - "file_cluster_0": 14.508, - "file_cluster_1": 15.015, - "file_cluster_2": 14.908, - "file_cluster_3": 15.712, - "file_cluster_4": 14.692, - "file_cluster_5": 15.047, - "file_cluster_6": 14.763, - "file_cluster_7": 14.759, - "file_cluster_8": 14.311, - "file_cluster_9": 14.728, - "file_cluster_10": 15.426, - "file_cluster_11": 14.382, - "file_cluster_12": 15.051, - "file_cluster_13": 14.302, - "file_cluster_14": 17.784, - "file_cluster_15": 15.002, - "file_cluster_16": 15.002, - "file_cluster_17": 14.499 + "file_cluster_0": 14.136, + "file_cluster_1": 14.631, + "file_cluster_2": 14.533, + "file_cluster_3": 15.358, + "file_cluster_4": 14.335, + "file_cluster_5": 14.666, + "file_cluster_6": 14.393, + "file_cluster_7": 14.374, + "file_cluster_8": 13.908, + "file_cluster_9": 14.355, + "file_cluster_10": 15.073, + "file_cluster_11": 14.023, + "file_cluster_12": 14.684, + "file_cluster_13": 13.925, + "file_cluster_14": 17.482, + "file_cluster_15": 14.642, + "file_cluster_16": 14.63, + "file_cluster_17": 14.133 }, "File Archetype": null, "File Drift (Z-Score)": 0.0, @@ -13886,7 +13886,7 @@ "Total LOC": 1200, "Coding LOC": 894, "Documentation LOC": 115, - "Structural Magnitude": 1332.38, + "Structural Magnitude": 1092.38, "Control Flow Ratio": "77.0%", "Popularity Rank": 0, "Raw Churn Frequency": 0.0, @@ -13896,7 +13896,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "72.97%", - "Error & Exception Exposure": "98.87%", + "Error & Exception Exposure": "94.79%", "Tech Debt Exposure": "0.0%", "Testing Exposure": "80.0%", "API Exposure": "4.54%", @@ -13969,7 +13969,7 @@ "High-Risk Execution Commands": 0, "I/O and Network Boundaries": 33, "Exposed API / Public Exports": 4, - "State Mutations / Variable Reassignments": 1142, + "State Mutations / Variable Reassignments": 902, "Commented-out Code (Dead Logic)": 3, "Structured Documentation Blocks": 0, "Unit Test Assertions": 0,