Fix: updates.xml regex only matches target stability block, restore correct SHAs
Some checks failed
Repo Health / Access control (push) Successful in 1s
Repo Health / Release configuration (push) Failing after 4s
Repo Health / Scripts governance (push) Successful in 4s
Repo Health / Repository health (push) Failing after 4s

The Python regex now uses negative lookahead (?:(?!</update>).)*? to
prevent matching across multiple <update> blocks. All channels restored
with correct SHA (0f1cf23a...) matching the v03 stable ZIP.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-04-18 17:51:44 -05:00
parent ca3e652525
commit 7089761488

View File

@@ -314,9 +314,9 @@ jobs:
with open("updates.xml", "r") as f:
content = f.read()
# Build regex to find the <update> block containing this stability tag
# Match from <update> to </update> that contains <tag>xml_tag</tag>
block_pattern = r"(<update>.*?<tag>" + re.escape(xml_tag) + r"</tag>.*?</update>)"
# Build regex to find the specific <update> block for this stability tag
# Use negative lookahead to avoid matching across multiple <update> blocks
block_pattern = r"(<update>(?:(?!</update>).)*?<tag>" + re.escape(xml_tag) + r"</tag>.*?</update>)"
match = re.search(block_pattern, content, re.DOTALL)
if not match: