Author SHA1 Message Date
Donavan FritzandClaude Fable 5.1 4c17d84dd2 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>
2026-11-04 11:35:54 -06:00
dfritz 1edb148aa1 Require authorship only in PR descriptions (#11)
test / test (push) Successful in 9s
Remove commit-message watermark inspection while preserving visible PR attribution, naming, identity exemptions and nonempty commit-range validation.

All79 offline contract cases and shell syntax pass.

Ticket: https://agenthub.fritzlab.net/t-d12vqnp63v5d
2026-10-18 15:48:13 +00:00
4 changed files with 118 additions and 49 deletions

No files matched your search

+18 -12
View File
@@ -1,23 +1,27 @@
# action/check-naming # action/check-naming
Composite Gitea Action that validates a pull request's branch, title, Bug Composite Gitea Action that validates a pull request's branch, title, Bug
tracking, and AI authorship against the fritzlab Git standard. The current tracking, PR-description AI authorship, and commit range against the fritzlab
action fails (exits 1) on any violation; `@v1` is the legacy warn-only release Git standard. The current action fails (exits 1) on any violation; `@v1` is the legacy warn-only release
(Bugs program: see (Bugs program: see
[fritzlab/agenthub#557](https://code.fritzlab.net/fritzlab/agenthub/issues/557)). [fritzlab/agenthub#557](https://code.fritzlab.net/fritzlab/agenthub/issues/557)).
## Standard ## Standard
``` ```
Branch: <role>/bug-<id>/<kebab-description> e.g. dev/bug-x7k2m9/fix-terminal-resize Branch: <role>/t-<ticket-id>/<kebab-description> e.g. dev/t-mazzph405ay0/fix-terminal-resize
Chore: chore/<kebab-description> bug-less trivia only (dep bumps, typos, CI tweaks) <role>/bug-<id>/<kebab-description> retired Bug ids remain accepted
Title: [bug-x7k2m9] fix(terminal): preserve resize state Mission: mission/mi-<mission-id> the work_branch AgentHub supplies to a Mission
Chore: chore/<kebab-description> untracked trivia only (dep bumps, typos, CI tweaks)
Title: [t-mazzph405ay0] fix(terminal): preserve resize state
fix(terminal): preserve resize state on a Mission branch
``` ```
- `<role>` must be a roster handle: `dev` | `ux` | `ops` | `security` | `perf` | `architect` | `support` - `<role>` must be a roster handle: `dev` | `ux` | `ops` | `security` | `perf` | `architect` | `support`
- `<bug-id>` is `bug-` followed by lowercase alphanumeric characters - `<ticket-id>` is a native AgentHub Ticket id: `t-` and twelve characters from `0123456789abcdefghjkmnpqrstvwxyz`; `bug-<id>` (lowercase alphanumerics) is the retired form
- `<mission-id>` is `mi-` and twelve of the same characters; a Mission branch's title is `type(scope): description` with no tracked-id prefix and no `## Tracking` section
- `<kebab-description>` is lowercase alphanumeric with hyphens, starting with a letter or digit - `<kebab-description>` is lowercase alphanumeric with hyphens, starting with a letter or digit
- When both the branch and the title carry a bug-id they **must match** - When both the branch and the title carry a tracked id they **must match**
- Break-glass: PRs authored by `dfritz` are exempt from all checks - Break-glass: PRs authored by `dfritz` are exempt from all checks
## Usage ## Usage
@@ -91,10 +95,12 @@ The check validates four things for every non-break-glass Agent PR:
`<h2>` sections outside collapsed `<details>` content. Fenced, commented, `<h2>` sections outside collapsed `<details>` content. Fenced, commented,
scripted, or collapsed copies do not satisfy the visible provenance contract. scripted, or collapsed copies do not satisfy the visible provenance contract.
4. **Commit attribution** — every commit in `base-sha..head-sha`, including 4. **Commit range** — `base-sha` and `head-sha` must identify available commits,
commits on `chore/` branches, ends with and `base-sha..head-sha` must contain at least one PR commit.
the canonical `Authored-By` trailer, separated from the message body by a The naming job must check out full history before this action.
blank line. The naming job must check out full history before this action. Attribution is required only in the PR description; commit messages are not
inspected. Existing commit trailers remain valid history, but no trailer is
required for a new commit.
Every violation prints a `FAIL[check-naming]: ...` line and the step Every violation prints a `FAIL[check-naming]: ...` line and the step
exits 1. To make the check required on a repo: drop any exits 1. To make the check required on a repo: drop any
@@ -103,7 +109,7 @@ context to the repo's `status_check_contexts` in agenthub `hub/hub.yaml`.
## Versions ## Versions
- unreleased — adds Bug tracking plus PR and commit attribution enforcement. - unreleased — requires Bug tracking and visible PR attribution, without commit-message watermarks.
- `v2` — enforces branch and title naming. - `v2` — enforces branch and title naming.
- `v1` — legacy warn-only: logs `WARN` lines, always exits 0. - `v1` — legacy warn-only: logs `WARN` lines, always exits 0.
+6 -4
View File
@@ -1,14 +1,16 @@
name: Check PR contract name: Check PR contract
description: | description: |
Validates that a PR's branch, title, Bug tracking, and AI attribution Validates that a PR's branch, title, Bug tracking, and PR-description AI attribution
follow the fritzlab Git standard. Fails (exits 1) on any violation, with follow the fritzlab Git standard. Fails (exits 1) on any violation, with
FAIL log lines naming it. Warn-only wiring is the consumer's choice: set FAIL log lines naming it. Warn-only wiring is the consumer's choice: set
continue-on-error: true on the job (or pin @v1, which never fails). continue-on-error: true on the job (or pin @v1, which never fails).
Standard: Standard:
branch: <role>/bug-<id>/<kebab> e.g. dev/bug-x7k2m9/fix-terminal-resize branch: <role>/t-<ticket-id>/<kebab> e.g. dev/t-mazzph405ay0/fix-terminal-resize
chore: chore/<kebab> bug-less trivia only <role>/bug-<id>/<kebab> retired Bug ids remain accepted
title: [bug-<id>] type(scope): description mission: mission/mi-<mission-id> the work_branch AgentHub supplies to a Mission
chore: chore/<kebab> untracked trivia only
title: [t-<ticket-id>] type(scope): description, or type(scope): description on a Mission branch
Role must be a roster handle: dev | ux | ops | security | perf | architect | support Role must be a roster handle: dev | ux | ops | security | perf | architect | support
Break-glass: PRs authored by dfritz are exempt. Break-glass: PRs authored by dfritz are exempt.
+24 -26
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Branch, PR body, and commit contract checker. # Branch, PR body, and commit-range contract checker.
# v2: exits 1 on violation. Consumers that want warn-only set # v2: exits 1 on violation. Consumers that want warn-only set
# continue-on-error: true on the job (or stay on @v1). # continue-on-error: true on the job (or stay on @v1).
set -euo pipefail set -euo pipefail
@@ -101,24 +101,32 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" |
hidden_content_guidance='move ## Tracking and ## Attribution outside collapsed <details> or <video>/<audio> fallback content' hidden_content_guidance='move ## Tracking and ## Attribution outside collapsed <details> or <video>/<audio> fallback content'
# ---- branch form ---- # ---- branch form ----
# <role>/bug-<id>/<kebab> # A tracked id is a native AgentHub Ticket (t- plus twelve id characters) or a
if echo "${BRANCH}" | grep -qE "^(dev|ux|ops|security|perf|architect|support)/bug-[a-z0-9]+/[a-z0-9][a-z0-9-]*$"; then # retired Bug id (bug- plus lowercase alphanumerics).
TRACKED_ID='(t-[0-9abcdefghjkmnpqrstvwxyz]{12}|bug-[a-z0-9]+)'
# <role>/<tracked-id>/<kebab>
if echo "${BRANCH}" | grep -qE "^(dev|ux|ops|security|perf|architect|support)/${TRACKED_ID}/[a-z0-9][a-z0-9-]*$"; then
BRANCH_KIND="role-bug" BRANCH_KIND="role-bug"
BRANCH_BUG=$(echo "${BRANCH}" | sed -E 's|^[^/]+/(bug-[a-z0-9]+)/.*|\1|') BRANCH_BUG=$(echo "${BRANCH}" | sed -E 's|^[^/]+/([^/]+)/.*|\1|')
# mission/<mission-id>: the work_branch AgentHub supplies to a Mission.
elif echo "${BRANCH}" | grep -qE "^mission/mi-[0-9abcdefghjkmnpqrstvwxyz]{12}$"; then
BRANCH_KIND="mission"
# chore/<kebab> # chore/<kebab>
elif echo "${BRANCH}" | grep -qE "^chore/[a-z0-9][a-z0-9-]*$"; then elif echo "${BRANCH}" | grep -qE "^chore/[a-z0-9][a-z0-9-]*$"; then
BRANCH_KIND="chore" BRANCH_KIND="chore"
else else
echo "FAIL[check-naming]: branch '${BRANCH}' does not match convention" echo "FAIL[check-naming]: branch '${BRANCH}' does not match convention"
echo " expected: <role>/bug-<id>/<kebab> (role: dev|ux|ops|security|perf|architect|support)" echo " expected: <role>/t-<ticket-id>/<kebab> (role: dev|ux|ops|security|perf|architect|support)"
echo " or: <role>/bug-<id>/<kebab>"
echo " or: mission/mi-<mission-id>"
echo " or: chore/<kebab>" echo " or: chore/<kebab>"
FAILED=1 FAILED=1
fi fi
# ---- title form ---- # ---- title form ----
TITLE_BUG="" TITLE_BUG=""
if echo "${TITLE}" | grep -qE "^\[bug-[a-z0-9]+\] ."; then if echo "${TITLE}" | grep -qE "^\[${TRACKED_ID}\] ."; then
TITLE_BUG=$(echo "${TITLE}" | sed -E 's|^\[(bug-[a-z0-9]+)\].*|\1|') TITLE_BUG=$(echo "${TITLE}" | sed -E 's|^\[([^]]+)\].*|\1|')
fi fi
if [ "${BRANCH_KIND}" = "role-bug" ]; then if [ "${BRANCH_KIND}" = "role-bug" ]; then
@@ -131,7 +139,7 @@ if [ "${BRANCH_KIND}" = "role-bug" ]; then
echo "FAIL[check-naming]: bug-id mismatch — branch carries '${BRANCH_BUG}' but title carries '${TITLE_BUG}'" echo "FAIL[check-naming]: bug-id mismatch — branch carries '${BRANCH_BUG}' but title carries '${TITLE_BUG}'"
FAILED=1 FAILED=1
elif ! printf '%s\n' "${TITLE}" | grep -qE "^\\[${BRANCH_BUG}\\] [a-z][a-z0-9-]*\\([a-z0-9][a-z0-9-]*\\)!?: .*[^[:space:]]$"; then elif ! printf '%s\n' "${TITLE}" | grep -qE "^\\[${BRANCH_BUG}\\] [a-z][a-z0-9-]*\\([a-z0-9][a-z0-9-]*\\)!?: .*[^[:space:]]$"; then
echo "FAIL[check-naming]: Bug-backed title must use '[${BRANCH_BUG}] type(scope): description'" echo "FAIL[check-naming]: tracked title must use '[${BRANCH_BUG}] type(scope): description'"
FAILED=1 FAILED=1
fi fi
@@ -155,7 +163,11 @@ if [ "${BRANCH_KIND}" = "role-bug" ]; then
fi fi
elif [ "${BRANCH_KIND}" = "chore" ] && [ -n "${TITLE_BUG}" ]; then elif [ "${BRANCH_KIND}" = "chore" ] && [ -n "${TITLE_BUG}" ]; then
echo "FAIL[check-naming]: chore branch should not carry a [bug-id] title prefix" echo "FAIL[check-naming]: chore branch should not carry a [tracked-id] title prefix"
FAILED=1
elif [ "${BRANCH_KIND}" = "mission" ] && ! printf '%s\n' "${TITLE}" | grep -qE "^[a-z][a-z0-9-]*\([a-z0-9][a-z0-9-]*\)!?: .*[^[:space:]]$"; then
echo "FAIL[check-naming]: Mission branch title must use 'type(scope): description'"
echo " have: ${TITLE}"
FAILED=1 FAILED=1
fi fi
@@ -180,23 +192,9 @@ if [ "${BRANCH_KIND}" != "invalid" ]; then
fi fi
done done
if git cat-file -e "${BASE}^{commit}" 2>/dev/null && git cat-file -e "${HEAD}^{commit}" 2>/dev/null; then if git cat-file -e "${BASE}^{commit}" 2>/dev/null && git cat-file -e "${HEAD}^{commit}" 2>/dev/null; then
commit_count=0 # Attribution belongs only in the PR description, not commit messages.
while IFS= read -r commit; do # Keep the existing nonempty-range gate independently of message content.
[ -n "${commit}" ] || continue commit_count=$(git rev-list --count "${BASE}..${HEAD}" 2>/dev/null) || commit_count=0
commit_count=$((commit_count + 1))
message=$(git log -1 --format=%B "${commit}")
if ! printf '%s\n' "${message}" | awk '
{ line[NR]=$0 }
END {
n=NR
while (n > 0 && line[n] == "") n--
if (n < 3 || line[n-1] != "" || line[n] !~ /^Authored-By: .+ \(.+\) <noreply@[[:alnum:].-]+>$/) exit 1
}
'; then
echo "FAIL[check-naming]: commit ${commit} must end with an Authored-By product/model trailer"
FAILED=1
fi
done < <(git rev-list --reverse "${BASE}..${HEAD}" 2>/dev/null)
if [ "${commit_count}" -eq 0 ]; then if [ "${commit_count}" -eq 0 ]; then
echo "FAIL[check-naming]: base-sha..head-sha contains no PR commits" echo "FAIL[check-naming]: base-sha..head-sha contains no PR commits"
FAILED=1 FAILED=1
+70 -7
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Tests for check.sh — exercises valid/invalid branch+title matrices. # Tests for check.sh — exercises naming, PR attribution, and commit ranges.
set -euo pipefail set -euo pipefail
SCRIPT="$(cd "$(dirname "$0")/.." && pwd)/check.sh" SCRIPT="$(cd "$(dirname "$0")/.." && pwd)/check.sh"
@@ -25,7 +25,7 @@ canonical_body() {
check() { check() {
local desc="$1" want_fail="$2" branch="$3" title="$4" author="$5" local desc="$1" want_fail="$2" branch="$3" title="$4" author="$5"
local bug body 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}") body=$(canonical_body "${bug:-bug-test}")
local out rc=0 local out rc=0
out=$(cd "${FIXTURES}" && HEAD_BRANCH="$branch" PR_TITLE="$title" PR_AUTHOR="$author" \ out=$(cd "${FIXTURES}" && HEAD_BRANCH="$branch" PR_TITLE="$title" PR_AUTHOR="$author" \
@@ -98,6 +98,26 @@ check_chore_contract() {
fi fi
} }
check_author_contract() {
local desc="$1" want_fail="$2" author="$3" body="$4" base="$5" head="$6"
local out rc=0
out=$(cd "${FIXTURES}" && HEAD_BRANCH="chore/contract" \
PR_TITLE="Align PR attribution policy" PR_AUTHOR="$author" \
PR_BODY="$body" GITEA_SERVER_URL="https://code.test" GITEA_TOKEN="test-token" \
GITEA_REPOSITORY="action/check-naming" GITEA_PR_NUMBER=1 PATH="${TEST_BIN}:$PATH" \
BASE_SHA="$base" HEAD_SHA="$head" bash "$SCRIPT" 2>&1) || rc=$?
local got_lines=0
printf '%s\n' "$out" | grep -qE '^FAIL' && got_lines=1 || true
if [ "$rc" -eq "$want_fail" ] && [ "$got_lines" -eq "$want_fail" ]; then
echo "PASS [$desc]"
PASS=$((PASS + 1))
else
echo "FAIL [$desc]: expected exit=$want_fail fail-lines=$want_fail, got exit=$rc fail-lines=$got_lines"
echo " output: $out"
FAIL=$((FAIL + 1))
fi
}
# break-glass # break-glass
check "dfritz exempt — invalid branch" 0 "totally/wrong-branch" "no prefix" "dfritz" check "dfritz exempt — invalid branch" 0 "totally/wrong-branch" "no prefix" "dfritz"
check "dfritz exempt — mismatch" 0 "dev/bug-abc/thing" "[bug-xyz] Thing" "dfritz" check "dfritz exempt — mismatch" 0 "dev/bug-abc/thing" "[bug-xyz] Thing" "dfritz"
@@ -139,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 — 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" 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. # Bug-backed PR body contract. These mirror the omissions in agenthub#779.
BODY=$(canonical_body "bug-x7k2m9") BODY=$(canonical_body "bug-x7k2m9")
check_contract "raw Fixes only rejects missing link and attribution" \ check_contract "raw Fixes only rejects missing link and attribution" \
@@ -233,20 +270,46 @@ else
fi fi
git -C "${FIXTURES}" commit --allow-empty -q -m "unwatermarked change" git -C "${FIXTURES}" commit --allow-empty -q -m "unwatermarked change"
BAD_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD) PLAIN_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD)
check_contract "agenthub 779 commits reject missing watermark" "$BODY" "$GOOD_HEAD" "$BAD_HEAD" "must end with an Authored-By" check_contract_pass "Bug-backed commits need no watermark" "$BODY" "$GOOD_HEAD" "$PLAIN_HEAD"
check_chore_contract "chore requires PR attribution" "" "$BASE" "$GOOD_HEAD" "## Attribution must contain" check_chore_contract "chore requires PR attribution" "" "$BASE" "$GOOD_HEAD" "## Attribution must contain"
check_chore_contract "chore commits require watermark" "$(canonical_body bug-unused)" "$GOOD_HEAD" "$BAD_HEAD" "must end with an Authored-By"
git -C "${FIXTURES}" commit --allow-empty -q -m $'misplaced trailer\nAuthored-By: Codex (GPT-5) <noreply@openai.com>' git -C "${FIXTURES}" commit --allow-empty -q -m $'misplaced trailer\nAuthored-By: Codex (GPT-5) <noreply@openai.com>'
MISPLACED_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD) MISPLACED_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD)
check_contract "commit watermark requires blank separator" "$BODY" "$BAD_HEAD" "$MISPLACED_HEAD" "must end with an Authored-By"
git -C "${FIXTURES}" commit --allow-empty -q -m "trailer not final" -m $'Authored-By: Codex (GPT-5) <noreply@openai.com>\nextra text' git -C "${FIXTURES}" commit --allow-empty -q -m "trailer not final" -m $'Authored-By: Codex (GPT-5) <noreply@openai.com>\nextra text'
NONFINAL_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD) NONFINAL_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD)
check_contract "commit watermark must be final trailer" "$BODY" "$MISPLACED_HEAD" "$NONFINAL_HEAD" "must end with an Authored-By"
git -C "${FIXTURES}" commit --allow-empty -q -m "malformed legacy attribution" -m "Authored-By: incomplete"
MALFORMED_HEAD=$(git -C "${FIXTURES}" rev-parse HEAD)
# Existing Human exemption is unchanged; other Humans and named Agents satisfy
# the same PR-description contract independently of any commit-message footer.
for author in dfritz human-contributor architect; do
for scenario in legacy plain misplaced nonfinal malformed; do
case "$scenario" in
legacy) head="$GOOD_HEAD" ;;
plain) head="$PLAIN_HEAD" ;;
misplaced) head="$MISPLACED_HEAD" ;;
nonfinal) head="$NONFINAL_HEAD" ;;
malformed) head="$MALFORMED_HEAD" ;;
esac
check_author_contract "$author accepts $scenario commit messages" 0 "$author" "$BODY" "$BASE" "$head"
done
done
for author in human-contributor architect; do
check_author_contract "$author requires PR-description attribution" 1 "$author" "" "$BASE" "$PLAIN_HEAD"
check_author_contract "$author rejects a missing PR model" 1 "$author" \
$'## Attribution\n- Authored-By: Codex <noreply@openai.com>' "$BASE" "$PLAIN_HEAD"
check_author_contract "$author rejects a non-noreply PR address" 1 "$author" \
$'## Attribution\n- Authored-By: Codex (GPT-5) <person@example.invalid>' "$BASE" "$PLAIN_HEAD"
done
check_author_contract "dfritz exemption still ignores PR attribution and commit range" 0 dfritz "" not-a-sha not-a-sha
check_contract "missing commit range rejects" "$BODY" "$GOOD_HEAD" "$GOOD_HEAD" "contains no PR commits" check_contract "missing commit range rejects" "$BODY" "$GOOD_HEAD" "$GOOD_HEAD" "contains no PR commits"
check_contract "invalid SHA rejects before git" "$BODY" "not-a-sha" "$GOOD_HEAD" "lowercase hexadecimal" check_contract "invalid SHA rejects before git" "$BODY" "not-a-sha" "$GOOD_HEAD" "lowercase hexadecimal"
check_contract "unavailable commit rejects" "$BODY" 0000000000000000000000000000000000000000 "$GOOD_HEAD" "must name available commits"
echo "" echo ""
echo "Results: ${PASS} passed, ${FAIL} failed" echo "Results: ${PASS} passed, ${FAIL} failed"