gitgalaxy 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/PKG-INFO +1 -1
  2. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/aperture.py +42 -45
  3. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/detector.py +6 -1
  4. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/network_risk_sensor.py +14 -7
  5. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/galaxyscope.py +3 -3
  6. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/physics/neural_auditor.py +1 -1
  7. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/recorders/llm_recorder.py +51 -37
  8. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/recorders/record_keeper.py +18 -14
  9. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/security/security_auditor.py +60 -18
  10. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/security/security_lens.py +52 -61
  11. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/language_standards.py +598 -182
  12. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/README.md +3 -2
  13. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_compiler_forge.py +12 -1
  14. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_graveyard_finder.py +3 -3
  15. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_lexical_patcher.py +1 -1
  16. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_microservice_slicer.py +5 -4
  17. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_schema_forge.py +2 -1
  18. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy.egg-info/PKG-INFO +1 -1
  19. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy.egg-info/SOURCES.txt +53 -18
  20. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/mkdocs.yml +9 -2
  21. gitgalaxy-2.2.0/tests/README.md +94 -0
  22. gitgalaxy-2.2.0/tests/cobol_mainframe/readme.md +70 -0
  23. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_agent_task_forge.py +117 -0
  24. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_compiler_forge.py +104 -0
  25. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_dag_architect.py +138 -0
  26. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_etl_unpacker.py +132 -0
  27. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_graveyard_finder.py +117 -0
  28. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_jcl_auditor.py +123 -0
  29. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_jcl_forge.py +127 -0
  30. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_lexical_patcher.py +87 -0
  31. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_microservice_slicer.py +111 -0
  32. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_refractor_controller.py +88 -0
  33. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_schema_forge.py +88 -0
  34. gitgalaxy-2.2.0/tests/cobol_mainframe/test_cobol_system_limits_reporter.py +105 -0
  35. gitgalaxy-2.2.0/tests/core_engine/readme.md +76 -0
  36. gitgalaxy-2.2.0/tests/core_engine/test_aperture.py +165 -0
  37. gitgalaxy-2.2.0/tests/core_engine/test_detector.py +161 -0
  38. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/core_engine}/test_galaxyscope.py +2 -2
  39. gitgalaxy-2.2.0/tests/core_engine/test_guidestar_lens.py +134 -0
  40. gitgalaxy-2.2.0/tests/core_engine/test_language_standards_strict.py +191 -0
  41. gitgalaxy-2.2.0/tests/core_engine/test_prism.py +165 -0
  42. gitgalaxy-2.2.0/tests/core_engine/test_signal_processor.py +161 -0
  43. gitgalaxy-2.2.0/tests/core_engine/test_state_rehydrator.py +119 -0
  44. gitgalaxy-2.2.0/tests/extraction/readme.md +72 -0
  45. gitgalaxy-2.2.0/tests/extraction/test_args_extraction_strict.py +289 -0
  46. gitgalaxy-2.2.0/tests/extraction/test_class_extraction_strict.py +329 -0
  47. gitgalaxy-2.2.0/tests/extraction/test_dependency_extraction_strict.py +462 -0
  48. gitgalaxy-2.2.0/tests/extraction/test_function_extraction_strict.py +472 -0
  49. gitgalaxy-2.2.0/tests/security_auditing/readme.md +45 -0
  50. gitgalaxy-2.2.0/tests/security_auditing/test_ai_appsec_sensor.py +105 -0
  51. gitgalaxy-2.2.0/tests/security_auditing/test_dev_agent_firewall.py +137 -0
  52. gitgalaxy-2.2.0/tests/security_auditing/test_network_risk_sensor.py +148 -0
  53. gitgalaxy-2.2.0/tests/security_auditing/test_neural_auditor.py +107 -0
  54. gitgalaxy-2.2.0/tests/security_auditing/test_pii_leak_hunter.py +78 -0
  55. gitgalaxy-2.2.0/tests/security_auditing/test_redos_poison.py +113 -0
  56. gitgalaxy-2.2.0/tests/security_auditing/test_spectral_auditor.py +147 -0
  57. gitgalaxy-2.2.0/tests/security_auditing/test_terabyte_log_scanner.py +127 -0
  58. gitgalaxy-2.2.0/tests/tools_recorders/readme.md +36 -0
  59. gitgalaxy-2.1.0/tests/test_neural_auditor.py +0 -60
  60. gitgalaxy-2.1.0/tests/test_redos_poison.py +0 -74
  61. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/ISSUE_TEMPLATE/parsing_discrepancy.yml +0 -0
  62. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/dependabot.yml +0 -0
  63. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/pull_request_template.md +0 -0
  64. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/workflows/codeql.yml +0 -0
  65. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/workflows/deploy-docs.yml +0 -0
  66. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/workflows/publish.yml +0 -0
  67. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.github/workflows/smoke-test.yml +0 -0
  68. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/.gitignore +0 -0
  69. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/CONTRIBUTING.md +0 -0
  70. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/LICENSE +0 -0
  71. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/MANIFEST.in +0 -0
  72. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/README.md +0 -0
  73. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/action.yml +0 -0
  74. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/README.md +0 -0
  75. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/__init__.py +0 -0
  76. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/cobol_refractor_controller.py +0 -0
  77. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/cobol_to_java_controller.py +0 -0
  78. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/README.md +0 -0
  79. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/__init__.py +0 -0
  80. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/guidestar_lens.py +0 -0
  81. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/prism.py +0 -0
  82. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/core/state_rehydrator.py +0 -0
  83. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/physics/README.md +0 -0
  84. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/physics/__init__.py +0 -0
  85. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/physics/chronometer.py +0 -0
  86. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/physics/signal_processor.py +0 -0
  87. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/physics/spectral_auditor.py +0 -0
  88. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/recorders/README.md +0 -0
  89. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/recorders/__init__.py +0 -0
  90. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/recorders/audit_recorder.py +0 -0
  91. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/recorders/gpu_recorder.py +0 -0
  92. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/security/README.md +0 -0
  93. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/security/__init__.py +0 -0
  94. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/README.md +0 -0
  95. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/__init__.py +0 -0
  96. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/analysis_lens.py +0 -0
  97. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/gitgalaxy_config.py +0 -0
  98. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/how_to_add_a_language.md +0 -0
  99. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/standards/language_lens.py +0 -0
  100. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/README.md +0 -0
  101. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/__init__.py +0 -0
  102. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/ai_guardrails/README.md +0 -0
  103. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/ai_guardrails/ai_appsec_sensor.py +0 -0
  104. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/ai_guardrails/dev_agent_firewall.py +0 -0
  105. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_agent_task_forge.py +0 -0
  106. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_dag_architect.py +0 -0
  107. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_etl_unpacker.py +0 -0
  108. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_jcl_auditor.py +0 -0
  109. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_jcl_forge.py +0 -0
  110. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_cobol/cobol_system_limits_reporter.py +0 -0
  111. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/README.md +0 -0
  112. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/batch_test_harness.py +0 -0
  113. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_agent_forge.py +0 -0
  114. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_api_contract_forge.py +0 -0
  115. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_build_forge.py +0 -0
  116. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_decoder_forge.py +0 -0
  117. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_service_forge.py +0 -0
  118. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_spring_forge.py +0 -0
  119. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/cobol_to_java/cobol_to_java_test_forge.py +0 -0
  120. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/compliance/README.md +0 -0
  121. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/compliance/sbom_generator.py +0 -0
  122. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/network_auditing/README.md +0 -0
  123. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/network_auditing/full_api_network_map.py +0 -0
  124. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/supply_chain_security/README.md +0 -0
  125. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/supply_chain_security/binary_anomaly_detector.py +0 -0
  126. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/supply_chain_security/supply_chain_firewall.py +0 -0
  127. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/supply_chain_security/vault_sentinel.py +0 -0
  128. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/terabyte_log_scanning/README.md +0 -0
  129. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/terabyte_log_scanning/pii_leak_hunter.py +0 -0
  130. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy/tools/terabyte_log_scanning/terabyte_log_scanner.py +0 -0
  131. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy.egg-info/dependency_links.txt +0 -0
  132. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy.egg-info/entry_points.txt +0 -0
  133. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/gitgalaxy.egg-info/top_level.txt +0 -0
  134. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/pyproject.toml +0 -0
  135. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/setup.cfg +0 -0
  136. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/core_engine}/test_chronometer_timeout.py +0 -0
  137. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/core_engine}/test_language_lens.py +0 -0
  138. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/core_engine}/test_zero_dependency.py +0 -0
  139. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/.gitattributes +0 -0
  140. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/.gitignore +0 -0
  141. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/LICENSE +0 -0
  142. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/Makefile +0 -0
  143. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/README.md +0 -0
  144. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/bufio.go +0 -0
  145. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/bufio_test.go +0 -0
  146. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/example_test.go +0 -0
  147. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/export_test.go +0 -0
  148. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/net_test.go +0 -0
  149. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/scan.go +0 -0
  150. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/bufio/scan_test.go +0 -0
  151. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/config.py +0 -0
  152. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/convert_em.F +0 -0
  153. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/dnn_converters.cpp +0 -0
  154. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/dnn_converters.hpp +0 -0
  155. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/insert_pinyin_to_db.py +0 -0
  156. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/iwubi.py +0 -0
  157. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/iwubi.svg +0 -0
  158. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/iwubi.xml +0 -0
  159. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/logconfig.py +0 -0
  160. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/logconfig.yaml +0 -0
  161. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/pinyin_simp.dict.csv +0 -0
  162. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/screenshot/add.png +0 -0
  163. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/screenshot/iwubi.gif +0 -0
  164. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/screenshot/set_ibus.png +0 -0
  165. {gitgalaxy-2.1.0 → gitgalaxy-2.2.0}/tests/fixtures/iwubi_frankenstein_test/wubi-jidian86.db +0 -0
  166. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/security_auditing}/test_api_network_map.py +0 -0
  167. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/security_auditing}/test_binary_anomaly_detector.py +0 -0
  168. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/security_auditing}/test_sbom_generator.py +0 -0
  169. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/security_auditing}/test_supply_chain_firewall.py +0 -0
  170. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/security_auditing}/test_vault_sentinel.py +0 -0
  171. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/tools_recorders}/test_agent_forge.py +0 -0
  172. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/tools_recorders}/test_batch_test_harness.py +0 -0
  173. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/tools_recorders}/test_decoder_forge.py +0 -0
  174. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/tools_recorders}/test_golden_forge.py +0 -0
  175. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/tools_recorders}/test_gpu_recorder.py +0 -0
  176. {gitgalaxy-2.1.0/tests → gitgalaxy-2.2.0/tests/tools_recorders}/test_service_forge.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitgalaxy
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: An AST-free, LLM-free zero-trust static analysis engine for mapping architectural risk, securing CI/CD pipelines, and modernizing legacy monoliths.
5
5
  Author: Joe Esquibel
6
6
  Project-URL: Homepage, https://gitgalaxy.io
@@ -16,7 +16,7 @@ from typing import Dict, Any, Set, Optional, TypedDict, Union, List, Tuple
16
16
 
17
17
  # ==============================================================================
18
18
  # GitGalaxy Phase 0.1: Ingestion & Filtering (The Solar Shield)
19
- # Strategy: v6.3.0 (Heuristic Optics, Intent Overrides & Stateful Caching)
19
+ # Strategy: v6.3.1 (Monolith Ceilings, Array Shields & Intent Overrides)
20
20
  # Architecture: Lead Shield -> Path Gate -> Intent Gate -> Content Gate
21
21
  # ==============================================================================
22
22
 
@@ -148,11 +148,6 @@ class ApertureFilter:
148
148
  if path_obj.name in self.config.get("SECRETS_EXACT", set()) or \
149
149
  ext.lower() in self.config.get("SECRETS_EXTENSIONS", set()):
150
150
  reason = f"CRITICAL LEAK (Exposed Secret: '{path_obj.name}')"
151
-
152
- # Muted logger to prevent UI overlap; spokes now handle their own alerts
153
- # self.logger.critical(f"🛡️ SECURITY BREACH: {reason} at {relative_path}")
154
-
155
- # THE FIX: Return False so it drops into Dark Matter for the Supernova Injection
156
151
  return False, size_bytes, reason
157
152
 
158
153
  # --- TIER 0.2: THE NEURAL AUDITOR SHUNT (Model Weights) ---
@@ -160,7 +155,6 @@ class ApertureFilter:
160
155
  if ext.lower() in AI_MODEL_EXTS:
161
156
  reason = f"AI MODEL WEIGHTS (Bypassing Standard Logic: '{ext}')"
162
157
  self.logger.info(f"🧠 NEURAL AUDITOR SHUNT: Routing {path_obj.name} away from regex engines.")
163
- # Return False to drop into Dark Matter, bypassing the memory-crashing I/O read
164
158
  return False, size_bytes, reason
165
159
 
166
160
  # --- TIER 0.5: THE ABSOLUTE EXTENSION SHIELD ---
@@ -235,8 +229,6 @@ class ApertureFilter:
235
229
  return result
236
230
 
237
231
  # --- THE SHUNT: Content Bypass for Secrets ---
238
- # If the path gate tagged this as a secret, skip the hex/binary
239
- # content checks so it doesn't accidentally get dropped.
240
232
  if reason and "CRITICAL LEAK" in reason:
241
233
  result.update({
242
234
  "is_in_scope": True,
@@ -269,7 +261,7 @@ class ApertureFilter:
269
261
 
270
262
  def _check_artifact_integrity(self, content: str, rel_path: str, has_intent: bool = False) -> Dict[str, Any]:
271
263
  """
272
- Deep-scans the content buffer for corruption, binary data,
264
+ Deep-scans the content buffer for corruption, binary data, arrays,
273
265
  or documentation generator signatures.
274
266
  """
275
267
  report = {"valid": True, "band": self.bands.get("VISIBLE", "source_code"), "reason": None, "loc": 0}
@@ -286,6 +278,17 @@ class ApertureFilter:
286
278
  "reason": "Blocked (Binary Format Detected)"
287
279
  })
288
280
  return report
281
+
282
+ # --- TIER 3.1: THE MONOLITH AMALGAMATION SHIELD ---
283
+ # 30,000+ lines in a single file is an amalgamation (e.g. sqlite3.c) or massive test array.
284
+ # It will saturate and choke the standard regex engine. Override Intent.
285
+ if report["loc"] > 30000:
286
+ report.update({
287
+ "valid": False,
288
+ "band": self.bands.get("INFRARED", "saturated"),
289
+ "reason": f"Blocked (Monolithic Amalgamation: {report['loc']} LOC exceeds safe regex boundaries)"
290
+ })
291
+ return report
289
292
 
290
293
  # --- TIER 3.5: THE AUTO-GEN DOC SHIELD ---
291
294
  low_path = rel_path.lower()
@@ -305,9 +308,6 @@ class ApertureFilter:
305
308
  return report
306
309
 
307
310
  # --- TIER 3.6: THE MACHINE-GENERATED SOURCE SHIELD ---
308
- # THE FIX: We now evaluate the machine-gen shield for ALL files.
309
- # If a file has a VIP pass (has_intent) but is an unreadable monolith (>1000 lines),
310
- # we strip its VIP status and banish it to Dark Matter as procedural debris.
311
311
  head_sample = "\n".join(lines_list[:100])
312
312
  if self.machine_gen_shield.search(head_sample):
313
313
  if not has_intent or report["loc"] > 1000:
@@ -319,8 +319,6 @@ class ApertureFilter:
319
319
  return report
320
320
 
321
321
  # --- TIER 3.7: THE LEXICAL MONOTONY SHIELD (Generated Code) ---
322
- # Detects massive generated boilerplate by checking structural entropy
323
- # EXEMPTION: COBOL Data Divisions and Copybooks are naturally highly repetitive.
324
322
  if report["loc"] > 2000 and not has_intent and not low_path.endswith(('.cpy', '.cbl', '.cob')):
325
323
  sample_lines = lines_list[:500]
326
324
  meaningful_lines = [l for l in sample_lines if l.strip()]
@@ -340,50 +338,52 @@ class ApertureFilter:
340
338
  })
341
339
  return report
342
340
 
343
- # --- TIER 3.8: THE DECLARATIVE DATA SHIELD ---
344
- if low_path.endswith(('.yml', '.yaml', '.json', '.xml')):
345
- if report["loc"] > 1000 and not has_intent:
341
+ # --- TIER 3.8: THE DECLARATIVE & VECTOR DATA SHIELD ---
342
+ if low_path.endswith(('.yml', '.yaml', '.json', '.xml', '.svg', '.sql', '.csv', '.tsv')):
343
+ # If the file is massive, absolutely drop it. Even if Git tracks it.
344
+ if report["loc"] > 2500:
345
+ report.update({
346
+ "valid": False,
347
+ "band": self.bands.get("RADIO", "radio_noise"),
348
+ "reason": f"Blocked (Massive Declarative/Vector Blob: {report['loc']} LOC)"
349
+ })
350
+ return report
351
+ elif not has_intent and report["loc"] > 1000:
346
352
  report.update({
347
353
  "valid": False,
348
354
  "band": self.bands.get("RADIO", "radio_noise"),
349
- "reason": f"Blocked (Declarative Data Blob: {report['loc']} lines exceed 1000-line logic threshold)"
355
+ "reason": f"Blocked (Declarative Data Blob without Intent: {report['loc']} LOC)"
350
356
  })
351
357
  return report
352
358
 
353
- # --- TIER 3.9: THE EMBEDDED DATA / HEX ARRAY SHIELD ---
354
- # Drops massive test vectors, crypto keys, or images compiled into C headers.
355
- # THE FIX: Removed 'has_intent'. Absolute structural density overrides VIP folder status.
356
- if report["loc"] > 250:
359
+ # --- TIER 3.9: THE TEST DATA & ARRAY SHIELD ---
360
+ # Drops massive test vectors, crypto keys, or arrays compiled into headers/tests.
361
+ if report["loc"] > 500:
362
+ # Check 1: Hex Arrays
357
363
  hex_count = content.count('0x') + content.count('0X')
358
-
359
- # Scenario A: High Absolute Hex Density.
360
- # Catches files where hex values are densely packed on single lines,
361
- # even if interleaved with verbose C-struct initializations.
362
364
  if hex_count > report["loc"]:
363
365
  report.update({
364
366
  "valid": False,
365
367
  "band": self.bands.get("MICROWAVE", "binary_debris"),
366
- "reason": f"Blocked (Embedded Data Payload: {hex_count} hex tokens in {report['loc']} LOC)"
368
+ "reason": f"Blocked (Embedded Hex Payload: {hex_count} hex tokens in {report['loc']} LOC)"
367
369
  })
368
370
  return report
369
371
 
370
- # Scenario B: Vertical Array formatting.
371
- # Catches files where hex values are spread out 1-per-line.
372
- if hex_count > (report["loc"] * 0.2):
373
- hex_lines = sum(1 for l in lines_list if ('0x' in l or '0X' in l) and ',' in l)
374
- if (hex_lines / report["loc"]) > 0.25:
375
- report.update({
376
- "valid": False,
377
- "band": self.bands.get("MICROWAVE", "binary_debris"),
378
- "reason": f"Blocked (Embedded Data Payload: >25% of {report['loc']} LOC is hex arrays)"
379
- })
380
- return report
372
+ # Check 2: Massive Data Arrays (Comma Density)
373
+ # If there are more than 3 commas per line on average in a massive file, it's a data array/matrix.
374
+ comma_count = content.count(',')
375
+ if comma_count > (report["loc"] * 3):
376
+ report.update({
377
+ "valid": False,
378
+ "band": self.bands.get("MICROWAVE", "binary_debris"),
379
+ "reason": f"Blocked (Embedded Array/Matrix Payload: {comma_count} commas in {report['loc']} LOC)"
380
+ })
381
+ return report
381
382
 
382
383
  # --- TIER 4: INFRARED GATE (Minification & Saturation) ---
383
384
  max_line = self.config.get("MAX_LINE_LENGTH", 500)
384
385
 
385
- # Prose and documentation often have long unbroken strings (URLs, paragraphs)
386
- is_prose = low_path.endswith(('.md', '.markdown', '.txt', '.json', '.csv', '.rst'))
386
+ is_prose = low_path.endswith(('.md', '.markdown', '.txt', '.json', '.csv', '.rst', '.sql', '.svg'))
387
387
 
388
388
  for i, line in enumerate(lines_list[:100]):
389
389
  if len(line) > max_line and not is_prose:
@@ -432,7 +432,6 @@ class ApertureFilter:
432
432
  return False
433
433
 
434
434
  # 4. Standard Iterative Gitignore Logic (The Fix)
435
- # Bypasses the massive OR Regex bottleneck
436
435
  for pattern in self.ignore_patterns:
437
436
  if pattern.endswith('/'):
438
437
  if any(fnmatch.fnmatch(p + '/', pattern) for p in parts):
@@ -453,11 +452,9 @@ class ApertureFilter:
453
452
  with ignore_file.open('r', encoding='utf-8') as f:
454
453
  for line in f:
455
454
  l = line.strip()
456
- # Ignore comments and empty lines
457
455
  if l and not l.startswith('#'):
458
456
  patterns.append(l)
459
457
  except Exception as e:
460
458
  self.logger.warning(f"Failed to parse .gitignore: {e}")
461
459
 
462
- return patterns
463
-
460
+ return patterns
@@ -348,7 +348,9 @@ class LogicSplicer:
348
348
  safe_lines = []
349
349
  for line in code_stream.split('\n'):
350
350
  if len(line) > 1500:
351
- safe_lines.append(' ' * len(line))
351
+ # Preserve indentation and inject a single safe char so it isn't counted as a blank line
352
+ indent = len(line) - len(line.lstrip())
353
+ safe_lines.append(' ' * indent + 'x' + ' ' * (len(line) - indent - 1))
352
354
  else:
353
355
  safe_lines.append(line)
354
356
  code_stream = '\n'.join(safe_lines)
@@ -478,6 +480,9 @@ class LogicSplicer:
478
480
  result_payload["regex_telemetry"] = regex_telemetry
479
481
  return result_payload
480
482
 
483
+ except TimeoutError:
484
+ # Let the Hardware Guillotine drop cleanly to the Worker thread!
485
+ raise
481
486
  except Exception as e:
482
487
  self.logger.error(f"Catastrophic failure during structural splicing: {e}", exc_info=True)
483
488
  return {
@@ -92,14 +92,16 @@ class NetworkRiskSensor:
92
92
  # PageRank determines the absolute "Load-Bearing" gravity of a file
93
93
  try:
94
94
  pagerank = nx.pagerank(G, weight='weight')
95
- # NEW: Calculate Choke Points (Betweenness) and Ripple Effect (Closeness)
96
- # Note: We limit betweenness to a sample (k=50) if the graph is massive (>5k nodes) to keep it O(N) fast.
97
- k_val = min(len(G.nodes()), 50) if len(G.nodes()) > 5000 else None
95
+
96
+ # THE FIX: Drop the exact threshold from 5000 down to 500.
97
+ # Force a maximum sample size of 100 nodes for anything larger.
98
+ k_val = min(len(G.nodes()), 100) if len(G.nodes()) > 500 else None
98
99
  betweenness = nx.betweenness_centrality(G, k=k_val, weight='weight')
99
100
 
100
- # Put a hard ceiling on Closeness Centrality to prevent the O(N^2) trap
101
- if len(G.nodes()) > 5000:
102
- self.logger.warning("Graph too massive for Closeness Centrality. Bypassing.")
101
+ # THE FIX: Closeness Centrality has no built-in sampling.
102
+ # Drop the bypass threshold from 5000 to 1500 to prevent minute-long hangs.
103
+ if len(G.nodes()) > 1500:
104
+ self.logger.warning("Graph too massive for exact Closeness Centrality. Bypassing.")
103
105
  closeness = {n: 0.0 for n in G.nodes()}
104
106
  else:
105
107
  closeness = nx.closeness_centrality(G)
@@ -194,7 +196,12 @@ class NetworkRiskSensor:
194
196
  self.logger.warning("Graph too massive for Modularity. Bypassing.")
195
197
  macro_metrics["modularity"] = 0.0
196
198
  else:
197
- communities = community.greedy_modularity_communities(U)
199
+ # THE FIX: Attempt Louvain (blazing fast), fallback to Greedy (slow)
200
+ try:
201
+ communities = community.louvain_communities(U)
202
+ except AttributeError:
203
+ communities = community.greedy_modularity_communities(U)
204
+
198
205
  macro_metrics["modularity"] = round(community.modularity(U, communities), 4)
199
206
  except Exception: pass
200
207
 
@@ -679,11 +679,11 @@ class Orchestrator:
679
679
  "zero_dependency_mode": (not HAS_NETWORKX or not HAS_TIKTOKEN or not ML_AVAILABLE)
680
680
  }
681
681
 
682
- if "singularity" not in summary:
683
- summary["singularity"] = {}
682
+ if "unparsable_files" not in summary:
683
+ summary["unparsable_files"] = {}
684
684
 
685
685
  # Pass the array into the function, and merge the results directly
686
- summary["singularity"].update(self._summarize_anomalies(total_unparsable))
686
+ summary["unparsable_files"].update(self._summarize_anomalies(total_unparsable))
687
687
 
688
688
  # --- PURE OUTPUT ROUTER ---
689
689
  # Respect the exact path provided, just ensure the parent folder exists
@@ -57,7 +57,7 @@ class NeuralAuditor:
57
57
 
58
58
  # 3. Extract Metadata
59
59
  metadata = header.get('__metadata__', {})
60
- architecture = metadata.get('format', metadata.get('architecture', 'Unknown Transformer'))
60
+ architecture = metadata.get('architecture', metadata.get('format', 'Unknown Transformer'))
61
61
 
62
62
  # 4. Calculate Parameters (Sum of the product of all tensor shapes)
63
63
  total_params = 0
@@ -86,8 +86,10 @@ class LLMRecorder:
86
86
  if name: resolution_map[name] = path
87
87
  if stem: resolution_map[stem] = path
88
88
 
89
- inbound_map = {s.get("path", ""): [] for s in parsed_files}
90
- outbound_map = {s.get("path", ""): [] for s in parsed_files}
89
+
90
+ from collections import defaultdict
91
+ inbound_set_map = defaultdict(set)
92
+ outbound_set_map = defaultdict(set)
91
93
 
92
94
  for s in parsed_files:
93
95
  curr = s.get("path", "")
@@ -95,8 +97,12 @@ class LLMRecorder:
95
97
  if imp in resolution_map:
96
98
  target_path = resolution_map[imp]
97
99
  if target_path != curr:
98
- if curr not in inbound_map[target_path]: inbound_map[target_path].append(curr)
99
- if target_path not in outbound_map[curr]: outbound_map[curr].append(target_path)
100
+ inbound_set_map[target_path].add(curr)
101
+ outbound_set_map[curr].add(target_path)
102
+
103
+ # Cast back to standard dictionaries of lists for downstream compatibility
104
+ inbound_map = {k: list(v) for k, v in inbound_set_map.items()}
105
+ outbound_map = {k: list(v) for k, v in outbound_set_map.items()}
100
106
 
101
107
  # 1. Build the Relational Knowledge Graph
102
108
  self._generate_sqlite_graph(parsed_files, unparsable_files, summary, session_meta, output_path_db, inbound_map)
@@ -128,8 +134,7 @@ class LLMRecorder:
128
134
  comp = summary.get("composition", {})
129
135
  git_audit = session_meta.get("git_audit", {})
130
136
 
131
- bypassed_count = summary.get("unparsable_files", {}).get("ambig_file_count", 0)
132
- total_excluded = len(unparsable_files) + bypassed_count
137
+ total_excluded = len(unparsable_files)
133
138
  visible_count = sum_data.get("verified_files", len(parsed_files))
134
139
 
135
140
  lines = []
@@ -403,22 +408,24 @@ class LLMRecorder:
403
408
  lines.append(f"{rank}. **{name}** (`{path}`) — {count} outbound dependencies")
404
409
  lines.append("")
405
410
 
411
+ import heapq
406
412
  # --- 8. GOD FUNCTIONS (THE FUNCTIONS) ---
407
413
  lines.append("## 8. FUNCTION HITLIST (Heaviest Functions)")
408
414
  lines.append("> *Note: The 'Impact' metric below represents Structural Magnitude (complexity, arguments, and length), NOT operational risk. These are the load-bearing pillars of the logic.*\n")
409
415
 
410
- # Flatten all functions to sort them globally
416
+ # Flatten without deep-copying memory using a lightweight Tuple
411
417
  all_sats = []
412
418
  for s in parsed_files:
419
+ file_path = s.get("path", "Unknown")
413
420
  for sat in s.get("functions", []):
414
- sat_copy = sat.copy()
415
- sat_copy["file"] = s.get("path", "Unknown")
416
- all_sats.append(sat_copy)
421
+ all_sats.append((sat, file_path))
417
422
 
418
- sorted_by_impact = sorted(all_sats, key=lambda x: x.get("impact", 0), reverse=True)
419
- if sorted_by_impact:
420
- for f in sorted_by_impact[:10]:
421
- lines.append(f"- `{f.get('name')}` (@ `{f.get('file')}`) -> Impact: **{f.get('impact')}** | LOC: {f.get('loc')}")
423
+ # O(N) extraction of the Top 10 (Faster than sorting the entire array)
424
+ top_impact = heapq.nlargest(10, all_sats, key=lambda x: x[0].get("impact", 0))
425
+
426
+ if top_impact:
427
+ for f, file_path in top_impact:
428
+ lines.append(f"- `{f.get('name')}` (@ `{file_path}`) -> Impact: **{f.get('impact')}** | LOC: {f.get('loc')}")
422
429
  doc = f.get('docstring', '').strip()
423
430
  if doc:
424
431
  clean_doc = " ".join(doc.split())[:150] + ("..." if len(doc) > 150 else "")
@@ -431,28 +438,28 @@ class LLMRecorder:
431
438
  lines.append("## 8.5 ALGORITHMIC & DATABASE BOTTLENECKS")
432
439
  lines.append("> Highlights the most computationally expensive and database-heavy functions across the repository.\n")
433
440
 
434
- # Sort by recursion first, then big-o depth
435
- sorted_by_big_o = sorted(all_sats, key=lambda x: (x.get("is_recursive", False), x.get("big_o_depth", 1)), reverse=True)
436
- complex_sats = [s for s in sorted_by_big_o if s.get("is_recursive", False) or s.get("big_o_depth", 1) > 2]
441
+ # THE FIX: x[0] accesses the dictionary inside the new (sat, file_path) tuple
442
+ sorted_by_big_o = sorted(all_sats, key=lambda x: (x[0].get("is_recursive", False), x[0].get("big_o_depth", 1)), reverse=True)
443
+ complex_sats = [s for s in sorted_by_big_o if s[0].get("is_recursive", False) or s[0].get("big_o_depth", 1) > 2]
437
444
 
438
445
  if complex_sats:
439
446
  lines.append("### Highest Time Complexity (Big-O)")
440
- for f in complex_sats[:10]:
447
+ for f, file_path in complex_sats[:10]:
441
448
  o_str = "O(2^N) [Recursive]" if f.get("is_recursive", False) else f"O(N^{f.get('big_o_depth', 1)})"
442
- lines.append(f"- `{f.get('name')}` (@ `{f.get('file')}`) -> **{o_str}**")
449
+ lines.append(f"- `{f.get('name')}` (@ `{file_path}`) -> **{o_str}**")
443
450
  doc = f.get('docstring', '').strip()
444
451
  if doc:
445
452
  clean_doc = " ".join(doc.split())[:150] + ("..." if len(doc) > 150 else "")
446
453
  lines.append(f" * *Intent:* {clean_doc}")
447
454
  lines.append("")
448
455
 
449
- sorted_by_db = sorted(all_sats, key=lambda x: x.get("db_complexity", 0), reverse=True)
450
- db_sats = [s for s in sorted_by_db if s.get("db_complexity", 0) > 0]
456
+ sorted_by_db = sorted(all_sats, key=lambda x: x[0].get("db_complexity", 0), reverse=True)
457
+ db_sats = [s for s in sorted_by_db if s[0].get("db_complexity", 0) > 0]
451
458
 
452
459
  if db_sats:
453
460
  lines.append("### Highest Data Gravity (Database Complexity)")
454
- for f in db_sats[:10]:
455
- lines.append(f"- `{f.get('name')}` (@ `{f.get('file')}`) -> DB Complexity: **{f.get('db_complexity', 0)}**")
461
+ for f, file_path in db_sats[:10]:
462
+ lines.append(f"- `{f.get('name')}` (@ `{file_path}`) -> DB Complexity: **{f.get('db_complexity', 0)}**")
456
463
  doc = f.get('docstring', '').strip()
457
464
  if doc:
458
465
  clean_doc = " ".join(doc.split())[:150] + ("..." if len(doc) > 150 else "")
@@ -1115,6 +1122,13 @@ class LLMRecorder:
1115
1122
  exps.get("verification", 0.0)
1116
1123
  ))
1117
1124
 
1125
+ # Master arrays for batching child records (Massive speed boost)
1126
+ all_dna_data = []
1127
+ all_satellites = []
1128
+ all_outbound = []
1129
+ all_inbound = []
1130
+
1131
+ import json
1118
1132
  for file_data in parsed_files:
1119
1133
  p = file_data.get("path")
1120
1134
  c_name = file_data.get("directory_group", "__monolith__")
@@ -1123,13 +1137,11 @@ class LLMRecorder:
1123
1137
  rv = file_data.get("risk_vector", [0.0] * len(self.RISK_SCHEMA))
1124
1138
  pop_count = len(inbound_map.get(p, []))
1125
1139
 
1126
- # Extract repo-level metadata (can be injected via ML pass)
1127
1140
  repo_macro = tel.get("repo_macro_species", "Unknown")
1128
1141
  repo_z = tel.get("repo_z_score", 0.0)
1129
-
1130
- # --- INJECT ALL RAW DNA METRICS ---
1131
1142
  parent_entity = tel.get("domain_context", {}).get("parent_entity", "")
1132
1143
 
1144
+ # 1. Insert star individually to safely retrieve its exact database ID (sid)
1133
1145
  cursor.execute(f'''
1134
1146
  INSERT INTO stars (
1135
1147
  path, filename, parent_entity, constellation, language, lock_tier,
@@ -1153,30 +1165,32 @@ class LLMRecorder:
1153
1165
 
1154
1166
  sid = cursor.lastrowid
1155
1167
 
1156
- # Dynamic Hit Insertion (Automatically includes all sec_ signatures)
1168
+ # 2. Accumulate DNA Hits
1157
1169
  hv = file_data.get("hit_vector", [])
1158
- dna_data = [(sid, self.SIGNAL_SCHEMA[i], hv[i]) for i in range(len(hv)) if hv[i] > 0]
1159
- cursor.executemany('INSERT INTO dna_hits VALUES (?, ?, ?)', dna_data)
1170
+ all_dna_data.extend([(sid, self.SIGNAL_SCHEMA[i], hv[i]) for i in range(len(hv)) if hv[i] > 0])
1160
1171
 
1161
- import json
1172
+ # 3. Accumulate Satellites
1162
1173
  for func in file_data.get("functions", []):
1163
1174
  calls_json = json.dumps(func.get("calls_out_to", []))
1164
- cursor.execute('INSERT INTO satellites (star_id, name, type_id, loc, impact, big_o_depth, is_recursive, db_complexity, docstring, calls_out_to) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', (
1175
+ all_satellites.append((
1165
1176
  sid, func.get("name"), func.get("type_id"), func.get("loc"), func.get("impact"),
1166
1177
  func.get("big_o_depth", 1), func.get("is_recursive", False), func.get("db_complexity", 0), func.get("docstring", ""), calls_json
1167
1178
  ))
1168
1179
 
1169
- raw_imports = file_data.get("raw_imports", [])
1170
-
1180
+ # 4. Accumulate Dependencies
1171
1181
  raw_imports = file_data.get("raw_imports", [])
1172
1182
  if raw_imports:
1173
- out_data = [(sid, imp) for imp in raw_imports]
1174
- cursor.executemany('INSERT INTO outbound_dependencies VALUES (?, ?)', out_data)
1183
+ all_outbound.extend([(sid, imp) for imp in raw_imports])
1175
1184
 
1176
1185
  inbound = inbound_map.get(p, [])
1177
1186
  if inbound:
1178
- in_data = [(sid, imp_by) for imp_by in inbound]
1179
- cursor.executemany('INSERT INTO inbound_dependencies VALUES (?, ?)', in_data)
1187
+ all_inbound.extend([(sid, imp_by) for imp_by in inbound])
1188
+
1189
+ # 5. Push all accumulated child records to C-backend SQLite at once
1190
+ cursor.executemany('INSERT INTO dna_hits VALUES (?, ?, ?)', all_dna_data)
1191
+ cursor.executemany('INSERT INTO satellites (star_id, name, type_id, loc, impact, big_o_depth, is_recursive, db_complexity, docstring, calls_out_to) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', all_satellites)
1192
+ cursor.executemany('INSERT INTO outbound_dependencies VALUES (?, ?)', all_outbound)
1193
+ cursor.executemany('INSERT INTO inbound_dependencies VALUES (?, ?)', all_inbound)
1180
1194
 
1181
1195
  conn.commit()
1182
1196
  conn.close()
@@ -44,6 +44,9 @@ class RecordKeeper:
44
44
  self.logger.debug(f"Record Keeper: Forging native SQLite database -> {db_file.name}")
45
45
 
46
46
  conn = sqlite3.connect(db_file)
47
+ # ---> THE SPEED FIX: Write-Ahead Logging & Relaxed Disk Sync
48
+ conn.execute("PRAGMA journal_mode = WAL;")
49
+ conn.execute("PRAGMA synchronous = NORMAL;")
47
50
  # Enforce foreign keys so cascading deletes work perfectly
48
51
  conn.execute("PRAGMA foreign_keys = ON;")
49
52
  cursor = conn.cursor()
@@ -248,6 +251,9 @@ class RecordKeeper:
248
251
  agg_build_files = 0
249
252
  agg_config_files = 0
250
253
  agg_test_files = 0
254
+
255
+ # ---> THE SPEED FIX: Global array for all functions in the repo
256
+ all_func_rows = []
251
257
 
252
258
  for file_data in parsed_files:
253
259
  tel = file_data.get("telemetry", {})
@@ -437,8 +443,7 @@ class RecordKeeper:
437
443
  ))
438
444
  class_id_map[cls.get("name")] = cursor.lastrowid
439
445
 
440
- # ---> UPDATED: 2. Extract and Insert the Functions <---
441
- func_rows = []
446
+ # ---> UPDATED: 2. Extract and Accumulate the Functions <---
442
447
  for func in functions:
443
448
  raw_hv = func.get("hit_vector", {})
444
449
  func_hits = [int(raw_hv.get(h, 0)) for h in self.SIGNAL_SCHEMA]
@@ -446,7 +451,7 @@ class RecordKeeper:
446
451
  parent_class_name = func.get("parent_class_name")
447
452
  parent_class_id = class_id_map.get(parent_class_name) if parent_class_name else None
448
453
 
449
- func_row_data = [
454
+ all_func_rows.append([
450
455
  file_id,
451
456
  parent_class_id,
452
457
  str(func.get("name", "unknown_function"))[:255],
@@ -463,17 +468,16 @@ class RecordKeeper:
463
468
  str(func.get("docstring", ""))[:2000],
464
469
  json.dumps(func.get("calls_out_to", [])),
465
470
  int(func.get("token_mass")) if func.get("token_mass") is not None else None
466
- ] + func_hits
467
-
468
- func_rows.append(func_row_data)
469
-
470
- if func_rows:
471
- func_placeholders = ",".join(["?"] * len(func_rows[0]))
472
- cursor.executemany(f'''
473
- INSERT INTO function_data
474
- (file_id, parent_class_id, func_name, complexity, loc, args, usage_status, keyword_density, func_archetype, func_z_score, big_o_depth, is_recursive, db_complexity, docstring, calls_out_to, token_mass, {", ".join([self.SHORT_KEY_MAP.get(h, h) for h in self.SIGNAL_SCHEMA])})
475
- VALUES ({func_placeholders})
476
- ''', func_rows)
471
+ ] + func_hits)
472
+
473
+ # ---> THE SPEED FIX: Push all functions to SQLite at once (OUTSIDE THE FILE LOOP) <---
474
+ if all_func_rows:
475
+ func_placeholders = ",".join(["?"] * len(all_func_rows[0]))
476
+ cursor.executemany(f'''
477
+ INSERT INTO function_data
478
+ (file_id, parent_class_id, func_name, complexity, loc, args, usage_status, keyword_density, func_archetype, func_z_score, big_o_depth, is_recursive, db_complexity, docstring, calls_out_to, token_mass, {", ".join([self.SHORT_KEY_MAP.get(h, h) for h in self.SIGNAL_SCHEMA])})
479
+ VALUES ({func_placeholders})
480
+ ''', all_func_rows)
477
481
 
478
482
  # 3. REPO DATA INSERTION
479
483
  class_start_idx = self.SIGNAL_SCHEMA.index("class_start") if "class_start" in self.SIGNAL_SCHEMA else -1