Enforce exact issue lock before branch, commit, push, or PR creation #204

Closed
opened 2026-07-05 15:23:10 -05:00 by sysadmin · 1 comment
Owner

Problem:
Author agents can implement a change without a clean, exact issue binding, then describe the work as tied to an 'equivalent' issue. This breaks durable workflow tracking and allows wall changes to bypass the issue-first process.

Required wall:
Before any branch creation, commit, push, or PR creation, the author workflow must resolve and lock exactly one issue.

Forbidden:

  • 'equivalent issue'
  • 'related issue'
  • 'same as #X'
  • missing issue number
  • reusing an issue already tied to a different open PR unless explicitly approved by the issue body
  • branch names that do not match the locked issue

Acceptance criteria:

  • Add a hard gate requiring selected_issue.number before branch creation.
  • Add a hard gate requiring the branch name to include the locked issue number.
  • Add a hard gate requiring the PR title/body to include Closes #<locked_issue>.
  • Add a test where the agent reports 'Issue #194 / #196 equivalent'; expected result: blocked.
  • Add a test where an issue already has an open PR and the agent tries to reuse it for unrelated work; expected result: blocked.
  • Final handoff must include exactly one selected issue and exactly one opened PR.
Problem: Author agents can implement a change without a clean, exact issue binding, then describe the work as tied to an 'equivalent' issue. This breaks durable workflow tracking and allows wall changes to bypass the issue-first process. Required wall: Before any branch creation, commit, push, or PR creation, the author workflow must resolve and lock exactly one issue. Forbidden: - 'equivalent issue' - 'related issue' - 'same as #X' - missing issue number - reusing an issue already tied to a different open PR unless explicitly approved by the issue body - branch names that do not match the locked issue Acceptance criteria: - Add a hard gate requiring selected_issue.number before branch creation. - Add a hard gate requiring the branch name to include the locked issue number. - Add a hard gate requiring the PR title/body to include Closes #<locked_issue>. - Add a test where the agent reports 'Issue #194 / #196 equivalent'; expected result: blocked. - Add a test where an issue already has an open PR and the agent tries to reuse it for unrelated work; expected result: blocked. - Final handoff must include exactly one selected issue and exactly one opened PR.
jcwalker3 added the status:in-progress label 2026-07-05 15:46:22 -05:00
Owner

Issue lock (recreation run after PR #205 was closed for invalid provenance).

  • Locked issue: #204 (exactly one)
  • Branch: feat/issue-204-exact-issue-lock-v2 (fresh, to be created off master; old feat/issue-204-exact-issue-lock belongs to closed PR #205 and will not be reused)
  • Base branch: master @ 4dcf8fdfe431b0ffe2131e183ae810aa28777bde
  • Repo/remote: Scaled-Tech-Consulting/Gitea-Tools on prgs
  • Identity/profile: jcwalker3 / prgs-author; capabilities in use: gitea.issue.comment (this claim), gitea.branch.create, gitea.repo.commit, gitea.branch.push, gitea.pr.create — all allowed in the active profile
  • Lock time: before any tracked-file edit, branch creation, or commit for this run (per #204/#208 lock-before-work ordering)
  • Scope: only the #204 exact-issue-lock changes; commit 10d2644 (PR #203 content) is explicitly excluded; not stacked work
  • Plan: implement fresh on the new branch, run py_compile + targeted tests + full suite + git diff --check + secret sweep, open replacement PR with Closes #204, back-link from closed PR #205
Issue lock (recreation run after PR #205 was closed for invalid provenance). - Locked issue: #204 (exactly one) - Branch: `feat/issue-204-exact-issue-lock-v2` (fresh, to be created off `master`; old `feat/issue-204-exact-issue-lock` belongs to closed PR #205 and will not be reused) - Base branch: `master` @ `4dcf8fdfe431b0ffe2131e183ae810aa28777bde` - Repo/remote: `Scaled-Tech-Consulting/Gitea-Tools` on `prgs` - Identity/profile: `jcwalker3 / prgs-author`; capabilities in use: `gitea.issue.comment` (this claim), `gitea.branch.create`, `gitea.repo.commit`, `gitea.branch.push`, `gitea.pr.create` — all allowed in the active profile - Lock time: before any tracked-file edit, branch creation, or commit for this run (per #204/#208 lock-before-work ordering) - Scope: only the #204 exact-issue-lock changes; commit `10d2644` (PR #203 content) is explicitly excluded; not stacked work - Plan: implement fresh on the new branch, run py_compile + targeted tests + full suite + `git diff --check` + secret sweep, open replacement PR with `Closes #204`, back-link from closed PR #205
sysadmin removed the status:in-progress label 2026-07-05 19:28:16 -05:00
Sign in to join this conversation.
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#204