From b51f0b02df9245832e0e18c4901e209128801cc0 Mon Sep 17 00:00:00 2001 From: squid-protocol Date: Fri, 11 Sep 2026 13:52:11 -0400 Subject: [PATCH 1/2] fix(rules): apply test-contract C1/C3 to ruby/js/java/groovy/assembly #2853 deferred the #2852 test-contract corollaries for five languages the crucible could not then measure. At the pinned v1.2.0 corpus all five now have files, so apply the fixes (same shape as PR #2923 for #2832/#2833): - ruby (C3): anchor every everyday word to its rspec/minitest form (describe/context -> description string or `do`, it/specify -> string, before/after -> hook call/`do`/:each/:all, let/subject -> `(`/`{`, expect -> `(`, minitest assert/refute -> `assert_`/`assert(`, setup/teardown -> `def`). Ruby has no runtime assert, so assert* stays test's. Prose (`# context`, the noun `assertions`) no longer fires. - javascript (C3/C1): anchor bare describe/expect to `\s*\(`; reduce bare runtime `assert` to the chai chain `assert.` (Node/console.assert is safety's); keep jest/mocha/vitest/cy./beforeEach/afterEach and the already contract-shaped `(? `assert\w{1,40}\(` -- keeps the JUnit `assertEquals(` framework form, drops the JLS/power-assert runtime `assert(cond)` (safety's), and bounds the run so a long word-char stream with no `(` can't catastrophically backtrack (a latent ReDoS the new contract-test coverage surfaced). - assembly (C3/C1): drop the `(?i)` bare prose menu describe/expect/assert (and the linker `ASSERT(` guard, safety's); keep the nasm `testcase` macro and call-anchored `it(`. Pipeline reprice (comment-stripped, golden-relevant): javascript 5->0, ruby 2->0, assembly 284->275, groovy 954->954 (no bare power-assert in corpus), java 0->0. Tests: add ruby/js/java/groovy/assembly CASES + COUNTS to test_test_contract_2852.py (java/groovy also added to the C1 runtime-guard-is-safety's test); refresh the assembly strict row + its collision test. docs/test_rule_contract.md: five audit rows moved to "validated"; the deferred-residue bullet rewritten as landed-in-#2853. Golden-master rebless owed (scoring-layer change: `verification`). Closes #2853 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_014rUcYDAzYYCgrLdHyKBT9G --- docs/test_rule_contract.md | 35 ++++++---- .../language_standards/languages/assembly.py | 7 +- .../language_standards/languages/groovy.py | 6 +- .../language_standards/languages/java.py | 8 ++- .../languages/javascript.py | 9 ++- .../language_standards/languages/ruby.py | 17 ++++- .../languages/test_assembly_strict.py | 6 +- .../languages/test_test_contract_2852.py | 65 +++++++++++++++++++ 8 files changed, 134 insertions(+), 19 deletions(-) diff --git a/docs/test_rule_contract.md b/docs/test_rule_contract.md index 8b0eec25a..51f4c1eef 100644 --- a/docs/test_rule_contract.md +++ b/docs/test_rule_contract.md @@ -102,12 +102,25 @@ an unplanted corpus. - **php `public static function spy()`** — Mockery declaring its own `spy` method fires the call-anchored form once; accepted (it is framework source). -- **Bare-word menus the crucible cannot measure** (ruby's - `before`/`after`/`let`/`subject`, javascript's bare `describe`/`expect`/ - `assert`, java's and groovy's `assert…(` runtime-statement exposure, - assembly's `(?i)` prose vocabulary): deferred with #2853 — no crucible - files, no corpus cell, nothing moves today. The audit records these as - conforming-by-absence-of-evidence, not validated. +- **Bare-word menus, resolved in #2853.** ruby's `before`/`after`/`let`/ + `subject`/`context`, javascript's bare `describe`/`expect`/`assert`, java's + and groovy's `assert…(` runtime-statement exposure, and assembly's `(?i)` + prose vocabulary — all deferred at #2852 as "conforming-by-absence-of- + evidence" — were validated once the v1.2.0 corpus grew files for these + languages (ruby, javascript, groovy 312, assembly 239; java present but with + no test sites). C3 anchors the everyday word to its framework form: ruby's + words to their rspec/minitest call/block (`describe "x" do`, `before(:each)`, + `let(:u)`, `assert_equal`), javascript's `describe`/`expect` to `\s*\(` and + bare `assert` to the chai chain `assert.`, assembly's menu dropped in + favour of the `testcase` macro. C1 hands the runtime guard to safety: java's + and groovy's `assert\w*\(` → `assert\w{1,40}\(` (the parenthesized power- + assert/JLS statement is safety's; `assertEquals(` stays; also closes a latent + `\w+\(` backtracking exposure), and js's bare `assert(`. Pipeline reprice: + javascript 5 → 0, ruby 2 → 0, assembly 284 → 275, groovy 954 → 954 + (unchanged — no bare power-assert in corpus), java 0 → 0. **Residual:** + non-black/unspaced forms and languages still thin on test files (java has no + `@Test` sites in its springboot corpus) are validated by the contract test's + positive/negative pairs rather than a corpus cell. ## The 46-language audit @@ -124,7 +137,7 @@ morphology. | ada | — | 2 | conforms (`AUnit`, `Assert(` — Ada has no runtime assert keyword) | | agc_assembly | 13 | 2 | conforms (SELFCHECK/ROPECHK are its self-test ops) | | apex | 116 | 2 | conforms (@isTest/System.assert anchored forms) | -| assembly | 275 | 2 | conforms; `testcase` macro rows are case declarations; `(?i)` prose surface → #2853 | +| assembly | 284 → 275 | 2 | validated (#2853): kept the `testcase` macro + `it(`; dropped the `(?i)` prose menu and the linker `ASSERT(` guard (safety's) | | c | 1052 → 97 | 3 → 2 | **C1**: `assert(` → safety's; uppercase `ASSERT_*` macros stay (framework form) | | cobol | 51 → 0 | 2 | **C3**: hyphen guards; `UT-TEST-CASE-COUNT` was an identifier (#2622 shape) | | cpp | 0 | 2 | conforms (framework macros only, no bare assert() alternative) | @@ -135,11 +148,11 @@ morphology. | embedded_python | 0 | 3 → 2 | **C1**: bare `assert` removed (#2626 applied to the twin) | | fortran | 0 | 2 | conforms (pFUnit `@test`/`@assertEqual` directive-anchored) | | go | 2 | 2 | conforms (`TestX`/`t.Run`/`assert.X(` anchored) | -| groovy | 948 | 2 | conforms; Spock labels line-anchored; `assert…(` exposure → #2853 | +| groovy | 954 → 954 | 2 | validated (#2853): C1 `assert\w{1,40}\(` drops the parenthesized power-assert (none in corpus); Spock labels + `assertEquals(` kept | | haskell | 0 | 2 | conforms (hspec/QuickCheck names, `prop_` prefix) | | html | 0 | 2 | conforms (`data-testid=` attribute form) | -| java | 0 | 2 | conforms; `assert…(` runtime-statement exposure → #2853 | -| javascript | 5 | 2 | conforms; anchored `it`/`test` halves already contract-shaped; bare `describe`/`expect`/`assert` → #2853 | +| java | 0 → 0 | 2 | validated (#2853): C1 `assert…{1,40}\(` keeps `assertEquals(`, drops the JLS runtime `assert(cond)`; no test sites in the springboot corpus, so pinned by the contract test | +| javascript | 5 → 0 | 2 | validated (#2853): C3 anchors `describe`/`expect` to `\s*\(`, bare `assert` to the chai chain `assert.`; the 5 were comment/string prose, now gone | | kotlin | 1 | 2 | conforms (annotation + call-anchored forms) | | livecode | 0 | 2 | conforms (`command test*`/`pass test` statement forms) | | lua | 3471 → 134 | 2 | **C1**: bare `assert` → safety's; luassert chain `assert.` added (the 134 are all chains) | @@ -151,7 +164,7 @@ morphology. | php | 53 → 7 | 2 | **C3**: everyday words call-anchored, `(?)` on `test`/`it`; remainder Mockery calls | | powershell | 203 | 2 | conforms (Pester `Should`/`Describe`/`It` forms) | | python | 1221 | 2 | conforms (#2626 already removed `assert`; framework names + `def test_`) | -| ruby | 0 | 2 | conforms-by-absence-of-evidence; bare-word menu → #2853 | +| ruby | 2 → 0 | 2 | validated (#2853): C3 anchors describe/context/it/before/after/let/subject/expect and minitest assert_*/refute_* to their framework forms; prose (`# context`, `assertions`) no longer fires | | rust | 464 | 2 | conforms (`#[test]`/`assert!` macros — the macro *is* the framework form) | | scala | 0 | 2 | conforms (framework names + `it should`) | | scheme | 0 | 2 | conforms (paren-anchored srfi-64 forms) | diff --git a/gitgalaxy/standards/language_standards/languages/assembly.py b/gitgalaxy/standards/language_standards/languages/assembly.py index f225b15da..e06cbd020 100644 --- a/gitgalaxy/standards/language_standards/languages/assembly.py +++ b/gitgalaxy/standards/language_standards/languages/assembly.py @@ -197,7 +197,12 @@ # #2882 contract C4: doc counts the block, not the author tag -- @author is ownership's alone. "doc": re.compile(r"^[;#@/|]+\s*@(?:param|return|brief|note)", re.M | re.I), # 14. test (Testing & Assertions) - "test": re.compile(r"(?i)\b(?:describe|expect|assert|TestCase)\b|\bit[ \t]*\("), + # #2853 contract C3/C1: dropped the `(?i)` bare prose menu + # `describe|expect|assert` (comment vocabulary, and a linker `ASSERT(` + # guard is safety's, not a test). The real test surface in the corpus is + # the nasm/masm `testcase` macro table (kept, case-insensitively) and a + # call-anchored `it(`. + "test": re.compile(r"(?i)\bTestCase\b|\bit[ \t]*\("), # --- PHASE 3: ARCHITECTURE & DOMAIN SENSORS --- # 15. concurrency (Asynchronous Execution) "concurrency": re.compile( diff --git a/gitgalaxy/standards/language_standards/languages/groovy.py b/gitgalaxy/standards/language_standards/languages/groovy.py index 1d2c6d639..82781a44b 100644 --- a/gitgalaxy/standards/language_standards/languages/groovy.py +++ b/gitgalaxy/standards/language_standards/languages/groovy.py @@ -344,7 +344,11 @@ # Spock-label anchor could stretch across blank lines. Bounded to # `[ \t]*` (same-line whitespace only). "test": re.compile( - r"@(?:Test|Before|After|BeforeEach|AfterEach|Mock)|assert\w*\s*\(|^[ \t]*(?:given|when|then|expect|setup|cleanup|where):", + # #2853 contract C1: `assert\w{1,40}\(` (was `\w*`) keeps `assertEquals(` + # but drops groovy's parenthesized power-assert `assert(cond)` -- a + # runtime guard, safety's. Spock block labels are untouched. Bounded so + # a long `\w` run with no `(` can't catastrophically backtrack. + r"@(?:Test|Before|After|BeforeEach|AfterEach|Mock)|assert\w{1,40}\s*\(|^[ \t]*(?:given|when|then|expect|setup|cleanup|where):", re.M, ), # --- PHASE 3: ARCHITECTURE & DOMAIN SENSORS --- diff --git a/gitgalaxy/standards/language_standards/languages/java.py b/gitgalaxy/standards/language_standards/languages/java.py index 4b811b6ca..a8d55dde7 100644 --- a/gitgalaxy/standards/language_standards/languages/java.py +++ b/gitgalaxy/standards/language_standards/languages/java.py @@ -267,8 +267,14 @@ r"/\*\*[\s\S]{0,15000}?\*/|@param|@return|@throws|@deprecated|@see|@since|@apiNote|@implSpec|@Operation|@Schema" ), # 14. test (Testing & Assertions) + # #2853 contract C1: `assert[...]{1,40}\(` (was `*`) requires >=1 char after + # `assert`, so a JUnit `assertEquals(`/`assertThat(` matches but the JLS + # runtime `assert(cond)` statement -- a production guard, safety's -- does + # not (the runtime `assert cond;` form was never matched here anyway). The + # count is bounded (a real assertion name is short) so a long run of word + # chars with no `(` can't catastrophically backtrack the `\w+\s*\(` tail. "test": re.compile( - r"@(?:Test|ParameterizedTest|Before|After|BeforeEach|AfterEach|Mock|InjectMocks)|assert[A-Za-z0-9_]*\s*\(|\b(?:verify|expect|given|when)\s*\(" + r"@(?:Test|ParameterizedTest|Before|After|BeforeEach|AfterEach|Mock|InjectMocks)|assert[A-Za-z0-9_]{1,40}\s*\(|\b(?:verify|expect|given|when)\s*\(" ), # --- PHASE 3: ARCHITECTURE & DOMAIN SENSORS --- # 15. concurrency (Asynchronous Execution) diff --git a/gitgalaxy/standards/language_standards/languages/javascript.py b/gitgalaxy/standards/language_standards/languages/javascript.py index 90d6e363c..45ace967a 100644 --- a/gitgalaxy/standards/language_standards/languages/javascript.py +++ b/gitgalaxy/standards/language_standards/languages/javascript.py @@ -258,8 +258,15 @@ # already carries this guard so `myRegex.test('x')` (a regex method # call) isn't miscounted as a test-framework call -- JavaScript's own # rule never got the same fix despite the identical ambiguity. + # #2853 contract C3/C1: the bare menu `describe|expect|assert` fired on + # comment/string prose (`methodName === 'assert'`, `/* assert */`). Anchor + # the everyday words to their call form (`describe(`, `expect(`), keep the + # unambiguous framework names bare, and reduce bare `assert` to the chai + # matcher chain `assert.` -- Node/`console.assert` runtime guards are + # safety's (C1). The `(?` or `assert(` call form, and setup/teardown to a `def`. + # Ruby has no runtime `assert` keyword, so `assert*` stays test's (C1 n/a). "test": re.compile( - r'\b(describe|context|expect|assert[a-zA-Z_]*|refute[a-zA-Z_]*|setup|teardown|before|after|let|subject)\b|\b(?:it|test)\s+[\'"]' + r"\bRSpec\b" + r"|\b(?:describe|context)\s*(?:['\"(]|do\b)" + r"|\b(?:it|specify)\s+['\"]" + r"|\b(?:before|after)\s*(?:\(|do\b|:each|:all)" + r"|\b(?:let|subject)\s*(?:\(|\{)" + r"|\bexpect\s*\(" + r"|\b(?:assert|refute)(?:_\w+|\s*\()" + r"|\bdef[ \t]+(?:setup|teardown)\b" ), # --- PHASE 3: ARCHITECTURE & DOMAIN SENSORS --- # 15. concurrency (Asynchronous Execution) diff --git a/tests/extraction/languages/test_assembly_strict.py b/tests/extraction/languages/test_assembly_strict.py index 5464c46e9..8ec90bf8d 100644 --- a/tests/extraction/languages/test_assembly_strict.py +++ b/tests/extraction/languages/test_assembly_strict.py @@ -89,7 +89,7 @@ ("state_mutation", "\txchg eax, ebx", "\tmov eax, ebx"), ("dead_code", "; mov eax, 5", "; just a note"), ("doc", "; @param x", "; just a note"), - ("test", "\tassert eax", "\tmov eax, ebx"), + ("test", "testcase {", "\tassert eax"), # #2853: nasm testcase macro counts; bare `assert` prose does not ("concurrency", "\tlock xadd eax, ebx", "\tmov eax, ebx"), ("globals", "\tbuf: resd 4", "\t.data"), # #2858: labeled storage, not the section switch ("comprehensions", "\trep movsb", "\tmov eax, ebx"), @@ -286,14 +286,14 @@ def test_assembly_test_vs_regex_execution_no_false_collision(): """ Known ambiguity pattern from the issue template (TypeScript's `myRegex.test('x')` colliding with `test`). assembly's `test` maps to - describe/expect/assert/TestCase/`it(`; `regex_execution` maps to + the `testcase` macro and `it(`; `regex_execution` maps to `call`/`bl` into POSIX regex functions -- disjoint token vocabularies, no realistic overlap. """ test_rule = ASM_RULES["test"] regex_execution = ASM_RULES["regex_execution"] - assertion = "\tassert eax" + assertion = "testcase {" # #2853: assembly's test surface is the nasm `testcase` macro (bare `assert` prose dropped) assert test_rule.search(assertion) assert not regex_execution.search(assertion) diff --git a/tests/extraction/languages/test_test_contract_2852.py b/tests/extraction/languages/test_test_contract_2852.py index 81514049e..693a9266e 100644 --- a/tests/extraction/languages/test_test_contract_2852.py +++ b/tests/extraction/languages/test_test_contract_2852.py @@ -92,6 +92,60 @@ def _rule(lang, signal="test"): ["ASSERT RESULT-ONE.", "ZUNIT RESULT-TWO.", "READY TRACE."], ["MOVE UT-TEST-CASE-COUNT TO UT-TEST-CASE-NUMBER", "UT-TEST-CASE-NUMBER '. '"], ), + # --- #2853: bare-word menus in languages the crucible now measures ----------- + "ruby": ( # C3: anchor rspec/minitest words; ruby has no runtime assert (C1 n/a) + [ + 'describe "x" do', + 'context "when y" do', + 'it "does" do', + "before(:each)", + "before do", + "let(:user)", + "subject { described_class }", + "expect(x).to be", + "assert_equal a, b", + "refute_nil x", + "def setup", + ], + [ + "# the context.", + 'require "bundler/setup"', + "Struct.new(:name, :failures, :assertions)", + "named after the method", + "before the request", + ], + ), + "javascript": ( # C3 anchors + C1 (bare `assert` runtime is safety's; keep chai `assert.`) + [ + 'describe("x", () => {', + "expect(x).toBe(1)", + "it('adds', () => {", + "assert.equal(a, b)", + "beforeEach(() => {", + "afterEach(() => {", + "jest.fn()", + "cy.visit('/')", + ], + [ + "if (methodName === 'assert') {", + "/* assert on the output */", + "myRegex.test('x')", + "transparency. Blending", + "const describer = 1", + ], + ), + "java": ( # C1: `assert...(` keeps JUnit `assertEquals(`, drops the runtime `assert(cond)` statement + ["@Test", "@ParameterizedTest", "assertEquals(a, b)", "assertThat(x).isNull()", "verify(mock).run()", "when(mock.get())"], + ["assert(cond);", "assert x > 0;", "assert cond : message;"], + ), + "groovy": ( # C1: keeps `assertEquals(`, drops groovy's parenthesized power-assert; Spock labels stay + ["@Test", "given:", "when:", "then:", "expect:", "assertEquals(a, b)", "assertTrue(ok)"], + ["assert(x)", "assert x == y", "assert (result > 0)"], + ), + "assembly": ( # C3: keep the nasm `testcase` macro + call-anchored `it(`, drop the `(?i)` prose menu + ["%macro testcase 2", "testcase {", "it (foo)", "TESTCASE macro"], + ["; describe the loop", "assert clarity of intent", "; expect failure here", "ASSERT(sizeof == 8)"], + ), } # One statement is one hit (C2), and the plant shapes stay pinned. @@ -112,6 +166,14 @@ def _rule(lang, signal="test"): ("lua", "function probe_test(kit)\n busted(kit)\n luassert(kit)\nend", 2), ("cobol", " PROBE-TEST.\n ASSERT RESULT-ONE.\n ZUNIT RESULT-TWO.", 2), ("php", "public function probe_test($kit) {\n PHPUnit::run($kit);\n assertTrue($kit);\n}", 2), + # #2853 + ("ruby", "def probe\n assert_equal a, b\n refute_nil x\nend", 2), + ("ruby", "x = respond_to?(:foo)\n# context here", 0), + ("javascript", "describe('x', () => {\n expect(a).toBe(b);\n});", 2), + ("javascript", "if (name === 'assert') doThing();", 0), + ("java", "@Test\nvoid t() { assertEquals(a, b); assert(raw); }", 2), # framework assert counts, runtime assert(raw) does not + ("groovy", "def 'spec'() {\n expect:\n assertEquals(a, b)\n assert(raw)\n}", 2), # label + framework assert; power-assert(raw) excluded + ("assembly", "%macro testcase 2\n; describe the flow\ntestcase {", 2), # macro decl + invocation; comment prose excluded ] PAYLOADS = [ @@ -153,6 +215,9 @@ def test_test_runtime_guard_is_safetys_hit_alone(): ("embedded_python", "assert isinstance(value, int)"), ("lua", "assert(os.remove(file))"), ("python", "assert x == 1"), + # #2853: java's and groovy's parenthesized runtime assert is safety's now + ("java", "assert(cond);"), + ("groovy", "assert(x)"), ]: assert _rule(lang, "safety").search(guard), f"{lang}: safety lost {guard!r}" assert not _rule(lang).search(guard), f"{lang}: test still claims {guard!r}" From 013c9307bf797ecc8463bbce8685c04653cef97f Mon Sep 17 00:00:00 2001 From: squid-protocol Date: Fri, 11 Sep 2026 13:54:20 -0400 Subject: [PATCH 2/2] test(golden): rebless test-rule C1/C3 reprice (#2853) The #2853 test-rule fixes drop the comment/prose and runtime-assert residue for ruby/javascript/assembly (groovy/java unchanged in corpus), repricing the `verification` signal. Both golden masters regenerated per-leg in isolated venvs against language-crucible @ v1.2.0. bless_scope.py (both legs): 24 diffs, 0 topological, all substantive and confined to the `test`/`safety` signal family exactly as the contract's Bless scope note predicts -- Unit Test Assertions (7) + Testing Exposure (1) direct; Error & Exception Exposure (11) + safety_score (4) + avg_safety_score (1) are the normalized-relative shifts (a file's exposures are relative to its total magnitude, and the C1 fix moves the dropped runtime `assert` from test to safety). Movement lands on ruby/rails, brew's .rb, vscode's .js and react .js (.rb/.js files nested in mixed-language project dirs); NO files newly parsed or excluded. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_014rUcYDAzYYCgrLdHyKBT9G --- tests/golden_master_audit.json | 52 ++++++++++++------------- tests/golden_master_zero_dep_audit.json | 52 ++++++++++++------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/tests/golden_master_audit.json b/tests/golden_master_audit.json index ceb181008..99ccb4647 100644 --- a/tests/golden_master_audit.json +++ b/tests/golden_master_audit.json @@ -12,8 +12,8 @@ }, "Target Root Name": "data", "Absolute Project Path": "/srv/storage_16tb/projects/gitgalaxy/language-crucible/data", - "Analysis ISO Timestamp": "2026-09-11T17:08:15.667545+00:00", - "Total Scan Duration": "30.71 seconds" + "Analysis ISO Timestamp": "2026-09-11T17:54:00.831283+00:00", + "Total Scan Duration": "28.99 seconds" }, "Source Control Footprint (Immutable Anchor)": { "Active Branch": "HEAD", @@ -237,7 +237,7 @@ }, "health": { "avg_cognitive_load": 20.662, - "avg_safety_score": 45.547, + "avg_safety_score": 45.548, "avg_tech_debt": 27.311, "avg_documentation": 52.357 }, @@ -3492,7 +3492,7 @@ "total_mass": 757.12, "avg_exposures": { "cognitive_load": 28.94, - "safety_score": 61.35, + "safety_score": 61.38, "tech_debt": 32.67, "verification": 40.91, "api_exposure": 6.64, @@ -3549,7 +3549,7 @@ "total_mass": 1870.62, "avg_exposures": { "cognitive_load": 32.94, - "safety_score": 46.08, + "safety_score": 46.13, "tech_debt": 24.13, "verification": 19.42, "api_exposure": 4.02, @@ -3758,7 +3758,7 @@ "total_mass": 8078.02, "avg_exposures": { "cognitive_load": 31.52, - "safety_score": 58.82, + "safety_score": 58.84, "tech_debt": 50.83, "verification": 58.39, "api_exposure": 7.64, @@ -4974,7 +4974,7 @@ "total_mass": 10161.86, "avg_exposures": { "cognitive_load": 39.99, - "safety_score": 49.59, + "safety_score": 49.62, "tech_debt": 42.44, "verification": 49.0, "api_exposure": 21.69, @@ -374853,7 +374853,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "39.99%", - "Error & Exception Exposure": "49.59%", + "Error & Exception Exposure": "49.62%", "Tech Debt Exposure": "42.44%", "Testing Exposure": "49.0%", "API Exposure": "21.69%", @@ -374904,7 +374904,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "38.62%", - "Error & Exception Exposure": "66.38%", + "Error & Exception Exposure": "66.42%", "Tech Debt Exposure": "14.83%", "Testing Exposure": "80.0%", "API Exposure": "28.18%", @@ -375860,7 +375860,7 @@ "State Mutations / Variable Reassignments": 305, "Commented-out Code (Dead Logic)": 2, "Structured Documentation Blocks": 1, - "Unit Test Assertions": 1, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 17, "Closures and Anonymous Functions": 0, @@ -376034,7 +376034,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "45.75%", - "Error & Exception Exposure": "67.68%", + "Error & Exception Exposure": "67.74%", "Tech Debt Exposure": "16.54%", "Testing Exposure": "80.0%", "API Exposure": "56.02%", @@ -377668,7 +377668,7 @@ "State Mutations / Variable Reassignments": 414, "Commented-out Code (Dead Logic)": 8, "Structured Documentation Blocks": 4, - "Unit Test Assertions": 2, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 2, "UI / View Layer Components": 23, "Closures and Anonymous Functions": 16, @@ -377856,7 +377856,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "81.75%", - "Error & Exception Exposure": "64.76%", + "Error & Exception Exposure": "64.81%", "Tech Debt Exposure": "28.76%", "Testing Exposure": "2.59%", "API Exposure": "6.59%", @@ -379906,7 +379906,7 @@ "State Mutations / Variable Reassignments": 523, "Commented-out Code (Dead Logic)": 5, "Structured Documentation Blocks": 1, - "Unit Test Assertions": 2, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 42, "UI / View Layer Components": 79, "Closures and Anonymous Functions": 47, @@ -484970,7 +484970,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "31.52%", - "Error & Exception Exposure": "58.82%", + "Error & Exception Exposure": "58.84%", "Tech Debt Exposure": "50.83%", "Testing Exposure": "58.39%", "API Exposure": "7.64%", @@ -485335,7 +485335,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "4.25%", - "Error & Exception Exposure": "62.13%", + "Error & Exception Exposure": "62.31%", "Tech Debt Exposure": "8.64%", "Testing Exposure": "2.3%", "API Exposure": "2.82%", @@ -485367,7 +485367,7 @@ "State Mutations / Variable Reassignments": 1, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 41, - "Unit Test Assertions": 3, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 12, "UI / View Layer Components": 4, "Closures and Anonymous Functions": 0, @@ -711944,7 +711944,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "32.94%", - "Error & Exception Exposure": "46.08%", + "Error & Exception Exposure": "46.13%", "Tech Debt Exposure": "24.13%", "Testing Exposure": "19.42%", "API Exposure": "4.02%", @@ -712890,7 +712890,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "77.4%", - "Error & Exception Exposure": "92.56%", + "Error & Exception Exposure": "92.89%", "Tech Debt Exposure": "66.93%", "Testing Exposure": "80.0%", "API Exposure": "0.0%", @@ -713573,7 +713573,7 @@ "State Mutations / Variable Reassignments": 89, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 0, - "Unit Test Assertions": 4, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 0, "Closures and Anonymous Functions": 19, @@ -714051,7 +714051,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "38.35%", - "Error & Exception Exposure": "70.02%", + "Error & Exception Exposure": "70.12%", "Tech Debt Exposure": "29.43%", "Testing Exposure": "80.0%", "API Exposure": "0.0%", @@ -715908,7 +715908,7 @@ "State Mutations / Variable Reassignments": 151, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 190, - "Unit Test Assertions": 40, + "Unit Test Assertions": 39, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 0, "Closures and Anonymous Functions": 23, @@ -816498,7 +816498,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "28.94%", - "Error & Exception Exposure": "61.35%", + "Error & Exception Exposure": "61.38%", "Tech Debt Exposure": "32.67%", "Testing Exposure": "40.91%", "API Exposure": "6.64%", @@ -816706,9 +816706,9 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "61.22%", - "Error & Exception Exposure": "97.11%", + "Error & Exception Exposure": "97.3%", "Tech Debt Exposure": "0.0%", - "Testing Exposure": "2.44%", + "Testing Exposure": "2.45%", "API Exposure": "0.0%", "Concurrency Exposure": "0.0%", "State Flux Exposure": "100.0%", @@ -816795,7 +816795,7 @@ "State Mutations / Variable Reassignments": 33, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 0, - "Unit Test Assertions": 2, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 0, "Closures and Anonymous Functions": 13, diff --git a/tests/golden_master_zero_dep_audit.json b/tests/golden_master_zero_dep_audit.json index 4bac33033..87817a664 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": "/srv/storage_16tb/projects/gitgalaxy/language-crucible/data", - "Analysis ISO Timestamp": "2026-09-11T17:05:48.599107+00:00", - "Total Scan Duration": "29.54 seconds" + "Analysis ISO Timestamp": "2026-09-11T17:52:47.731540+00:00", + "Total Scan Duration": "27.52 seconds" }, "Source Control Footprint (Immutable Anchor)": { "Active Branch": "HEAD", @@ -237,7 +237,7 @@ }, "health": { "avg_cognitive_load": 20.662, - "avg_safety_score": 45.547, + "avg_safety_score": 45.548, "avg_tech_debt": 27.311, "avg_documentation": 52.357 }, @@ -3492,7 +3492,7 @@ "total_mass": 757.12, "avg_exposures": { "cognitive_load": 28.94, - "safety_score": 61.35, + "safety_score": 61.38, "tech_debt": 32.67, "verification": 40.91, "api_exposure": 6.64, @@ -3549,7 +3549,7 @@ "total_mass": 1870.62, "avg_exposures": { "cognitive_load": 32.94, - "safety_score": 46.08, + "safety_score": 46.13, "tech_debt": 24.13, "verification": 19.42, "api_exposure": 4.02, @@ -3758,7 +3758,7 @@ "total_mass": 8078.02, "avg_exposures": { "cognitive_load": 31.52, - "safety_score": 58.82, + "safety_score": 58.84, "tech_debt": 50.83, "verification": 58.39, "api_exposure": 7.64, @@ -4974,7 +4974,7 @@ "total_mass": 10161.86, "avg_exposures": { "cognitive_load": 39.99, - "safety_score": 49.59, + "safety_score": 49.62, "tech_debt": 42.44, "verification": 49.0, "api_exposure": 21.69, @@ -374853,7 +374853,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "39.99%", - "Error & Exception Exposure": "49.59%", + "Error & Exception Exposure": "49.62%", "Tech Debt Exposure": "42.44%", "Testing Exposure": "49.0%", "API Exposure": "21.69%", @@ -374904,7 +374904,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "38.62%", - "Error & Exception Exposure": "66.38%", + "Error & Exception Exposure": "66.42%", "Tech Debt Exposure": "14.83%", "Testing Exposure": "80.0%", "API Exposure": "28.18%", @@ -375860,7 +375860,7 @@ "State Mutations / Variable Reassignments": 305, "Commented-out Code (Dead Logic)": 2, "Structured Documentation Blocks": 1, - "Unit Test Assertions": 1, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 17, "Closures and Anonymous Functions": 0, @@ -376034,7 +376034,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "45.75%", - "Error & Exception Exposure": "67.68%", + "Error & Exception Exposure": "67.74%", "Tech Debt Exposure": "16.54%", "Testing Exposure": "80.0%", "API Exposure": "56.02%", @@ -377668,7 +377668,7 @@ "State Mutations / Variable Reassignments": 414, "Commented-out Code (Dead Logic)": 8, "Structured Documentation Blocks": 4, - "Unit Test Assertions": 2, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 2, "UI / View Layer Components": 23, "Closures and Anonymous Functions": 16, @@ -377856,7 +377856,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "81.75%", - "Error & Exception Exposure": "64.76%", + "Error & Exception Exposure": "64.81%", "Tech Debt Exposure": "28.76%", "Testing Exposure": "2.59%", "API Exposure": "6.59%", @@ -379906,7 +379906,7 @@ "State Mutations / Variable Reassignments": 523, "Commented-out Code (Dead Logic)": 5, "Structured Documentation Blocks": 1, - "Unit Test Assertions": 2, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 42, "UI / View Layer Components": 79, "Closures and Anonymous Functions": 47, @@ -484970,7 +484970,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "31.52%", - "Error & Exception Exposure": "58.82%", + "Error & Exception Exposure": "58.84%", "Tech Debt Exposure": "50.83%", "Testing Exposure": "58.39%", "API Exposure": "7.64%", @@ -485335,7 +485335,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "4.25%", - "Error & Exception Exposure": "62.13%", + "Error & Exception Exposure": "62.31%", "Tech Debt Exposure": "8.64%", "Testing Exposure": "2.3%", "API Exposure": "2.82%", @@ -485367,7 +485367,7 @@ "State Mutations / Variable Reassignments": 1, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 41, - "Unit Test Assertions": 3, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 12, "UI / View Layer Components": 4, "Closures and Anonymous Functions": 0, @@ -711944,7 +711944,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "32.94%", - "Error & Exception Exposure": "46.08%", + "Error & Exception Exposure": "46.13%", "Tech Debt Exposure": "24.13%", "Testing Exposure": "19.42%", "API Exposure": "4.02%", @@ -712890,7 +712890,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "77.4%", - "Error & Exception Exposure": "92.56%", + "Error & Exception Exposure": "92.89%", "Tech Debt Exposure": "66.93%", "Testing Exposure": "80.0%", "API Exposure": "0.0%", @@ -713573,7 +713573,7 @@ "State Mutations / Variable Reassignments": 89, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 0, - "Unit Test Assertions": 4, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 0, "Closures and Anonymous Functions": 19, @@ -714051,7 +714051,7 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "38.35%", - "Error & Exception Exposure": "70.02%", + "Error & Exception Exposure": "70.12%", "Tech Debt Exposure": "29.43%", "Testing Exposure": "80.0%", "API Exposure": "0.0%", @@ -715908,7 +715908,7 @@ "State Mutations / Variable Reassignments": 151, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 190, - "Unit Test Assertions": 40, + "Unit Test Assertions": 39, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 0, "Closures and Anonymous Functions": 23, @@ -816498,7 +816498,7 @@ }, "Average Risk Exposures": { "Cognitive Load Exposure": "28.94%", - "Error & Exception Exposure": "61.35%", + "Error & Exception Exposure": "61.38%", "Tech Debt Exposure": "32.67%", "Testing Exposure": "40.91%", "API Exposure": "6.64%", @@ -816706,9 +816706,9 @@ }, "4. Vulnerability & Risk Exposures": { "Cognitive Load Exposure": "61.22%", - "Error & Exception Exposure": "97.11%", + "Error & Exception Exposure": "97.3%", "Tech Debt Exposure": "0.0%", - "Testing Exposure": "2.44%", + "Testing Exposure": "2.45%", "API Exposure": "0.0%", "Concurrency Exposure": "0.0%", "State Flux Exposure": "100.0%", @@ -816795,7 +816795,7 @@ "State Mutations / Variable Reassignments": 33, "Commented-out Code (Dead Logic)": 0, "Structured Documentation Blocks": 0, - "Unit Test Assertions": 2, + "Unit Test Assertions": 0, "Asynchronous/Concurrent Execution": 0, "UI / View Layer Components": 0, "Closures and Anonymous Functions": 13,