alr-emit 0.1.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 (684) hide show
  1. alr_emit-0.1.0/.gitattributes +28 -0
  2. alr_emit-0.1.0/.github/workflows/ci.yml +254 -0
  3. alr_emit-0.1.0/.github/workflows/publish-pypi.yml +136 -0
  4. alr_emit-0.1.0/.github/workflows/publish-testpypi.yml +101 -0
  5. alr_emit-0.1.0/.gitignore +7 -0
  6. alr_emit-0.1.0/LICENSE +201 -0
  7. alr_emit-0.1.0/Makefile +20 -0
  8. alr_emit-0.1.0/PKG-INFO +4022 -0
  9. alr_emit-0.1.0/README.md +3995 -0
  10. alr_emit-0.1.0/alr_emit/__init__.py +31 -0
  11. alr_emit-0.1.0/alr_emit/about.py +31 -0
  12. alr_emit-0.1.0/alr_emit/adapters/__init__.py +1 -0
  13. alr_emit-0.1.0/alr_emit/adapters/claude_code.py +2844 -0
  14. alr_emit-0.1.0/alr_emit/adapters/grok.py +215 -0
  15. alr_emit-0.1.0/alr_emit/adapters/grok_tui.py +1808 -0
  16. alr_emit-0.1.0/alr_emit/adapters/hermes.py +982 -0
  17. alr_emit-0.1.0/alr_emit/adapters/sdk.py +516 -0
  18. alr_emit-0.1.0/alr_emit/amendments.py +155 -0
  19. alr_emit-0.1.0/alr_emit/atomicfile.py +136 -0
  20. alr_emit-0.1.0/alr_emit/billing.py +409 -0
  21. alr_emit-0.1.0/alr_emit/commands.py +2286 -0
  22. alr_emit-0.1.0/alr_emit/config.py +1757 -0
  23. alr_emit-0.1.0/alr_emit/costmap.py +69 -0
  24. alr_emit-0.1.0/alr_emit/dashboard/DATA_CONTRACT.md +753 -0
  25. alr_emit-0.1.0/alr_emit/dashboard/__init__.py +10 -0
  26. alr_emit-0.1.0/alr_emit/dashboard/builder.py +704 -0
  27. alr_emit-0.1.0/alr_emit/dashboard/redact.py +322 -0
  28. alr_emit-0.1.0/alr_emit/dashboard/site.py +245 -0
  29. alr_emit-0.1.0/alr_emit/dashboard/static/dashboard.css +82 -0
  30. alr_emit-0.1.0/alr_emit/dashboard/static/dashboard.js +4548 -0
  31. alr_emit-0.1.0/alr_emit/display.py +116 -0
  32. alr_emit-0.1.0/alr_emit/hookio.py +32 -0
  33. alr_emit-0.1.0/alr_emit/jsonedit.py +258 -0
  34. alr_emit-0.1.0/alr_emit/jsonl.py +252 -0
  35. alr_emit-0.1.0/alr_emit/kit.py +1983 -0
  36. alr_emit-0.1.0/alr_emit/otel.py +1074 -0
  37. alr_emit-0.1.0/alr_emit/otel_ctl.py +780 -0
  38. alr_emit-0.1.0/alr_emit/otel_probe.py +220 -0
  39. alr_emit-0.1.0/alr_emit/paths.py +204 -0
  40. alr_emit-0.1.0/alr_emit/plan_interview.py +237 -0
  41. alr_emit-0.1.0/alr_emit/plan_workbook.py +1030 -0
  42. alr_emit-0.1.0/alr_emit/plans.py +1502 -0
  43. alr_emit-0.1.0/alr_emit/prices_interview.py +138 -0
  44. alr_emit-0.1.0/alr_emit/project_names.py +83 -0
  45. alr_emit-0.1.0/alr_emit/projects.py +418 -0
  46. alr_emit-0.1.0/alr_emit/purge.py +322 -0
  47. alr_emit-0.1.0/alr_emit/record.py +252 -0
  48. alr_emit-0.1.0/alr_emit/reserved.py +26 -0
  49. alr_emit-0.1.0/alr_emit/session.py +563 -0
  50. alr_emit-0.1.0/alr_emit/sink.py +552 -0
  51. alr_emit-0.1.0/alr_emit/streams.py +24 -0
  52. alr_emit-0.1.0/alr_emit/syslog_frame.py +204 -0
  53. alr_emit-0.1.0/alr_emit/syslog_send.py +614 -0
  54. alr_emit-0.1.0/alr_emit/syslog_transport.py +426 -0
  55. alr_emit-0.1.0/alr_emit/tag_lists.py +335 -0
  56. alr_emit-0.1.0/alr_emit/taghook.py +637 -0
  57. alr_emit-0.1.0/alr_emit/tagmodel.py +274 -0
  58. alr_emit-0.1.0/alr_emit/tags.py +499 -0
  59. alr_emit-0.1.0/alr_emit/trust.py +331 -0
  60. alr_emit-0.1.0/alr_emit/validate.py +458 -0
  61. alr_emit-0.1.0/alr_emit/viewer/__init__.py +4 -0
  62. alr_emit-0.1.0/alr_emit/viewer/accept_cli.py +122 -0
  63. alr_emit-0.1.0/alr_emit/viewer/cli.py +2692 -0
  64. alr_emit-0.1.0/alr_emit/viewer/corpus.py +376 -0
  65. alr_emit-0.1.0/alr_emit/viewer/ed25519.py +117 -0
  66. alr_emit-0.1.0/alr_emit/viewer/ev.py +952 -0
  67. alr_emit-0.1.0/alr_emit/viewer/glmap.py +220 -0
  68. alr_emit-0.1.0/alr_emit/viewer/html_report.py +148 -0
  69. alr_emit-0.1.0/alr_emit/viewer/journal.py +536 -0
  70. alr_emit-0.1.0/alr_emit/viewer/local_rates.py +638 -0
  71. alr_emit-0.1.0/alr_emit/viewer/orgkeys.py +244 -0
  72. alr_emit-0.1.0/alr_emit/viewer/plan_cli.py +1417 -0
  73. alr_emit-0.1.0/alr_emit/viewer/pricebook.json +851 -0
  74. alr_emit-0.1.0/alr_emit/viewer/pricebook.json.sig +1 -0
  75. alr_emit-0.1.0/alr_emit/viewer/pricebook.py +512 -0
  76. alr_emit-0.1.0/alr_emit/viewer/prices_update.py +629 -0
  77. alr_emit-0.1.0/alr_emit/viewer/pricesig.py +106 -0
  78. alr_emit-0.1.0/alr_emit/viewer/projects_check.py +191 -0
  79. alr_emit-0.1.0/alr_emit/viewer/render.py +445 -0
  80. alr_emit-0.1.0/alr_emit/viewer/resolve.py +510 -0
  81. alr_emit-0.1.0/alr_emit/viewer/summary.py +616 -0
  82. alr_emit-0.1.0/alr_emit/viewer/tags.py +51 -0
  83. alr_emit-0.1.0/examples/demo/README.md +237 -0
  84. alr_emit-0.1.0/examples/demo/dated_plan.py +55 -0
  85. alr_emit-0.1.0/examples/demo/demo_env.sh +108 -0
  86. alr_emit-0.1.0/examples/demo/hook_reply.py +10 -0
  87. alr_emit-0.1.0/examples/demo/plan.json +32 -0
  88. alr_emit-0.1.0/examples/demo/plan_records.jsonl +5 -0
  89. alr_emit-0.1.0/examples/demo/seed_corpus.sh +76 -0
  90. alr_emit-0.1.0/examples/demo/setup.sh +80 -0
  91. alr_emit-0.1.0/examples/demo/show.sh +151 -0
  92. alr_emit-0.1.0/fixtures/README.md +317 -0
  93. alr_emit-0.1.0/fixtures/claude-code/hook-event-sessionend.json +7 -0
  94. alr_emit-0.1.0/fixtures/claude-code/hook-event-stop.json +7 -0
  95. alr_emit-0.1.0/fixtures/claude-code/multi-turn/demo-project/5e551011-0000-4000-8000-000000000001/subagents/agent-a2222222222222222.jsonl +5 -0
  96. alr_emit-0.1.0/fixtures/claude-code/multi-turn/demo-project/5e551011-0000-4000-8000-000000000001.jsonl +21 -0
  97. alr_emit-0.1.0/fixtures/claude-code/subagent-layout/demo-project/c0ffee00-1111-2222-3333-444444444444/subagents/agent-a1111111111111111.jsonl +5 -0
  98. alr_emit-0.1.0/fixtures/claude-code/subagent-layout/demo-project/c0ffee00-1111-2222-3333-444444444444/subagents/agent-a1111111111111111.meta.json +1 -0
  99. alr_emit-0.1.0/fixtures/claude-code/subagent-layout/demo-project/c0ffee00-1111-2222-3333-444444444444/subagents/workflows/run-0001/agent-a2222222222222222.jsonl +2 -0
  100. alr_emit-0.1.0/fixtures/claude-code/subagent-layout/demo-project/c0ffee00-1111-2222-3333-444444444444.jsonl +5 -0
  101. alr_emit-0.1.0/fixtures/claude-code/transcript-basic.jsonl +8 -0
  102. alr_emit-0.1.0/fixtures/claude-code/transcript-traps.jsonl +11 -0
  103. alr_emit-0.1.0/fixtures/claude-p/result.json +28 -0
  104. alr_emit-0.1.0/fixtures/grok/result-cost-partial.json +19 -0
  105. alr_emit-0.1.0/fixtures/grok/result-cost-zero.json +20 -0
  106. alr_emit-0.1.0/fixtures/grok/result-usage-incomplete.json +21 -0
  107. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/README.md +28 -0
  108. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000a/events.jsonl +4 -0
  109. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000a/rewind_points.jsonl +2 -0
  110. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000a/signals.json +3 -0
  111. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000a/summary.json +6 -0
  112. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000a/usage.json +82 -0
  113. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000b/events.jsonl +8 -0
  114. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000b/rewind_points.jsonl +3 -0
  115. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000b/signals.json +3 -0
  116. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000b/summary.json +9 -0
  117. alr_emit-0.1.0/fixtures/grok-tui/fork-rewind/grok-home/sessions/%2Fwork/01f00000-0000-7000-8000-00000000000b/usage.json +186 -0
  118. alr_emit-0.1.0/fixtures/hermes/hook-sequence-0.21.5.json +788 -0
  119. alr_emit-0.1.0/fixtures/hermes/hook-sequence-0.21.6.json +795 -0
  120. alr_emit-0.1.0/fixtures/hermes/hook-sequence-orphan-ttl.json +176 -0
  121. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.alr-emit/kit/state.json +65 -0
  122. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.alr-emit/records.jsonl +5 -0
  123. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.alr-emit/sessions/claude-code/older-tags-1.tags +3 -0
  124. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.claude/commands/alr-ctl.md +9 -0
  125. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.claude/commands/alr-tag.md +9 -0
  126. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.claude/commands/alr-turns.md +9 -0
  127. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.claude/settings.json +55 -0
  128. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.local/state/openalr/sessions/claude-code/older-sess-1/changes.jsonl +2 -0
  129. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.local/state/openalr/sessions/claude-code/older-sess-1/state.json +20 -0
  130. alr_emit-0.1.0/fixtures/older-layouts/first-release/userdir/.local/state/openalr/sessions/claude-code/older-sess-1/turns.jsonl +2 -0
  131. alr_emit-0.1.0/fixtures/older-layouts/replies-release/userdir/.local/state/openalr/sessions/claude-code/older-sess-1/replies.jsonl +3 -0
  132. alr_emit-0.1.0/fixtures/sdk/usage-beta-iterations.json +37 -0
  133. alr_emit-0.1.0/fixtures/sdk/usage-full.json +19 -0
  134. alr_emit-0.1.0/fixtures/sdk/usage-object.json +5 -0
  135. alr_emit-0.1.0/kit/TRY.md +299 -0
  136. alr_emit-0.1.0/kit/plan-template.csv +3 -0
  137. alr_emit-0.1.0/kit/plan-template.xlsx +0 -0
  138. alr_emit-0.1.0/plugins/claude-code/commands/alr-ctl.md +9 -0
  139. alr_emit-0.1.0/plugins/claude-code/commands/alr-grade.md +9 -0
  140. alr_emit-0.1.0/plugins/claude-code/commands/alr-help.md +9 -0
  141. alr_emit-0.1.0/plugins/claude-code/commands/alr-plan.md +101 -0
  142. alr_emit-0.1.0/plugins/claude-code/commands/alr-prices.md +77 -0
  143. alr_emit-0.1.0/plugins/claude-code/commands/alr-tag.md +9 -0
  144. alr_emit-0.1.0/plugins/claude-code/commands/alr-turns.md +9 -0
  145. alr_emit-0.1.0/plugins/claude-code/commands/alr.md +9 -0
  146. alr_emit-0.1.0/plugins/hermes/README.md +72 -0
  147. alr_emit-0.1.0/plugins/hermes/__init__.py +77 -0
  148. alr_emit-0.1.0/plugins/hermes/plugin.yaml +14 -0
  149. alr_emit-0.1.0/pyproject.toml +82 -0
  150. alr_emit-0.1.0/spec/PROVENANCE.json +15 -0
  151. alr_emit-0.1.0/spec/VERSIONING.md +212 -0
  152. alr_emit-0.1.0/spec/schema/alr-0.1.schema.json +286 -0
  153. alr_emit-0.1.0/spec/schema/alr-acceptance-0.1.schema.json +69 -0
  154. alr_emit-0.1.0/spec/schema/alr-cost-0.1.schema.json +57 -0
  155. alr_emit-0.1.0/spec/schema/alr-grade-0.1.schema.json +50 -0
  156. alr_emit-0.1.0/spec/schema/alr-plan-0.1.schema.json +149 -0
  157. alr_emit-0.1.0/spec/schema/alr-session-0.1.schema.json +110 -0
  158. alr_emit-0.1.0/spec/schema/alr-tag-0.1.schema.json +59 -0
  159. alr_emit-0.1.0/tests/capture_support.py +57 -0
  160. alr_emit-0.1.0/tests/cc_support.py +70 -0
  161. alr_emit-0.1.0/tests/checkout_support.py +27 -0
  162. alr_emit-0.1.0/tests/cli_json_golden.py +9 -0
  163. alr_emit-0.1.0/tests/cli_json_support.py +45 -0
  164. alr_emit-0.1.0/tests/conftest.py +204 -0
  165. alr_emit-0.1.0/tests/dashboard_conformance.py +392 -0
  166. alr_emit-0.1.0/tests/dashboard_dom_harness.js +302 -0
  167. alr_emit-0.1.0/tests/dashboard_hostile_corpus.py +188 -0
  168. alr_emit-0.1.0/tests/dashboard_overview_conformance.py +257 -0
  169. alr_emit-0.1.0/tests/dashboard_page_support.py +571 -0
  170. alr_emit-0.1.0/tests/dashboard_pivot_conformance.py +270 -0
  171. alr_emit-0.1.0/tests/dashboard_quality_support.py +155 -0
  172. alr_emit-0.1.0/tests/dashboard_session_support.py +131 -0
  173. alr_emit-0.1.0/tests/dashboard_sets.py +346 -0
  174. alr_emit-0.1.0/tests/dashboard_view_support.py +60 -0
  175. alr_emit-0.1.0/tests/eager_index_support.py +68 -0
  176. alr_emit-0.1.0/tests/fake_hermes.py +303 -0
  177. alr_emit-0.1.0/tests/fixtures/openalr_examples/SOURCE.json +95 -0
  178. alr_emit-0.1.0/tests/fixtures/openalr_examples/allocated-turns.json +52 -0
  179. alr_emit-0.1.0/tests/fixtures/openalr_examples/attempts-summed.json +50 -0
  180. alr_emit-0.1.0/tests/fixtures/openalr_examples/child-cost-in-parent.json +57 -0
  181. alr_emit-0.1.0/tests/fixtures/openalr_examples/child-included.json +49 -0
  182. alr_emit-0.1.0/tests/fixtures/openalr_examples/cost-corrected-lineage.json +49 -0
  183. alr_emit-0.1.0/tests/fixtures/openalr_examples/empty-session.json +21 -0
  184. alr_emit-0.1.0/tests/fixtures/openalr_examples/forked-lineage.json +76 -0
  185. alr_emit-0.1.0/tests/fixtures/openalr_examples/full-record.json +41 -0
  186. alr_emit-0.1.0/tests/fixtures/openalr_examples/graded-lineage.json +51 -0
  187. alr_emit-0.1.0/tests/fixtures/openalr_examples/interrupted-no-usage.json +21 -0
  188. alr_emit-0.1.0/tests/fixtures/openalr_examples/interrupted-turn.json +68 -0
  189. alr_emit-0.1.0/tests/fixtures/openalr_examples/minimal-record.json +40 -0
  190. alr_emit-0.1.0/tests/fixtures/openalr_examples/plan-accepted.json +176 -0
  191. alr_emit-0.1.0/tests/fixtures/openalr_examples/plan-no-human-effort.json +42 -0
  192. alr_emit-0.1.0/tests/fixtures/openalr_examples/replan-withdrawal.json +177 -0
  193. alr_emit-0.1.0/tests/fixtures/openalr_examples/reserved-key-retag.json +48 -0
  194. alr_emit-0.1.0/tests/fixtures/openalr_examples/session-gap.json +185 -0
  195. alr_emit-0.1.0/tests/fixtures/openalr_examples/subagent-parent-turn.json +48 -0
  196. alr_emit-0.1.0/tests/fixtures/openalr_examples/superseded-lineage.json +87 -0
  197. alr_emit-0.1.0/tests/fixtures/openalr_examples/tag-amendments.json +103 -0
  198. alr_emit-0.1.0/tests/fixtures/openalr_examples/turn-chain.json +97 -0
  199. alr_emit-0.1.0/tests/fixtures/openalr_examples/turn-shares.json +79 -0
  200. alr_emit-0.1.0/tests/fixtures/openalr_tools/PROVENANCE.json +52 -0
  201. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-0.1.schema.json +286 -0
  202. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-acceptance-0.1.schema.json +69 -0
  203. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-cost-0.1.schema.json +57 -0
  204. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-grade-0.1.schema.json +50 -0
  205. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-plan-0.1.schema.json +149 -0
  206. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-session-0.1.schema.json +110 -0
  207. alr_emit-0.1.0/tests/fixtures/openalr_tools/schema/alr-tag-0.1.schema.json +59 -0
  208. alr_emit-0.1.0/tests/fixtures/openalr_tools/totals.py +740 -0
  209. alr_emit-0.1.0/tests/fixtures/openalr_tools/validate.py +335 -0
  210. alr_emit-0.1.0/tests/golden/summary/cost-shares__agent.json +133 -0
  211. alr_emit-0.1.0/tests/golden/summary/cost-shares__agent.txt +13 -0
  212. alr_emit-0.1.0/tests/golden/summary/cost-shares__day.json +441 -0
  213. alr_emit-0.1.0/tests/golden/summary/cost-shares__day.txt +25 -0
  214. alr_emit-0.1.0/tests/golden/summary/cost-shares__harness.json +133 -0
  215. alr_emit-0.1.0/tests/golden/summary/cost-shares__harness.txt +13 -0
  216. alr_emit-0.1.0/tests/golden/summary/cost-shares__model.json +133 -0
  217. alr_emit-0.1.0/tests/golden/summary/cost-shares__model.txt +13 -0
  218. alr_emit-0.1.0/tests/golden/summary/cost-shares__tag.json +771 -0
  219. alr_emit-0.1.0/tests/golden/summary/cost-shares__tag.txt +50 -0
  220. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__agent.json +146 -0
  221. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__agent.txt +13 -0
  222. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__day.json +177 -0
  223. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__day.txt +14 -0
  224. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__harness.json +146 -0
  225. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__harness.txt +13 -0
  226. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__model.json +233 -0
  227. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__model.txt +16 -0
  228. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__tag.json +177 -0
  229. alr_emit-0.1.0/tests/golden/summary/fixtures-all-together__tag.txt +15 -0
  230. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__agent.json +421 -0
  231. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__agent.txt +23 -0
  232. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__day.json +628 -0
  233. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__day.txt +30 -0
  234. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__harness.json +261 -0
  235. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__harness.txt +18 -0
  236. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__model.json +292 -0
  237. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__model.txt +19 -0
  238. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__tag.json +613 -0
  239. alr_emit-0.1.0/tests/golden/summary/openalr-examples-all-together__tag.txt +31 -0
  240. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__agent.json +135 -0
  241. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__agent.txt +12 -0
  242. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__day.json +104 -0
  243. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__day.txt +11 -0
  244. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__harness.json +135 -0
  245. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__harness.txt +12 -0
  246. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__model.json +166 -0
  247. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__model.txt +13 -0
  248. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__tag.json +104 -0
  249. alr_emit-0.1.0/tests/golden/summary/partial-unknown-synthetic-mix__tag.txt +12 -0
  250. alr_emit-0.1.0/tests/golden/summary/tag-order__agent.json +88 -0
  251. alr_emit-0.1.0/tests/golden/summary/tag-order__agent.txt +10 -0
  252. alr_emit-0.1.0/tests/golden/summary/tag-order__day.json +88 -0
  253. alr_emit-0.1.0/tests/golden/summary/tag-order__day.txt +10 -0
  254. alr_emit-0.1.0/tests/golden/summary/tag-order__harness.json +88 -0
  255. alr_emit-0.1.0/tests/golden/summary/tag-order__harness.txt +10 -0
  256. alr_emit-0.1.0/tests/golden/summary/tag-order__model.json +88 -0
  257. alr_emit-0.1.0/tests/golden/summary/tag-order__model.txt +10 -0
  258. alr_emit-0.1.0/tests/golden/summary/tag-order__tag.json +305 -0
  259. alr_emit-0.1.0/tests/golden/summary/tag-order__tag.txt +18 -0
  260. alr_emit-0.1.0/tests/golden/summary/turn-shares__agent.json +187 -0
  261. alr_emit-0.1.0/tests/golden/summary/turn-shares__agent.txt +15 -0
  262. alr_emit-0.1.0/tests/golden/summary/turn-shares__day.json +104 -0
  263. alr_emit-0.1.0/tests/golden/summary/turn-shares__day.txt +12 -0
  264. alr_emit-0.1.0/tests/golden/summary/turn-shares__harness.json +104 -0
  265. alr_emit-0.1.0/tests/golden/summary/turn-shares__harness.txt +12 -0
  266. alr_emit-0.1.0/tests/golden/summary/turn-shares__model.json +129 -0
  267. alr_emit-0.1.0/tests/golden/summary/turn-shares__model.txt +13 -0
  268. alr_emit-0.1.0/tests/golden/summary/turn-shares__tag.json +253 -0
  269. alr_emit-0.1.0/tests/golden/summary/turn-shares__tag.txt +18 -0
  270. alr_emit-0.1.0/tests/golden_summary_support.py +141 -0
  271. alr_emit-0.1.0/tests/home_guard.py +729 -0
  272. alr_emit-0.1.0/tests/hostile_names.py +39 -0
  273. alr_emit-0.1.0/tests/journal_support.py +102 -0
  274. alr_emit-0.1.0/tests/malformed_corpus.py +310 -0
  275. alr_emit-0.1.0/tests/older_price_book.py +74 -0
  276. alr_emit-0.1.0/tests/org_signer.py +29 -0
  277. alr_emit-0.1.0/tests/pricebook_vectors/rfc8032-7.1.txt +41 -0
  278. alr_emit-0.1.0/tests/pricebook_vectors/test-book-tampered.json +48 -0
  279. alr_emit-0.1.0/tests/pricebook_vectors/test-book.json +48 -0
  280. alr_emit-0.1.0/tests/pricebook_vectors/test-book.json.sig +1 -0
  281. alr_emit-0.1.0/tests/pricebook_vectors_0_3/test-book-tampered.json +72 -0
  282. alr_emit-0.1.0/tests/pricebook_vectors_0_3/test-book.json +72 -0
  283. alr_emit-0.1.0/tests/pricebook_vectors_0_3/test-book.json.sig +1 -0
  284. alr_emit-0.1.0/tests/refuse_real_home.py +12 -0
  285. alr_emit-0.1.0/tests/reserved_key_support.py +76 -0
  286. alr_emit-0.1.0/tests/syslog_prompt_receiver.py +140 -0
  287. alr_emit-0.1.0/tests/syslog_support.py +328 -0
  288. alr_emit-0.1.0/tests/taskshare_support.py +201 -0
  289. alr_emit-0.1.0/tests/test_accept_cli.py +299 -0
  290. alr_emit-0.1.0/tests/test_alr_emit.py +725 -0
  291. alr_emit-0.1.0/tests/test_alr_turns_command.py +257 -0
  292. alr_emit-0.1.0/tests/test_ascii_digits_only.py +176 -0
  293. alr_emit-0.1.0/tests/test_atomicfile.py +146 -0
  294. alr_emit-0.1.0/tests/test_backup_sibling_link.py +76 -0
  295. alr_emit-0.1.0/tests/test_check_config_lines_by_home.py +132 -0
  296. alr_emit-0.1.0/tests/test_check_otel_sink.py +539 -0
  297. alr_emit-0.1.0/tests/test_ci_smoke_subset.py +48 -0
  298. alr_emit-0.1.0/tests/test_claude_code_command_turns.py +110 -0
  299. alr_emit-0.1.0/tests/test_claude_code_injected_prompt_pair.py +204 -0
  300. alr_emit-0.1.0/tests/test_claude_code_kill_cost.py +145 -0
  301. alr_emit-0.1.0/tests/test_claude_code_notice_readers.py +120 -0
  302. alr_emit-0.1.0/tests/test_claude_code_notice_reservations.py +196 -0
  303. alr_emit-0.1.0/tests/test_claude_code_notification_turn.py +195 -0
  304. alr_emit-0.1.0/tests/test_claude_code_price_split.py +133 -0
  305. alr_emit-0.1.0/tests/test_claude_code_real_296.py +404 -0
  306. alr_emit-0.1.0/tests/test_claude_code_real_tui_296.py +265 -0
  307. alr_emit-0.1.0/tests/test_claude_code_restated_tags.py +106 -0
  308. alr_emit-0.1.0/tests/test_claude_code_sink_known_limits.py +86 -0
  309. alr_emit-0.1.0/tests/test_claude_code_stop_settle.py +228 -0
  310. alr_emit-0.1.0/tests/test_claude_code_tui_replay.py +330 -0
  311. alr_emit-0.1.0/tests/test_claude_code_turn_cost.py +401 -0
  312. alr_emit-0.1.0/tests/test_claude_code_turn_numbering.py +150 -0
  313. alr_emit-0.1.0/tests/test_claude_code_turns.py +704 -0
  314. alr_emit-0.1.0/tests/test_claude_code_unallocated.py +111 -0
  315. alr_emit-0.1.0/tests/test_cli_json.py +314 -0
  316. alr_emit-0.1.0/tests/test_config_credential_display.py +66 -0
  317. alr_emit-0.1.0/tests/test_config_not_utf8.py +164 -0
  318. alr_emit-0.1.0/tests/test_config_scope_table.py +376 -0
  319. alr_emit-0.1.0/tests/test_config_sources_and_refusals.py +134 -0
  320. alr_emit-0.1.0/tests/test_config_toml.py +263 -0
  321. alr_emit-0.1.0/tests/test_config_unreadable_note.py +105 -0
  322. alr_emit-0.1.0/tests/test_dashboard_a11y_contrast.py +536 -0
  323. alr_emit-0.1.0/tests/test_dashboard_a11y_keyboard.py +224 -0
  324. alr_emit-0.1.0/tests/test_dashboard_a11y_offline.py +135 -0
  325. alr_emit-0.1.0/tests/test_dashboard_breakdown_controls.py +252 -0
  326. alr_emit-0.1.0/tests/test_dashboard_breakdown_export.py +133 -0
  327. alr_emit-0.1.0/tests/test_dashboard_breakdown_filters.py +182 -0
  328. alr_emit-0.1.0/tests/test_dashboard_breakdown_fragment.py +255 -0
  329. alr_emit-0.1.0/tests/test_dashboard_breakdown_hostile.py +143 -0
  330. alr_emit-0.1.0/tests/test_dashboard_breakdown_keyboard.py +140 -0
  331. alr_emit-0.1.0/tests/test_dashboard_breakdown_view_conformance.py +423 -0
  332. alr_emit-0.1.0/tests/test_dashboard_build_details.py +276 -0
  333. alr_emit-0.1.0/tests/test_dashboard_conformance_suite.py +147 -0
  334. alr_emit-0.1.0/tests/test_dashboard_conformance_texts.py +37 -0
  335. alr_emit-0.1.0/tests/test_dashboard_csp_every_page.py +146 -0
  336. alr_emit-0.1.0/tests/test_dashboard_csv_header_literals.py +71 -0
  337. alr_emit-0.1.0/tests/test_dashboard_csv_pipe_guard.py +44 -0
  338. alr_emit-0.1.0/tests/test_dashboard_data.py +949 -0
  339. alr_emit-0.1.0/tests/test_dashboard_escaping.py +272 -0
  340. alr_emit-0.1.0/tests/test_dashboard_ev.py +161 -0
  341. alr_emit-0.1.0/tests/test_dashboard_ev_display.py +115 -0
  342. alr_emit-0.1.0/tests/test_dashboard_ev_screen.py +706 -0
  343. alr_emit-0.1.0/tests/test_dashboard_fragment_scaffold.py +89 -0
  344. alr_emit-0.1.0/tests/test_dashboard_grade_shares.py +118 -0
  345. alr_emit-0.1.0/tests/test_dashboard_header_inputs.py +94 -0
  346. alr_emit-0.1.0/tests/test_dashboard_header_text.py +47 -0
  347. alr_emit-0.1.0/tests/test_dashboard_header_theme.py +477 -0
  348. alr_emit-0.1.0/tests/test_dashboard_health_conformance.py +283 -0
  349. alr_emit-0.1.0/tests/test_dashboard_health_screen.py +241 -0
  350. alr_emit-0.1.0/tests/test_dashboard_home_paths.py +220 -0
  351. alr_emit-0.1.0/tests/test_dashboard_hostile.py +202 -0
  352. alr_emit-0.1.0/tests/test_dashboard_hostile_corpus.py +109 -0
  353. alr_emit-0.1.0/tests/test_dashboard_hostile_corpus_escaping.py +217 -0
  354. alr_emit-0.1.0/tests/test_dashboard_incomplete_cost.py +191 -0
  355. alr_emit-0.1.0/tests/test_dashboard_label_allowlist.py +128 -0
  356. alr_emit-0.1.0/tests/test_dashboard_ledger_export.py +74 -0
  357. alr_emit-0.1.0/tests/test_dashboard_local_rate.py +454 -0
  358. alr_emit-0.1.0/tests/test_dashboard_notes_below.py +256 -0
  359. alr_emit-0.1.0/tests/test_dashboard_number_forms.py +303 -0
  360. alr_emit-0.1.0/tests/test_dashboard_offline.py +123 -0
  361. alr_emit-0.1.0/tests/test_dashboard_open.py +205 -0
  362. alr_emit-0.1.0/tests/test_dashboard_overview.py +311 -0
  363. alr_emit-0.1.0/tests/test_dashboard_overview_conformance.py +197 -0
  364. alr_emit-0.1.0/tests/test_dashboard_overview_figures.py +412 -0
  365. alr_emit-0.1.0/tests/test_dashboard_page.py +135 -0
  366. alr_emit-0.1.0/tests/test_dashboard_page_conformance.py +138 -0
  367. alr_emit-0.1.0/tests/test_dashboard_page_map.py +292 -0
  368. alr_emit-0.1.0/tests/test_dashboard_pivot.py +279 -0
  369. alr_emit-0.1.0/tests/test_dashboard_pivot_conformance.py +292 -0
  370. alr_emit-0.1.0/tests/test_dashboard_pivot_csv.py +249 -0
  371. alr_emit-0.1.0/tests/test_dashboard_pivot_hostile.py +126 -0
  372. alr_emit-0.1.0/tests/test_dashboard_pivot_measures.py +249 -0
  373. alr_emit-0.1.0/tests/test_dashboard_pivot_special_rows.py +122 -0
  374. alr_emit-0.1.0/tests/test_dashboard_plain_words.py +209 -0
  375. alr_emit-0.1.0/tests/test_dashboard_plans_only.py +62 -0
  376. alr_emit-0.1.0/tests/test_dashboard_price_book_named.py +197 -0
  377. alr_emit-0.1.0/tests/test_dashboard_quality.py +312 -0
  378. alr_emit-0.1.0/tests/test_dashboard_quality_conformance.py +230 -0
  379. alr_emit-0.1.0/tests/test_dashboard_quality_hostile.py +247 -0
  380. alr_emit-0.1.0/tests/test_dashboard_quality_redact.py +116 -0
  381. alr_emit-0.1.0/tests/test_dashboard_redact.py +370 -0
  382. alr_emit-0.1.0/tests/test_dashboard_redact_grep.py +185 -0
  383. alr_emit-0.1.0/tests/test_dashboard_redact_grep_sets.py +1924 -0
  384. alr_emit-0.1.0/tests/test_dashboard_required_tags.py +171 -0
  385. alr_emit-0.1.0/tests/test_dashboard_required_tags_conformance.py +81 -0
  386. alr_emit-0.1.0/tests/test_dashboard_required_tags_screen.py +107 -0
  387. alr_emit-0.1.0/tests/test_dashboard_reserved_label.py +239 -0
  388. alr_emit-0.1.0/tests/test_dashboard_session_bases.py +92 -0
  389. alr_emit-0.1.0/tests/test_dashboard_session_conformance.py +153 -0
  390. alr_emit-0.1.0/tests/test_dashboard_session_drill.py +205 -0
  391. alr_emit-0.1.0/tests/test_dashboard_session_export.py +96 -0
  392. alr_emit-0.1.0/tests/test_dashboard_session_hostile.py +210 -0
  393. alr_emit-0.1.0/tests/test_dashboard_session_synthetic.py +136 -0
  394. alr_emit-0.1.0/tests/test_dashboard_session_verdicts.py +32 -0
  395. alr_emit-0.1.0/tests/test_dashboard_sessions.py +154 -0
  396. alr_emit-0.1.0/tests/test_dashboard_shares.py +538 -0
  397. alr_emit-0.1.0/tests/test_dashboard_site.py +259 -0
  398. alr_emit-0.1.0/tests/test_dashboard_spec_examples.py +91 -0
  399. alr_emit-0.1.0/tests/test_dashboard_synthetic_text.py +70 -0
  400. alr_emit-0.1.0/tests/test_dashboard_table_controls.py +85 -0
  401. alr_emit-0.1.0/tests/test_dashboard_taskshare.py +192 -0
  402. alr_emit-0.1.0/tests/test_dashboard_title_case.py +418 -0
  403. alr_emit-0.1.0/tests/test_dashboard_trust_links.py +230 -0
  404. alr_emit-0.1.0/tests/test_dashboard_two_rows.py +345 -0
  405. alr_emit-0.1.0/tests/test_dashboard_unsafe_integers.py +149 -0
  406. alr_emit-0.1.0/tests/test_dashboard_view_address_text.py +57 -0
  407. alr_emit-0.1.0/tests/test_dashboard_walkthrough_text.py +307 -0
  408. alr_emit-0.1.0/tests/test_demo_kit.py +678 -0
  409. alr_emit-0.1.0/tests/test_demo_kit_ev.py +311 -0
  410. alr_emit-0.1.0/tests/test_docs_agree_with_kit.py +80 -0
  411. alr_emit-0.1.0/tests/test_docs_harness_versions.py +133 -0
  412. alr_emit-0.1.0/tests/test_eager_index_claude_code.py +139 -0
  413. alr_emit-0.1.0/tests/test_eager_index_hermes.py +147 -0
  414. alr_emit-0.1.0/tests/test_ed25519_verify.py +194 -0
  415. alr_emit-0.1.0/tests/test_emit_home.py +336 -0
  416. alr_emit-0.1.0/tests/test_emit_tag_layers_named.py +114 -0
  417. alr_emit-0.1.0/tests/test_emitter_stream_safety.py +78 -0
  418. alr_emit-0.1.0/tests/test_env_constants_have_comments.py +166 -0
  419. alr_emit-0.1.0/tests/test_ev.py +579 -0
  420. alr_emit-0.1.0/tests/test_ev_cli.py +217 -0
  421. alr_emit-0.1.0/tests/test_ev_taskshare.py +170 -0
  422. alr_emit-0.1.0/tests/test_every_shape_validates.py +1017 -0
  423. alr_emit-0.1.0/tests/test_exception_notes.py +977 -0
  424. alr_emit-0.1.0/tests/test_export_definition.py +492 -0
  425. alr_emit-0.1.0/tests/test_final_newline_refused.py +88 -0
  426. alr_emit-0.1.0/tests/test_gen_docs_reference.py +1005 -0
  427. alr_emit-0.1.0/tests/test_grade_picker.py +509 -0
  428. alr_emit-0.1.0/tests/test_grok_purges_write.py +41 -0
  429. alr_emit-0.1.0/tests/test_grok_session_events.py +61 -0
  430. alr_emit-0.1.0/tests/test_grok_tui.py +363 -0
  431. alr_emit-0.1.0/tests/test_grok_tui_backfill_scope.py +137 -0
  432. alr_emit-0.1.0/tests/test_grok_tui_blocked_tag.py +163 -0
  433. alr_emit-0.1.0/tests/test_grok_tui_blocked_tag_replay.py +251 -0
  434. alr_emit-0.1.0/tests/test_grok_tui_cancel_index.py +263 -0
  435. alr_emit-0.1.0/tests/test_grok_tui_first_event.py +743 -0
  436. alr_emit-0.1.0/tests/test_grok_tui_fork.py +429 -0
  437. alr_emit-0.1.0/tests/test_grok_tui_is_subagent.py +42 -0
  438. alr_emit-0.1.0/tests/test_grok_tui_journal_identity.py +193 -0
  439. alr_emit-0.1.0/tests/test_grok_tui_journal_pairing.py +159 -0
  440. alr_emit-0.1.0/tests/test_grok_tui_late_turn_started.py +83 -0
  441. alr_emit-0.1.0/tests/test_grok_tui_legacy_space.py +128 -0
  442. alr_emit-0.1.0/tests/test_grok_tui_numbering_space.py +242 -0
  443. alr_emit-0.1.0/tests/test_grok_tui_numbering_upgrade.py +280 -0
  444. alr_emit-0.1.0/tests/test_grok_tui_renumbered_journal.py +138 -0
  445. alr_emit-0.1.0/tests/test_grok_tui_turn_close_and_subagents.py +389 -0
  446. alr_emit-0.1.0/tests/test_grok_tui_turn_identity.py +263 -0
  447. alr_emit-0.1.0/tests/test_help_screen_and_grade.py +603 -0
  448. alr_emit-0.1.0/tests/test_hermes_config_edit_mode.py +63 -0
  449. alr_emit-0.1.0/tests/test_hermes_eager_index_and_commands.py +310 -0
  450. alr_emit-0.1.0/tests/test_hermes_enable_offline.py +45 -0
  451. alr_emit-0.1.0/tests/test_hermes_grok_sdk_adapters.py +536 -0
  452. alr_emit-0.1.0/tests/test_hermes_hooks.py +382 -0
  453. alr_emit-0.1.0/tests/test_hermes_real_0216.py +182 -0
  454. alr_emit-0.1.0/tests/test_hermes_session_cwd.py +109 -0
  455. alr_emit-0.1.0/tests/test_hermes_subagent_row.py +222 -0
  456. alr_emit-0.1.0/tests/test_hermes_turns.py +336 -0
  457. alr_emit-0.1.0/tests/test_home_guard.py +1716 -0
  458. alr_emit-0.1.0/tests/test_home_guard_putenv_children.py +239 -0
  459. alr_emit-0.1.0/tests/test_home_guard_windows.py +152 -0
  460. alr_emit-0.1.0/tests/test_hook_label.py +140 -0
  461. alr_emit-0.1.0/tests/test_hook_stdin_utf8.py +89 -0
  462. alr_emit-0.1.0/tests/test_hostile_names.py +41 -0
  463. alr_emit-0.1.0/tests/test_hostile_notes_and_paths.py +326 -0
  464. alr_emit-0.1.0/tests/test_hostile_repository.py +719 -0
  465. alr_emit-0.1.0/tests/test_install_preview.py +111 -0
  466. alr_emit-0.1.0/tests/test_interrupted_conformance.py +195 -0
  467. alr_emit-0.1.0/tests/test_journal.py +196 -0
  468. alr_emit-0.1.0/tests/test_journal_csv_formula_guard.py +31 -0
  469. alr_emit-0.1.0/tests/test_journal_export_temp_files.py +73 -0
  470. alr_emit-0.1.0/tests/test_journal_idempotence.py +113 -0
  471. alr_emit-0.1.0/tests/test_journal_late_corrections.py +59 -0
  472. alr_emit-0.1.0/tests/test_journal_layout.py +99 -0
  473. alr_emit-0.1.0/tests/test_journal_map.py +223 -0
  474. alr_emit-0.1.0/tests/test_journal_money.py +248 -0
  475. alr_emit-0.1.0/tests/test_journal_profiles.py +276 -0
  476. alr_emit-0.1.0/tests/test_journal_reserved_keys.py +122 -0
  477. alr_emit-0.1.0/tests/test_journal_rules.py +170 -0
  478. alr_emit-0.1.0/tests/test_journal_split.py +288 -0
  479. alr_emit-0.1.0/tests/test_kit.py +666 -0
  480. alr_emit-0.1.0/tests/test_kit_apply_atomic.py +71 -0
  481. alr_emit-0.1.0/tests/test_kit_hermes.py +807 -0
  482. alr_emit-0.1.0/tests/test_kit_hermes_leftovers.py +109 -0
  483. alr_emit-0.1.0/tests/test_kit_state_containment.py +180 -0
  484. alr_emit-0.1.0/tests/test_kit_state_write.py +47 -0
  485. alr_emit-0.1.0/tests/test_kit_upgrade.py +253 -0
  486. alr_emit-0.1.0/tests/test_leak_scan.py +437 -0
  487. alr_emit-0.1.0/tests/test_line_endings.py +120 -0
  488. alr_emit-0.1.0/tests/test_local_rate_figures.py +349 -0
  489. alr_emit-0.1.0/tests/test_local_rate_invariants.py +120 -0
  490. alr_emit-0.1.0/tests/test_local_rates_file.py +343 -0
  491. alr_emit-0.1.0/tests/test_malformed_corpus.py +58 -0
  492. alr_emit-0.1.0/tests/test_malformed_readers.py +688 -0
  493. alr_emit-0.1.0/tests/test_managed_profile_docs.py +51 -0
  494. alr_emit-0.1.0/tests/test_no_internal_labels.py +492 -0
  495. alr_emit-0.1.0/tests/test_no_review_labels.py +45 -0
  496. alr_emit-0.1.0/tests/test_older_layouts.py +263 -0
  497. alr_emit-0.1.0/tests/test_one_home.py +138 -0
  498. alr_emit-0.1.0/tests/test_otel_env.py +292 -0
  499. alr_emit-0.1.0/tests/test_otel_sink.py +285 -0
  500. alr_emit-0.1.0/tests/test_otel_sink_hardening.py +114 -0
  501. alr_emit-0.1.0/tests/test_otel_sink_received.py +147 -0
  502. alr_emit-0.1.0/tests/test_otel_spool_names.py +70 -0
  503. alr_emit-0.1.0/tests/test_otel_start_stop_status.py +1579 -0
  504. alr_emit-0.1.0/tests/test_output_paths.py +597 -0
  505. alr_emit-0.1.0/tests/test_phase_ordinary_tag.py +71 -0
  506. alr_emit-0.1.0/tests/test_plan_cli.py +627 -0
  507. alr_emit-0.1.0/tests/test_plan_cli_docs.py +132 -0
  508. alr_emit-0.1.0/tests/test_plan_csv.py +245 -0
  509. alr_emit-0.1.0/tests/test_plan_csv_messages.py +137 -0
  510. alr_emit-0.1.0/tests/test_plan_csv_revise.py +266 -0
  511. alr_emit-0.1.0/tests/test_plan_documents.py +930 -0
  512. alr_emit-0.1.0/tests/test_plan_free_text_cap.py +199 -0
  513. alr_emit-0.1.0/tests/test_plan_interactive.py +341 -0
  514. alr_emit-0.1.0/tests/test_plan_interview.py +218 -0
  515. alr_emit-0.1.0/tests/test_plan_interview_quoting.py +41 -0
  516. alr_emit-0.1.0/tests/test_plan_interview_revise.py +175 -0
  517. alr_emit-0.1.0/tests/test_plan_interview_tags.py +133 -0
  518. alr_emit-0.1.0/tests/test_plan_level_file.py +106 -0
  519. alr_emit-0.1.0/tests/test_plan_read_side.py +264 -0
  520. alr_emit-0.1.0/tests/test_plan_show_held.py +78 -0
  521. alr_emit-0.1.0/tests/test_plan_sink_reader.py +678 -0
  522. alr_emit-0.1.0/tests/test_plan_slash_install.py +225 -0
  523. alr_emit-0.1.0/tests/test_plan_slash_passthrough.py +202 -0
  524. alr_emit-0.1.0/tests/test_plan_tag_reports.py +139 -0
  525. alr_emit-0.1.0/tests/test_plan_task_tags.py +217 -0
  526. alr_emit-0.1.0/tests/test_plan_workbook.py +293 -0
  527. alr_emit-0.1.0/tests/test_plan_workbook_bounds.py +226 -0
  528. alr_emit-0.1.0/tests/test_plan_workbook_hostile.py +358 -0
  529. alr_emit-0.1.0/tests/test_plan_workbook_text_caps.py +332 -0
  530. alr_emit-0.1.0/tests/test_plan_workbook_token_caps.py +389 -0
  531. alr_emit-0.1.0/tests/test_plan_workbook_zip_methods.py +249 -0
  532. alr_emit-0.1.0/tests/test_price_book_keys_config.py +279 -0
  533. alr_emit-0.1.0/tests/test_price_book_keys_docs.py +83 -0
  534. alr_emit-0.1.0/tests/test_price_book_keys_import_update.py +197 -0
  535. alr_emit-0.1.0/tests/test_price_book_keys_repo_modes.py +92 -0
  536. alr_emit-0.1.0/tests/test_price_book_keys_show.py +137 -0
  537. alr_emit-0.1.0/tests/test_price_book_keys_verify.py +161 -0
  538. alr_emit-0.1.0/tests/test_pricebook_bundled.py +105 -0
  539. alr_emit-0.1.0/tests/test_pricebook_dated.py +222 -0
  540. alr_emit-0.1.0/tests/test_pricebook_v03.py +225 -0
  541. alr_emit-0.1.0/tests/test_pricebook_v03_vectors.py +94 -0
  542. alr_emit-0.1.0/tests/test_prices_docs.py +226 -0
  543. alr_emit-0.1.0/tests/test_prices_dry_run.py +367 -0
  544. alr_emit-0.1.0/tests/test_prices_import.py +146 -0
  545. alr_emit-0.1.0/tests/test_prices_interview.py +487 -0
  546. alr_emit-0.1.0/tests/test_prices_interview_view.py +160 -0
  547. alr_emit-0.1.0/tests/test_prices_local.py +198 -0
  548. alr_emit-0.1.0/tests/test_prices_reset.py +364 -0
  549. alr_emit-0.1.0/tests/test_prices_show_metadata.py +86 -0
  550. alr_emit-0.1.0/tests/test_prices_show_source.py +196 -0
  551. alr_emit-0.1.0/tests/test_prices_stored.py +142 -0
  552. alr_emit-0.1.0/tests/test_prices_update.py +1224 -0
  553. alr_emit-0.1.0/tests/test_prices_url_messages.py +76 -0
  554. alr_emit-0.1.0/tests/test_prices_v03_signed.py +200 -0
  555. alr_emit-0.1.0/tests/test_private_record_files.py +124 -0
  556. alr_emit-0.1.0/tests/test_product_name_grok_build.py +53 -0
  557. alr_emit-0.1.0/tests/test_profile_deprecation.py +354 -0
  558. alr_emit-0.1.0/tests/test_profile_managed.py +265 -0
  559. alr_emit-0.1.0/tests/test_profile_protections.py +399 -0
  560. alr_emit-0.1.0/tests/test_profile_words.py +70 -0
  561. alr_emit-0.1.0/tests/test_project_config_never_sets_personal_keys.py +206 -0
  562. alr_emit-0.1.0/tests/test_project_names.py +364 -0
  563. alr_emit-0.1.0/tests/test_project_tag_file_safety.py +149 -0
  564. alr_emit-0.1.0/tests/test_projects_check.py +470 -0
  565. alr_emit-0.1.0/tests/test_projects_loader.py +392 -0
  566. alr_emit-0.1.0/tests/test_provider_credential.py +662 -0
  567. alr_emit-0.1.0/tests/test_purge.py +964 -0
  568. alr_emit-0.1.0/tests/test_readme_alr_plan.py +42 -0
  569. alr_emit-0.1.0/tests/test_readme_check_scope_docs.py +91 -0
  570. alr_emit-0.1.0/tests/test_readme_claude_hooks.py +40 -0
  571. alr_emit-0.1.0/tests/test_readme_config_and_costs.py +126 -0
  572. alr_emit-0.1.0/tests/test_readme_dashboard_health.py +18 -0
  573. alr_emit-0.1.0/tests/test_readme_dashboard_page.py +164 -0
  574. alr_emit-0.1.0/tests/test_readme_dollars_never_measured.py +63 -0
  575. alr_emit-0.1.0/tests/test_readme_grok_hook_file.py +58 -0
  576. alr_emit-0.1.0/tests/test_readme_grok_tui.py +168 -0
  577. alr_emit-0.1.0/tests/test_readme_local_rates_rules.py +119 -0
  578. alr_emit-0.1.0/tests/test_readme_summary_dimensions.py +34 -0
  579. alr_emit-0.1.0/tests/test_record_file_dangling_link.py +335 -0
  580. alr_emit-0.1.0/tests/test_record_file_mode.py +181 -0
  581. alr_emit-0.1.0/tests/test_release_known_limits.py +342 -0
  582. alr_emit-0.1.0/tests/test_release_workflows.py +607 -0
  583. alr_emit-0.1.0/tests/test_reply_journal.py +552 -0
  584. alr_emit-0.1.0/tests/test_repo_trust.py +322 -0
  585. alr_emit-0.1.0/tests/test_required_tags.py +87 -0
  586. alr_emit-0.1.0/tests/test_reserved_note_add.py +37 -0
  587. alr_emit-0.1.0/tests/test_reserved_note_migration.py +21 -0
  588. alr_emit-0.1.0/tests/test_reserved_tags.py +79 -0
  589. alr_emit-0.1.0/tests/test_reserved_value_checks.py +281 -0
  590. alr_emit-0.1.0/tests/test_retag_step4.py +55 -0
  591. alr_emit-0.1.0/tests/test_routing_hostile_repository.py +352 -0
  592. alr_emit-0.1.0/tests/test_routing_said_loudly.py +274 -0
  593. alr_emit-0.1.0/tests/test_routing_table.py +571 -0
  594. alr_emit-0.1.0/tests/test_sdk_real_1130.py +50 -0
  595. alr_emit-0.1.0/tests/test_sdk_session.py +341 -0
  596. alr_emit-0.1.0/tests/test_sdk_usage.py +158 -0
  597. alr_emit-0.1.0/tests/test_session_commands.py +559 -0
  598. alr_emit-0.1.0/tests/test_session_events.py +107 -0
  599. alr_emit-0.1.0/tests/test_session_id_allowlist.py +89 -0
  600. alr_emit-0.1.0/tests/test_shipped_vocabulary.py +145 -0
  601. alr_emit-0.1.0/tests/test_spec_in_wheel.py +175 -0
  602. alr_emit-0.1.0/tests/test_stream_safety.py +122 -0
  603. alr_emit-0.1.0/tests/test_subagent_layout.py +1059 -0
  604. alr_emit-0.1.0/tests/test_summary_golden.py +76 -0
  605. alr_emit-0.1.0/tests/test_summary_help_width.py +35 -0
  606. alr_emit-0.1.0/tests/test_summary_reserved_keys.py +241 -0
  607. alr_emit-0.1.0/tests/test_summary_reserved_keys_sets.py +120 -0
  608. alr_emit-0.1.0/tests/test_summary_taskshare.py +163 -0
  609. alr_emit-0.1.0/tests/test_syslog_delivery.py +1260 -0
  610. alr_emit-0.1.0/tests/test_syslog_frame.py +305 -0
  611. alr_emit-0.1.0/tests/test_syslog_send.py +383 -0
  612. alr_emit-0.1.0/tests/test_syslog_support_linger.py +46 -0
  613. alr_emit-0.1.0/tests/test_syslog_tls.py +189 -0
  614. alr_emit-0.1.0/tests/test_syslog_tls_end_class.py +85 -0
  615. alr_emit-0.1.0/tests/test_syslog_tls_python.py +156 -0
  616. alr_emit-0.1.0/tests/test_syslog_transport.py +618 -0
  617. alr_emit-0.1.0/tests/test_tag_argument_order.py +91 -0
  618. alr_emit-0.1.0/tests/test_tag_grammar_docs.py +69 -0
  619. alr_emit-0.1.0/tests/test_tag_layer_order_both_paths.py +131 -0
  620. alr_emit-0.1.0/tests/test_tag_lists.py +325 -0
  621. alr_emit-0.1.0/tests/test_tag_model.py +269 -0
  622. alr_emit-0.1.0/tests/test_tag_move.py +898 -0
  623. alr_emit-0.1.0/tests/test_tag_move_checks.py +330 -0
  624. alr_emit-0.1.0/tests/test_tag_pattern_fullmatch.py +75 -0
  625. alr_emit-0.1.0/tests/test_tag_picker.py +305 -0
  626. alr_emit-0.1.0/tests/test_tag_project_rejudge.py +118 -0
  627. alr_emit-0.1.0/tests/test_tag_refusals_no_echo.py +51 -0
  628. alr_emit-0.1.0/tests/test_tag_undo.py +148 -0
  629. alr_emit-0.1.0/tests/test_tagging_unsafe_session.py +39 -0
  630. alr_emit-0.1.0/tests/test_tags.py +615 -0
  631. alr_emit-0.1.0/tests/test_task_class_refused_where_set.py +270 -0
  632. alr_emit-0.1.0/tests/test_taskshare_docs.py +42 -0
  633. alr_emit-0.1.0/tests/test_turn_index_space.py +28 -0
  634. alr_emit-0.1.0/tests/test_turn_journal_lines.py +245 -0
  635. alr_emit-0.1.0/tests/test_turn_zone.py +49 -0
  636. alr_emit-0.1.0/tests/test_turn_zone_local.py +121 -0
  637. alr_emit-0.1.0/tests/test_turn_zone_windows.py +49 -0
  638. alr_emit-0.1.0/tests/test_turns_labels.py +32 -0
  639. alr_emit-0.1.0/tests/test_turns_order_and_aux.py +138 -0
  640. alr_emit-0.1.0/tests/test_validate_conformance.py +486 -0
  641. alr_emit-0.1.0/tests/test_validate_cost_share.py +139 -0
  642. alr_emit-0.1.0/tests/test_vendored_openalr_tools.py +92 -0
  643. alr_emit-0.1.0/tests/test_viewer.py +1005 -0
  644. alr_emit-0.1.0/tests/test_viewer_cost_share.py +212 -0
  645. alr_emit-0.1.0/tests/test_viewer_turn_grain.py +84 -0
  646. alr_emit-0.1.0/tests/test_work_type_ambiguous.py +102 -0
  647. alr_emit-0.1.0/tests/test_work_type_reports.py +111 -0
  648. alr_emit-0.1.0/tests/test_work_type_reserved.py +138 -0
  649. alr_emit-0.1.0/tests/test_xai_reasoning.py +98 -0
  650. alr_emit-0.1.0/tests/test_xfail_marks.py +146 -0
  651. alr_emit-0.1.0/tests/tls_end_probe.py +73 -0
  652. alr_emit-0.1.0/tests/tls_support.py +88 -0
  653. alr_emit-0.1.0/tools/README.md +145 -0
  654. alr_emit-0.1.0/tools/check_dists.py +162 -0
  655. alr_emit-0.1.0/tools/check_installed.py +85 -0
  656. alr_emit-0.1.0/tools/gen_docs_reference.py +1027 -0
  657. alr_emit-0.1.0/tools/gen_plan_workbook.py +47 -0
  658. alr_emit-0.1.0/tools/harness_test/alr_harness_test/__init__.py +9 -0
  659. alr_emit-0.1.0/tools/harness_test/alr_harness_test/__main__.py +5 -0
  660. alr_emit-0.1.0/tools/harness_test/alr_harness_test/alr_assert.py +183 -0
  661. alr_emit-0.1.0/tools/harness_test/alr_harness_test/cli.py +218 -0
  662. alr_emit-0.1.0/tools/harness_test/alr_harness_test/harness.py +63 -0
  663. alr_emit-0.1.0/tools/harness_test/alr_harness_test/results.py +76 -0
  664. alr_emit-0.1.0/tools/harness_test/alr_harness_test/runner.py +171 -0
  665. alr_emit-0.1.0/tools/harness_test/alr_harness_test/sandbox.py +178 -0
  666. alr_emit-0.1.0/tools/harness_test/alr_harness_test/scenario.py +123 -0
  667. alr_emit-0.1.0/tools/harness_test/alr_harness_test/scenarios.py +125 -0
  668. alr_emit-0.1.0/tools/harness_test/alr_harness_test/terminal.py +335 -0
  669. alr_emit-0.1.0/tools/harness_test/tests/conftest.py +78 -0
  670. alr_emit-0.1.0/tools/harness_test/tests/fake_tmux.py +45 -0
  671. alr_emit-0.1.0/tools/harness_test/tests/fake_tui.py +139 -0
  672. alr_emit-0.1.0/tools/harness_test/tests/golden/results_table.md +5 -0
  673. alr_emit-0.1.0/tools/harness_test/tests/pty_terminal.py +112 -0
  674. alr_emit-0.1.0/tools/harness_test/tests/test_cli.py +422 -0
  675. alr_emit-0.1.0/tools/harness_test/tests/test_no_bytecode.py +64 -0
  676. alr_emit-0.1.0/tools/harness_test/tests/test_real_tmux_gate.py +50 -0
  677. alr_emit-0.1.0/tools/harness_test/tests/test_results.py +62 -0
  678. alr_emit-0.1.0/tools/harness_test/tests/test_sandbox.py +167 -0
  679. alr_emit-0.1.0/tools/harness_test/tests/test_scenarios.py +377 -0
  680. alr_emit-0.1.0/tools/harness_test/tests/test_terminal.py +122 -0
  681. alr_emit-0.1.0/tools/harness_test/tests/test_terminal_calls.py +155 -0
  682. alr_emit-0.1.0/tools/harness_test/tests/test_terminal_ungated.py +22 -0
  683. alr_emit-0.1.0/tools/leak_scan.py +452 -0
  684. alr_emit-0.1.0/tools/measure_dashboard.py +150 -0
@@ -0,0 +1,28 @@
1
+ # Every tracked text file checks out with LF on every platform (tests/test_line_endings.py).
2
+ # A binary needs its own `-text` rule just below it.
3
+ * text=auto eol=lf
4
+ # The planning workbook template: a zip archive, generated by tools/gen_plan_workbook.py.
5
+ kit/plan-template.xlsx -text
6
+
7
+ # What the public export leaves out. `git archive` honours export-ignore
8
+ # natively; the sdist excludes in pyproject.toml must list the same paths
9
+ # (tests/test_export_definition.py pins the two together).
10
+ RELEASE-rc-*.md export-ignore
11
+ docs/qa/ export-ignore
12
+ # The repository's own hygiene scan, its allowlist and its test: internal tooling.
13
+ tools/hygiene_scan.py export-ignore
14
+ tools/hygiene_allowlist.txt export-ignore
15
+ tests/test_hygiene.py export-ignore
16
+ # The real captures (fixtures/README.md marks each REAL): kept here for the tests, which
17
+ # skip without them; left out of the export until their publication is decided
18
+ # (tests/capture_support.py holds the same list).
19
+ fixtures/claude-code/real-2.1.296/ export-ignore
20
+ fixtures/claude-code/real-tui-2.1.296/ export-ignore
21
+ fixtures/claude-p/result-2.1.296.json export-ignore
22
+ fixtures/claude-p/result-2.1.296-subagent.json export-ignore
23
+ fixtures/grok/result-cost-reported.json export-ignore
24
+ fixtures/grok/result-cost-reported-grok-4.6.json export-ignore
25
+ fixtures/grok/result-spawn-denied.json export-ignore
26
+ fixtures/grok-tui/real-1.0.50/ export-ignore
27
+ fixtures/hermes/real-0.21.6/ export-ignore
28
+ fixtures/sdk/real-1.13.0/ export-ignore
@@ -0,0 +1,254 @@
1
+ # CI for alr-emit.
2
+ # Branch pushes and pull requests run a quick check (Linux, oldest and newest
3
+ # supported Python). A push to main runs the quick check plus a smoke leg each
4
+ # on macOS and Windows (newest Python). Only a version tag push (v*, rc or
5
+ # final) runs the full matrix (Linux, macOS, Windows x every supported
6
+ # Python). A manual run runs exactly one leg of that matrix: both inputs are
7
+ # required and name one system and one Python; there is no "all".
8
+ # A push to a branch named *-qa-reports-* runs nothing: such a branch holds
9
+ # documents only and is never merged.
10
+ name: ci
11
+
12
+ on:
13
+ push:
14
+ branches-ignore: ["*-qa-reports-*"]
15
+ tags: ["v*"]
16
+ pull_request:
17
+ workflow_dispatch:
18
+ inputs:
19
+ # One system of the full matrix; no default, so the run must name it.
20
+ os:
21
+ description: "The system of the one leg to run"
22
+ required: true
23
+ type: choice
24
+ options: [ubuntu-latest, macos-latest, windows-latest]
25
+ # One Python of the full matrix; no default, so the run must name it.
26
+ python:
27
+ description: "The Python of the one leg to run"
28
+ required: true
29
+ type: choice
30
+ options: ["3.10", "3.11", "3.12", "3.13", "3.14"]
31
+
32
+ permissions:
33
+ contents: read
34
+
35
+ jobs:
36
+ # The commit messages and identities this event brings in, by the hygiene
37
+ # scan's --messages mode. The hygiene scan's --ci-range (tested) picks the
38
+ # range: a pull request's own commits, a push's new commits
39
+ # (before..after), or, for a new branch, a tag or a manual run, the
40
+ # commits not on main. Full history is fetched so the range exists.
41
+ # The hygiene scan is maintainer tooling that the published source leaves
42
+ # out (.gitattributes export-ignore). Its steps run wherever any of the
43
+ # files the published source leaves out is present, so they are mandatory
44
+ # in the maintainers' repository (a missing scan there fails the step) and
45
+ # skipped in a checkout of the published source, which holds none of them.
46
+ messages:
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ with:
51
+ fetch-depth: 0
52
+ - uses: actions/setup-python@v5
53
+ with:
54
+ python-version: "3.14"
55
+ - name: Hygiene scan of commit messages
56
+ if: hashFiles('tools/hygiene_scan.py', 'tools/hygiene_allowlist.txt', 'tests/test_hygiene.py', 'RELEASE-rc-*.md') != ''
57
+ env:
58
+ EVENT: ${{ github.event_name }}
59
+ BEFORE: ${{ github.event.before }}
60
+ PR_BASE: ${{ github.event.pull_request.base.sha }}
61
+ PR_HEAD: ${{ github.event.pull_request.head.sha }}
62
+ run: |
63
+ range="$(python tools/hygiene_scan.py --ci-range --event "$EVENT" --base "$PR_BASE" --head "$PR_HEAD" --before "$BEFORE" --sha "$GITHUB_SHA")"
64
+ echo "scanning commit messages in $range"
65
+ python tools/hygiene_scan.py --messages "$range" --no-labels
66
+
67
+ # Every event but a version tag push and a manual run.
68
+ quick:
69
+ if: >-
70
+ !(github.event_name == 'workflow_dispatch' ||
71
+ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')))
72
+ strategy:
73
+ fail-fast: false
74
+ matrix:
75
+ python-version: ["3.10", "3.14"]
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - uses: actions/checkout@v4
79
+ - uses: actions/setup-python@v5
80
+ with:
81
+ python-version: ${{ matrix.python-version }}
82
+ - name: Hygiene scan (file names, internal labels, bytecode)
83
+ # maintainer tooling: see the messages job
84
+ if: hashFiles('tools/hygiene_scan.py', 'tools/hygiene_allowlist.txt', 'tests/test_hygiene.py', 'RELEASE-rc-*.md') != ''
85
+ run: python tools/hygiene_scan.py
86
+ - name: Install package with dev extras
87
+ run: python -m pip install -e ".[dev]"
88
+ - name: Run tests
89
+ run: python -m pytest tests
90
+
91
+ # A version tag push (rc or final) only: every system x every supported Python.
92
+ full:
93
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
94
+ strategy:
95
+ fail-fast: false
96
+ matrix:
97
+ os: [ubuntu-latest, macos-latest, windows-latest]
98
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
99
+ runs-on: ${{ matrix.os }}
100
+ # A safety cap, not a target: a hung leg ends here, not at GitHub's 6-hour limit.
101
+ timeout-minutes: 150
102
+ steps:
103
+ - uses: actions/checkout@v4
104
+ - uses: actions/setup-python@v5
105
+ with:
106
+ python-version: ${{ matrix.python-version }}
107
+ - name: Install package with dev extras
108
+ run: python -m pip install -e ".[dev]"
109
+ - name: Run tests
110
+ # Windows legs also list the 40 slowest tests.
111
+ run: python -m pytest tests ${{ runner.os == 'Windows' && '--durations=40' || '' }}
112
+
113
+ # A manual run only: the one leg of the full matrix its two inputs name,
114
+ # with the same steps as a full leg.
115
+ leg:
116
+ if: github.event_name == 'workflow_dispatch'
117
+ strategy:
118
+ fail-fast: false
119
+ matrix:
120
+ os: ["${{ inputs.os }}"]
121
+ python-version: ["${{ inputs.python }}"]
122
+ runs-on: ${{ matrix.os }}
123
+ # A safety cap, not a target: a hung leg ends here, not at GitHub's 6-hour limit.
124
+ timeout-minutes: 150
125
+ steps:
126
+ - uses: actions/checkout@v4
127
+ - uses: actions/setup-python@v5
128
+ with:
129
+ python-version: ${{ matrix.python-version }}
130
+ - name: Install package with dev extras
131
+ run: python -m pip install -e ".[dev]"
132
+ - name: Run tests
133
+ # Windows legs also list the 40 slowest tests.
134
+ run: python -m pytest tests ${{ runner.os == 'Windows' && '--durations=40' || '' }}
135
+
136
+ # The wheel a tester installs, built from this commit. It must install into a
137
+ # fresh virtual environment and report there the version pyproject.toml names;
138
+ # it is then kept as a workflow artifact named for that version. Nothing is
139
+ # published and no secret is used.
140
+ wheel:
141
+ runs-on: ubuntu-latest
142
+ steps:
143
+ - uses: actions/checkout@v4
144
+ - uses: actions/setup-python@v5
145
+ with:
146
+ python-version: "3.14"
147
+ - name: Install uv
148
+ run: python -m pip install "uv==0.11.16"
149
+ - name: Build the wheel
150
+ run: uv build --wheel --out-dir dist
151
+ - name: Install the wheel into a fresh venv and check its version
152
+ id: check
153
+ run: |
154
+ version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
155
+ wheel="$PWD/dist/alr_emit-$version-py3-none-any.whl"
156
+ test -f "$wheel"
157
+ python -m venv "$RUNNER_TEMP/wheel-venv"
158
+ "$RUNNER_TEMP/wheel-venv/bin/python" -m pip install "$wheel"
159
+ cd "$RUNNER_TEMP"
160
+ "$RUNNER_TEMP/wheel-venv/bin/alr" --help
161
+ installed="$("$RUNNER_TEMP/wheel-venv/bin/python" -I -c 'import alr_emit; print(alr_emit.__version__)')"
162
+ metadata="$("$RUNNER_TEMP/wheel-venv/bin/python" -I -c 'import importlib.metadata as m; print(m.version("alr-emit"))')"
163
+ echo "pyproject $version, installed alr_emit $installed, metadata $metadata"
164
+ test "$installed" = "$version"
165
+ test "$metadata" = "$version"
166
+ echo "version=$version" >> "$GITHUB_OUTPUT"
167
+ - name: Upload the wheel
168
+ uses: actions/upload-artifact@v4
169
+ with:
170
+ name: alr-emit-${{ steps.check.outputs.version }}-wheel
171
+ path: dist/alr_emit-${{ steps.check.outputs.version }}-py3-none-any.whl
172
+ if-no-files-found: error
173
+
174
+ # The package a release uploads, checked without any credential: the sdist and
175
+ # the wheel are both built from this commit, their metadata (the long
176
+ # description included) must pass the validated-metadata and rendering check of
177
+ # tools/check_dists.py, and the sdist must
178
+ # hold what the wheel ships from the package, the spec directory and the kit
179
+ # plugins, byte for byte, and nothing the export leaves out. Nothing is
180
+ # published; the same two files are then installed on three systems.
181
+ dists:
182
+ runs-on: ubuntu-latest
183
+ steps:
184
+ - uses: actions/checkout@v4
185
+ - uses: actions/setup-python@v5
186
+ with:
187
+ python-version: "3.14"
188
+ - name: Install uv
189
+ run: python -m pip install "uv==0.11.16"
190
+ - name: Build the sdist and the wheel
191
+ run: uv build --out-dir dist
192
+ - name: Check the metadata, the long description, and the sdist against the wheel and the export
193
+ run: uv run --no-project --with "packaging==26.3" --with "markdown-it-py==4.2.0" --with "mdurl==0.1.2" python tools/check_dists.py dist .
194
+ - name: Check both with twine (the check the index's own tooling runs)
195
+ run: uvx --from "twine==7.0.0" twine check --strict dist/*
196
+ - name: Upload the distributions
197
+ uses: actions/upload-artifact@v4
198
+ with:
199
+ name: alr-emit-dists
200
+ path: dist/
201
+ if-no-files-found: error
202
+
203
+ # The wheel from the dists job, installed from a local file index (no network
204
+ # index is read) into a fresh virtual environment on each system: `alr --version`
205
+ # prints the version pyproject.toml names, and one record is written from a
206
+ # shipped test transcript and read back.
207
+ dists-install:
208
+ needs: dists
209
+ strategy:
210
+ fail-fast: false
211
+ matrix:
212
+ os: [ubuntu-latest, macos-latest, windows-latest]
213
+ runs-on: ${{ matrix.os }}
214
+ steps:
215
+ - uses: actions/checkout@v4
216
+ - uses: actions/setup-python@v5
217
+ with:
218
+ python-version: "3.14"
219
+ - uses: actions/download-artifact@v4
220
+ with:
221
+ name: alr-emit-dists
222
+ path: dist
223
+ - name: Install from the local index and run
224
+ shell: bash
225
+ run: |
226
+ version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
227
+ python -m venv "$RUNNER_TEMP/dist-venv"
228
+ venv_python="$RUNNER_TEMP/dist-venv/bin/python"
229
+ test -f "$venv_python" || venv_python="$RUNNER_TEMP/dist-venv/Scripts/python.exe"
230
+ "$venv_python" -m pip install --no-index --find-links dist "alr-emit==$version"
231
+ fixtures="$PWD/fixtures"
232
+ script="$PWD/tools/check_installed.py"
233
+ cd "$RUNNER_TEMP"
234
+ "$venv_python" -I "$script" "$version" "$fixtures"
235
+
236
+ # A push to main: one macOS and one Windows leg, newest Python, beside quick. The
237
+ # Windows leg runs only the tests marked smoke; tags and manual runs run them all.
238
+ smoke:
239
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
240
+ strategy:
241
+ fail-fast: false
242
+ matrix:
243
+ os: [macos-latest, windows-latest]
244
+ python-version: ["3.14"]
245
+ runs-on: ${{ matrix.os }}
246
+ steps:
247
+ - uses: actions/checkout@v4
248
+ - uses: actions/setup-python@v5
249
+ with:
250
+ python-version: ${{ matrix.python-version }}
251
+ - name: Install package with dev extras
252
+ run: python -m pip install -e ".[dev]"
253
+ - name: Run tests
254
+ run: python -m pytest tests ${{ runner.os == 'Windows' && '-m smoke' || '' }}
@@ -0,0 +1,136 @@
1
+ # A release: publish one tagged version of the package to PyPI.
2
+ #
3
+ # This workflow is run by hand (Actions, "Run workflow"), with the release tag to
4
+ # publish (for example v0.1.0rc9), and only after the maintainer has added a trusted
5
+ # publisher on PyPI for this repository, this workflow file and the environment named
6
+ # pypi. It has no other trigger: no push, tag, pull request or schedule starts it, so
7
+ # pushing a tag (a throwaway -ciN tag included) never publishes anything.
8
+ #
9
+ # It stores no secret and no token. The publish job asks GitHub for a short-lived
10
+ # OpenID Connect identity (permission id-token: write, on that job alone), and PyPI
11
+ # accepts it only from the publisher registered for this file and environment
12
+ # (trusted publishing).
13
+ #
14
+ # The tag is read as data, never as shell text. The build job refuses a tag that is
15
+ # not v<major>.<minor>.<patch> or v<major>.<minor>.<patch>rc<N> (so a -ciN tag is
16
+ # refused), a checkout that is not the commit the tag names, and a package whose
17
+ # version is not the tag's. It then builds and checks the sdist and the wheel exactly
18
+ # as the TestPyPI dry run does. The publish job uploads both to PyPI; the verify job
19
+ # installs the published version back from PyPI into a clean virtual environment and
20
+ # runs `alr --version`.
21
+ #
22
+ # PyPI takes each version once: a version can never be uploaded again, not even after
23
+ # it is deleted there.
24
+ name: publish-pypi
25
+
26
+ on:
27
+ workflow_dispatch:
28
+ inputs:
29
+ tag:
30
+ description: "The release tag to publish, for example v0.1.0rc9"
31
+ required: true
32
+ type: string
33
+
34
+ permissions:
35
+ contents: read
36
+
37
+ jobs:
38
+ build:
39
+ runs-on: ubuntu-latest
40
+ outputs:
41
+ version: ${{ steps.version.outputs.version }}
42
+ steps:
43
+ - name: Refuse a tag that is not a release tag
44
+ env:
45
+ TAG: ${{ inputs.tag }}
46
+ run: |
47
+ if ! [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?$ ]]; then
48
+ echo "::error::the tag must be v<major>.<minor>.<patch> or v<major>.<minor>.<patch>rc<N>"
49
+ exit 1
50
+ fi
51
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
52
+ with:
53
+ ref: refs/tags/${{ inputs.tag }}
54
+ - name: Refuse a checkout that is not the commit the tag names
55
+ env:
56
+ TAG: ${{ inputs.tag }}
57
+ run: |
58
+ head="$(git rev-parse HEAD)"
59
+ tagged="$(git rev-parse --verify "refs/tags/$TAG^{commit}")"
60
+ if [ "$head" != "$tagged" ]; then
61
+ echo "::error::the checkout is not the commit the tag names"
62
+ exit 1
63
+ fi
64
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
65
+ with:
66
+ python-version: "3.14"
67
+ - name: Install uv
68
+ run: python -m pip install "uv==0.11.16"
69
+ - name: Build the sdist and the wheel
70
+ run: uv build --out-dir dist
71
+ - name: Check the metadata, the long description, and the sdist against the wheel and the export
72
+ run: uv run --no-project --with "packaging==26.3" --with "markdown-it-py==4.2.0" --with "mdurl==0.1.2" python tools/check_dists.py dist .
73
+ - name: Check both with twine (the check the index's own tooling runs)
74
+ run: uvx --from "twine==7.0.0" twine check --strict dist/*
75
+ - name: Read the version
76
+ id: version
77
+ env:
78
+ TAG: ${{ inputs.tag }}
79
+ run: |
80
+ version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
81
+ test -f "dist/alr_emit-$version-py3-none-any.whl"
82
+ if [ "v$version" != "$TAG" ]; then
83
+ echo "::error::the package version is not the tag's"
84
+ exit 1
85
+ fi
86
+ echo "version=$version" >> "$GITHUB_OUTPUT"
87
+ - name: Upload the distributions for the publish job
88
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
89
+ with:
90
+ name: alr-emit-dists
91
+ path: dist/
92
+ if-no-files-found: error
93
+
94
+ publish:
95
+ needs: build
96
+ runs-on: ubuntu-latest
97
+ environment: pypi
98
+ permissions:
99
+ id-token: write
100
+ steps:
101
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
102
+ with:
103
+ name: alr-emit-dists
104
+ path: dist
105
+ - name: Upload to PyPI
106
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
107
+ with:
108
+ packages-dir: dist/
109
+
110
+ verify:
111
+ needs: [build, publish]
112
+ runs-on: ubuntu-latest
113
+ steps:
114
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
115
+ with:
116
+ python-version: "3.14"
117
+ - name: Install the published version from PyPI and run it
118
+ env:
119
+ VERSION: ${{ needs.build.outputs.version }}
120
+ run: |
121
+ python -m venv "$RUNNER_TEMP/pypi-venv"
122
+ # PyPI alone and no dependencies (there are none). The index may take a moment
123
+ # to list the file.
124
+ for attempt in 1 2 3 4 5 6; do
125
+ if "$RUNNER_TEMP/pypi-venv/bin/python" -m pip install --no-cache-dir \
126
+ --index-url https://pypi.org/simple/ \
127
+ --no-deps \
128
+ "alr-emit==$VERSION"; then
129
+ break
130
+ fi
131
+ test "$attempt" -lt 6
132
+ sleep 20
133
+ done
134
+ shown="$("$RUNNER_TEMP/pypi-venv/bin/alr" --version)"
135
+ echo "$shown"
136
+ test "$shown" = "OpenALR alr-emit $VERSION"
@@ -0,0 +1,101 @@
1
+ # A dry run of a release on TestPyPI, the package index for rehearsals.
2
+ #
3
+ # This workflow is run by hand (Actions, "Run workflow"), and only after the
4
+ # maintainer has added a pending trusted publisher for this repository, this
5
+ # workflow file and the environment named testpypi on TestPyPI. It has no other
6
+ # trigger: no push, tag, pull request or schedule starts it.
7
+ #
8
+ # It stores no secret and no token. The publish job asks GitHub for a short-lived
9
+ # OpenID Connect identity (permission id-token: write, on that job alone), and
10
+ # TestPyPI accepts it only from the publisher registered for this file and
11
+ # environment (trusted publishing).
12
+ #
13
+ # Three jobs: build the sdist and the wheel from the chosen commit and check
14
+ # them; upload both to TestPyPI; install the uploaded version back from
15
+ # TestPyPI into a clean virtual environment and run `alr --version`. TestPyPI
16
+ # takes each version once, so a second run needs a new version in pyproject.toml.
17
+ #
18
+ # Publishing to the real PyPI is a separate, later workflow. This one never does.
19
+ name: publish-testpypi
20
+
21
+ on:
22
+ workflow_dispatch:
23
+
24
+ permissions:
25
+ contents: read
26
+
27
+ jobs:
28
+ build:
29
+ runs-on: ubuntu-latest
30
+ outputs:
31
+ version: ${{ steps.version.outputs.version }}
32
+ steps:
33
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
34
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
35
+ with:
36
+ python-version: "3.14"
37
+ - name: Install uv
38
+ run: python -m pip install "uv==0.11.16"
39
+ - name: Build the sdist and the wheel
40
+ run: uv build --out-dir dist
41
+ - name: Check the metadata, the long description, and the sdist against the wheel and the export
42
+ run: uv run --no-project --with "packaging==26.3" --with "markdown-it-py==4.2.0" --with "mdurl==0.1.2" python tools/check_dists.py dist .
43
+ - name: Check both with twine (the check the index's own tooling runs)
44
+ run: uvx --from "twine==7.0.0" twine check --strict dist/*
45
+ - name: Read the version
46
+ id: version
47
+ run: |
48
+ version="$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
49
+ test -f "dist/alr_emit-$version-py3-none-any.whl"
50
+ echo "version=$version" >> "$GITHUB_OUTPUT"
51
+ - name: Upload the distributions for the publish job
52
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
53
+ with:
54
+ name: alr-emit-dists
55
+ path: dist/
56
+ if-no-files-found: error
57
+
58
+ publish:
59
+ needs: build
60
+ runs-on: ubuntu-latest
61
+ environment: testpypi
62
+ permissions:
63
+ id-token: write
64
+ steps:
65
+ - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
66
+ with:
67
+ name: alr-emit-dists
68
+ path: dist
69
+ - name: Upload to TestPyPI
70
+ uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
71
+ with:
72
+ repository-url: https://test.pypi.org/legacy/
73
+ packages-dir: dist/
74
+
75
+ verify:
76
+ needs: [build, publish]
77
+ runs-on: ubuntu-latest
78
+ steps:
79
+ - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
80
+ with:
81
+ python-version: "3.14"
82
+ - name: Install the uploaded version from TestPyPI and run it
83
+ env:
84
+ VERSION: ${{ needs.build.outputs.version }}
85
+ run: |
86
+ python -m venv "$RUNNER_TEMP/testpypi-venv"
87
+ # TestPyPI alone and no dependencies (there are none): a same-named package on the main
88
+ # index must not be able to satisfy the pin. The index may take a moment to list the file.
89
+ for attempt in 1 2 3 4 5 6; do
90
+ if "$RUNNER_TEMP/testpypi-venv/bin/python" -m pip install --no-cache-dir \
91
+ --index-url https://test.pypi.org/simple/ \
92
+ --no-deps \
93
+ "alr-emit==$VERSION"; then
94
+ break
95
+ fi
96
+ test "$attempt" -lt 6
97
+ sleep 20
98
+ done
99
+ shown="$("$RUNNER_TEMP/testpypi-venv/bin/alr" --version)"
100
+ echo "$shown"
101
+ test "$shown" = "OpenALR alr-emit $VERSION"
@@ -0,0 +1,7 @@
1
+ # Bytecode, virtual environments and build metadata are never committed.
2
+ __pycache__/
3
+ *.pyc
4
+ .venv/
5
+ *.egg-info/
6
+ # Not consumed: CI installs with pip install -e .[dev]; hatchling builds the wheel.
7
+ uv.lock