Skip to content

docs(todo-markers): record accepted branch-name-identity limitation in stale check - #289

Merged
mtskf merged 1 commit into
mainfrom
chore/check-stale-markers-reused-branch-identity
Jul 29, 2026
Merged

docs(todo-markers): record accepted branch-name-identity limitation in stale check#289
mtskf merged 1 commit into
mainfrom
chore/check-stale-markers-reused-branch-identity

Conversation

@mtskf

@mtskf mtskf commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

Records the reused-branch false-STALE in check-stale-todo-markers.mjs as an accepted, documented limitation rather than an open backlog item — the deferred judgement call from the cycle-2 review of the stale-marker check (Codex MEDIUM/98).

The gap: a head-branch name reused after its first PR merged, whose new work has not yet opened a PR, still resolves via the old MERGED PR and reads hard-STALE (exit 1). This is fundamental to identifying a branch by name.

Changes

  • scripts/check-stale-todo-markers.mjs — header note (a) + the inline resolveEntry comment now frame the residual gap as an accepted limitation (with the cost/rarity reasoning and a pointer to LEARNING.md), replacing the prior "tracked in the TODO backlog" open-item framing.
  • test/build/stale-todo-markers.test.ts — clarifying comment on the existing no-OPEN + MERGED → stale test marking it as the pin for the accepted behaviour (do not soften to a warning without revisiting the decision).
  • .claude/docs/LEARNING.md (local-only, gitignored) — full decision entry under "Claude Workflow" weighing cost vs. rarity.

Why accept rather than implement durable PR identity

  • A durable PR identity can't be recorded at claim time: next-todo writes the (branch: X) marker before any PR exists (the PR is opened later by /ship). Implementing it needs a new write-back step in the global /ship or /merge-pr flow, kept in lockstep across four skills — global cross-repo plumbing changed to serve one repo's local-only advisory backstop.
  • The false-positive window is narrow (reused branch + old merged PR + no new PR opened yet + the check run in exactly that window).
  • The merged-no-open path is also this tool's primary genuine-stale signal, so it can't be downgraded to a warning without gutting detection.

Satisfies the TODO's Done-when via the documented-decision branch of its OR.

Related

  • TODO: check-stale-todo-markers — a reused branch with an old merged PR and no new PR yet still false-STALEs (cycle-2 review finding).

Test Plan

  • pnpm exec vitest run test/build/stale-todo-markers.test.ts — 29 passed
  • pnpm compile — exit 0
  • pnpm exec biome check on both changed files — clean

…n stale check

The reused-branch false-STALE (a branch name reused after its first PR
merged, with new work that has not opened a PR yet, resolves via the old
MERGED PR and reads STALE) is now documented as an ACCEPTED limitation
rather than an open backlog item.

A durable fix would need a repo-bound PR identity (number/SHA) on the 🚧
marker, but the marker is written by next-todo's claim before any PR
exists — so that identity would have to be back-filled by a new step in
the global /ship or /merge-pr flow and kept in lockstep across four
skills, all to serve this LOCAL-only advisory backstop. The
false-positive window is narrow and the merged-no-open path is also the
tool's primary genuine-stale signal, so it cannot be downgraded without
gutting detection.

Converts the script header note (a) + inline comment from a
'tracked in the backlog' framing to a recorded decision, and pins the
accepted behaviour via a clarifying comment on the existing
no-OPEN+MERGED test. Full cost/rarity weighing in LEARNING.md.
@mtskf
mtskf merged commit 35f5892 into main Jul 29, 2026
1 check passed
@mtskf
mtskf deleted the chore/check-stale-markers-reused-branch-identity branch July 29, 2026 04:34
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.

1 participant