jj-stack 0.1.3__tar.gz → 0.1.4__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.
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/workflows/ci.yml +4 -9
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/workflows/codeql.yml +2 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.gitignore +2 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/AGENTS.md +21 -19
- {jj_stack-0.1.3 → jj_stack-0.1.4}/CONTRIBUTING.md +24 -6
- {jj_stack-0.1.3 → jj_stack-0.1.4}/PKG-INFO +81 -96
- jj_stack-0.1.4/README.md +158 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/check.py +55 -18
- {jj_stack-0.1.3 → jj_stack-0.1.4}/complexity-budget.toml +1 -0
- jj_stack-0.1.4/docs/AGENTS.md +57 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/docs/README.md +5 -6
- jj_stack-0.1.4/docs/guides/close-or-separate.md +89 -0
- jj_stack-0.1.4/docs/guides/continue-a-stack.md +89 -0
- jj_stack-0.1.4/docs/guides/merge-and-sync.md +181 -0
- jj_stack-0.1.4/docs/guides/multiple-stacks.md +167 -0
- jj_stack-0.1.4/docs/guides/review-a-stack.md +70 -0
- jj_stack-0.1.4/docs/guides/revise.md +87 -0
- jj_stack-0.1.4/docs/guides/submit-and-update.md +97 -0
- jj_stack-0.1.4/docs/guides/working-on-github.md +56 -0
- jj_stack-0.1.4/docs/internals/AGENTS.md +20 -0
- jj_stack-0.1.4/docs/internals/README.md +45 -0
- jj_stack-0.1.4/docs/internals/code-reviews.md +78 -0
- jj_stack-0.1.4/docs/internals/design.md +752 -0
- jj_stack-0.1.4/docs/internals/property-testing.md +14 -0
- jj_stack-0.1.4/docs/internals/releasing.md +118 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/docs/internals/testing-philosophy.md +29 -12
- {jj_stack-0.1.3 → jj_stack-0.1.4}/docs/json-output.schema.json +24 -1
- jj_stack-0.1.4/docs/mental-model.md +130 -0
- jj_stack-0.1.4/docs/quick-start.md +197 -0
- jj_stack-0.1.4/docs/reference/automation.md +127 -0
- jj_stack-0.1.4/docs/reference/bookmarks-and-selection.md +127 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/docs/reference/commands.md +15 -19
- jj_stack-0.1.4/docs/reference/configuration.md +127 -0
- jj_stack-0.1.4/docs/reference/descriptions.md +94 -0
- jj_stack-0.1.4/docs/reference/json-output.md +190 -0
- jj_stack-0.1.4/docs/tool-comparison.md +128 -0
- jj_stack-0.1.4/docs/troubleshooting.md +280 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/evals/jj-stack-skill.md +5 -5
- {jj_stack-0.1.3 → jj_stack-0.1.4}/justfile +8 -6
- {jj_stack-0.1.3 → jj_stack-0.1.4}/pyproject.toml +14 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/release-notes/v0.1.2.md +1 -1
- jj_stack-0.1.4/release-notes/v0.1.4.md +23 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/skills/jj-stack/SKILL.md +50 -37
- {jj_stack-0.1.3 → jj_stack-0.1.4}/skills/jj-stack/references/multi-stack.md +33 -29
- {jj_stack-0.1.3 → jj_stack-0.1.4}/skills/jj-stack/references/recovery.md +27 -24
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/bootstrap.py +13 -18
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/cli.py +136 -260
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/cli_help.py +34 -27
- jj_stack-0.1.4/src/jj_stack/commands/_json_status.py +62 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/checkout.py +178 -218
- jj_stack-0.1.3/src/jj_stack/commands/_cleanup_actions.py → jj_stack-0.1.4/src/jj_stack/commands/cleanup/actions.py +68 -155
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/cleanup/command.py +209 -268
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/doctor.py +99 -87
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/in_use.py +4 -4
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/list_.py +120 -288
- jj_stack-0.1.4/src/jj_stack/commands/merge/command.py +401 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/merge/github_stack.py +34 -56
- jj_stack-0.1.4/src/jj_stack/commands/merge/plan.py +269 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/relink.py +48 -58
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/auto_close.py +18 -23
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/changes.py +13 -62
- jj_stack-0.1.4/src/jj_stack/commands/submit/command.py +586 -0
- jj_stack-0.1.4/src/jj_stack/commands/submit/descriptions.py +342 -0
- jj_stack-0.1.4/src/jj_stack/commands/submit/editor.py +277 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/github_stack.py +12 -51
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/inputs.py +55 -28
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/managed_comments.py +8 -7
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/models.py +40 -86
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/overview_comments.py +22 -52
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/prs.py +44 -81
- jj_stack-0.1.4/src/jj_stack/commands/submit/publication.py +279 -0
- jj_stack-0.1.4/src/jj_stack/commands/submit/render.py +139 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/revision_comments.py +9 -13
- jj_stack-0.1.4/src/jj_stack/commands/sync.py +464 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/sync_apply.py +124 -181
- jj_stack-0.1.4/src/jj_stack/commands/sync_prs.py +118 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/unstack.py +39 -45
- jj_stack-0.1.4/src/jj_stack/commands/view.py +778 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/completion.py +3 -8
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/concurrency.py +21 -13
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/config.py +28 -45
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/console.py +93 -57
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/errors.py +48 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/formatting.py +19 -49
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/client.py +170 -159
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/error_messages.py +57 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/pr_refs.py +5 -10
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/resolution.py +8 -6
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/identifiers.py +7 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/jj/cli_args.py +0 -3
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/jj/client.py +208 -378
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/jj/colors.py +26 -91
- jj_stack-0.1.4/src/jj_stack/jj/settings.py +63 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/models/github.py +34 -28
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/models/stack.py +11 -15
- jj_stack-0.1.4/src/jj_stack/models/tracking.py +52 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/pr_branch_namespace.py +2 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/change_state.py +154 -158
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/convergence.py +160 -150
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/convergence_models.py +16 -24
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/convergence_observation.py +36 -36
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/github_stack_safety.py +3 -3
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/global_convergence.py +60 -62
- jj_stack-0.1.4/src/jj_stack/stack/observation.py +174 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/path.py +37 -38
- jj_stack-0.1.4/src/jj_stack/stack/pr_branches.py +148 -0
- jj_stack-0.1.4/src/jj_stack/stack/pr_facts.py +200 -0
- jj_stack-0.1.4/src/jj_stack/stack/preparation.py +84 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/repo.py +18 -19
- jj_stack-0.1.4/src/jj_stack/stack/reporting.py +182 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/selected.py +28 -28
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/selection.py +16 -32
- jj_stack-0.1.4/src/jj_stack/stack/status.py +255 -0
- jj_stack-0.1.4/src/jj_stack/stack/trunk.py +48 -0
- jj_stack-0.1.4/src/jj_stack/stack/trunk_evidence.py +51 -0
- jj_stack-0.1.4/src/jj_stack/state/migrations.py +57 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/state/operation_lock.py +13 -13
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/state/store.py +21 -46
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/conftest.py +22 -1
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/conftest.py +0 -18
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/submit_command_helpers.py +0 -10
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_boundary_conditions.py +1 -1
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_checkout_command.py +20 -32
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_cleanup_command.py +36 -33
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_doctor_command.py +36 -47
- jj_stack-0.1.4/tests/integration/test_fake_github_contracts.py +114 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_jj_stack.py +59 -30
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_list_command.py +40 -51
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_merge_command.py +108 -89
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_relink_command.py +7 -5
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_submit_command.py +240 -206
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_sync_command.py +157 -137
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_unstack_command.py +17 -34
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/test_view_command.py +37 -59
- jj_stack-0.1.4/tests/property/test_submit_property_scenarios.py +105 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/run_live_github.py +1 -1
- jj_stack-0.1.4/tests/run_submit_property_scenarios.py +122 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/change_helpers.py +1 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/contexts.py +1 -3
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/fake_github.py +78 -53
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/integration_helpers.py +33 -49
- jj_stack-0.1.4/tests/support/stack_machine.py +1291 -0
- jj_stack-0.1.4/tests/support/submit_faults.py +91 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/tracking.py +1 -1
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_bootstrap.py +1 -35
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_change_state.py +17 -43
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_check_script.py +2 -26
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_checkout.py +1 -1
- jj_stack-0.1.4/tests/unit/test_cleanup.py +20 -0
- jj_stack-0.1.4/tests/unit/test_cli.py +166 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_cli_dispatch.py +4 -24
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_completion.py +3 -4
- jj_stack-0.1.4/tests/unit/test_config.py +81 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_describe_with_editor_script.py +4 -20
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_describe_with_prompt_script.py +4 -29
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_errors.py +5 -8
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_github_client.py +35 -18
- jj_stack-0.1.4/tests/unit/test_github_error_messages.py +52 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_github_models.py +22 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_github_resolution.py +6 -5
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_github_stack_planning.py +6 -3
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_in_use_command.py +4 -3
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_jj_client.py +91 -153
- jj_stack-0.1.4/tests/unit/test_jj_settings.py +86 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_merge.py +88 -105
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_pr_branches.py +22 -31
- jj_stack-0.1.4/tests/unit/test_pr_facts.py +112 -0
- jj_stack-0.1.4/tests/unit/test_property_runner.py +53 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_relink.py +16 -28
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_selected.py +2 -2
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_stack_path.py +13 -48
- jj_stack-0.1.4/tests/unit/test_stack_status.py +152 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_store.py +37 -38
- jj_stack-0.1.4/tests/unit/test_submit.py +176 -0
- jj_stack-0.1.4/tests/unit/test_submit_descriptions.py +121 -0
- jj_stack-0.1.4/tests/unit/test_submit_editor.py +206 -0
- jj_stack-0.1.4/tests/unit/test_trunk_evidence.py +95 -0
- jj_stack-0.1.4/tests/unit/test_ui.py +154 -0
- jj_stack-0.1.4/tests/unit/test_view.py +299 -0
- jj_stack-0.1.4/tests/unit/test_view_entrypoint.py +212 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tools/check_complexity.py +6 -7
- jj_stack-0.1.4/uv.lock +915 -0
- jj_stack-0.1.3/README.md +0 -173
- jj_stack-0.1.3/docs/AGENTS.md +0 -85
- jj_stack-0.1.3/docs/guides/close-or-separate.md +0 -73
- jj_stack-0.1.3/docs/guides/continue-a-stack.md +0 -66
- jj_stack-0.1.3/docs/guides/merge-and-sync.md +0 -149
- jj_stack-0.1.3/docs/guides/multiple-stacks.md +0 -113
- jj_stack-0.1.3/docs/guides/review-a-stack.md +0 -60
- jj_stack-0.1.3/docs/guides/revise.md +0 -54
- jj_stack-0.1.3/docs/guides/submit-and-update.md +0 -106
- jj_stack-0.1.3/docs/guides/working-on-github.md +0 -55
- jj_stack-0.1.3/docs/internals/AGENTS.md +0 -30
- jj_stack-0.1.3/docs/internals/README.md +0 -22
- jj_stack-0.1.3/docs/internals/code-reviews.md +0 -113
- jj_stack-0.1.3/docs/internals/design.md +0 -980
- jj_stack-0.1.3/docs/internals/implementation-strategy.md +0 -126
- jj_stack-0.1.3/docs/internals/property-testing.md +0 -54
- jj_stack-0.1.3/docs/internals/releasing.md +0 -119
- jj_stack-0.1.3/docs/mental-model.md +0 -66
- jj_stack-0.1.3/docs/quick-start.md +0 -131
- jj_stack-0.1.3/docs/reference/automation.md +0 -133
- jj_stack-0.1.3/docs/reference/bookmarks-and-selection.md +0 -149
- jj_stack-0.1.3/docs/reference/configuration.md +0 -75
- jj_stack-0.1.3/docs/reference/descriptions.md +0 -84
- jj_stack-0.1.3/docs/reference/json-output.md +0 -167
- jj_stack-0.1.3/docs/tool-comparison.md +0 -215
- jj_stack-0.1.3/docs/troubleshooting.md +0 -211
- jj_stack-0.1.3/src/jj_stack/commands/_json_status.py +0 -115
- jj_stack-0.1.3/src/jj_stack/commands/cleanup/shared.py +0 -61
- jj_stack-0.1.3/src/jj_stack/commands/cleanup/stale.py +0 -79
- jj_stack-0.1.3/src/jj_stack/commands/merge/command.py +0 -370
- jj_stack-0.1.3/src/jj_stack/commands/merge/models.py +0 -106
- jj_stack-0.1.3/src/jj_stack/commands/merge/plan.py +0 -108
- jj_stack-0.1.3/src/jj_stack/commands/merge/preconditions.py +0 -169
- jj_stack-0.1.3/src/jj_stack/commands/merge/render.py +0 -54
- jj_stack-0.1.3/src/jj_stack/commands/submit/command.py +0 -850
- jj_stack-0.1.3/src/jj_stack/commands/submit/comments.py +0 -64
- jj_stack-0.1.3/src/jj_stack/commands/submit/descriptions.py +0 -637
- jj_stack-0.1.3/src/jj_stack/commands/submit/render.py +0 -124
- jj_stack-0.1.3/src/jj_stack/commands/sync.py +0 -507
- jj_stack-0.1.3/src/jj_stack/commands/view.py +0 -1041
- jj_stack-0.1.3/src/jj_stack/models/tracking.py +0 -93
- jj_stack-0.1.3/src/jj_stack/stack/pr_branches.py +0 -123
- jj_stack-0.1.3/src/jj_stack/stack/pr_facts.py +0 -203
- jj_stack-0.1.3/src/jj_stack/stack/status.py +0 -544
- jj_stack-0.1.3/src/jj_stack/stack/trunk.py +0 -25
- jj_stack-0.1.3/src/jj_stack/stack/trunk_evidence.py +0 -149
- jj_stack-0.1.3/src/jj_stack/state/migrations.py +0 -63
- jj_stack-0.1.3/tests/property/test_submit_property_scenarios.py +0 -382
- jj_stack-0.1.3/tests/run_submit_property_scenarios.py +0 -246
- jj_stack-0.1.3/tests/support/submit_property_harness.py +0 -1117
- jj_stack-0.1.3/tests/support/submit_property_scenarios.py +0 -1075
- jj_stack-0.1.3/tests/unit/conftest.py +0 -14
- jj_stack-0.1.3/tests/unit/test_cleanup.py +0 -72
- jj_stack-0.1.3/tests/unit/test_cli.py +0 -297
- jj_stack-0.1.3/tests/unit/test_config.py +0 -193
- jj_stack-0.1.3/tests/unit/test_list.py +0 -25
- jj_stack-0.1.3/tests/unit/test_property_runner.py +0 -50
- jj_stack-0.1.3/tests/unit/test_selection.py +0 -9
- jj_stack-0.1.3/tests/unit/test_stack_status.py +0 -260
- jj_stack-0.1.3/tests/unit/test_submit.py +0 -253
- jj_stack-0.1.3/tests/unit/test_submit_descriptions.py +0 -354
- jj_stack-0.1.3/tests/unit/test_trunk_evidence.py +0 -169
- jj_stack-0.1.3/tests/unit/test_ui.py +0 -270
- jj_stack-0.1.3/tests/unit/test_view.py +0 -368
- jj_stack-0.1.3/tests/unit/test_view_entrypoint.py +0 -252
- jj_stack-0.1.3/uv.lock +0 -595
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/SECURITY.md +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/dependabot.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/pull_request_template.md +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/workflows/block-pr-base-merges.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/workflows/check-jj-release-updates.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/.github/workflows/release.yml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/CLAUDE.md +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/LICENSE +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/NOTICE +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/release-notes/v0.1.3.md +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/scripts/README.md +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/scripts/describe_with_claude.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/scripts/describe_with_codex.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/scripts/describe_with_editor.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/scripts/describe_with_prompt.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/skills/jj-stack/agents/openai.yaml +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/__main__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/merge/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/commands/submit/default_pr_text.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/auth.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/overview_comments.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/github/stack_availability.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/jj/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/models/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/models/git.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/stack/divergence.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/state/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/src/jj_stack/ui.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/integration/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/json_schema.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/output_assertions.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/pytest_concurrency.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/support/stack_edit_scenarios.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/__init__.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_concurrency.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_default_pr_text.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_divergence.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_github_auth.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_live_github_runner.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_operation_lock.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_pr_refs.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_property_scenarios.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_sync.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tests/unit/test_unstack.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tools/check_jj_release_updates.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tools/check_release_artifacts.py +0 -0
- {jj_stack-0.1.3 → jj_stack-0.1.4}/tools/install-jj-release.sh +0 -0
|
@@ -26,9 +26,9 @@ jobs:
|
|
|
26
26
|
run: |
|
|
27
27
|
TOKEI_VERSION="$(
|
|
28
28
|
uv run --no-project --python 3.14 python -c \
|
|
29
|
-
'from tools.check_complexity import
|
|
29
|
+
'from tools.check_complexity import TOKEI_VERSIONS; print(TOKEI_VERSIONS[-1])'
|
|
30
30
|
)"
|
|
31
|
-
cargo install tokei --locked --version "
|
|
31
|
+
cargo install tokei --locked --version "^$TOKEI_VERSION"
|
|
32
32
|
|
|
33
33
|
- name: Install project environment
|
|
34
34
|
run: uv sync --locked
|
|
@@ -86,11 +86,6 @@ jobs:
|
|
|
86
86
|
- name: Install jj
|
|
87
87
|
run: echo "$(tools/install-jj-release.sh "$JJ_VERSION")" >> "$GITHUB_PATH"
|
|
88
88
|
|
|
89
|
-
- name: Run
|
|
89
|
+
- name: Run generated client and server sequences
|
|
90
90
|
run: >-
|
|
91
|
-
tests/run_submit_property_scenarios.py
|
|
92
|
-
--stack-join-scenarios 5
|
|
93
|
-
--lifecycle-scenarios 10
|
|
94
|
-
--stack-move-scenarios 5
|
|
95
|
-
--retry-scenarios 5
|
|
96
|
-
--drift-scenarios 21
|
|
91
|
+
tests/run_submit_property_scenarios.py 5 --steps 20 --shards 8 --random-seed -n auto
|
|
@@ -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.
|
|
26
|
+
uses: github/codeql-action/init@v4.37.9
|
|
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.
|
|
32
|
+
uses: github/codeql-action/analyze@v4.37.9
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
# Complexity control
|
|
2
2
|
|
|
3
3
|
- A replacement is incomplete until it deletes the mechanism it supersedes in the same change.
|
|
4
|
-
Do not
|
|
5
|
-
-
|
|
6
|
-
|
|
4
|
+
Do not keep a parallel model for a later cleanup.
|
|
5
|
+
- Store each persistent fact in one form, with one owner. Shared observation and storage code
|
|
6
|
+
must not introduce competing policy decisions.
|
|
7
7
|
- Batch independent read-only facts, but keep dependent mutations in order. Bind an irreversible
|
|
8
8
|
external mutation to the identity and version observed while planning when the platform
|
|
9
9
|
supports a conditional write or lease. Re-observe only when an earlier mutation invalidates a
|
|
10
10
|
precondition or when an observed trigger or platform contract requires it.
|
|
11
|
-
-
|
|
12
|
-
when
|
|
11
|
+
- Check the cumulative complexity budgets after each code change. Run `just complexity` locally
|
|
12
|
+
when a supported `tokei` is installed; CI invokes the underlying checker. A budget increase is a
|
|
13
13
|
design stop that requires explicit review, not routine maintenance of the budget file.
|
|
14
14
|
- If the same subsystem needs a third consecutive hardening change, stop patching it and
|
|
15
15
|
re-derive the design from the core invariants.
|
|
@@ -38,25 +38,26 @@
|
|
|
38
38
|
|
|
39
39
|
# Documentation
|
|
40
40
|
|
|
41
|
-
- User-facing docs live in `docs
|
|
42
|
-
rules and the public/internal split.
|
|
43
|
-
the user docs: assume jj/git familiarity,
|
|
41
|
+
- User-facing docs live in `docs/`, except for contributor notes in `docs/internals/`. See
|
|
42
|
+
[docs/AGENTS.md](docs/AGENTS.md) for the vocabulary rules and the public/internal split.
|
|
43
|
+
Built-in `--help` text is held to the same standard as the user docs: assume jj/git familiarity,
|
|
44
|
+
avoid `jj-stack` internal design jargon.
|
|
44
45
|
- The web version of the user docs normally lives in the sibling jj repository at
|
|
45
46
|
`$(jj root)/../website`. When user-facing docs change here, run `just website`, inspect the
|
|
46
47
|
corresponding website changes, and update them as needed. If the change here is committed,
|
|
47
48
|
commit the corresponding website update in that repository as well; preserve unrelated work in
|
|
48
49
|
either working copy.
|
|
49
50
|
- Active internal docs use ordinary technical language too. Introduce a project-specific term
|
|
50
|
-
only when it names
|
|
51
|
+
only when it names an existing type, field, or enduring rule, define it at first use, and prefer
|
|
51
52
|
describing concrete inputs and effects.
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
- Internal design and strategy documents describe the current product and architecture. Keep
|
|
54
|
+
implementation history in `jj` commits.
|
|
55
|
+
- For implementation work, update documentation when a change adds or alters a supported rule or
|
|
56
|
+
workflow, or makes an existing statement inaccurate. A bug fix alone does not require a docs
|
|
57
|
+
change. Documentation reviews and corrections can also address clarity, duplication, and gaps.
|
|
57
58
|
- When documentation is required, update only the affected source: `design.md` for an enduring
|
|
58
|
-
product rule, user docs or `--help` for user guidance, and
|
|
59
|
-
|
|
59
|
+
product rule, user docs or `--help` for user guidance, and the relevant testing document for
|
|
60
|
+
test strategy.
|
|
60
61
|
|
|
61
62
|
# Behaviour changes
|
|
62
63
|
|
|
@@ -67,8 +68,9 @@
|
|
|
67
68
|
the other way around: evaluate a documented behavior on its merits before extending it, and
|
|
68
69
|
prefer deleting case-specific rules that follow from the principles over adding new ones. Never
|
|
69
70
|
add durable transaction or replay state; recovery is observational (see design.md).
|
|
70
|
-
- Preserve the core invariants: the `jj` DAG determines stack topology,
|
|
71
|
-
|
|
71
|
+
- Preserve the core invariants: the `jj` DAG determines stack topology, tracking stores only PR
|
|
72
|
+
links and submitted commits, GitHub PRs follow the local stack, and ambiguous linkage stops
|
|
73
|
+
mutation.
|
|
72
74
|
|
|
73
75
|
# Testing
|
|
74
76
|
|
|
@@ -13,7 +13,8 @@ discussion.
|
|
|
13
13
|
|
|
14
14
|
## Development setup
|
|
15
15
|
|
|
16
|
-
You need `uv`, `jj` 0.45.1 or newer, and `just`.
|
|
16
|
+
You need `uv`, Git, `jj` 0.45.1 or newer, and `just`. The project requires Python 3.14 or newer;
|
|
17
|
+
`uv` can provide the interpreter when it creates the locked development environment:
|
|
17
18
|
|
|
18
19
|
```console
|
|
19
20
|
just setup
|
|
@@ -30,12 +31,29 @@ virtualenv path directly:
|
|
|
30
31
|
just run view
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
Before finishing a code change, run the standard Ruff, type-check, and test pass. Docs-only edits
|
|
35
|
+
under `docs/` do not require it:
|
|
34
36
|
|
|
35
37
|
```console
|
|
36
38
|
just check
|
|
37
39
|
```
|
|
38
40
|
|
|
41
|
+
Pyrefly is the default type checker, including a second pass targeting Windows. To select ty
|
|
42
|
+
or mypy for the current platform instead, use `--type-checker` or its short form, `-t`:
|
|
43
|
+
|
|
44
|
+
```console
|
|
45
|
+
just check -t ty
|
|
46
|
+
just check -t mypy
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Repeat the option to run several in the given order, for example
|
|
50
|
+
`just check -t pyrefly -t ty -t mypy`. The runner installs the selected checkers from the lockfile,
|
|
51
|
+
checks `src`, `tests`, `tools`, and `check.py`, and runs the usual Ruff and pytest checks. It stops
|
|
52
|
+
at the first failed check. ty and mypy are optional during development and can report issues
|
|
53
|
+
that Pyrefly does not; their failures are reported normally. Plain `just check` and CI continue
|
|
54
|
+
to use Pyrefly. Before a release, follow the
|
|
55
|
+
[requirement for all three type checkers to pass](docs/internals/releasing.md#qualify-the-candidate).
|
|
56
|
+
|
|
39
57
|
Run focused tests while you iterate:
|
|
40
58
|
|
|
41
59
|
```console
|
|
@@ -43,10 +61,10 @@ just test tests/unit/test_jj_client.py
|
|
|
43
61
|
```
|
|
44
62
|
|
|
45
63
|
CI also enforces the cumulative complexity budgets. Check them locally with `just complexity`
|
|
46
|
-
when
|
|
64
|
+
when a supported `tokei` is installed. Raising a budget is a design decision, not routine
|
|
47
65
|
maintenance — say why in the pull request.
|
|
48
66
|
|
|
49
|
-
If your change touches user-facing
|
|
67
|
+
If your change touches user-facing guides or references, refresh the website snapshot with
|
|
50
68
|
`just website` and include the resulting change in the sibling `website` repository.
|
|
51
69
|
|
|
52
70
|
## Conventions
|
|
@@ -62,8 +80,8 @@ The short version:
|
|
|
62
80
|
- Explain *why* the change exists in the body, wrapped at 72 columns.
|
|
63
81
|
- Add tests at the narrowest layer that covers a distinct risk; consolidate overlapping coverage
|
|
64
82
|
rather than adding parallel cases.
|
|
65
|
-
-
|
|
66
|
-
|
|
83
|
+
- For code changes, update docs when supported rules, workflows, or existing statements change.
|
|
84
|
+
Documentation corrections and editorial improvements are welcome independently.
|
|
67
85
|
|
|
68
86
|
## Submitting
|
|
69
87
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: jj-stack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
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/
|
|
@@ -29,64 +29,26 @@ Description-Content-Type: text/markdown
|
|
|
29
29
|
# jj-stack: manage stacked GitHub PRs with jj
|
|
30
30
|
|
|
31
31
|
`jj-stack` turns a linear series of local `jj` changes into a stack of GitHub pull requests.
|
|
32
|
-
Rewrite, split, squash, or reorder the changes with `jj`, then
|
|
33
|
-
|
|
32
|
+
Rewrite, split, squash, or reorder the changes with `jj`, then run `jj-stack submit` to update
|
|
33
|
+
GitHub. Existing PRs follow their change IDs, keeping comments and review history together.
|
|
34
34
|
|
|
35
35
|
## Quick start
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
You need Python 3.14 or newer, `jj` 0.45.1 or newer, and a repo on github.com where you can push
|
|
38
|
+
branches and open pull requests. `jj-stack` uses `GITHUB_TOKEN`, then `GH_TOKEN`, then your GitHub
|
|
39
|
+
CLI login for authentication.
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
- `jj` 0.45.1 or newer
|
|
41
|
-
- GitHub authentication
|
|
42
|
-
|
|
43
|
-
### Install
|
|
44
|
-
|
|
45
|
-
Install `jj-stack` from PyPI with `uv` in an isolated tool environment (recommended):
|
|
41
|
+
Install with `uv`:
|
|
46
42
|
|
|
47
43
|
```bash
|
|
48
44
|
uv tool install jj-stack
|
|
49
45
|
```
|
|
50
46
|
|
|
51
|
-
`pipx` provides another isolated installation:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
pipx install jj-stack
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
You can also use `pip` inside an activated virtual environment:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
python -m pip install jj-stack
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
To upgrade an installation made with `uv`, rerun its command with `--force`. If the command is
|
|
64
|
-
not on your shell `PATH`, run `uv tool update-shell`.
|
|
65
|
-
|
|
66
|
-
### Invoke it as `jj stack`
|
|
67
|
-
|
|
68
|
-
Add a command alias to your user configuration with `jj config edit --user`:
|
|
69
|
-
|
|
70
|
-
```toml
|
|
71
|
-
[aliases]
|
|
72
|
-
stack = ["util", "exec", "--", "jj-stack"]
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
For tab completion of both `jj-stack` and `jj stack`, add the output of `jj-stack completion` to
|
|
76
|
-
your shell startup file:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
eval "$(jj-stack completion zsh --jj-alias stack)"
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
`bash` and `fish` work the same way. See
|
|
83
|
-
[Configuration](https://www.serpentine.com/software/jj-stack/reference/configuration/) for more
|
|
84
|
-
setup options.
|
|
85
|
-
|
|
86
47
|
### Submit your first stack
|
|
87
48
|
|
|
88
|
-
Start with a linear series of local `jj` changes on top of `trunk()`.
|
|
89
|
-
|
|
49
|
+
Start with a linear series of local `jj` changes on top of `trunk()`. Authenticate with
|
|
50
|
+
`gh auth login`, or supply a token in `GITHUB_TOKEN` or `GH_TOKEN`. Check the repo setup and
|
|
51
|
+
apply the safe local fixes:
|
|
90
52
|
|
|
91
53
|
```bash
|
|
92
54
|
jj-stack doctor --fix
|
|
@@ -110,19 +72,26 @@ refresh. Use `jj-stack list` to see every tracked stack in the repo.
|
|
|
110
72
|
## Mental model
|
|
111
73
|
|
|
112
74
|
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
|
|
114
|
-
|
|
75
|
+
change gets a stable PR branch and a PR. The bottom PR targets trunk by default, and each PR
|
|
76
|
+
above it targets the PR branch below:
|
|
115
77
|
|
|
116
78
|
```text
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
jj-stack/refactor-model-... -> PR #1 (base: main)
|
|
120
|
-
main -> trunk
|
|
79
|
+
Local changes: trunk() <- A <- B <- C
|
|
80
|
+
GitHub PRs: main <- PR #1 <- PR #2 <- PR #3
|
|
121
81
|
```
|
|
122
82
|
|
|
123
|
-
|
|
124
|
-
`jj-stack`
|
|
125
|
-
|
|
83
|
+
Each PR's diff shows only the changes it adds on top of its base, so reviewers can consider
|
|
84
|
+
one change at a time. `jj-stack` manages the PR branches for you, and they normally stay out
|
|
85
|
+
of your local bookmark view.
|
|
86
|
+
|
|
87
|
+
When you rewrite a change, its change ID still connects it to the same PR. Submitting again
|
|
88
|
+
updates that PR and the PRs for any dependent changes, preserving their discussions.
|
|
89
|
+
|
|
90
|
+
To select a stack, pass the change ID of its head (the top change). `jj-stack` follows the
|
|
91
|
+
head's parents back to trunk to find the rest. If you don't name a head, it uses your working
|
|
92
|
+
copy when it has both a description and changes, or its parent otherwise. After editing a
|
|
93
|
+
lower change, pass the head's ID to `jj-stack submit` so the update includes the changes above
|
|
94
|
+
your edit.
|
|
126
95
|
|
|
127
96
|
## Everyday workflow
|
|
128
97
|
|
|
@@ -130,8 +99,9 @@ dependent changes.
|
|
|
130
99
|
2. Run `jj-stack submit`.
|
|
131
100
|
3. Revise, add, remove, or reorder the changes locally as reviews come in.
|
|
132
101
|
4. Run `jj-stack submit` again to refresh GitHub.
|
|
133
|
-
5. Run `jj-stack merge
|
|
134
|
-
|
|
102
|
+
5. Run `jj-stack merge --pull-request <last-pr-to-merge> --method squash` when the bottom
|
|
103
|
+
portion is ready. Choose a merge method your repo allows. Queues choose their own method.
|
|
104
|
+
6. After a queued merge or a merge made through GitHub finishes, run
|
|
135
105
|
`jj-stack sync <head-change-id>`.
|
|
136
106
|
|
|
137
107
|
`view`, `submit`, `merge`, and `sync` accept a change ID when you need to select a stack other
|
|
@@ -140,19 +110,58 @@ than the one ending at the working copy.
|
|
|
140
110
|
See the [user guide](https://www.serpentine.com/software/jj-stack/) for drafts, descriptions,
|
|
141
111
|
merge queues, cleanup, and working with multiple stacks.
|
|
142
112
|
|
|
113
|
+
## Optional setup
|
|
114
|
+
|
|
115
|
+
### Invoke it as `jj stack`
|
|
116
|
+
|
|
117
|
+
Add a command alias to your user configuration with `jj config edit --user`:
|
|
118
|
+
|
|
119
|
+
```toml
|
|
120
|
+
[aliases]
|
|
121
|
+
stack = ["util", "exec", "--", "jj-stack"]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
For tab completion of both `jj-stack` and `jj stack`, add the output of `jj-stack completion` to
|
|
125
|
+
your shell startup file:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
eval "$(jj-stack completion zsh --jj-alias stack)"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
`bash` and `fish` work the same way. See
|
|
132
|
+
[Configuration](https://www.serpentine.com/software/jj-stack/reference/configuration/) for more
|
|
133
|
+
setup options.
|
|
134
|
+
|
|
135
|
+
### Other installation options
|
|
136
|
+
|
|
137
|
+
`pipx` provides another isolated installation:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pipx install jj-stack
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
You can also use `pip` inside an activated virtual environment:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
python -m pip install jj-stack
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
To upgrade an installation made with `uv`, run `uv tool upgrade jj-stack`. If the command is
|
|
150
|
+
not on your shell `PATH`, run `uv tool update-shell`.
|
|
151
|
+
|
|
143
152
|
## Learn more
|
|
144
153
|
|
|
145
|
-
- [
|
|
146
|
-
- [
|
|
147
|
-
- [
|
|
154
|
+
- [How jj-stack works](https://www.serpentine.com/software/jj-stack/mental-model/)
|
|
155
|
+
- [Submit and update](https://www.serpentine.com/software/jj-stack/guides/submit-and-update/)
|
|
156
|
+
- [Merge and sync](https://www.serpentine.com/software/jj-stack/guides/merge-and-sync/)
|
|
157
|
+
- [Multiple stacks](https://www.serpentine.com/software/jj-stack/guides/multiple-stacks/)
|
|
148
158
|
- [Configuration](https://www.serpentine.com/software/jj-stack/reference/configuration/)
|
|
149
159
|
- [Writing PR descriptions](https://www.serpentine.com/software/jj-stack/reference/descriptions/)
|
|
150
160
|
- [Troubleshooting](https://www.serpentine.com/software/jj-stack/troubleshooting/)
|
|
151
|
-
- [
|
|
152
|
-
- [
|
|
153
|
-
- [Automation and exit codes](https://www.serpentine.com/software/jj-stack/reference/automation/)
|
|
161
|
+
- [Compare tools](https://www.serpentine.com/software/jj-stack/tool-comparison/)
|
|
162
|
+
- [Automation](https://www.serpentine.com/software/jj-stack/reference/automation/)
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
For all flags and aliases, use the built-in help:
|
|
156
165
|
|
|
157
166
|
```bash
|
|
158
167
|
jj-stack --help
|
|
@@ -160,42 +169,18 @@ jj-stack <command> --help
|
|
|
160
169
|
jj-stack help --all
|
|
161
170
|
```
|
|
162
171
|
|
|
163
|
-
## Development
|
|
164
|
-
|
|
165
|
-
Contributor workflows live in the [`justfile`](justfile). With `uv`, `jj`, and `just` installed,
|
|
166
|
-
run `just` to list the setup, formatting, focused test, verification, documentation, and release
|
|
167
|
-
recipes.
|
|
168
|
-
|
|
169
172
|
## Coding agent integration
|
|
170
173
|
|
|
171
|
-
Install the bundled skill to
|
|
172
|
-
GitHub PRs safely:
|
|
174
|
+
Install the bundled skill to give coding agents instructions for working with `jj-stack`:
|
|
173
175
|
|
|
174
176
|
```bash
|
|
175
177
|
gh skill install bos/jj-stack jj-stack
|
|
176
178
|
```
|
|
177
179
|
|
|
178
|
-
|
|
179
|
-
|
|
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. 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.)
|
|
187
|
-
|
|
188
|
-
## Performance
|
|
189
|
-
|
|
190
|
-
Although `jj-stack` is written in Python, this does not significantly affect its speed.
|
|
191
|
-
The real determinants of its performance are the GitHub API and the `jj` command.
|
|
180
|
+
The [skill source](skills/jj-stack/SKILL.md) and [evaluation notes](evals/jj-stack-skill.md) are
|
|
181
|
+
included in this repo.
|
|
192
182
|
|
|
193
|
-
|
|
194
|
-
reduces its impact with:
|
|
195
|
-
|
|
196
|
-
- GraphQL batch requests where possible
|
|
197
|
-
- concurrent use of the GitHub REST API
|
|
198
|
-
- periodic audits that its queries are minimal in extent
|
|
183
|
+
## Development
|
|
199
184
|
|
|
200
|
-
|
|
201
|
-
|
|
185
|
+
With `uv`, `jj`, and `just` installed, run `just` to list the development workflows. See
|
|
186
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for setup and validation instructions.
|
jj_stack-0.1.4/README.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# jj-stack: manage stacked GitHub PRs with jj
|
|
2
|
+
|
|
3
|
+
`jj-stack` turns a linear series of local `jj` changes into a stack of GitHub pull requests.
|
|
4
|
+
Rewrite, split, squash, or reorder the changes with `jj`, then run `jj-stack submit` to update
|
|
5
|
+
GitHub. Existing PRs follow their change IDs, keeping comments and review history together.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
You need Python 3.14 or newer, `jj` 0.45.1 or newer, and a repo on github.com where you can push
|
|
10
|
+
branches and open pull requests. `jj-stack` uses `GITHUB_TOKEN`, then `GH_TOKEN`, then your GitHub
|
|
11
|
+
CLI login for authentication.
|
|
12
|
+
|
|
13
|
+
Install with `uv`:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv tool install jj-stack
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Submit your first stack
|
|
20
|
+
|
|
21
|
+
Start with a linear series of local `jj` changes on top of `trunk()`. Authenticate with
|
|
22
|
+
`gh auth login`, or supply a token in `GITHUB_TOKEN` or `GH_TOKEN`. Check the repo setup and
|
|
23
|
+
apply the safe local fixes:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
jj-stack doctor --fix
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Inspect the stack that ends at your working copy:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
jj-stack
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Create one GitHub PR per local change:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
jj-stack submit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Revise the changes locally with `jj` and rerun `jj-stack submit` whenever the stack is ready to
|
|
42
|
+
refresh. Use `jj-stack list` to see every tracked stack in the repo.
|
|
43
|
+
|
|
44
|
+
## Mental model
|
|
45
|
+
|
|
46
|
+
Your local `jj` history determines which changes form a stack and their order. On GitHub, each
|
|
47
|
+
change gets a stable PR branch and a PR. The bottom PR targets trunk by default, and each PR
|
|
48
|
+
above it targets the PR branch below:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
Local changes: trunk() <- A <- B <- C
|
|
52
|
+
GitHub PRs: main <- PR #1 <- PR #2 <- PR #3
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Each PR's diff shows only the changes it adds on top of its base, so reviewers can consider
|
|
56
|
+
one change at a time. `jj-stack` manages the PR branches for you, and they normally stay out
|
|
57
|
+
of your local bookmark view.
|
|
58
|
+
|
|
59
|
+
When you rewrite a change, its change ID still connects it to the same PR. Submitting again
|
|
60
|
+
updates that PR and the PRs for any dependent changes, preserving their discussions.
|
|
61
|
+
|
|
62
|
+
To select a stack, pass the change ID of its head (the top change). `jj-stack` follows the
|
|
63
|
+
head's parents back to trunk to find the rest. If you don't name a head, it uses your working
|
|
64
|
+
copy when it has both a description and changes, or its parent otherwise. After editing a
|
|
65
|
+
lower change, pass the head's ID to `jj-stack submit` so the update includes the changes above
|
|
66
|
+
your edit.
|
|
67
|
+
|
|
68
|
+
## Everyday workflow
|
|
69
|
+
|
|
70
|
+
1. Write code as a series of local `jj` changes.
|
|
71
|
+
2. Run `jj-stack submit`.
|
|
72
|
+
3. Revise, add, remove, or reorder the changes locally as reviews come in.
|
|
73
|
+
4. Run `jj-stack submit` again to refresh GitHub.
|
|
74
|
+
5. Run `jj-stack merge --pull-request <last-pr-to-merge> --method squash` when the bottom
|
|
75
|
+
portion is ready. Choose a merge method your repo allows. Queues choose their own method.
|
|
76
|
+
6. After a queued merge or a merge made through GitHub finishes, run
|
|
77
|
+
`jj-stack sync <head-change-id>`.
|
|
78
|
+
|
|
79
|
+
`view`, `submit`, `merge`, and `sync` accept a change ID when you need to select a stack other
|
|
80
|
+
than the one ending at the working copy.
|
|
81
|
+
|
|
82
|
+
See the [user guide](https://www.serpentine.com/software/jj-stack/) for drafts, descriptions,
|
|
83
|
+
merge queues, cleanup, and working with multiple stacks.
|
|
84
|
+
|
|
85
|
+
## Optional setup
|
|
86
|
+
|
|
87
|
+
### Invoke it as `jj stack`
|
|
88
|
+
|
|
89
|
+
Add a command alias to your user configuration with `jj config edit --user`:
|
|
90
|
+
|
|
91
|
+
```toml
|
|
92
|
+
[aliases]
|
|
93
|
+
stack = ["util", "exec", "--", "jj-stack"]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For tab completion of both `jj-stack` and `jj stack`, add the output of `jj-stack completion` to
|
|
97
|
+
your shell startup file:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
eval "$(jj-stack completion zsh --jj-alias stack)"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`bash` and `fish` work the same way. See
|
|
104
|
+
[Configuration](https://www.serpentine.com/software/jj-stack/reference/configuration/) for more
|
|
105
|
+
setup options.
|
|
106
|
+
|
|
107
|
+
### Other installation options
|
|
108
|
+
|
|
109
|
+
`pipx` provides another isolated installation:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pipx install jj-stack
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
You can also use `pip` inside an activated virtual environment:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
python -m pip install jj-stack
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
To upgrade an installation made with `uv`, run `uv tool upgrade jj-stack`. If the command is
|
|
122
|
+
not on your shell `PATH`, run `uv tool update-shell`.
|
|
123
|
+
|
|
124
|
+
## Learn more
|
|
125
|
+
|
|
126
|
+
- [How jj-stack works](https://www.serpentine.com/software/jj-stack/mental-model/)
|
|
127
|
+
- [Submit and update](https://www.serpentine.com/software/jj-stack/guides/submit-and-update/)
|
|
128
|
+
- [Merge and sync](https://www.serpentine.com/software/jj-stack/guides/merge-and-sync/)
|
|
129
|
+
- [Multiple stacks](https://www.serpentine.com/software/jj-stack/guides/multiple-stacks/)
|
|
130
|
+
- [Configuration](https://www.serpentine.com/software/jj-stack/reference/configuration/)
|
|
131
|
+
- [Writing PR descriptions](https://www.serpentine.com/software/jj-stack/reference/descriptions/)
|
|
132
|
+
- [Troubleshooting](https://www.serpentine.com/software/jj-stack/troubleshooting/)
|
|
133
|
+
- [Compare tools](https://www.serpentine.com/software/jj-stack/tool-comparison/)
|
|
134
|
+
- [Automation](https://www.serpentine.com/software/jj-stack/reference/automation/)
|
|
135
|
+
|
|
136
|
+
For all flags and aliases, use the built-in help:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
jj-stack --help
|
|
140
|
+
jj-stack <command> --help
|
|
141
|
+
jj-stack help --all
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Coding agent integration
|
|
145
|
+
|
|
146
|
+
Install the bundled skill to give coding agents instructions for working with `jj-stack`:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
gh skill install bos/jj-stack jj-stack
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
The [skill source](skills/jj-stack/SKILL.md) and [evaluation notes](evals/jj-stack-skill.md) are
|
|
153
|
+
included in this repo.
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
With `uv`, `jj`, and `just` installed, run `just` to list the development workflows. See
|
|
158
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for setup and validation instructions.
|