PR #794 follow-ups: the other paths that still set a chunk branch upstream to origin/main nf-vxgd ← Beads

closed priority 2 task unassigned

Twinned from https://github.com/cfsh/ninefold/issues/797 by tools/beads/import_github.py's reconcile pass.

Suggestions from ninefold-reviewer's review of #794.

PR #794 puts --no-track on spawn_dev.py's fresh-chunk git worktree add, which is the mainline path and the one Aedan asked for. Three other places still describe or produce the shape it removes. None is a regression and none blocked the PR.

1. tools/office/spawn_dev.py:1088-1094 — the refusal message paste line. When the worktree comes up detached, create_worktree tells the operator to run:

git -C <worktree> checkout -B <branch> <names.start>

On a fresh chunk names.start is origin/main (Names.start, line 226), and git checkout -B <new> <remote-tracking-ref> sets tracking by the branch.autoSetupMerge default — so pasting it recreates merge = refs/heads/main by hand. That is the argument PR #794 makes for its own dry-run parity assertion ("the line an operator pastes when the tool refuses"), applied to the other pasteable line in the same file. adopting is already a parameter of create_worktree, so the asymmetry worktree_add_argv just grew can be repeated there — or the message can render text derived from worktree_add_argv, keeping ONE definition of the flags. Cheap enough to fold into #794 itself; close this item if it lands there.

2. tools/pr/session_start.py:484 — the advice the hook prints. cut_new is:

git switch -c feat/<name> origin/main

printed on BRANCH-MERGED, BRANCH-STALE and MAIN-AHEAD. git switch -c is git branch plus git switch, so the same autoSetupMerge default applies: a session that follows the advice sets origin/main as the upstream of its new branch. After #794 the spawner no longer creates that state and the hook that found it still tells sessions to create it. --no-track on that command closes it; test_every_situation_that_stops_you_says_what_to_do pins the wording.

3. Two present-tense claims #794 falsifies. The _counterpart docstring (tools/pr/session_start.py:260-266) and test_the_spawn_dev_SHAPE_is_not_mistaken_for_a_pushed_branch (tools/tests/test_session_start.py:261-267) both say spawn_dev.py cuts from origin/main with autoSetupMerge unset "so git tracks origin/main". Post-#794 that is the shape of branches cut *before* it — the six in this clone — not what the spawner leaves. The code needs no change: _counterpart still has to defend against those six, against a . remote and against a name mismatch, and the post-#794 shape is already covered by test_a_branch_with_NO_upstream_never_claims_its_work_is_safe. It is the justification and the test name that now point at history rather than at what the code does (DEV_PRINCIPLES C6) — a rewording, and possibly renaming that case to say "branches cut before #794".

Unclaimed and unlabelled.

Dependencies

None.

Comments

No comments.

Add a comment