How apm 0.39 writes a port into a package identity is unverified, so a key derived from a git: URL with a port could be wrong while looking right. The gate now fails clearly on one, naming `apm approve --list` as the way to read the real identity. The script and gates.md record that only an https URL on a lowercase host was checked against apm. The test drops its GNU-only `sed -i` for a python3 rewrite, and covers ssh:// and https URLs with a port under both readers. Refs: #271 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi