syntopica-codeality-py 0.2.2__tar.gz → 0.2.3__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 (200) hide show
  1. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/CHANGELOG.md +25 -7
  2. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/PKG-INFO +14 -1
  3. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/README.md +13 -0
  4. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/codeality-py.toml +1 -0
  5. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/pyproject.toml +1 -1
  6. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/assets/codeality-py.toml +3 -0
  7. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/assets/pyproject-sections.toml +7 -2
  8. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/baseline_config.py +3 -0
  9. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/load_config.py +2 -0
  10. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/gate_result.py +4 -1
  11. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/gate_stages.py +6 -0
  12. syntopica_codeality_py-0.2.3/src/codeality_py/gate/over_budget_detail.py +24 -0
  13. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/run_gate.py +1 -1
  14. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/run_stage.py +7 -0
  15. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/stage.py +2 -0
  16. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/stage_status.py +2 -0
  17. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/roles/test_file_patterns.py +1 -1
  18. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/config/test_load_config.py +10 -0
  19. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/gate/test_gate_stages.py +13 -0
  20. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/gate/test_run_gate.py +35 -0
  21. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/init/test_plan_init.py +23 -0
  22. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/init/test_render_asset.py +10 -9
  23. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/roles/test_matches_glob.py +1 -1
  24. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/uv.lock +1 -1
  25. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/.gitignore +0 -0
  26. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/LICENSE +0 -0
  27. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/mypy.ini +0 -0
  28. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/ruff.toml +0 -0
  29. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/__init__.py +0 -0
  30. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/assets/codeality-py-ci.yml +0 -0
  31. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/assets/importlinter.ini +0 -0
  32. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/assets/mypy.ini +0 -0
  33. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/assets/ruff.toml +0 -0
  34. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/__init__.py +0 -0
  35. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/baseline_file.py +0 -0
  36. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/classified_findings.py +0 -0
  37. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/classify_findings.py +0 -0
  38. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/finding_context.py +0 -0
  39. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/fingerprint.py +0 -0
  40. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/fingerprint_context.py +0 -0
  41. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/read_baseline.py +0 -0
  42. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/baseline/write_baseline.py +0 -0
  43. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/cli.py +0 -0
  44. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/__init__.py +0 -0
  45. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/baseline_check_command.py +0 -0
  46. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/baseline_command.py +0 -0
  47. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/baseline_update_command.py +0 -0
  48. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/check_command.py +0 -0
  49. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/checked_project.py +0 -0
  50. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/gate_command.py +0 -0
  51. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/init_command.py +0 -0
  52. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/commands/project_option.py +0 -0
  53. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/__init__.py +0 -0
  54. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/check_schema_version.py +0 -0
  55. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/config_error.py +0 -0
  56. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/default_generated_globs.py +0 -0
  57. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/discover_source_roots.py +0 -0
  58. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/discover_test_roots.py +0 -0
  59. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/limits.py +0 -0
  60. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/module_role.py +0 -0
  61. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/override.py +0 -0
  62. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/parse_overrides.py +0 -0
  63. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/parse_roles.py +0 -0
  64. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/parse_rule_codes.py +0 -0
  65. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/pyproject_layout_hints.py +0 -0
  66. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/read_config_document.py +0 -0
  67. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/reject_duplicate_role_claims.py +0 -0
  68. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/config/reject_unknown_keys.py +0 -0
  69. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/engine/__init__.py +0 -0
  70. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/engine/check_project.py +0 -0
  71. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/engine/check_result.py +0 -0
  72. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/engine/check_source_file.py +0 -0
  73. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/engine/fingerprint_findings.py +0 -0
  74. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/engine/rule_registry.py +0 -0
  75. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/__init__.py +0 -0
  76. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/build_stage_result.py +0 -0
  77. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/stage_kind.py +0 -0
  78. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/gate/stage_result.py +0 -0
  79. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/__init__.py +0 -0
  80. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/add_missing_rules.py +0 -0
  81. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/apply_init.py +0 -0
  82. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/current_branch.py +0 -0
  83. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/first_party_packages.py +0 -0
  84. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/has_ruff_table.py +0 -0
  85. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/managed_asset_files.py +0 -0
  86. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/managed_file.py +0 -0
  87. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/merge_pyproject_sections.py +0 -0
  88. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/merge_quality_group.py +0 -0
  89. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/merge_ruff_config.py +0 -0
  90. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/plan_asset_file.py +0 -0
  91. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/plan_disposition.py +0 -0
  92. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/plan_init.py +0 -0
  93. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/plan_pyproject.py +0 -0
  94. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/plan_ruff.py +0 -0
  95. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/plan_shadowed_ruff.py +0 -0
  96. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/python_floor_minor.py +0 -0
  97. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/read_asset.py +0 -0
  98. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/read_requires_python.py +0 -0
  99. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/render_asset.py +0 -0
  100. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/render_nested_workflow.py +0 -0
  101. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/repository_root.py +0 -0
  102. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/init/workflow_target.py +0 -0
  103. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/model/__init__.py +0 -0
  104. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/model/finding.py +0 -0
  105. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/model/location.py +0 -0
  106. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/model/rule_code.py +0 -0
  107. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/model/severity.py +0 -0
  108. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/parsing/__init__.py +0 -0
  109. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/parsing/infrastructure_error.py +0 -0
  110. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/parsing/parse_source_file.py +0 -0
  111. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/parsing/read_source_text.py +0 -0
  112. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/parsing/source_file.py +0 -0
  113. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/parsing/syntax_error_finding.py +0 -0
  114. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/__init__.py +0 -0
  115. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/exit_code.py +0 -0
  116. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/finding_document.py +0 -0
  117. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/findings_summary.py +0 -0
  118. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/render_gate_report.py +0 -0
  119. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/render_json_report.py +0 -0
  120. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/render_text_report.py +0 -0
  121. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/report/stage_document.py +0 -0
  122. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/roles/__init__.py +0 -0
  123. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/roles/assign_module_role.py +0 -0
  124. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/roles/compile_glob.py +0 -0
  125. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/roles/matches_any_pattern.py +0 -0
  126. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/roles/matches_glob.py +0 -0
  127. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/__init__.py +0 -0
  128. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/barrel_only_init.py +0 -0
  129. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/count_code_lines.py +0 -0
  130. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/data_unit_findings.py +0 -0
  131. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/docstring_line_spans.py +0 -0
  132. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/file_matches_unit.py +0 -0
  133. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/grab_bag_names.py +0 -0
  134. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/is_allowed_barrel_statement.py +0 -0
  135. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/is_column_list.py +0 -0
  136. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/is_docstring_statement.py +0 -0
  137. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/is_sql_literal.py +0 -0
  138. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/is_static_dunder_assignment.py +0 -0
  139. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/is_type_checking_block.py +0 -0
  140. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/joined_string_text.py +0 -0
  141. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/looks_like_sql.py +0 -0
  142. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/max_file_lines.py +0 -0
  143. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/no_grab_bag_names.py +0 -0
  144. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/no_inline_sql.py +0 -0
  145. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/one_primary_unit.py +0 -0
  146. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/ordinary_unit_findings.py +0 -0
  147. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/sql_subject.py +0 -0
  148. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/rules/unit_finding.py +0 -0
  149. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/__init__.py +0 -0
  150. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/apply_suppressions.py +0 -0
  151. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/build_suppression.py +0 -0
  152. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/covering_suppression.py +0 -0
  153. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/is_overridden.py +0 -0
  154. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/parse_suppression_line.py +0 -0
  155. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/parse_suppressions.py +0 -0
  156. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/suppression/suppression.py +0 -0
  157. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/traversal/__init__.py +0 -0
  158. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/traversal/collect_source_files.py +0 -0
  159. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/traversal/default_excludes.py +0 -0
  160. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/traversal/gitignore_matcher.py +0 -0
  161. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/traversal/walk_root.py +0 -0
  162. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/__init__.py +0 -0
  163. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/coalesce_overloads.py +0 -0
  164. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/coalesce_singledispatch.py +0 -0
  165. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/collect_declarations.py +0 -0
  166. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/count_primary_declarations.py +0 -0
  167. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/declaration.py +0 -0
  168. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/declaration_for.py +0 -0
  169. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/declaration_kind.py +0 -0
  170. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/decorator_name.py +0 -0
  171. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/decorator_names.py +0 -0
  172. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/is_main_guard.py +0 -0
  173. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/is_private_local_handler.py +0 -0
  174. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/legacy_type_alias.py +0 -0
  175. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/literal_string_names.py +0 -0
  176. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/merge_stray_letters.py +0 -0
  177. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/named_declaration.py +0 -0
  178. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/overload_family_length.py +0 -0
  179. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/resolve_exported_names.py +0 -0
  180. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/to_snake_case.py +0 -0
  181. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/src/codeality_py/units/top_level_statements.py +0 -0
  182. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/baseline/test_classify_findings.py +0 -0
  183. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/commands/test_baseline_command.py +0 -0
  184. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/commands/test_check_command.py +0 -0
  185. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/config/test_pyproject_layout_hints.py +0 -0
  186. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/conftest.py +0 -0
  187. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/init/test_merge_ruff_config.py +0 -0
  188. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/model/test_finding.py +0 -0
  189. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/model/test_rule_code.py +0 -0
  190. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/parsing/test_parse_source_file.py +0 -0
  191. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/roles/test_assign_module_role.py +0 -0
  192. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/rules/test_barrel_only_init.py +0 -0
  193. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/rules/test_file_matches_unit.py +0 -0
  194. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/rules/test_max_file_lines.py +0 -0
  195. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/rules/test_no_grab_bag_names.py +0 -0
  196. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/rules/test_no_inline_sql.py +0 -0
  197. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/rules/test_one_primary_unit.py +0 -0
  198. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/test_cli_version.py +0 -0
  199. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/traversal/test_collect_source_files.py +0 -0
  200. {syntopica_codeality_py-0.2.2 → syntopica_codeality_py-0.2.3}/tests/units/test_to_snake_case.py +0 -0
@@ -4,6 +4,24 @@ All notable changes to `syntopica-codeality-py` are documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
5
5
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.2.3
8
+
9
+ ### Added
10
+
11
+ - `test-budget-seconds` in `codeality-py.toml`: the gate reports the pytest
12
+ stage as `over-budget` when the suite passes but takes longer, and the detail
13
+ carries pytest's slowest-durations table and the suite-time procedure. A
14
+ consumer's suite had grown to 31 minutes with every gate green; one profiling
15
+ pass found a checker re-parsing the same file 620 951 times per run
16
+ (2026-09-22). Unset, the suite is unbudgeted, so no existing gate changes
17
+ colour on upgrade.
18
+ - The pytest stage always runs with `--durations=10`, so the measurement is in
19
+ the output before anyone asks for it.
20
+ - `init` scaffolds `pytest-xdist` with `addopts = "-ra -n auto"` and a
21
+ `test-budget-seconds = 300` in `codeality-py.toml`: a suite written parallel
22
+ from its first test stays isolated. A project with its own `[tool.pytest]`
23
+ table keeps it, as before.
24
+
7
25
  ## 0.2.2
8
26
 
9
27
  ### Changed
@@ -59,7 +77,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
59
77
  - `init --ci` in a project nested inside a repository writes the workflow at the
60
78
  repository root, named `quality-<project>.yml`, with every step running from
61
79
  the project directory. GitHub reads workflows only from the root, so the file
62
- scaffolded inside `tools/qlctool` was never picked up.
80
+ scaffolded inside `tools/nested-tool` was never picked up.
63
81
 
64
82
  ## 0.1.10
65
83
 
@@ -104,7 +122,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
104
122
  `[tool.ruff]`. Ruff reads one configuration per directory, so the file wins
105
123
  outright and the table is never read - silently. The pair builds itself over
106
124
  time: init writes the file when no table exists, and a table arrives later.
107
- Found in DJCenterDeluxe, which spent a release linting against a config nobody
125
+ Found in consumer-a, which spent a release linting against a config nobody
108
126
  read; once the shadow was removed, 1707 findings resolved to 6 real ones.
109
127
 
110
128
  ### Changed
@@ -122,7 +140,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
122
140
  - `init` no longer adds the quality dependency group to a project whose
123
141
  `requires-python` floor is below 3.11: the group carries
124
142
  `syntopica-codeality-py`, and declaring it there makes every uv resolution
125
- unsatisfiable. Found adopting the baseline in `djplayerdeluxe`, which declares
143
+ unsatisfiable. Found adopting the baseline in `consumer-b`, which declares
126
144
  `>=3.8` for its Raspberry Pi target.
127
145
 
128
146
  ## 0.1.6
@@ -131,7 +149,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
131
149
 
132
150
  - `[audit] ignore-vulns` in `codeality-py.toml`: accepted advisories, each
133
151
  expected to carry a written reason, reach pip-audit as `--ignore-vuln` flags.
134
- Found adopting the baseline in `clawd-pet`, where platformio 6.x pins
152
+ Found adopting the baseline in `consumer-c`, where platformio 6.x pins
135
153
  starlette below the patched release and the gate had no way to accept the
136
154
  documented risk.
137
155
  - `init` records the discovered `import-package`, so coverage measures the
@@ -149,7 +167,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
149
167
 
150
168
  - Root discovery now reads the layout a `pyproject.toml` already declares -
151
169
  pytest's `pythonpath` and `testpaths`, hatch's wheel `packages` - before
152
- guessing from directories. Found adopting the baseline in `clawd-pet`, a
170
+ guessing from directories. Found adopting the baseline in `consumer-c`, a
153
171
  firmware host whose Python lives under `host/src` where directory scanning
154
172
  sees nothing.
155
173
  - The test per-file-ignores pattern is `**/tests/**`, so it also reaches nested
@@ -203,7 +221,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
203
221
  identifies itself, a naming rule (`BPY002`, `BPY003`) identifies its symbol,
204
222
  and everything else uses the offending line's content plus an occurrence
205
223
  counter, so it survives edits elsewhere in the file. Found adopting the
206
- baseline in DJCenterDeluxe, where 155 findings recorded as only 91 entries.
224
+ baseline in consumer-a, where 155 findings recorded as only 91 entries.
207
225
 
208
226
  ## 0.1.1
209
227
 
@@ -213,7 +231,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
213
231
  separator and `**` crosses it. They were matched with `fnmatch`, whose `*`
214
232
  crosses separators, so a role or override written for the scripts in a
215
233
  repository root silently claimed every file in the tree. Found while adopting
216
- the baseline in DJCenterDeluxe, where `entrypoint = ["*.py"]` matched all 106
234
+ the baseline in consumer-a, where `entrypoint = ["*.py"]` matched all 106
217
235
  files instead of the 40 at the root and hid 25 real `BPY002` findings.
218
236
 
219
237
  ## 0.1.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: syntopica-codeality-py
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Structural linter and config scaffolder for Python: atomic files, placement, size caps, no inline SQL
5
5
  Project-URL: Homepage, https://github.com/syntopica/codeality
6
6
  Project-URL: Issues, https://github.com/syntopica/codeality/issues
@@ -82,6 +82,19 @@ rather than skipping it.
82
82
  | `BPY005` | `barrel-only-init` | `__init__.py` holds imports, `__all__` and nothing else. |
83
83
  | `BPY006` | `no-inline-sql` | SQL lives in resource files, not in string literals. |
84
84
 
85
+ ## Suite time budget
86
+
87
+ ```toml
88
+ # codeality-py.toml
89
+ test-budget-seconds = 300
90
+ ```
91
+
92
+ Past the budget a passing suite is a finding: the pytest stage reports
93
+ `over-budget`, exits 1, and its detail carries the slowest tests. The
94
+ procedure - profile, make the unit under test cheaper, parallelise, serialise
95
+ what must stay shared - is in
96
+ [docs/standards/testing.md](https://github.com/syntopica/codeality/blob/main/docs/standards/testing.md#suite-time-budget).
97
+
85
98
  ## Exit codes
86
99
 
87
100
  | Code | Meaning |
@@ -39,6 +39,19 @@ rather than skipping it.
39
39
  | `BPY005` | `barrel-only-init` | `__init__.py` holds imports, `__all__` and nothing else. |
40
40
  | `BPY006` | `no-inline-sql` | SQL lives in resource files, not in string literals. |
41
41
 
42
+ ## Suite time budget
43
+
44
+ ```toml
45
+ # codeality-py.toml
46
+ test-budget-seconds = 300
47
+ ```
48
+
49
+ Past the budget a passing suite is a finding: the pytest stage reports
50
+ `over-budget`, exits 1, and its detail carries the slowest tests. The
51
+ procedure - profile, make the unit under test cheaper, parallelise, serialise
52
+ what must stay shared - is in
53
+ [docs/standards/testing.md](https://github.com/syntopica/codeality/blob/main/docs/standards/testing.md#suite-time-budget).
54
+
42
55
  ## Exit codes
43
56
 
44
57
  | Code | Meaning |
@@ -4,6 +4,7 @@ source-roots = ["src"]
4
4
  test-roots = ["tests"]
5
5
  import-package = "codeality_py"
6
6
  coverage-threshold = 80
7
+ test-budget-seconds = 60
7
8
 
8
9
  [limits]
9
10
  max-file-lines = 150
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "syntopica-codeality-py"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Structural linter and config scaffolder for Python: atomic files, placement, size caps, no inline SQL"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -4,6 +4,9 @@ source-roots = ["src"]
4
4
  test-roots = ["tests"]
5
5
  respect-gitignore = true
6
6
  coverage-threshold = 80
7
+ # The gate reports the pytest stage as over-budget past this many seconds.
8
+ # A suite that grows past it gets profiled, not more hardware.
9
+ test-budget-seconds = 300
7
10
 
8
11
  [limits]
9
12
  max-file-lines = 150
@@ -6,12 +6,16 @@
6
6
  known_first_party = ["CHANGE_ME"]
7
7
 
8
8
  [tool.deptry.per_rule_ignores]
9
- DEP002 = []
9
+ # pytest-xdist is a pytest plugin, loaded by the -n in addopts, never imported.
10
+ DEP002 = ["pytest-xdist"]
10
11
  # Test tooling legitimately lives in a dev group and is imported only by tests.
11
12
  DEP004 = ["pytest", "pytest_asyncio", "pytest_cov"]
12
13
 
14
+ # One worker per core from the first test, so the suite is written isolated:
15
+ # a test that needs a shared port, file or process serialises on a lock in the
16
+ # code that uses it, never by ordering. `-n 0` runs in-process for a debugger.
13
17
  [tool.pytest.ini_options]
14
- addopts = "-ra"
18
+ addopts = "-ra -n auto"
15
19
  testpaths = ["tests"]
16
20
 
17
21
  [tool.coverage.run]
@@ -30,5 +34,6 @@ quality = [
30
34
  "pip-audit>=2.7,<3",
31
35
  "pytest>=8,<10",
32
36
  "pytest-cov>=5,<8",
37
+ "pytest-xdist>=3,<4",
33
38
  "ruff>=0.15,<1",
34
39
  ]
@@ -25,3 +25,6 @@ class BaselineConfig:
25
25
  import_package: str | None = None
26
26
  coverage_threshold: int = 0
27
27
  audit_ignore_vulns: tuple[str, ...] = ()
28
+ # Seconds the pytest stage may take before the gate reports it. Zero
29
+ # leaves the suite unbudgeted.
30
+ test_budget_seconds: int = 0
@@ -25,6 +25,7 @@ _TOP_LEVEL_KEYS = {
25
25
  "sql-resource-globs",
26
26
  "import-package",
27
27
  "coverage-threshold",
28
+ "test-budget-seconds",
28
29
  "limits",
29
30
  "audit",
30
31
  "roles",
@@ -61,4 +62,5 @@ def load_config(project_root: Path) -> BaselineConfig:
61
62
  import_package=document.get("import-package"),
62
63
  coverage_threshold=int(document.get("coverage-threshold", 0)),
63
64
  audit_ignore_vulns=tuple(audit.get("ignore-vulns", ())),
65
+ test_budget_seconds=int(document.get("test-budget-seconds", 0)),
64
66
  )
@@ -6,6 +6,9 @@ from codeality_py.gate.stage_result import StageResult
6
6
  from codeality_py.gate.stage_status import StageStatus
7
7
  from codeality_py.report.exit_code import ExitCode
8
8
 
9
+ # A suite past its budget exits like any other finding: it is one.
10
+ _FINDINGS = (StageStatus.FINDINGS, StageStatus.OVER_BUDGET)
11
+
9
12
 
10
13
  @dataclass(frozen=True, slots=True)
11
14
  class GateResult:
@@ -18,6 +21,6 @@ class GateResult:
18
21
  blocking = [stage for stage in self.stages if stage.kind.value == "required"]
19
22
  if any(stage.status is StageStatus.FAILED_TO_RUN for stage in blocking):
20
23
  return ExitCode.INFRASTRUCTURE
21
- if any(stage.status is StageStatus.FINDINGS for stage in blocking):
24
+ if any(stage.status in _FINDINGS for stage in blocking):
22
25
  return ExitCode.FINDINGS
23
26
  return ExitCode.OK
@@ -12,6 +12,10 @@ def gate_stages(config: BaselineConfig) -> tuple[Stage, ...]:
12
12
  Coverage is collected rather than merely configured. pip-audit audits the
13
13
  installed environment, which the CI workflow builds with "uv sync
14
14
  --locked", so what is audited is exactly what the lockfile pins.
15
+
16
+ pytest reports its slowest tests every run, so a suite that goes over its
17
+ budget hands the reader the measurement in the same output, and a suite
18
+ creeping towards it is visible before it gets there.
15
19
  """
16
20
  roots = [*config.source_roots, *config.test_roots]
17
21
  package = config.import_package or config.source_roots[0]
@@ -44,7 +48,9 @@ def gate_stages(config: BaselineConfig) -> tuple[Stage, ...]:
44
48
  f"--cov={package}",
45
49
  "--cov-report=term-missing",
46
50
  f"--cov-fail-under={config.coverage_threshold}",
51
+ "--durations=10",
47
52
  ),
53
+ budget_seconds=float(config.test_budget_seconds),
48
54
  ),
49
55
  Stage("pyrefly", StageKind.SHADOW, ("pyrefly", "check")),
50
56
  )
@@ -0,0 +1,24 @@
1
+ """What the report says about a stage that passed too slowly."""
2
+
3
+ from codeality_py.gate.stage import Stage
4
+
5
+ # The suite-time procedure: profile the slowest tests, make the unit under
6
+ # test cheaper, then parallelise, then serialise what must stay shared.
7
+ PROCEDURE_URL = (
8
+ "https://github.com/syntopica/codeality/blob/main/docs/standards/testing.md#suite-time-budget"
9
+ )
10
+
11
+
12
+ def over_budget_detail(stage: Stage, elapsed: float, output: str) -> str:
13
+ """Return the detail for a stage that succeeded past its budget.
14
+
15
+ It carries the last part of the stage's own output, which for pytest run
16
+ with ``--durations`` is the table of the slowest tests, so the reader
17
+ starts from the measurement rather than from the exit code.
18
+ """
19
+ header = (
20
+ f"{stage.name} passed in {elapsed:.1f}s, over its budget of "
21
+ f"{stage.budget_seconds:g}s. Profile before adding hardware: {PROCEDURE_URL}"
22
+ )
23
+ tail = output[-2000:].strip()
24
+ return f"{header}\n{tail}" if tail else header
@@ -7,7 +7,7 @@ from codeality_py.gate.run_stage import run_stage
7
7
  from codeality_py.gate.stage_kind import StageKind
8
8
  from codeality_py.gate.stage_status import StageStatus
9
9
 
10
- _BLOCKED = (StageStatus.FINDINGS, StageStatus.FAILED_TO_RUN)
10
+ _BLOCKED = (StageStatus.FINDINGS, StageStatus.OVER_BUDGET, StageStatus.FAILED_TO_RUN)
11
11
 
12
12
 
13
13
  def run_gate(config: BaselineConfig, fail_fast: bool) -> GateResult:
@@ -6,6 +6,7 @@ import time
6
6
  from pathlib import Path
7
7
 
8
8
  from codeality_py.gate.build_stage_result import build_stage_result
9
+ from codeality_py.gate.over_budget_detail import over_budget_detail
9
10
  from codeality_py.gate.stage import Stage
10
11
  from codeality_py.gate.stage_kind import StageKind
11
12
  from codeality_py.gate.stage_result import StageResult
@@ -49,4 +50,10 @@ def run_stage(stage: Stage, project_root: Path) -> StageResult:
49
50
  part.strip() for part in (completed.stdout, completed.stderr) if part.strip()
50
51
  )
51
52
  detail = "" if completed.returncode == 0 else output[-2000:]
53
+ # A suite that passes but takes longer than it may is a finding of its
54
+ # own: the tail of its output holds pytest's slowest-durations table,
55
+ # which is where fixing it starts.
56
+ if status is StageStatus.PASSED and 0.0 < stage.budget_seconds < elapsed:
57
+ status = StageStatus.OVER_BUDGET
58
+ detail = over_budget_detail(stage, elapsed, output)
52
59
  return build_stage_result(stage, status, completed.returncode, elapsed, detail)
@@ -12,3 +12,5 @@ class Stage:
12
12
  name: str
13
13
  kind: StageKind
14
14
  command: tuple[str, ...]
15
+ # Seconds the stage may take and still pass. Zero means unbudgeted.
16
+ budget_seconds: float = 0.0
@@ -8,5 +8,7 @@ class StageStatus(StrEnum):
8
8
 
9
9
  PASSED = "passed"
10
10
  FINDINGS = "findings"
11
+ # The command succeeded and took longer than the stage's budget.
12
+ OVER_BUDGET = "over-budget"
11
13
  FAILED_TO_RUN = "failed-to-run"
12
14
  SKIPPED_NOT_APPLICABLE = "skipped-not-applicable"
@@ -1,6 +1,6 @@
1
1
  """Patterns that identify a test module.
2
2
 
3
- ``waveform_test.py`` in djplayerdeluxe is missed by a ``test_*.py``-only rule,
3
+ ``waveform_test.py`` in consumer-b is missed by a ``test_*.py``-only rule,
4
4
  so the suffix form is part of the default set.
5
5
  """
6
6
 
@@ -86,3 +86,13 @@ def test_an_unknown_rule_code_in_an_override_is_fatal(tmp_path: Path) -> None:
86
86
  )
87
87
  with pytest.raises(ConfigError, match="unknown rule code"):
88
88
  load_config(tmp_path)
89
+
90
+
91
+ def test_the_suite_is_unbudgeted_unless_the_project_says_otherwise(tmp_path: Path) -> None:
92
+ (tmp_path / "src").mkdir()
93
+ assert load_config(tmp_path).test_budget_seconds == 0
94
+
95
+
96
+ def test_the_test_budget_is_read(tmp_path: Path) -> None:
97
+ _write(tmp_path, "schema-version = 1\ntest-budget-seconds = 300\n")
98
+ assert load_config(tmp_path).test_budget_seconds == 300
@@ -67,3 +67,16 @@ def test_a_missing_required_tool_still_fails_to_run(tmp_path: Path) -> None:
67
67
  result = run_stage(stage, tmp_path)
68
68
  assert result.status is StageStatus.FAILED_TO_RUN
69
69
  assert result.exit_code == 127
70
+
71
+
72
+ def test_pytest_reports_its_slowest_tests_on_every_run() -> None:
73
+ """The measurement a slow suite is fixed from is in the output already."""
74
+ config = BaselineConfig(project_root=Path("/p"), import_package="demo")
75
+ assert "--durations=10" in _commands(config)["pytest"]
76
+
77
+
78
+ def test_the_test_budget_reaches_the_pytest_stage_and_no_other() -> None:
79
+ config = BaselineConfig(project_root=Path("/p"), test_budget_seconds=300)
80
+ budgets = {stage.name: stage.budget_seconds for stage in gate_stages(config)}
81
+ assert budgets["pytest"] == 300.0
82
+ assert all(budget == 0.0 for name, budget in budgets.items() if name != "pytest")
@@ -83,3 +83,38 @@ def test_a_failing_stage_keeps_what_it_wrote_to_stderr(tmp_path: Path) -> None:
83
83
  assert result.status is StageStatus.FINDINGS
84
84
  assert "found on stdout" in result.detail
85
85
  assert "found on stderr" in result.detail
86
+
87
+
88
+ def test_a_passing_stage_past_its_budget_is_over_budget(tmp_path: Path) -> None:
89
+ """2026-09-22: a consumer's suite had grown to 31 minutes and every gate
90
+ was green, because a slow suite was not a finding. One profiling pass
91
+ found that a checker re-parsed the same file 620 951 times per run and
92
+ took it to four minutes; parallel workers took it to 32 seconds. The
93
+ gate has to be what says the number is too big.
94
+ """
95
+ stage = Stage("sleep", StageKind.REQUIRED, ("sleep", "0.2"), budget_seconds=0.05)
96
+ result = run_stage(stage, tmp_path)
97
+ assert result.status is StageStatus.OVER_BUDGET
98
+ assert result.exit_code == 0
99
+ assert "over its budget of 0.05s" in result.detail
100
+ assert "testing.md#suite-time-budget" in result.detail
101
+
102
+
103
+ def test_an_unbudgeted_stage_passes_however_long_it_takes(tmp_path: Path) -> None:
104
+ result = run_stage(Stage("sleep", StageKind.REQUIRED, ("sleep", "0.05")), tmp_path)
105
+ assert result.status is StageStatus.PASSED
106
+
107
+
108
+ def test_a_failing_stage_past_its_budget_reports_the_failure(tmp_path: Path) -> None:
109
+ stage = Stage("false", StageKind.REQUIRED, ("false",), budget_seconds=0.000001)
110
+ assert run_stage(stage, tmp_path).status is StageStatus.FINDINGS
111
+
112
+
113
+ def test_over_budget_in_a_required_stage_exits_1() -> None:
114
+ result = GateResult(stages=(_stage_result(StageKind.REQUIRED, StageStatus.OVER_BUDGET),))
115
+ assert result.exit_code() is ExitCode.FINDINGS
116
+
117
+
118
+ def test_over_budget_in_a_shadow_stage_does_not_fail_the_gate() -> None:
119
+ result = GateResult(stages=(_stage_result(StageKind.SHADOW, StageStatus.OVER_BUDGET),))
120
+ assert result.exit_code() is ExitCode.OK
@@ -170,3 +170,26 @@ def test_a_ruff_toml_alone_is_not_a_conflict(tmp_path: Path) -> None:
170
170
  (tmp_path / "pyproject.toml").write_text('[project]\nname = "demo"\n', encoding="utf-8")
171
171
  dispositions = _dispositions(plan_init(tmp_path, "lib", with_ci=False))
172
172
  assert dispositions["ruff.toml"] is PlanDisposition.CREATE
173
+
174
+
175
+ def test_a_new_project_runs_its_suite_on_every_core(tmp_path: Path) -> None:
176
+ """A suite written parallel from its first test stays isolated; one
177
+ retrofitted later finds every shared port, file and process the hard way.
178
+ """
179
+ (tmp_path / "pyproject.toml").write_text('[project]\nname = "demo"\n', encoding="utf-8")
180
+ plan = plan_init(tmp_path, "lib", with_ci=False)
181
+ pyproject = next(item for item in plan if item.path.name == "pyproject.toml").content
182
+ assert 'addopts = "-ra -n auto"' in pyproject
183
+ assert '"pytest-xdist>=3,<4"' in pyproject
184
+ assert 'DEP002 = ["pytest-xdist"]' in pyproject
185
+
186
+
187
+ def test_a_project_with_its_own_pytest_table_keeps_it(tmp_path: Path) -> None:
188
+ (tmp_path / "pyproject.toml").write_text(
189
+ '[project]\nname = "demo"\n\n[tool.pytest.ini_options]\naddopts = "-q"\n',
190
+ encoding="utf-8",
191
+ )
192
+ plan = plan_init(tmp_path, "lib", with_ci=False)
193
+ pyproject = next(item for item in plan if item.path.name == "pyproject.toml").content
194
+ assert 'addopts = "-q"' in pyproject
195
+ assert "-n auto" not in pyproject
@@ -94,11 +94,11 @@ def test_the_workflow_listens_on_the_checked_out_branch(tmp_path: Path) -> None:
94
94
 
95
95
 
96
96
  def test_a_nested_project_finds_the_enclosing_repository(tmp_path: Path) -> None:
97
- _checked_out(tmp_path, "qlctool")
98
- nested = tmp_path / "tools" / "qlctool"
97
+ _checked_out(tmp_path, "nested-tool")
98
+ nested = tmp_path / "tools" / "nested-tool"
99
99
  nested.mkdir(parents=True)
100
100
  rendered = render_asset(read_asset("codeality-py-ci.yml"), nested)
101
- assert "branches: [qlctool]" in rendered
101
+ assert "branches: [nested-tool]" in rendered
102
102
 
103
103
 
104
104
  def test_a_detached_head_keeps_main(tmp_path: Path) -> None:
@@ -110,23 +110,24 @@ def test_a_detached_head_keeps_main(tmp_path: Path) -> None:
110
110
 
111
111
  def test_a_nested_project_runs_its_workflow_from_its_directory(tmp_path: Path) -> None:
112
112
  (tmp_path / ".git").mkdir()
113
- nested = tmp_path / "tools" / "qlctool"
113
+ nested = tmp_path / "tools" / "nested-tool"
114
114
  nested.mkdir(parents=True)
115
115
  rendered = render_asset(read_asset("codeality-py-ci.yml"), nested)
116
- assert "working-directory: tools/qlctool" in rendered
117
- assert "path: tools/qlctool/pyrefly.json" in rendered
116
+ assert "working-directory: tools/nested-tool" in rendered
117
+ assert "path: tools/nested-tool/pyrefly.json" in rendered
118
118
 
119
119
 
120
120
  def test_a_nested_workflow_is_planned_at_the_repository_root(tmp_path: Path) -> None:
121
121
  (tmp_path / ".git").mkdir()
122
- nested = tmp_path / "tools" / "qlctool"
122
+ nested = tmp_path / "tools" / "nested-tool"
123
123
  nested.mkdir(parents=True)
124
- (nested / "pyproject.toml").write_text('[project]\nname = "qlctool"\n', encoding="utf-8")
124
+ (nested / "pyproject.toml").write_text('[project]\nname = "nested-tool"\n', encoding="utf-8")
125
125
  workflow = next(
126
126
  managed.path
127
127
  for managed in plan_init(nested, "lib", with_ci=True)
128
128
  if ".github" in str(managed.path)
129
129
  )
130
130
  assert (
131
- workflow.resolve() == (tmp_path / ".github" / "workflows" / "quality-qlctool.yml").resolve()
131
+ workflow.resolve()
132
+ == (tmp_path / ".github" / "workflows" / "quality-nested-tool.yml").resolve()
132
133
  )
@@ -33,6 +33,6 @@ def test_not_matching(path: str, pattern: str) -> None:
33
33
 
34
34
 
35
35
  def test_a_root_only_pattern_does_not_claim_the_whole_tree() -> None:
36
- """The DJCenterDeluxe case: entrypoint = ["*.py"] meant the 40 root scripts."""
36
+ """The consumer-a case: entrypoint = ["*.py"] meant the 40 root scripts."""
37
37
  assert matches_glob("autoclean.py", "*.py")
38
38
  assert not matches_glob("facturas/invoice.py", "*.py")
@@ -937,7 +937,7 @@ wheels = [
937
937
 
938
938
  [[package]]
939
939
  name = "syntopica-codeality-py"
940
- version = "0.2.2"
940
+ version = "0.2.3"
941
941
  source = { editable = "." }
942
942
  dependencies = [
943
943
  { name = "click" },