From cb30e5d7a6cbf9c1ee196aeb3e89bb68d6cdeb29 Mon Sep 17 00:00:00 2001 From: Evelyn Chen Date: Thu, 27 Aug 2026 18:01:03 +0000 Subject: [PATCH 1/2] Exclude hidden media fallback provenance Authored-By: Codex (GPT-5) --- check.sh | 13 +++++++++---- tests/bin/curl | 4 ++++ tests/run | 6 ++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/check.sh b/check.sh index f6355fa..e562077 100755 --- a/check.sh +++ b/check.sh @@ -43,7 +43,8 @@ fi # A collapsed disclosure is valid supporting content, but provenance inside one # is not visible by default. Remove only collapsed details subtrees; an open -# disclosure remains visible unless one of its ancestors is collapsed. +# disclosure remains visible unless one of its ancestors is collapsed. Media +# fallback subtrees are likewise hidden when the browser supports the element. VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" | awk ' { @@ -54,7 +55,11 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" | tag=tag char if (char == ">") { lower=tolower(tag) - if (lower ~ /^])/) { + if (lower ~ /^<(video|audio)([[:space:]>])/) media_depth++ + else if (lower ~ /^<\/(video|audio)([[:space:]>])/) { + if (media_depth > 0) media_depth-- + } + else if (lower ~ /^])/) { attributes=lower gsub(/"[^"]*"/, "", attributes) parent_hidden=(details_depth > 0 && hidden[details_depth]) @@ -67,7 +72,7 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" | details_depth-- } } - else if (!hidden[details_depth]) printf "%s", tag + else if (!hidden[details_depth] && media_depth == 0) printf "%s", tag in_tag=0 tag="" } @@ -76,7 +81,7 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" | in_tag=1 tag=char } - else if (!hidden[details_depth]) printf "%s", char + else if (!hidden[details_depth] && media_depth == 0) printf "%s", char } } ') diff --git a/tests/bin/curl b/tests/bin/curl index 3832ec0..afb5208 100755 --- a/tests/bin/curl +++ b/tests/bin/curl @@ -68,6 +68,10 @@ printf '%s\n' "${PR_BODY}" | awk ' print line next } + if (lower ~ /^[ ]{0,3}<\/?(video|audio)([[:blank:]>])/) { + print line + next + } if (line ~ /^## Tracking[[:space:]]*$/) print "

Tracking

" else if (line ~ /^## Attribution[[:space:]]*$/) print "

Attribution

" else if (line ~ /^- Fixes[[:space:]]/) print "
  • " substr(line, 3) "
  • " diff --git a/tests/run b/tests/run index c6bce89..d0b974c 100755 --- a/tests/run +++ b/tests/run @@ -188,6 +188,12 @@ check_contract "open details inside collapsed details remain hidden" \ check_contract "open text in another details attribute remains collapsed" \ $'
    Release notes\n\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) \n
    ' \ "$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section" +check_contract "video fallback cannot hide provenance" \ + $'' \ + "$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section" +check_contract "audio fallback cannot hide provenance" \ + $'' \ + "$BASE" "$GOOD_HEAD" "PR body must contain a non-empty ## Tracking section" check_contract_pass "unrelated collapsed details remain available" \ $'
    Logs\n\nSupporting output\n
    \n\n## Tracking\n- Fixes bug-x7k2m9 — https://agenthub.fritzlab.net/bug-x7k2m9\n\n## Attribution\n- Authored-By: Codex (GPT-5) ' \ "$BASE" "$GOOD_HEAD" -- 2.54.0 From 93b6bf62bb5c603e0fc1db6df22632a3f5da139d Mon Sep 17 00:00:00 2001 From: Evelyn Chen Date: Thu, 27 Aug 2026 18:06:03 +0000 Subject: [PATCH 2/2] Explain hidden provenance recovery Authored-By: Codex (GPT-5) --- check.sh | 6 ++++-- tests/run | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/check.sh b/check.sh index e562077..391c571 100755 --- a/check.sh +++ b/check.sh @@ -86,6 +86,8 @@ VISIBLE_BODY=$(printf '%s\n' "${RENDERED_BODY}" | } ') +hidden_content_guidance='move ## Tracking and ## Attribution outside collapsed
    or