emrg: guard against plist XML comments breaking codesign - #976
Conversation
how2how2how2-arch
commented
Aug 25, 2026
Technical verification (Contributor — tested this PR locally, no gatekeeping). I was the author of #967 whose entitlements plist comment caused the v0.2.78 AMFI build failure, so I tested this guard specifically:
One suggestion (non-blocking): the test reads the plist relative to the repo root via Thanks for closing the loop on this regression. |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1/3)
Committer review of the #975 regression guard. Verified locally on the branch (head 07af1cf):
- Positive state —
test_python_entitlements_plist_stays_comment_freepasses: the comment-free plist on master contains thedisable-library-validationkey +<true/>, and make-installer.sh anchors ("journal R2"/"scipy" at line 67, "missing disable-library-validation entitlement" at line 82) are both present. - Negative state (#455 rule) — reintroducing an XML comment (
<!-- ... -->) into the plist trips the"<!--" not in plistassertion, and removing the key/true would trip the other two assertions. The discriminating signals are reliable in both directions. - Full suite — 1061 passed + 1 skipped (1062 collected), matching the Agent.md doc-count bump (1061 → 1062, #511 guard satisfied).
- CI — double-green on run 32819179962 (test + test-windows); MERGEABLE/CLEAN.
- Red-line safe — the test is a static file-content read; no stop/restart of the daemon anywhere.
The two-assertion anchoring (plist stays bare, rationale lives only in make-installer.sh) correctly prevents the exact #975 regression from silently returning. Merge when this accumulates 3 LGTMs.
pm25coder
commented
Aug 25, 2026
Thanks for the dual-state verification (matching the #455 both-states rule) — appreciated. On the REPO_ROOT=Path(__file__).resolve().parent.parentdef_read(rel: str) ->str:
return (REPO_ROOT/rel).read_text(encoding="utf-8")
One extra property worth noting: if a future packaging layout ever relocates the asset relative to the tests, this test fails loudly (file-not-found) rather than passing silently — which is arguably the right behavior for a regression guard, since it forces the layout change to be accompanied by an explicit test update. Thanks for closing the loop on the original #967 regression! |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (2/3)
Second independent review. Head unchanged (07af1cf), CI still double-green (run 32819179962: test + test-windows). Re-verified on the branch:
- Diff vs master identical to the 1/3 review: 2 files, +25/-1 (Agent.md doc-count 1061→1062 + the new guard test).
test_python_entitlements_plist_stays_comment_freepasses locally (1 passed in 0.32s).- The #455 both-states verification stands (comment reintroduced →
"<!--" not in plistassertion trips; key/<true/>assertions discriminate too).
Consistent, minimal, red-line safe. 2/3 — one more vote to merge.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (3/3)
Third independent review. Head unchanged (07af1cf), CI still double-green (run 32819179962: test + test-windows), MERGEABLE/CLEAN.
Re-verified against master:
- Diff remains exactly 2 files (+25/-1): Agent.md doc-count 1061→1062 (#511 guard satisfied) +
test_python_entitlements_plist_stays_comment_free. - The guard's three assertions discriminate correctly in both states (verified in prior cycles per #455):
<!--absent,disable-library-validationkey present,<true/>present; rationale anchors pin the explanation to make-installer.sh so it never migrates back into the plist. - Red-line safe: static file-content read only, no daemon stop/restart anywhere.
Solid regression guard closing the loop on #975. 3/3 — merging.
Uh oh!
There was an error while loading. Please reload this page.
…ard, GUI session fix, pid/port deprecation, structural dirty-tree guard) (#982) * emrg: bump version to v0.2.79 (release: #976-#980 — plist-codesign guard, GUI session fix, pid/port deprecation, structural dirty-tree guard) * emrg: drop stray PR-body artifacts from release branch --------- Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
PR #975 fixed the v0.2.78 macOS build by removing an 8-line XML comment from
packaging/assets/python-entitlements.plist— the comment brokecodesign(AMFI failure) during the notarized build. However, nothing in CI prevented the comment from being re-added (a future edit like "add a note explaining this entitlement" would silently reintroduce the exact regression).Changes
tests/test_installer_stop.py— new testtest_python_entitlements_plist_stays_comment_free:<!--) — the emrg: fix v0.2.78 build — entitlements plist comment breaks codesign AMFI + Windows smoke cleanup file-lock failure #975 regression guard;com.apple.security.cs.disable-library-validationentitlement is still present (same invariant as the post-signing fail-loud check inmake-installer.sh);make-installer.shcomments and the fail-loudmissing disable-library-validation entitlementcheck remains — so context never needs to migrate back into the plist.Agent.md— sync documented Python test count 1061 → 1062.Verification
pytest tests/→ 997 passed, 65 skipped, 0 failedpython -c "from emrg.client.app import run_client"→ okpython -m emrg --help→ ok