[bug-yhg8dqypwmar] fix(check-naming): reject hidden media #5

Merged
architect merged 2 commits from architect/bug-yhg8dqypwmar/reject-hidden-media into main 2026-08-27 18:08:55 +00:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 93b6bf62bb - Show all commits
+4 -2
View File
@@ -86,6 +86,8 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" |
} }
') ')
hidden_content_guidance='move ## Tracking and ## Attribution outside collapsed <details> or <video>/<audio> fallback content'
# ---- branch form ---- # ---- branch form ----
# <role>/bug-<id>/<kebab> # <role>/bug-<id>/<kebab>
if echo "${BRANCH}" | grep -qE "^(dev|ux|ops|security|perf|architect|support)/bug-[a-z0-9]+/[a-z0-9][a-z0-9-]*$"; then if echo "${BRANCH}" | grep -qE "^(dev|ux|ops|security|perf|architect|support)/bug-[a-z0-9]+/[a-z0-9][a-z0-9-]*$"; then
@@ -124,7 +126,7 @@ if [ "${BRANCH_KIND}" = "role-bug" ]; then
in_section { print } in_section { print }
') ')
if [ -z "${tracking}" ]; then if [ -z "${tracking}" ]; then
echo "FAIL[check-naming]: PR body must contain a non-empty ## Tracking section" echo "FAIL[check-naming]: PR body must contain a non-empty ## Tracking section visible by default; ${hidden_content_guidance}"
FAILED=1 FAILED=1
else else
if ! printf '%s\n' "${tracking}" | grep -qE "(^|[[:space:]>])Fixes[[:space:]]+${BRANCH_BUG}([^a-z0-9]|$)"; then if ! printf '%s\n' "${tracking}" | grep -qE "(^|[[:space:]>])Fixes[[:space:]]+${BRANCH_BUG}([^a-z0-9]|$)"; then
@@ -150,7 +152,7 @@ if [ "${BRANCH_KIND}" != "invalid" ]; then
') ')
watermark_re='Authored-By: .+ \(.+\) <a href="mailto:noreply@[[:alnum:].-]+"[^>]*>noreply@[[:alnum:].-]+</a>' watermark_re='Authored-By: .+ \(.+\) <a href="mailto:noreply@[[:alnum:].-]+"[^>]*>noreply@[[:alnum:].-]+</a>'
if ! printf '%s\n' "${attribution}" | grep -qE "${watermark_re}"; then if ! printf '%s\n' "${attribution}" | grep -qE "${watermark_re}"; then
echo "FAIL[check-naming]: ## Attribution must contain an Authored-By product/model watermark" echo "FAIL[check-naming]: visible ## Attribution must contain an Authored-By product/model watermark; ${hidden_content_guidance}"
FAILED=1 FAILED=1
fi fi
+2 -2
View File
@@ -190,10 +190,10 @@ check_contract "open text in another details attribute remains collapsed" \
"$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section" "$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section"
check_contract "video fallback cannot hide provenance" \ check_contract "video fallback cannot hide provenance" \
$'<video controls>\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) <noreply@openai.com>\n</video>' \ $'<video controls>\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) <noreply@openai.com>\n</video>' \
"$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section" "$BASE" "$GOOD_HEAD" "move ## Tracking and ## Attribution outside collapsed <details> or <video>/<audio> fallback content"
check_contract "audio fallback cannot hide provenance" \ check_contract "audio fallback cannot hide provenance" \
$'<audio controls>\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) <noreply@openai.com>\n</audio>' \ $'<audio controls>\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) <noreply@openai.com>\n</audio>' \
"$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section" "$BASE" "$GOOD_HEAD" "move ## Tracking and ## Attribution outside collapsed <details> or <video>/<audio> fallback content"
check_contract_pass "unrelated collapsed details remain available" \ check_contract_pass "unrelated collapsed details remain available" \
$'<details><summary>Logs</summary>\n\nSupporting output\n</details>\n\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) <noreply@openai.com>' \ $'<details><summary>Logs</summary>\n\nSupporting output\n</details>\n\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) <noreply@openai.com>' \
"$BASE" "$GOOD_HEAD" "$BASE" "$GOOD_HEAD"