jj-stack 0.1.2__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. jj_stack-0.1.3/.github/ISSUE_TEMPLATE/bug_report.yml +59 -0
  2. jj_stack-0.1.3/.github/ISSUE_TEMPLATE/config.yml +11 -0
  3. jj_stack-0.1.3/.github/ISSUE_TEMPLATE/feature_request.yml +32 -0
  4. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/SECURITY.md +2 -2
  5. jj_stack-0.1.3/.github/pull_request_template.md +19 -0
  6. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/workflows/ci.yml +8 -7
  7. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/workflows/codeql.yml +2 -2
  8. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/workflows/release.yml +1 -1
  9. {jj_stack-0.1.2 → jj_stack-0.1.3}/AGENTS.md +1 -0
  10. jj_stack-0.1.3/CONTRIBUTING.md +74 -0
  11. {jj_stack-0.1.2 → jj_stack-0.1.3}/PKG-INFO +11 -8
  12. {jj_stack-0.1.2 → jj_stack-0.1.3}/README.md +9 -6
  13. {jj_stack-0.1.2 → jj_stack-0.1.3}/check.py +3 -4
  14. {jj_stack-0.1.2 → jj_stack-0.1.3}/complexity-budget.toml +6 -5
  15. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/AGENTS.md +10 -0
  16. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/README.md +2 -1
  17. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/close-or-separate.md +7 -4
  18. jj_stack-0.1.3/docs/guides/continue-a-stack.md +66 -0
  19. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/merge-and-sync.md +23 -20
  20. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/review-a-stack.md +3 -3
  21. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/submit-and-update.md +5 -10
  22. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/design.md +88 -60
  23. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/implementation-strategy.md +9 -0
  24. jj_stack-0.1.3/docs/internals/releasing.md +119 -0
  25. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/json-output.schema.json +1 -1
  26. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/mental-model.md +2 -2
  27. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/quick-start.md +1 -1
  28. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/reference/bookmarks-and-selection.md +11 -11
  29. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/reference/commands.md +1 -1
  30. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/reference/descriptions.md +3 -3
  31. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/reference/json-output.md +16 -14
  32. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/tool-comparison.md +20 -20
  33. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/troubleshooting.md +31 -17
  34. {jj_stack-0.1.2 → jj_stack-0.1.3}/pyproject.toml +3 -3
  35. jj_stack-0.1.3/release-notes/v0.1.3.md +27 -0
  36. {jj_stack-0.1.2 → jj_stack-0.1.3}/scripts/describe_with_claude.py +5 -5
  37. {jj_stack-0.1.2 → jj_stack-0.1.3}/scripts/describe_with_codex.py +5 -5
  38. {jj_stack-0.1.2 → jj_stack-0.1.3}/scripts/describe_with_prompt.py +3 -4
  39. {jj_stack-0.1.2 → jj_stack-0.1.3}/skills/jj-stack/references/multi-stack.md +7 -4
  40. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/bootstrap.py +11 -30
  41. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/cli.py +73 -37
  42. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/cli_help.py +22 -43
  43. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/_cleanup_actions.py +136 -115
  44. jj_stack-0.1.3/src/jj_stack/commands/_json_status.py +115 -0
  45. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/checkout.py +112 -126
  46. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/cleanup/command.py +100 -56
  47. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/cleanup/shared.py +1 -2
  48. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/cleanup/stale.py +1 -1
  49. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/doctor.py +64 -39
  50. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/in_use.py +2 -5
  51. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/list_.py +116 -119
  52. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/merge/command.py +27 -46
  53. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/merge/github_stack.py +37 -58
  54. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/merge/models.py +10 -0
  55. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/merge/plan.py +1 -1
  56. jj_stack-0.1.3/src/jj_stack/commands/merge/preconditions.py +169 -0
  57. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/merge/render.py +3 -1
  58. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/relink.py +93 -79
  59. jj_stack-0.1.3/src/jj_stack/commands/submit/changes.py +202 -0
  60. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/command.py +84 -127
  61. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/comments.py +2 -0
  62. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/descriptions.py +20 -46
  63. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/github_stack.py +18 -10
  64. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/inputs.py +18 -6
  65. jj_stack-0.1.3/src/jj_stack/commands/submit/managed_comments.py +37 -0
  66. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/models.py +6 -0
  67. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/overview_comments.py +15 -51
  68. jj_stack-0.1.3/src/jj_stack/commands/submit/prs.py +244 -0
  69. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/render.py +7 -18
  70. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/revision_comments.py +17 -28
  71. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/sync.py +58 -63
  72. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/sync_apply.py +85 -73
  73. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/unstack.py +43 -45
  74. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/view.py +241 -387
  75. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/completion.py +2 -0
  76. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/concurrency.py +2 -2
  77. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/config.py +46 -0
  78. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/console.py +16 -16
  79. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/formatting.py +1 -2
  80. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/client.py +254 -158
  81. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/error_messages.py +3 -13
  82. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/pr_refs.py +40 -1
  83. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/resolution.py +42 -15
  84. jj_stack-0.1.3/src/jj_stack/identifiers.py +16 -0
  85. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/jj/client.py +158 -89
  86. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/models/github.py +9 -9
  87. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/models/stack.py +5 -6
  88. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/pr_branch_namespace.py +12 -9
  89. jj_stack-0.1.3/src/jj_stack/stack/change_state.py +713 -0
  90. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/convergence.py +205 -184
  91. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/convergence_models.py +3 -1
  92. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/convergence_observation.py +1 -1
  93. jj_stack-0.1.3/src/jj_stack/stack/divergence.py +20 -0
  94. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/github_stack_safety.py +22 -36
  95. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/global_convergence.py +37 -54
  96. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/path.py +12 -1
  97. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/pr_facts.py +51 -15
  98. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/repo.py +8 -31
  99. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/selected.py +46 -31
  100. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/selection.py +2 -28
  101. jj_stack-0.1.3/src/jj_stack/stack/status.py +544 -0
  102. jj_stack-0.1.3/src/jj_stack/stack/trunk.py +25 -0
  103. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/trunk_evidence.py +3 -24
  104. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/state/operation_lock.py +47 -21
  105. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/state/store.py +7 -8
  106. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/ui.py +5 -15
  107. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/conftest.py +7 -0
  108. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/submit_command_helpers.py +0 -22
  109. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_boundary_conditions.py +7 -13
  110. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_checkout_command.py +135 -39
  111. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_cleanup_command.py +129 -45
  112. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_doctor_command.py +37 -4
  113. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_jj_stack.py +46 -35
  114. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_list_command.py +13 -3
  115. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_merge_command.py +23 -6
  116. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_relink_command.py +29 -35
  117. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_submit_command.py +212 -166
  118. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_sync_command.py +203 -44
  119. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_unstack_command.py +23 -1
  120. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/test_view_command.py +70 -53
  121. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/property/test_submit_property_scenarios.py +66 -12
  122. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/run_live_github.py +4 -8
  123. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/run_submit_property_scenarios.py +21 -15
  124. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/change_helpers.py +10 -3
  125. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/contexts.py +1 -2
  126. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/fake_github.py +67 -68
  127. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/integration_helpers.py +76 -3
  128. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/stack_edit_scenarios.py +0 -6
  129. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/submit_property_harness.py +22 -73
  130. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/submit_property_scenarios.py +14 -138
  131. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_bootstrap.py +3 -3
  132. jj_stack-0.1.3/tests/unit/test_change_state.py +227 -0
  133. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_check_script.py +0 -13
  134. jj_stack-0.1.3/tests/unit/test_cleanup.py +72 -0
  135. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_cli.py +3 -4
  136. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_cli_dispatch.py +36 -1
  137. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_completion.py +4 -2
  138. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_config.py +25 -4
  139. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_describe_with_prompt_script.py +2 -2
  140. jj_stack-0.1.3/tests/unit/test_divergence.py +15 -0
  141. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_github_client.py +308 -103
  142. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_github_models.py +6 -5
  143. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_github_resolution.py +23 -7
  144. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_github_stack_planning.py +15 -30
  145. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_jj_client.py +46 -46
  146. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_merge.py +89 -12
  147. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_operation_lock.py +19 -2
  148. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_pr_branches.py +22 -1
  149. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_relink.py +3 -2
  150. jj_stack-0.1.3/tests/unit/test_selected.py +44 -0
  151. jj_stack-0.1.3/tests/unit/test_selection.py +9 -0
  152. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_stack_path.py +15 -3
  153. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_stack_status.py +57 -34
  154. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_store.py +1 -26
  155. jj_stack-0.1.3/tests/unit/test_submit.py +253 -0
  156. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_submit_descriptions.py +67 -1
  157. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_trunk_evidence.py +12 -14
  158. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_ui.py +35 -5
  159. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_view.py +79 -108
  160. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_view_entrypoint.py +3 -3
  161. {jj_stack-0.1.2 → jj_stack-0.1.3}/tools/check_jj_release_updates.py +2 -2
  162. jj_stack-0.1.3/tools/install-jj-release.sh +176 -0
  163. {jj_stack-0.1.2 → jj_stack-0.1.3}/uv.lock +34 -26
  164. jj_stack-0.1.2/docs/guides/continue-a-stack.md +0 -57
  165. jj_stack-0.1.2/docs/internals/releasing.md +0 -71
  166. jj_stack-0.1.2/src/jj_stack/commands/_json_status.py +0 -85
  167. jj_stack-0.1.2/src/jj_stack/commands/merge/preconditions.py +0 -157
  168. jj_stack-0.1.2/src/jj_stack/commands/submit/changes.py +0 -90
  169. jj_stack-0.1.2/src/jj_stack/commands/submit/prs.py +0 -449
  170. jj_stack-0.1.2/src/jj_stack/identifiers.py +0 -7
  171. jj_stack-0.1.2/src/jj_stack/stack/change_status.py +0 -223
  172. jj_stack-0.1.2/src/jj_stack/stack/status.py +0 -665
  173. jj_stack-0.1.2/tests/unit/test_change_status.py +0 -86
  174. jj_stack-0.1.2/tests/unit/test_change_status_topology.py +0 -113
  175. jj_stack-0.1.2/tests/unit/test_cleanup.py +0 -191
  176. jj_stack-0.1.2/tests/unit/test_selection.py +0 -24
  177. jj_stack-0.1.2/tests/unit/test_submit.py +0 -350
  178. jj_stack-0.1.2/tools/install-jj-release.sh +0 -266
  179. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/dependabot.yml +0 -0
  180. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/workflows/block-pr-base-merges.yml +0 -0
  181. {jj_stack-0.1.2 → jj_stack-0.1.3}/.github/workflows/check-jj-release-updates.yml +0 -0
  182. {jj_stack-0.1.2 → jj_stack-0.1.3}/.gitignore +0 -0
  183. {jj_stack-0.1.2 → jj_stack-0.1.3}/CLAUDE.md +0 -0
  184. {jj_stack-0.1.2 → jj_stack-0.1.3}/LICENSE +0 -0
  185. {jj_stack-0.1.2 → jj_stack-0.1.3}/NOTICE +0 -0
  186. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/multiple-stacks.md +0 -0
  187. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/revise.md +0 -0
  188. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/guides/working-on-github.md +0 -0
  189. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/AGENTS.md +0 -0
  190. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/README.md +0 -0
  191. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/code-reviews.md +0 -0
  192. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/property-testing.md +0 -0
  193. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/internals/testing-philosophy.md +0 -0
  194. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/reference/automation.md +0 -0
  195. {jj_stack-0.1.2 → jj_stack-0.1.3}/docs/reference/configuration.md +0 -0
  196. {jj_stack-0.1.2 → jj_stack-0.1.3}/evals/jj-stack-skill.md +0 -0
  197. {jj_stack-0.1.2 → jj_stack-0.1.3}/justfile +0 -0
  198. {jj_stack-0.1.2 → jj_stack-0.1.3}/release-notes/v0.1.2.md +0 -0
  199. {jj_stack-0.1.2 → jj_stack-0.1.3}/scripts/README.md +0 -0
  200. {jj_stack-0.1.2 → jj_stack-0.1.3}/scripts/describe_with_editor.py +0 -0
  201. {jj_stack-0.1.2 → jj_stack-0.1.3}/skills/jj-stack/SKILL.md +0 -0
  202. {jj_stack-0.1.2 → jj_stack-0.1.3}/skills/jj-stack/agents/openai.yaml +0 -0
  203. {jj_stack-0.1.2 → jj_stack-0.1.3}/skills/jj-stack/references/recovery.md +0 -0
  204. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/__init__.py +0 -0
  205. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/__main__.py +0 -0
  206. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/__init__.py +0 -0
  207. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/merge/__init__.py +0 -0
  208. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/__init__.py +0 -0
  209. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/auto_close.py +0 -0
  210. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/commands/submit/default_pr_text.py +0 -0
  211. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/errors.py +0 -0
  212. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/__init__.py +0 -0
  213. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/auth.py +0 -0
  214. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/overview_comments.py +0 -0
  215. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/github/stack_availability.py +0 -0
  216. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/jj/__init__.py +0 -0
  217. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/jj/cli_args.py +0 -0
  218. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/jj/colors.py +0 -0
  219. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/models/__init__.py +0 -0
  220. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/models/git.py +0 -0
  221. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/models/tracking.py +0 -0
  222. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/__init__.py +0 -0
  223. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/stack/pr_branches.py +0 -0
  224. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/state/__init__.py +0 -0
  225. {jj_stack-0.1.2 → jj_stack-0.1.3}/src/jj_stack/state/migrations.py +0 -0
  226. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/__init__.py +0 -0
  227. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/__init__.py +0 -0
  228. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/integration/conftest.py +0 -0
  229. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/__init__.py +0 -0
  230. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/json_schema.py +0 -0
  231. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/output_assertions.py +0 -0
  232. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/pytest_concurrency.py +0 -0
  233. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/support/tracking.py +0 -0
  234. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/__init__.py +0 -0
  235. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/conftest.py +0 -0
  236. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_checkout.py +0 -0
  237. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_concurrency.py +0 -0
  238. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_default_pr_text.py +0 -0
  239. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_describe_with_editor_script.py +0 -0
  240. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_errors.py +0 -0
  241. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_github_auth.py +0 -0
  242. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_in_use_command.py +0 -0
  243. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_list.py +0 -0
  244. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_live_github_runner.py +0 -0
  245. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_pr_refs.py +0 -0
  246. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_property_runner.py +0 -0
  247. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_property_scenarios.py +0 -0
  248. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_sync.py +0 -0
  249. {jj_stack-0.1.2 → jj_stack-0.1.3}/tests/unit/test_unstack.py +0 -0
  250. {jj_stack-0.1.2 → jj_stack-0.1.3}/tools/check_complexity.py +0 -0
  251. {jj_stack-0.1.2 → jj_stack-0.1.3}/tools/check_release_artifacts.py +0 -0
@@ -0,0 +1,59 @@
1
+ name: Bug report
2
+ description: Report incorrect or surprising jj-stack behavior.
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Before filing, check [Troubleshooting](https://www.serpentine.com/software/jj-stack/troubleshooting/).
9
+ Many errors end with a `Hint:` that resolves them.
10
+
11
+ Do not paste private repository contents, tokens, or internal URLs.
12
+ - type: textarea
13
+ id: what-happened
14
+ attributes:
15
+ label: What happened
16
+ description: What you ran, what you expected, and what jj-stack did instead.
17
+ placeholder: |
18
+ I ran `jj-stack submit` on a three-change stack and expected ...
19
+ Instead it ...
20
+ validations:
21
+ required: true
22
+ - type: textarea
23
+ id: repro
24
+ attributes:
25
+ label: Steps to reproduce
26
+ description: >-
27
+ The local stack shape and the commands you ran, in order. `jj log` output for the
28
+ affected stack is usually the most useful thing you can include.
29
+ validations:
30
+ required: true
31
+ - type: textarea
32
+ id: doctor
33
+ attributes:
34
+ label: Output of `jj-stack doctor`
35
+ description: Run it in the affected repo. It reports repo setup, GitHub access, and leftovers.
36
+ render: console
37
+ validations:
38
+ required: false
39
+ - type: input
40
+ id: jj-stack-version
41
+ attributes:
42
+ label: jj-stack version
43
+ description: Output of `jj-stack --version`.
44
+ validations:
45
+ required: true
46
+ - type: input
47
+ id: jj-version
48
+ attributes:
49
+ label: jj version
50
+ description: Output of `jj --version`.
51
+ validations:
52
+ required: true
53
+ - type: input
54
+ id: platform
55
+ attributes:
56
+ label: Operating system
57
+ placeholder: macOS 15.5, Ubuntu 24.04, Windows 11
58
+ validations:
59
+ required: true
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://www.serpentine.com/software/jj-stack/
5
+ about: Guides, command reference, configuration, and automation.
6
+ - name: Troubleshooting
7
+ url: https://www.serpentine.com/software/jj-stack/troubleshooting/
8
+ about: Recovery steps for the common failure symptoms, organized by what you saw.
9
+ - name: Report a security vulnerability
10
+ url: https://github.com/bos/jj-stack/security/advisories/new
11
+ about: Use private vulnerability reporting. Do not open a public issue.
@@ -0,0 +1,32 @@
1
+ name: Feature request
2
+ description: Suggest a capability or a change to an existing one.
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ jj-stack is deliberately opinionated: one `jj` change is one pull request, and it owns the
9
+ generated PR branches. [Compare tools](https://www.serpentine.com/software/jj-stack/tool-comparison/)
10
+ explains what that rules out. A request that conflicts with those choices may still be
11
+ worth making — say why the stance should change.
12
+ - type: textarea
13
+ id: problem
14
+ attributes:
15
+ label: The problem
16
+ description: The workflow you are trying to complete, and where jj-stack gets in the way.
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: proposal
21
+ attributes:
22
+ label: What you would like instead
23
+ description: The behavior you want. Include the command and output you imagine, if you have one.
24
+ validations:
25
+ required: true
26
+ - type: textarea
27
+ id: alternatives
28
+ attributes:
29
+ label: What you do today
30
+ description: The workaround you currently use, and why it is not good enough.
31
+ validations:
32
+ required: false
@@ -8,8 +8,8 @@ This project is under active development. Security fixes are supported on `main`
8
8
 
9
9
  Please do not report security vulnerabilities in public GitHub issues.
10
10
 
11
- Use GitHub's private vulnerability reporting for this repo if it is enabled. If you cannot
12
- use private reporting, contact the maintainers directly and include:
11
+ Use [private vulnerability reporting](https://github.com/bos/jj-stack/security/advisories/new),
12
+ which is enabled for this repo. Include:
13
13
 
14
14
  - a description of the issue
15
15
  - steps to reproduce or a proof of concept
@@ -0,0 +1,19 @@
1
+ <!--
2
+ See CONTRIBUTING.md. For a substantial change, please open an issue first.
3
+ Commit subjects use `scope: summary`; explain why in the body, wrapped at 72 columns.
4
+ -->
5
+
6
+ ## What this changes
7
+
8
+ <!-- The user-visible behavior or rule this adds, alters, or fixes. -->
9
+
10
+ ## Why
11
+
12
+ <!-- The motivation. For a fix, the symptom that is gone. -->
13
+
14
+ ## Checks
15
+
16
+ - [ ] `just check` passes
17
+ - [ ] `just complexity` passes, or the pull request explains why a budget must change
18
+ - [ ] Documentation updated, or not required by the rules in `AGENTS.md`
19
+ - [ ] Website snapshot refreshed with `just website` if user-facing docs or `--help` changed
@@ -23,11 +23,12 @@ jobs:
23
23
  python-version: "3.14"
24
24
 
25
25
  - name: Install tokei
26
- env:
27
- # Must match TOKEI_VERSION in tools/check_complexity.py; the budgets are baselined
28
- # against this exact counter. 14.0.0 publishes no prebuilt binaries, so build it.
29
- TOKEI_VERSION: 14.0.0
30
- run: cargo install tokei --locked --version "$TOKEI_VERSION"
26
+ run: |
27
+ TOKEI_VERSION="$(
28
+ uv run --no-project --python 3.14 python -c \
29
+ 'from tools.check_complexity import TOKEI_VERSION; print(TOKEI_VERSION)'
30
+ )"
31
+ cargo install tokei --locked --version "$TOKEI_VERSION"
31
32
 
32
33
  - name: Install project environment
33
34
  run: uv sync --locked
@@ -39,7 +40,7 @@ jobs:
39
40
  strategy:
40
41
  fail-fast: false
41
42
  matrix:
42
- jj-version: ["v0.44.0"]
43
+ jj-version: ["v0.45.1"]
43
44
  os: [ubuntu-latest, macos-latest, windows-latest]
44
45
  python-version: ["3.14"]
45
46
  runs-on: ${{ matrix.os }}
@@ -71,7 +72,7 @@ jobs:
71
72
  submit-property-smoke:
72
73
  runs-on: ubuntu-latest
73
74
  env:
74
- JJ_VERSION: v0.44.0
75
+ JJ_VERSION: v0.45.1
75
76
 
76
77
  steps:
77
78
  - name: Check out repo
@@ -23,10 +23,10 @@ jobs:
23
23
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24
24
 
25
25
  - name: Initialize CodeQL
26
- uses: github/codeql-action/init@v4.37.7
26
+ uses: github/codeql-action/init@v4.37.8
27
27
  with:
28
28
  languages: python
29
29
  build-mode: none
30
30
 
31
31
  - name: Analyze
32
- uses: github/codeql-action/analyze@v4.37.7
32
+ uses: github/codeql-action/analyze@v4.37.8
@@ -19,7 +19,7 @@ concurrency:
19
19
  cancel-in-progress: false
20
20
 
21
21
  env:
22
- JJ_VERSION: v0.44.0
22
+ JJ_VERSION: v0.45.1
23
23
 
24
24
  jobs:
25
25
  build:
@@ -22,6 +22,7 @@
22
22
  - Run the CLI locally with `just run ...` instead of invoking the module or virtualenv path
23
23
  directly.
24
24
  - Hard-wrap code and markdown files at 98 columns unless a file uses a different convention.
25
+ Release-note prose follows `docs/internals/releasing.md` and is intentionally unwrapped.
25
26
 
26
27
  # Commit messages
27
28
 
@@ -0,0 +1,74 @@
1
+ # Contributing
2
+
3
+ Thanks for your interest in `jj-stack`.
4
+
5
+ ## Before you start
6
+
7
+ Open an issue before writing a substantial change. `jj-stack` is deliberately opinionated about
8
+ what it manages and what it leaves to `jj`, so a feature that fits your workflow may still be out
9
+ of scope. [Compare tools](docs/tool-comparison.md) explains the stance and its trade-offs.
10
+
11
+ Bug reports, documentation corrections, and small focused fixes are welcome without prior
12
+ discussion.
13
+
14
+ ## Development setup
15
+
16
+ You need `uv`, `jj` 0.45.1 or newer, and `just`. Then:
17
+
18
+ ```console
19
+ just setup
20
+ ```
21
+
22
+ Run `just` on its own to list every recipe.
23
+
24
+ ## Working on a change
25
+
26
+ Run the CLI from your checkout with `just run ...` rather than invoking the module or the
27
+ virtualenv path directly:
28
+
29
+ ```console
30
+ just run view
31
+ ```
32
+
33
+ Run the standard Ruff, type-check, and test pass before you finish:
34
+
35
+ ```console
36
+ just check
37
+ ```
38
+
39
+ Run focused tests while you iterate:
40
+
41
+ ```console
42
+ just test tests/unit/test_jj_client.py
43
+ ```
44
+
45
+ CI also enforces the cumulative complexity budgets. Check them locally with `just complexity`
46
+ when the pinned `tokei` is installed. Raising a budget is a design decision, not routine
47
+ maintenance — say why in the pull request.
48
+
49
+ If your change touches user-facing documentation, refresh the website snapshot with
50
+ `just website` and include the resulting change in the sibling `website` repository.
51
+
52
+ ## Conventions
53
+
54
+ [`AGENTS.md`](AGENTS.md) is the working agreement for this repo, and it applies to human
55
+ contributors too. It covers commit message format, the 98-column wrap, when documentation
56
+ changes are required, and where each kind of documentation belongs. The internal notes under
57
+ [`docs/internals/`](docs/internals/) cover the design, testing philosophy, and review standard.
58
+
59
+ The short version:
60
+
61
+ - Write commit subjects as `scope: summary`, lowercase, no trailing period.
62
+ - Explain *why* the change exists in the body, wrapped at 72 columns.
63
+ - Add tests at the narrowest layer that covers a distinct risk; consolidate overlapping coverage
64
+ rather than adding parallel cases.
65
+ - Update documentation only when a change adds or alters a supported rule or workflow, or makes
66
+ an existing statement inaccurate.
67
+
68
+ ## Submitting
69
+
70
+ Pull requests go to `main`. `jj-stack` is developed with `jj-stack`, so a stacked series of small
71
+ changes is easy to review and very welcome.
72
+
73
+ By contributing, you agree that your contributions are licensed under the
74
+ [Apache License 2.0](LICENSE).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: jj-stack
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Stacked GitHub pull requests for Jujutsu
5
5
  Project-URL: Homepage, https://www.serpentine.com/software/jj-stack/
6
6
  Project-URL: Documentation, https://www.serpentine.com/software/jj-stack/
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Topic :: Software Development :: Version Control
21
21
  Classifier: Topic :: Software Development :: Version Control :: Git
22
22
  Requires-Python: >=3.14
23
- Requires-Dist: httpxyz<0.32,>=0.31.0
23
+ Requires-Dist: httpx2<3,>=2.12.0
24
24
  Requires-Dist: markdown-it-py<5,>=4.0.0
25
25
  Requires-Dist: pydantic<3,>=2.13.3
26
26
  Requires-Dist: rich<16,>=15.0.0
@@ -37,7 +37,7 @@ matching PRs.
37
37
  ### Requirements
38
38
 
39
39
  - Python 3.14 or newer
40
- - `jj` 0.44.0 or newer
40
+ - `jj` 0.45.1 or newer
41
41
  - GitHub authentication
42
42
 
43
43
  ### Install
@@ -109,8 +109,8 @@ refresh. Use `jj-stack list` to see every tracked stack in the repo.
109
109
 
110
110
  ## Mental model
111
111
 
112
- The local `jj` DAG determines which changes form a stack and their order. On GitHub, each change
113
- gets a stable PR branch and a PR; every PR targets the PR branch below it, except the
112
+ Your local `jj` history determines which changes form a stack and their order. On GitHub, each
113
+ change gets a stable PR branch and a PR; every PR targets the PR branch below it, except the
114
114
  bottom PR, which targets trunk by default:
115
115
 
116
116
  ```text
@@ -178,9 +178,12 @@ gh skill install bos/jj-stack jj-stack
178
178
  See the [skill source](https://github.com/bos/jj-stack/blob/main/skills/jj-stack/SKILL.md). In
179
179
  my evaluations with Codex and Claude Code, agents with the `jj-stack` skill succeeded in 11/12
180
180
  scenarios versus 6/12 without it, with one critical error versus four, using 60% fewer failed
181
- command attempts and 18% fewer tool calls. (The critical error was due to Claude Haiku
182
- understanding a rule and ignoring it. I haven't figured out how to get smaller Claude models to
183
- behave better, and I don't personally use them.)
181
+ command attempts and 18% fewer tool calls. Treat that as a small pilot rather than a published
182
+ benchmark:
183
+ [`evals/jj-stack-skill.md`](https://github.com/bos/jj-stack/blob/main/evals/jj-stack-skill.md)
184
+ gives the evaluation design, but this repo does not include the traces behind those numbers.
185
+ (The critical error was due to Claude Haiku understanding a rule and ignoring it. I haven't
186
+ figured out how to get smaller Claude models to behave better, and I don't personally use them.)
184
187
 
185
188
  ## Performance
186
189
 
@@ -9,7 +9,7 @@ matching PRs.
9
9
  ### Requirements
10
10
 
11
11
  - Python 3.14 or newer
12
- - `jj` 0.44.0 or newer
12
+ - `jj` 0.45.1 or newer
13
13
  - GitHub authentication
14
14
 
15
15
  ### Install
@@ -81,8 +81,8 @@ refresh. Use `jj-stack list` to see every tracked stack in the repo.
81
81
 
82
82
  ## Mental model
83
83
 
84
- The local `jj` DAG determines which changes form a stack and their order. On GitHub, each change
85
- gets a stable PR branch and a PR; every PR targets the PR branch below it, except the
84
+ Your local `jj` history determines which changes form a stack and their order. On GitHub, each
85
+ change gets a stable PR branch and a PR; every PR targets the PR branch below it, except the
86
86
  bottom PR, which targets trunk by default:
87
87
 
88
88
  ```text
@@ -150,9 +150,12 @@ gh skill install bos/jj-stack jj-stack
150
150
  See the [skill source](https://github.com/bos/jj-stack/blob/main/skills/jj-stack/SKILL.md). In
151
151
  my evaluations with Codex and Claude Code, agents with the `jj-stack` skill succeeded in 11/12
152
152
  scenarios versus 6/12 without it, with one critical error versus four, using 60% fewer failed
153
- command attempts and 18% fewer tool calls. (The critical error was due to Claude Haiku
154
- understanding a rule and ignoring it. I haven't figured out how to get smaller Claude models to
155
- behave better, and I don't personally use them.)
153
+ command attempts and 18% fewer tool calls. Treat that as a small pilot rather than a published
154
+ benchmark:
155
+ [`evals/jj-stack-skill.md`](https://github.com/bos/jj-stack/blob/main/evals/jj-stack-skill.md)
156
+ gives the evaluation design, but this repo does not include the traces behind those numbers.
157
+ (The critical error was due to Claude Haiku understanding a rule and ignoring it. I haven't
158
+ figured out how to get smaller Claude models to behave better, and I don't personally use them.)
156
159
 
157
160
  ## Performance
158
161
 
@@ -70,10 +70,9 @@ def _build_checks(
70
70
  if coverage:
71
71
  pytest_command = (
72
72
  *pytest_command,
73
- "--cov=jj_stack",
74
- "--cov-branch",
75
- "--cov-report=term-missing",
76
- "--cov-report=html:htmlcov",
73
+ "--cov",
74
+ "--cov-report=term",
75
+ "--cov-report=html",
77
76
  )
78
77
  return (
79
78
  ("ruff", ("-m", "ruff", "check")),
@@ -3,7 +3,7 @@ production = 20_160
3
3
  tests = 21_570
4
4
  total = 41_833
5
5
  merge = 1_682
6
- governed = 3_315
6
+ governed = 3_869
7
7
  governed_module = 502
8
8
  checker = 182
9
9
 
@@ -12,8 +12,8 @@ c901 = 16
12
12
  governed_c901 = 0
13
13
 
14
14
  [pytest]
15
- fixed_property = 8
16
- merge_recovery = 58
15
+ fixed_property = 9
16
+ merge_recovery = 60
17
17
 
18
18
  [labels]
19
19
  production = "Production"
@@ -21,9 +21,9 @@ tests = "Tests"
21
21
  total = "Production and tests combined"
22
22
  checker = "Complexity checker"
23
23
  merge = "Merge command"
24
- governed = "Merge and recovery code"
24
+ governed = "Merge, recovery, and change-state code"
25
25
  c901 = "Production"
26
- governed_c901 = "Merge and recovery code"
26
+ governed_c901 = "Merge, recovery, and change-state code"
27
27
  fixed_property = "Property-test cases"
28
28
  merge_recovery = "Merge and recovery cases"
29
29
 
@@ -57,6 +57,7 @@ governed = [
57
57
  "src/jj_stack/stack/convergence_observation.py",
58
58
  "src/jj_stack/stack/global_convergence.py",
59
59
  "src/jj_stack/stack/pr_facts.py",
60
+ "src/jj_stack/stack/change_state.py",
60
61
  ]
61
62
  fixed_property = [
62
63
  "tests/property/test_submit_property_scenarios.py",
@@ -35,6 +35,16 @@ implementation — terms a jj user would not know without reading the source:
35
35
  The distinction is between standard jj/git vocabulary (fine) and
36
36
  `jj-stack`-specific design prose that leaked into the wrong layer (not fine).
37
37
 
38
+ Use one name for each recurring concept, in docs, help, and hints alike:
39
+
40
+ - The record that connects a pull request to a local change is its **saved pull request link**
41
+ (or "saved link"); the collection is **tracking data**. Do not call it PR identity, saved
42
+ tracking, or a remembered PR. The verbs are **link** and **relink**, not attach, adopt, or
43
+ claim.
44
+ - A **direct merge** is one GitHub performs immediately rather than through a merge queue. Say
45
+ so the first time a page or help text uses the term.
46
+ - Name commands in full in hints and messages: `jj-stack relink`, not `relink`.
47
+
38
48
  ## What belongs here vs. docs/internals/
39
49
 
40
50
  **`docs/`** — user-facing guides. These files should explain what to do and
@@ -39,4 +39,5 @@ jj-stack <command> --help
39
39
  jj-stack help --all
40
40
  ```
41
41
 
42
- State-changing commands also accept `--dry-run` when you want to preview their work.
42
+ `submit`, `merge`, `unstack`, `cleanup`, and `sync` accept `--dry-run` when you want to preview
43
+ their work.
@@ -53,8 +53,11 @@ links:
53
53
  jj-stack cleanup <head-change-id>
54
54
  ```
55
55
 
56
- Cleanup leaves a PR branch in place if an open pull request still needs it. Close or retarget
57
- that pull request, then run the same cleanup command again.
56
+ Cleanup keeps a PR branch while another pull request still uses it as its base, because GitHub
57
+ cannot reopen a pull request whose base branch is gone. The message names that pull request.
58
+ Retarget it to trunk; if it is closed, either reopen and retarget it, or delete its head branch.
59
+ Cleanup also keeps a branch while GitHub still groups its pull request in a stack, so run
60
+ `unstack` first. Then run the same cleanup command again.
58
61
 
59
62
  ## Close an orphaned pull request
60
63
 
@@ -66,5 +69,5 @@ directly:
66
69
  jj-stack cleanup --pull-request <pr> --close
67
70
  ```
68
71
 
69
- This closes your pull request if it is open, then removes its unused branch, stack overview
70
- comment, and saved link.
72
+ If your pull request is open, this retargets it to trunk and closes it. It then removes its unused
73
+ branch, stack overview comment, and saved link.
@@ -0,0 +1,66 @@
1
+ ---
2
+ title: Continue an existing stack
3
+ linkTitle: Continue an existing stack
4
+ description: Connect this checkout to your existing stack of pull requests on GitHub.
5
+ navGroup: Everyday work
6
+ weight: 70
7
+ ---
8
+
9
+ Use this workflow when you submitted your stack from another machine or checkout and want to work
10
+ on it here.
11
+
12
+ ## Pick a stack
13
+
14
+ List the active stacks already tracked here and those available only on GitHub:
15
+
16
+ ```console
17
+ jj-stack checkout --pick
18
+ ```
19
+
20
+ Each GitHub row shows the stack number, top pull request, base branch, size, status, and whether
21
+ the stack is already tracked here, partly tracked, or available only on GitHub. Choosing a stack
22
+ that is not fully tracked here records its pull request links, fetches any missing commits, and
23
+ runs `jj edit` on its top open change. Choosing a stack that is already tracked here just edits
24
+ its head change.
25
+
26
+ ## Connect a pull request directly
27
+
28
+ Choose any pull request in your stack:
29
+
30
+ ```console
31
+ jj-stack checkout --pull-request <pr>
32
+ ```
33
+
34
+ `checkout` follows that pull request down to the bottom of its stack, fetches those commits,
35
+ records which local change belongs to each pull request, and runs `jj edit` on its change.
36
+
37
+ To start a new change on top instead of editing that change directly, run:
38
+
39
+ ```console
40
+ jj new
41
+ ```
42
+
43
+ ## If your change is already here with local edits
44
+
45
+ If this repo already has a different commit for the same change, usually because you edited it
46
+ after it was last submitted, `checkout` brings in the pull request's commit as a second copy of
47
+ that change and prints both commit IDs. It does not choose between them. Compare the two, then
48
+ abandon the one you do not want by its commit ID:
49
+
50
+ ```console
51
+ jj log -r 'change_id(<change-id>)'
52
+ jj diff -r <commit-id>
53
+ jj abandon <unwanted-commit-id>
54
+ ```
55
+
56
+ If you kept your own copy, update the pull request:
57
+
58
+ ```console
59
+ jj-stack submit <head-change-id>
60
+ ```
61
+
62
+ ## If someone pushed a commit to your PR branch
63
+
64
+ A commit that someone else pushed to your PR branch, such as a reviewer's suggestion, is not part
65
+ of your change. `checkout` brings it in as a new change on top of yours and prints the
66
+ `jj squash` command that folds it into your change.
@@ -29,8 +29,8 @@ By default, `merge` starts with the pull request at the bottom of your stack—t
29
29
  trunk—and works upward. It merges your ready pull requests in order until your whole stack is
30
30
  merged or it reaches a pull request that it cannot merge.
31
31
 
32
- To merge only the bottom portion of your stack, specify its last change by change ID, commit ID,
33
- or pull request ID:
32
+ To merge only the bottom portion of your stack, name the last change to merge, either as a
33
+ revset or by its pull request:
34
34
 
35
35
  ```console
36
36
  jj-stack merge --pull-request 42
@@ -52,6 +52,16 @@ After GitHub merges some or all of your pull requests, `sync` fetches trunk, rem
52
52
  changes from your local history if needed, rebases your remaining changes, updates your remaining
53
53
  pull requests, and removes your PR branches when they are no longer needed.
54
54
 
55
+ Select the stack by its head change ID or by any linked pull request:
56
+
57
+ ```console
58
+ jj-stack sync <head-change-id>
59
+ jj-stack sync --pull-request <pr>
60
+ ```
61
+
62
+ Unlike `merge --pull-request`, which stops at the selected PR, `sync --pull-request` selects the
63
+ complete local stack containing that PR. The selected PR can already be merged.
64
+
55
65
  If none of the pull requests in your stack has merged and GitHub has not rebased the stack,
56
66
  `sync` reports that there are no merged changes and leaves the pull requests unchanged. Run
57
67
  `submit` explicitly when you want to publish local changes.
@@ -64,21 +74,18 @@ trunk. `sync` discards the old changes for you.
64
74
 
65
75
  ### Direct merges
66
76
 
67
- For a direct merge, `merge` waits for GitHub to finish and runs `sync` before it returns. You do
68
- not need to run another cleanup command.
77
+ A direct merge is one that GitHub performs immediately, rather than through a merge queue. For a
78
+ direct merge, `merge` waits for GitHub to finish and runs `sync` before it returns. You do not
79
+ need to run another cleanup command.
69
80
 
70
81
  ### Merge queues
71
82
 
72
83
  When `merge` uses a merge queue, it returns successfully once GitHub accepts the pull requests
73
84
  you asked it to merge. This does not mean trunk has changed. Wait until GitHub reports that your
74
- stack has merged. Then run `sync` with the head of your stack:
75
-
76
- ```console
77
- jj-stack sync <head-change-id>
78
- ```
85
+ stack has merged. Then run `sync` for that stack.
79
86
 
80
- If you run either command while one of those pull requests is queued, `submit` and `sync` leave
81
- your stack unchanged.
87
+ While those pull requests are waiting in the queue, `submit` and `sync` leave your stack
88
+ unchanged.
82
89
 
83
90
  ### Merges outside jj-stack
84
91
 
@@ -88,11 +95,7 @@ same `sync` command after GitHub reports that the merge finished.
88
95
  ### Rebasing from GitHub
89
96
 
90
97
  GitHub's **Rebase stack** action rewrites every PR branch onto the latest trunk. After it
91
- finishes, run:
92
-
93
- ```console
94
- jj-stack sync <head-change-id>
95
- ```
98
+ finishes, run `sync` for that stack.
96
99
 
97
100
  GitHub does not retain jj change IDs in those rewritten commits. `sync` verifies that the PRs,
98
101
  branch order, and contents still match your submitted stack, rebases the original local changes,
@@ -113,9 +116,9 @@ to it. It also removes branches, comments, and saved pull-request links for merg
113
116
  local changes are gone. If one stack cannot be updated, jj-stack explains why and continues with
114
117
  independent stacks.
115
118
 
116
- `sync --all` and `sync <head-change-id>` do not rebase a stack merely because trunk advanced.
117
- `sync <head-change-id>` also recognizes a completed native GitHub stack rebase because GitHub
118
- moved every PR branch and the rewritten contents can be verified.
119
+ Neither form of `sync` rebases a stack merely because trunk advanced. `sync --all` applies
120
+ completed merges only; after GitHub's **Rebase stack** action, run `sync <head-change-id>` for
121
+ that stack.
119
122
 
120
123
  ## If `merge` fails after GitHub merges your pull requests
121
124
 
@@ -139,7 +142,7 @@ command.
139
142
  changes with `jj` if needed, then submit the rewritten changes:
140
143
 
141
144
  ```console
142
- jj rebase -r '<bottom-change-id>::<head-change-id>' -o 'trunk()'
145
+ jj rebase -s '<bottom-change-id>' -o 'trunk()'
143
146
  jj-stack submit <head-change-id>
144
147
  ```
145
148
 
@@ -29,9 +29,9 @@ A lower layer can be approved while work continues above it. When merging only p
29
29
  merge a contiguous section from the bottom; the remaining pull requests still depend on the
30
30
  merged work and the author should run `jj-stack sync` afterward.
31
31
 
32
- Use GitHub's native stack merge controls for merges started in the web UI. The ordinary legacy
33
- pull request merge API does not implement the same stack operation. For current UI behavior and
34
- limitations, see GitHub's [stacked pull request guides][github-stacks] for the current controls.
32
+ When merging from the web UI, use the stack's own merge controls. Merging an individual pull
33
+ request with its ordinary merge button or API does not perform the stack merge. GitHub's
34
+ [stacked pull request guides][github-stacks] describe the current controls and their limitations.
35
35
 
36
36
  ## Configure rules and CI for the final base
37
37