Accept Mission work branches and native Ticket ids
test / test (pull_request) Successful in 12s

AgentHub supplies every Mission a work_branch of the form mission/<mission-id>,
and Bug ids were retired in favour of native Ticket ids. The check accepted
neither, so no Mission-driven pull request could pass validate / naming in a
consumer that pins this action (t-mazzph405ay0).

A Mission branch needs a Conventional title and the visible attribution, and
no Tracking section, because the Mission is the tracking. Role branches now
carry a native Ticket id or the retired Bug id; the title and Tracking rules
are unchanged apart from the id they name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Donavan FritzandClaude Fable 5.1 committed 2026-11-04 11:35:54 -06:00
1 parent 1edb148aa1
commit 4c17d84dd2
4 files changed
+52 -17

No files matched your search

+18 -1
View File
@@ -25,7 +25,7 @@ canonical_body() {
check() {
local desc="$1" want_fail="$2" branch="$3" title="$4" author="$5"
local bug body
bug=$(printf '%s\n' "$branch" | sed -nE 's|^[^/]+/(bug-[a-z0-9]+)/.*|\1|p')
bug=$(printf '%s\n' "$branch" | sed -nE 's|^[^/]+/(bug-[a-z0-9]+\|t-[0-9a-z]{12})/.*|\1|p')
body=$(canonical_body "${bug:-bug-test}")
local out rc=0
out=$(cd "${FIXTURES}" && HEAD_BRANCH="$branch" PR_TITLE="$title" PR_AUTHOR="$author" \
@@ -159,6 +159,23 @@ check "invalid — uppercase bug-id" 1 "dev/bug-ABC123/thing" "[b
check "invalid — empty kebab" 1 "dev/bug-x7k2m9/" "[bug-x7k2m9] No kebab" "dev"
check "invalid — no bug prefix on seg" 1 "dev/x7k2m9/fix-resize" "Fix resize" "dev"
# native Ticket ids on role branches, matching the title and ## Tracking
check "dev/t-ticket matching title" 0 "dev/t-mazzph405ay0/accept-mission-branches" "[t-mazzph405ay0] fix(check): accept mission branches" "dev"
check "ux/t-ticket matching title" 0 "ux/t-6ec3tjxva5pm/one-header-height" "[t-6ec3tjxva5pm] fix(frame): one header height" "ux"
check "t-ticket mismatch" 1 "dev/t-mazzph405ay0/accept-mission" "[t-6ec3tjxva5pm] fix(check): accept mission" "dev"
check "t-ticket no title prefix" 1 "dev/t-mazzph405ay0/accept-mission" "fix(check): accept mission" "dev"
check "invalid — short ticket id" 1 "dev/t-abc123/thing" "[t-abc123] fix(x): thing" "dev"
check "invalid — ticket id with l" 1 "dev/t-mazzph405ayl/thing" "[t-mazzph405ayl] fix(x): thing" "dev"
# Mission work branches: AgentHub supplies mission/<mission-id>; a Conventional
# title, no tracked-id prefix, attribution still required
check "mission Conventional title" 0 "mission/mi-hvaet01kawp2" "fix(gitea): name the site Fritzlab Code" "ux"
check "mission breaking title" 0 "mission/mi-hvaet01kawp2" "feat(adapter)!: drop the stock footer" "ux"
check "mission plain title" 1 "mission/mi-hvaet01kawp2" "Name the site Fritzlab Code" "ux"
check "mission tracked-id title" 1 "mission/mi-hvaet01kawp2" "[bug-abc] fix(gitea): name the site" "ux"
check "invalid — mission short id" 1 "mission/mi-abc" "fix(gitea): name the site" "ux"
check "invalid — mission with kebab" 1 "mission/mi-hvaet01kawp2/extra" "fix(gitea): name the site" "ux"
# Bug-backed PR body contract. These mirror the omissions in agenthub#779.
BODY=$(canonical_body "bug-x7k2m9")
check_contract "raw Fixes only rejects missing link and attribution" \