Repository navigation
fix(registry): render transport error text in printable ASCII - #4369
Merged
Daniel Meppiel (danielmeppiel) merged 3 commits intoNov 21, 2026
Merged
Conversation
The macOS trust store reports an untrusted certificate with curly quotes; the registry transport error echoed that text verbatim. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 15:12
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the transport-error text sanitization change.
No open issues 🎉
What changed in this PR
This PR fixes non-ASCII operating-system text in registry transport errors, including macOS TLS certificate failures, without changing trust decisions or failure behavior.
Changes:
- Uses the existing
printable_ascii_texthelper to sanitize transport exception text. - Adds a regression test for certificate errors containing curly quotes.
- Documents the user-visible fix in the changelog.
| File | Description |
|---|---|
tests/unit/registry/test_client.py |
Adds regression coverage for ASCII rendering of TLS errors. |
src/apm_cli/deps/registry/client.py |
Sanitizes transport exception text before wrapping it in RegistryError. |
CHANGELOG.md |
Records the printable-ASCII error-output fix. |
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
5 of 10 tasks
Daniel Meppiel (danielmeppiel)
deleted the
fix-registry-transport-ascii
branch
November 21, 2026 05:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On macOS,
apm installagainst a registry whose certificate the OS trust store rejects echoes the platform error text, which contains curly quotes (\u201clocalhost\u201d certificate is not trusted). The command correctly refuses with exit 1; only the output breaks the printable-ASCII rule (I6). The lifecycle output oracle now catches this ontest_tls_install_custom_ca.py::test_apm_install_trusts_private_ca_and_retains_default_root[os-trust](main CI, macOS).The registry client now renders the transport exception through the existing
utils/diagnostics.printable_ascii_texthelper. Trust decisions are unchanged.Issue and approved scope
Issue: Refs #4092
Human scope-approval comment: release-gate fix requested by the 0.37 release PM for a red main check.
Does this PR complete the issue, or what remains? It fixes this red check only.
Type of change
Testing
pytest tests/unit/registry/test_client.py: 41 passed, including a new case where the transport error from the OS carries curly quotes and the RegistryError message is ASCII.ruff check/ruff format --check(0.15.12) and architecture boundaries: clean. The macOS TLS integration test runs in CI.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)