bmsdna-devtools 1.5.0__tar.gz → 1.6.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 (156) hide show
  1. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/PKG-INFO +6 -2
  2. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/README.md +5 -1
  3. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/ci_plan.py +26 -5
  4. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/ci_plan_env.py +7 -3
  5. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/pyproject.toml +1 -1
  6. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_ci_plan.py +39 -0
  7. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/uv.lock +1 -1
  8. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/.github/workflows/auto-release.yml +0 -0
  9. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/.github/workflows/python-publish.yml +0 -0
  10. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/.github/workflows/python-test.yml +0 -0
  11. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/.gitignore +0 -0
  12. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/.python-version +0 -0
  13. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/__init__.py +0 -0
  14. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/_api_dump.py +0 -0
  15. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/ado_auth.py +0 -0
  16. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/ado_issue.py +0 -0
  17. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/agent_mentions.py +0 -0
  18. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/api_usage.py +0 -0
  19. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/app_service_logs.py +0 -0
  20. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/azure_arm.py +0 -0
  21. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/azure_auth.py +0 -0
  22. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/bdt_config.py +0 -0
  23. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/business_user.py +0 -0
  24. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/cleanup_scan.py +0 -0
  25. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/cli.py +0 -0
  26. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/cli_tools.py +0 -0
  27. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/commit.py +0 -0
  28. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/dead_code.py +0 -0
  29. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/__init__.py +0 -0
  30. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/advisories.py +0 -0
  31. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/cli.py +0 -0
  32. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/cooldown.py +0 -0
  33. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/lockfiles.py +0 -0
  34. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/osv.py +0 -0
  35. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/deps/versions.py +0 -0
  36. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/env_config.py +0 -0
  37. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/env_files.py +0 -0
  38. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/find_injection.py +0 -0
  39. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/find_repo.py +0 -0
  40. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/gh_args.py +0 -0
  41. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/gh_issue.py +0 -0
  42. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/gh_pr.py +0 -0
  43. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/github_api.py +0 -0
  44. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/gitrepo.py +0 -0
  45. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/injection_frontend.py +0 -0
  46. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/injection_python.py +0 -0
  47. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/issue_do.py +0 -0
  48. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/issue_show.py +0 -0
  49. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/issue_watch.py +0 -0
  50. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint.py +0 -0
  51. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint_findings.py +0 -0
  52. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint_models.py +0 -0
  53. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint_sql.py +0 -0
  54. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint_sql_files.py +0 -0
  55. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint_tooling.py +0 -0
  56. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/lint_typescript.py +0 -0
  57. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/logs.py +0 -0
  58. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_build.py +0 -0
  59. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_cancel.py +0 -0
  60. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_choice.py +0 -0
  61. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_create_args.py +0 -0
  62. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_drift.py +0 -0
  63. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_info.py +0 -0
  64. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_issue_link.py +0 -0
  65. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_labels.py +0 -0
  66. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_list.py +0 -0
  67. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_markdown.py +0 -0
  68. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_merge_defaults.py +0 -0
  69. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pr_ref.py +0 -0
  70. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/pull.py +0 -0
  71. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/testdb.py +0 -0
  72. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/translate.py +0 -0
  73. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/__init__.py +0 -0
  74. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/cli.py +0 -0
  75. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/pipeline.py +0 -0
  76. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/pricing.py +0 -0
  77. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/report.py +0 -0
  78. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/00_schema.sql +0 -0
  79. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/01_ingest_claude.sql +0 -0
  80. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/01_ingest_codex.sql +0 -0
  81. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/02_messages.sql +0 -0
  82. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/03_markers.sql +0 -0
  83. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/04_facts.sql +0 -0
  84. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/usage/sql/05_views.sql +0 -0
  85. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/bmsdna/devtools/worktree.py +0 -0
  86. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/justfile +0 -0
  87. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/prek.toml +0 -0
  88. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/skills/bmsdna-devtools/SKILL.md +0 -0
  89. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/conftest.py +0 -0
  90. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/fake_github.py +0 -0
  91. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_ado_auth.py +0 -0
  92. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_ado_issue.py +0 -0
  93. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_ado_issue_flow.py +0 -0
  94. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_agent_mentions.py +0 -0
  95. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_api_usage.py +0 -0
  96. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_app_service_logs.py +0 -0
  97. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_azure_arm.py +0 -0
  98. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_bdt_config.py +0 -0
  99. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_business_user.py +0 -0
  100. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_ci_plan_env.py +0 -0
  101. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cleanup_scan.py +0 -0
  102. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_cleanup.py +0 -0
  103. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_commit.py +0 -0
  104. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_deps.py +0 -0
  105. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_issue.py +0 -0
  106. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_pr_create.py +0 -0
  107. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_pr_id.py +0 -0
  108. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_pull.py +0 -0
  109. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_tools.py +0 -0
  110. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_cli_version.py +0 -0
  111. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_commit.py +0 -0
  112. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_deps_advisories.py +0 -0
  113. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_deps_cooldown.py +0 -0
  114. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_deps_lockfiles.py +0 -0
  115. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_deps_osv.py +0 -0
  116. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_deps_versions.py +0 -0
  117. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_env_config.py +0 -0
  118. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_env_files.py +0 -0
  119. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_find_injection.py +0 -0
  120. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_find_repo.py +0 -0
  121. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_gh_issue.py +0 -0
  122. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_gh_pr.py +0 -0
  123. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_github_api.py +0 -0
  124. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_gitrepo.py +0 -0
  125. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_issue_do.py +0 -0
  126. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_issue_for_me.py +0 -0
  127. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_issue_show.py +0 -0
  128. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_issue_watch.py +0 -0
  129. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_lint.py +0 -0
  130. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_lint_models.py +0 -0
  131. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_lint_sql.py +0 -0
  132. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_lint_sql_files.py +0 -0
  133. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_lint_tooling.py +0 -0
  134. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_lint_typescript.py +0 -0
  135. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_logs.py +0 -0
  136. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_build.py +0 -0
  137. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_build_create_options.py +0 -0
  138. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_build_flow.py +0 -0
  139. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_cancel_build.py +0 -0
  140. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_choice.py +0 -0
  141. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_create_args.py +0 -0
  142. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_description_not_truncated.py +0 -0
  143. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_drift.py +0 -0
  144. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_info.py +0 -0
  145. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_issue_link.py +0 -0
  146. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_labels.py +0 -0
  147. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_list.py +0 -0
  148. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_markdown.py +0 -0
  149. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pr_merge_defaults.py +0 -0
  150. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_pull.py +0 -0
  151. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_testdb.py +0 -0
  152. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_translate.py +0 -0
  153. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_usage.py +0 -0
  154. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_wait_timeout.py +0 -0
  155. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_worktree_clean.py +0 -0
  156. {bmsdna_devtools-1.5.0 → bmsdna_devtools-1.6.0}/tests/test_worktree_create.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: bmsdna-devtools
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: Shared Azure DevOps / GitHub / git / Azure Monitor developer tooling for BMS projects
5
5
  Requires-Python: >=3.14
6
6
  Requires-Dist: azure-identity>=1.19.0
@@ -980,6 +980,7 @@ the `branching-strategy` skill). Add the table to pyproject.toml (an empty one s
980
980
  [tool.bdt.ci.plan]
981
981
  on_missing = "infer" # PR without a usable label: infer from the changed files (default) or "fail"
982
982
  non_code = ["docs/**", "*.md"] # files no test reads or ships; explicit per repo (full-match globs: `*.md` = root only, `**/*.md` = every folder)
983
+ # the `bdt translate` source file (`[tool.bdt.translate] file`, default translations.toml) always counts too
983
984
 
984
985
  [tool.bdt.ci.plan.tiers.unit] # default tiers: unit = tests/unit, e2e = tests/e2e (a tier whose folder is missing is skipped)
985
986
  dir = "tests/unit" # areas = sub-folders with tests (test_*.py / *_test.py); `route_planning` <-> `test-route-planning`
@@ -1019,7 +1020,10 @@ Order of decision, always logged with its reason:
1019
1020
  `dev`); the nightly, manual runs (also on `test`/`main`), other branches and forks run everything. A manual run of
1020
1021
  `refs/pull/<id>/merge` is planned like that PR (a fork PR still runs everything).
1021
1022
  2. Branch flow: promotions (`dev` -> `test`, `test` -> `main`, `main` -> `dev`) run nothing. `fix/*` / `hotfix/*` into
1022
- `main` are tested and must be cut from `main` (no unreleased `dev` commits). That check needs full history
1023
+ `main` are tested and must be cut from `main` (no unreleased `dev` commits). `cherry/*` ports a subset of
1024
+ `test` to `main`: cut `cherry/<topic>-to-main` from `main` and `git cherry-pick` the wanted commits (never merge
1025
+ `test` or `dev` into it), same base check. `main` gets a combination `test` never ran, so a port always runs the
1026
+ full suite and its labels are ignored (`bdt pr create` still wants one: pass `test-full`). That check needs full history
1023
1027
  (`fetchDepth: 0` on the checkout); in a shallow checkout or when the refs cannot be fetched it is skipped with a
1024
1028
  warning instead of guessing. Any other PR into `test` / `main` fails the build. Area folders must not be called
1025
1029
  `full` or `none` (they would collide with the labels).
@@ -961,6 +961,7 @@ the `branching-strategy` skill). Add the table to pyproject.toml (an empty one s
961
961
  [tool.bdt.ci.plan]
962
962
  on_missing = "infer" # PR without a usable label: infer from the changed files (default) or "fail"
963
963
  non_code = ["docs/**", "*.md"] # files no test reads or ships; explicit per repo (full-match globs: `*.md` = root only, `**/*.md` = every folder)
964
+ # the `bdt translate` source file (`[tool.bdt.translate] file`, default translations.toml) always counts too
964
965
 
965
966
  [tool.bdt.ci.plan.tiers.unit] # default tiers: unit = tests/unit, e2e = tests/e2e (a tier whose folder is missing is skipped)
966
967
  dir = "tests/unit" # areas = sub-folders with tests (test_*.py / *_test.py); `route_planning` <-> `test-route-planning`
@@ -1000,7 +1001,10 @@ Order of decision, always logged with its reason:
1000
1001
  `dev`); the nightly, manual runs (also on `test`/`main`), other branches and forks run everything. A manual run of
1001
1002
  `refs/pull/<id>/merge` is planned like that PR (a fork PR still runs everything).
1002
1003
  2. Branch flow: promotions (`dev` -> `test`, `test` -> `main`, `main` -> `dev`) run nothing. `fix/*` / `hotfix/*` into
1003
- `main` are tested and must be cut from `main` (no unreleased `dev` commits). That check needs full history
1004
+ `main` are tested and must be cut from `main` (no unreleased `dev` commits). `cherry/*` ports a subset of
1005
+ `test` to `main`: cut `cherry/<topic>-to-main` from `main` and `git cherry-pick` the wanted commits (never merge
1006
+ `test` or `dev` into it), same base check. `main` gets a combination `test` never ran, so a port always runs the
1007
+ full suite and its labels are ignored (`bdt pr create` still wants one: pass `test-full`). That check needs full history
1004
1008
  (`fetchDepth: 0` on the checkout); in a shallow checkout or when the refs cannot be fetched it is skipped with a
1005
1009
  warning instead of guessing. Any other PR into `test` / `main` fails the build. Area folders must not be called
1006
1010
  `full` or `none` (they would collide with the labels).
@@ -5,6 +5,7 @@ Configured under `[tool.bdt.ci.plan]` in pyproject.toml (the table must exist, e
5
5
  [tool.bdt.ci.plan]
6
6
  on_missing = "infer" # PR without a usable label: "infer" from the changed files (default) or "fail"
7
7
  non_code = ["docs/**", "*.md"] # files no test reads or ships; explicit per repo (`*.md` = root only, `**/*.md` = all)
8
+ # (the `bdt translate` file, translations.toml, is always one of them)
8
9
 
9
10
  [tool.bdt.ci.plan.tiers.unit] # default tiers: unit = tests/unit, e2e = tests/e2e
10
11
  dir = "tests/unit" # areas = sub-folders with tests (snake_case folder <-> kebab-case label)
@@ -25,14 +26,15 @@ Labels: `test-<area>`, `test-full` (everything), `test-none` (no tests; lint and
25
26
 
26
27
  1. Not a PR: the CI run after a push (merge) to `test`/`main` runs nothing (promoted code was tested on its way
27
28
  into `dev`); anything else (nightly, manual runs, other branches) and forks run everything.
28
- 2. Branch flow: promotions (dev -> test -> main -> dev) run nothing; `fix/*` and `hotfix/*` into `main` are tested
29
- and must be cut from `main`; any other PR into `test`/`main` is an error.
29
+ 2. Branch flow: promotions (dev -> test -> main -> dev) run nothing; `fix/*` and `hotfix/*` into `main` are tested and `cherry/*` (a subset of `test` ported to `main`) runs
30
+ the full suite whatever its label; both must be cut from `main`; any other PR into `test`/`main` is an error.
30
31
  3. PR labels decide. Without a usable label the changed files decide (`on_missing = "infer"`): nothing changed or
31
32
  only `non_code` files -> none, only files an area owns (its tests, or `paths`) -> those areas, any other file ->
32
33
  everything. An area without tests (such as `infra`) selects nothing to run: `runTests` stays true, every tier is off.
33
34
  4. Anything unreadable (label API, change list) selects everything.
34
35
  """
35
36
 
37
+ import glob
36
38
  import shlex
37
39
  from collections.abc import Callable, Collection, Iterable, Mapping
38
40
  from dataclasses import dataclass, field
@@ -56,6 +58,7 @@ UNMATCHED_AREA = "shared"
56
58
  LONG_LIVED = frozenset({"dev", "test", "main"})
57
59
  PROMOTIONS = frozenset({("dev", "test"), ("test", "main"), ("main", "dev")})
58
60
  FIX_PREFIXES = ("fix/", "hotfix/")
61
+ PORT_PREFIXES = ("cherry/",) # a subset of test cherry-picked onto a branch cut from main
59
62
  PUSH_REASONS = frozenset({"IndividualCI", "BatchedCI"}) # a merge landed on the branch: deploy only
60
63
  INFRA_AREA = "infra" # owns `infra/**` by default when the repo has an infra/ folder; usually has no tests
61
64
  RESERVED_AREAS = frozenset({"full", "none"}) # test-full / test-none are the control labels
@@ -197,6 +200,15 @@ def _tier(name: str, raw: object) -> Tier:
197
200
  return Tier(name, directory.strip("/"), globs, test_files)
198
201
 
199
202
 
203
+ def _translations_file(start: Path | None) -> str | None:
204
+ """The `bdt translate` source file relative to the project folder: text that tests do not read (they get the
205
+ generated JSON, and `bdt translate --check` guards the keys), so an edit alone needs no tests."""
206
+ file = load_bdt_table("translate", start).get("file", "translations.toml")
207
+ if not isinstance(file, str):
208
+ return None
209
+ return PurePosixPath(file).as_posix()
210
+
211
+
200
212
  def load_plan_config(start: Path | None = None) -> PlanConfig | None:
201
213
  """`[tool.bdt.ci.plan]`, or None when the table is absent (the feature is opt-in per repo)."""
202
214
  raw = load_bdt_table("ci", start).get("plan")
@@ -215,11 +227,14 @@ def load_plan_config(start: Path | None = None) -> PlanConfig | None:
215
227
  paths = {str(area): _strings(globs, f"paths.{area}") for area, globs in paths_raw.items()}
216
228
  if (pyproject.parent / "infra").is_dir():
217
229
  paths.setdefault(INFRA_AREA, ("infra/**",))
230
+ non_code = _strings(raw.get("non_code", []), "non_code")
231
+ if translations := _translations_file(start):
232
+ non_code += (glob.escape(translations),)
218
233
  config = PlanConfig(
219
234
  root=pyproject.parent,
220
235
  tiers=tuple(_tier(name, t) for name, t in tiers_raw.items()),
221
236
  on_missing=on_missing,
222
- non_code=_strings(raw.get("non_code", []), "non_code"),
237
+ non_code=non_code,
223
238
  paths=paths,
224
239
  )
225
240
  if clash := sorted(config.all_areas() & RESERVED_AREAS):
@@ -274,7 +289,7 @@ class Plan:
274
289
  warnings: tuple[str, ...] = ()
275
290
 
276
291
 
277
- def classify_pr(source: str, target: str) -> tuple[Literal["promotion", "tested", "rejected"], str]:
292
+ def classify_pr(source: str, target: str) -> tuple[Literal["promotion", "tested", "ported", "rejected"], str]:
278
293
  """How a PR from `source` into `target` (branch names, no `refs/heads/`) is treated."""
279
294
  if source in LONG_LIVED and target in LONG_LIVED:
280
295
  if (source, target) in PROMOTIONS:
@@ -291,9 +306,11 @@ def classify_pr(source: str, target: str) -> tuple[Literal["promotion", "tested"
291
306
  if target == "main":
292
307
  if source.startswith(FIX_PREFIXES):
293
308
  return "tested", f"fix branch {source} -> main"
309
+ if source.startswith(PORT_PREFIXES):
310
+ return "ported", f"port branch {source} -> main"
294
311
  return (
295
312
  "rejected",
296
- f"only fix/*, hotfix/* branches and the test -> main promotion may target main, not {source}",
313
+ f"only fix/*, hotfix/*, cherry/* branches and the test -> main promotion may target main, not {source}",
297
314
  )
298
315
  return "tested", f"{source} -> {target}"
299
316
 
@@ -398,6 +415,10 @@ def make_plan(
398
415
  return Plan("error", f"branch flow violated: {error}")
399
416
  except (OSError, ValueError, RuntimeError) as error:
400
417
  warnings.append(f"fix-branch base not verified: {error}")
418
+ if kind == "ported":
419
+ return _full(
420
+ config, f"{why}: a port is a combination test never ran, so the full suite runs (labels ignored)", warnings
421
+ )
401
422
  try:
402
423
  found = _from_labels(labels(), config, warnings)
403
424
  except (OSError, ValueError, RuntimeError) as error:
@@ -151,7 +151,7 @@ def changed_files(target: str, *, merge_checkout: bool, root: Path | None = None
151
151
 
152
152
 
153
153
  def verify_fix_base(env: Mapping[str, str]) -> None:
154
- """A fix for `main` must not contain unreleased `dev` commits (cut it from `main`, never from `dev`; being behind
154
+ """A fix or cherry-pick port for `main` must not contain unreleased `dev` commits (cut it from `main`, never from `dev`; being behind
155
155
  `main` is fine, the PR merge handles that).
156
156
 
157
157
  Needs the PR merge commit as HEAD and fetches `origin/dev` and `origin/main`; raises RuntimeError when that is not
@@ -161,7 +161,9 @@ def verify_fix_base(env: Mapping[str, str]) -> None:
161
161
  if len(parents) != 3:
162
162
  raise RuntimeError("HEAD is not a PR merge commit")
163
163
  if _git("rev-parse", "--is-shallow-repository").stdout.strip() == "true":
164
- raise RuntimeError("shallow checkout: set `fetchDepth: 0` on the checkout step to verify fix branches")
164
+ raise RuntimeError(
165
+ "shallow checkout: set `fetchDepth: 0` on the checkout step to verify fix and cherry branches"
166
+ )
165
167
  token = env.get("SYSTEM_ACCESSTOKEN")
166
168
  auth = (
167
169
  {
@@ -184,7 +186,9 @@ def verify_fix_base(env: Mapping[str, str]) -> None:
184
186
  dev_only = set(_git("rev-list", "refs/remotes/origin/dev", "--not", main).stdout.split())
185
187
  fix_only = set(_git("rev-list", fix, "--not", main).stdout.split())
186
188
  if dev_only & fix_only:
187
- raise BranchFlowError("the fix branch contains unreleased dev commits; cut the fix from main")
189
+ raise BranchFlowError(
190
+ "the branch contains unreleased dev commits; cut it from main (and cherry-pick onto it, never merge dev or test)"
191
+ )
188
192
 
189
193
 
190
194
  def _vso(text: str) -> str:
@@ -10,7 +10,7 @@ packages = ["bmsdna"]
10
10
 
11
11
  [project]
12
12
  name = "bmsdna-devtools"
13
- version = "1.5.0"
13
+ version = "1.6.0"
14
14
  description = "Shared Azure DevOps / GitHub / git / Azure Monitor developer tooling for BMS projects"
15
15
  readme = "README.md"
16
16
  requires-python = ">=3.14" # pgdevkit>=0.7.1 requires 3.14; was >=3.11 before adding it as a dependency
@@ -291,6 +291,22 @@ def test_non_code_glob_is_not_a_substring_match(config) -> None:
291
291
  assert plan_for(config, pr(), files=["pkg/README.md"]).kind == "full"
292
292
 
293
293
 
294
+ def test_translations_file_is_non_code(repo) -> None:
295
+ config = load_plan_config(repo)
296
+ assert config is not None
297
+ assert plan_for(config, pr(), files=["translations.toml"]).kind == "none"
298
+ assert plan_for(config, pr(), files=["sub/translations.toml"]).kind == "full"
299
+
300
+
301
+ def test_translations_file_follows_the_translate_config(repo) -> None:
302
+ pyproject = repo / "pyproject.toml"
303
+ pyproject.write_text(pyproject.read_text() + '[tool.bdt.translate]\nfile = "i18n/strings.toml"\n')
304
+ config = load_plan_config(repo)
305
+ assert config is not None
306
+ assert plan_for(config, pr(), files=["i18n/strings.toml"]).kind == "none"
307
+ assert plan_for(config, pr(), files=["translations.toml"]).kind == "full"
308
+
309
+
294
310
  def test_infer_unreadable_file_list_runs_everything(config) -> None:
295
311
  assert plan_for(config, pr(), files=RuntimeError("git failed")).kind == "full"
296
312
 
@@ -329,6 +345,29 @@ def test_fix_branch_into_main_is_tested_like_any_pr(config) -> None:
329
345
  assert (result.kind, result.areas) == ("areas", {"orders"})
330
346
 
331
347
 
348
+ @pytest.mark.parametrize("labels", [[], ["test-orders"], ["test-none"], ["test-full"]])
349
+ def test_cherry_branch_into_main_always_runs_the_full_suite(config, labels) -> None:
350
+ result = plan_for(config, pr("cherry/30367-to-main", "main"), labels=labels, files=["docs/x.md"])
351
+ assert result.kind == "full" and result.areas == config.all_areas() and "full suite" in result.reason
352
+
353
+
354
+ def test_cherry_branch_does_not_need_the_label_api(config) -> None:
355
+ result = plan_for(config, pr("cherry/x-to-main", "main"), labels=OSError("must not be read"))
356
+ assert result.kind == "full" and not result.warnings
357
+
358
+
359
+ def test_cherry_branch_with_dev_commits_is_an_error(config) -> None:
360
+ def violated() -> None:
361
+ raise BranchFlowError("contains unreleased dev commits")
362
+
363
+ result = plan_for(config, pr("cherry/x-to-main", "main"), labels=["test-full"], fix_base=violated)
364
+ assert result.kind == "error" and "unreleased dev commits" in result.reason
365
+
366
+
367
+ def test_cherry_branch_is_only_allowed_into_main(config) -> None:
368
+ assert plan_for(config, pr("cherry/x", "test"), labels=["test-full"]).kind == "error"
369
+
370
+
332
371
  def test_fix_branch_with_dev_commits_is_an_error(config) -> None:
333
372
  def violated() -> None:
334
373
  raise BranchFlowError("contains unreleased dev commits")
@@ -58,7 +58,7 @@ wheels = [
58
58
 
59
59
  [[package]]
60
60
  name = "bmsdna-devtools"
61
- version = "1.5.0"
61
+ version = "1.6.0"
62
62
  source = { editable = "." }
63
63
  dependencies = [
64
64
  { name = "azure-identity" },