Skip to content

D210 — claim never takes an earlier cycle's start branch, and a renewal starts one - #380

Merged
napkinstack-agent[bot] merged 5 commits into
mainfrom
fix-claim-start-branch
Nov 13, 2026
Merged

napkinstack-agent[bot] merged 5 commits into
mainfrom
fix-claim-start-branch

Conversation

@fadi-dev-1

@fadi-dev-1 fadi-dev-1 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Workstream

D210, its row in docs/governance/workstreams.md.

What it changes

On a project, nstack claim D5 in an accepted cycle answered work continues on d5-…, which exists: no other branch is made. That branch was the start branch of an earlier cycle's D5. It had another title, its only commit was the empty Start D5 — …, and it had never been deleted on the remote. Since D149, any d<n>-… branch counts as the deliverable's work. Once that branch was deleted, claiming again only renewed the hold, and still made no work branch.

flowchart LR
    C["nstack claim D5"] --> E{"d5-… branch?"}
    E -->|"first commit: Start D5 — another title"| X["an earlier cycle's: ignored"]
    X --> M
    E -->|"hand-named, or this title's start"| K["work continues on it"]
    E -->|"none"| M["work branch d5-‹this title› made"]
    R["renewed hold"] --> E2{"work branch left?"}
    E2 -->|"yes"| S["nothing said"]
    E2 -->|"none, not merged"| M
    E2 -->|"none, merged this cycle"| N["none made"]
Loading

Legend: on the left, a claim. Below, a renewal by the holding session. Before this change, the renewal never reached the branch, and every d5-… branch was taken.

  • hold._started_for_another: an empty branch (one commit off the default branch, its tree unchanged — the test _empty_starts reads, now the shared _empty) whose commit is a claim's start for another title of the same id is an earlier cycle's. Neither the remote's copy nor this checkout's is taken. A hand-named branch (d1-log-audit, D149), this deliverable's own start, and a branch with work whose deliverable was retitled since are still taken.
  • hold._work_branch(renew=True): a renewed hold with no work branch left gets its first one again, unless this cycle's default branch has already merged the deliverable. Without that guard, a renewal after the merge would bring back an empty start branch. With a branch, the renewal prints nothing about it, as before.
  • skeleton/.nstack/handbook/project.md, Who holds a deliverable, says both.

What a project receives

  • Engine: claim ignores an earlier cycle's start branch, and a renewal can make a work branch.
  • Skeleton: nstack update merges two sentences into project.md.
  • Nothing that was green turns red.

Definition of Done

  • The behaviour is covered by a test that failed before — committed first, seen red (P5)
  • Every failure names the rule, the place and the action (P6) — no new failure message
  • uv run bash platform/tests/run.sh green, on a committed tree
  • uv run nstack fitness green
  • Affected documentation updated, diagrams and legends included; no dead reference
  • The workstream's row updated in the register; its plan deleted, if it had one
  • Brought current with main as the last thing before opening
  • No private project named, no path of a workstation, no link into an assistant's session

Summary

DONE

  • An earlier cycle's start branch of the same id is no longer taken as the deliverable's work.
  • A renewed hold with no work branch left gets one again, unless the deliverable is merged.
  • project.md says it; register row D210.

VERIFIED

  • Six new tests in platform/tests/test_hold.py:
    • seen red before the fix, then green: another cycle's start branch ignored; a renewed hold with none makes one;
    • green before and after, pinning what must not change: this title's own start branch still taken; a renewal with a branch prints nothing;
    • the merge guard: seen red with the guard disabled.
  • test_hold.py: 208 passed.
  • uv run bash platform/tests/run.sh: 1269 passed, Platform tests: OK, at the head.
  • uv run nstack fitness --root .: compliant. nstack pr-scope: inside the review budget.

ASSUMED

  • A claim's start commit subject, Start D<n> — <title>, identifies the cycle well enough. The two cycles' D had different titles.

NOT VERIFIED

  • Not run against the project that exposed it; the tests reproduce the case.
  • Not checked by an independent verifier.

RISKS

  • These branches are still taken: an earlier cycle's D with the same title, or a stale branch with real work on top of a start of this title. Start commits do not name their cycle.
  • If the new title's 40-character slug equals the stale branch's name, the push is refused and the claim says NOT pushed. Not tested.
  • nstack plan's Empty start branches left (_empty_starts) still counts such a stale branch of a takeable id as this cycle's. Left unchanged, out of this scope.

🤖 Generated with Claude Code

fadi-dev-1 and others added 2 commits November 10, 2026 20:41
… a renewal starts one

A cycle's D5 claim answered "work continues on d5-…" with the start
branch of an earlier cycle's D5, a different title, never deleted: any
d<n>-… branch counted as the deliverable's work. Once that branch was
gone, claiming again only renewed the hold and made no work branch.

A branch whose first commit off the default branch is a claim's start
for another title of the same id is now an earlier cycle's, and the
claim makes its own. A renewed hold with no work branch left gets its
first one again, unless the cycle's default branch has merged the
deliverable; with one, the renewal says nothing of it. project.md says
both. Five tests, two seen red first; the merge guard's seen red
without it.

Agent-Session: 656a02b7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: 656a02b7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-agent Bot and others added 3 commits November 13, 2026 11:37
A deliverable retitled mid-cycle kept its worked branch judged by the first
commit's subject alone, so a renewal made a second d<n>-… branch (D149). The
emptiness test of the unused start branches is now one helper both read.

Agent-Session: 2e1c63e2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: 2e1c63e2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: 2e1c63e2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot merged commit be71144 into main Nov 13, 2026
3 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the fix-claim-start-branch branch November 13, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants