Skip to content

promotion-gate: use plistlib for CFBundleShortVersionString - #150

Merged
mdheller merged 1 commit into
mainfrom
fix/promotion-gate-plistlib
Aug 4, 2026
Merged

promotion-gate: use plistlib for CFBundleShortVersionString#150
mdheller merged 1 commit into
mainfrom
fix/promotion-gate-plistlib

Conversation

@mdheller

@mdheller mdheller commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Second false-negative from promotion-gate.yml. First run 127'd on missing 7zz (#149 fixed that). Second run — this one — extracted the DMG fine but reported empty version:

  • Info.plist in a real DMG is a BINARY plist, not XML
  • plistutil was supposed to convert but silently failed (its 2>/dev/null swallowed the error)
  • The fallback cp put the binary blob at /tmp/plist.xml
  • grep matched (binary file matches) but sed yielded empty
  • Comparison: '' != '150.0.6' → gate quarantined a good release

Fix

Python's plistlib — handles binary AND XML formats natively, zero extra deps. Removes libplist-utils entirely.

Meta-lesson

A two-step tool chain where the first step's failure is silenced becomes a two-step tool chain where you cannot tell which step failed. Both 2>/dev/null fallbacks in this gate have now bitten us. Follow-up will smoke-test the gate against a fixture DMG on PR time (already documented in #149's commit).

…binary plist)

Second false-negative from promotion-gate.yml: first run 127'd on missing
7zz (#149 fixed that), second run extracted the DMG fine but reported
empty version because:

  - Info.plist in a real DMG is a BINARY plist, not XML
  - plistutil (libplist-utils) was supposed to convert it to XML but
    silently failed (its '2>/dev/null' swallowed the error)
  - The fallback 'cp' put the binary blob at /tmp/plist.xml
  - grep matched (binary file matches) but sed on binary yielded ''
  - Version comparison: '' != '150.0.6' → gate quarantined a good release

Use Python's plistlib instead. Handles binary AND XML formats natively,
zero extra deps (Python 3 is on every ubuntu-latest runner).

Meta-lesson (again): a two-step tool chain where the first step's failure
is silenced becomes a two-step tool chain where you cannot tell which
step failed. Both '2>/dev/null' fallbacks in this gate have now bitten
us. Removing libplist-utils entirely closes the class.
@mdheller
mdheller merged commit e0e376f into main Aug 4, 2026
17 checks passed
@mdheller
mdheller deleted the fix/promotion-gate-plistlib branch August 4, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant