diff options
| -rw-r--r-- | docs/superpowers/plans/2026-08-09-external-providers.md | 14 | ||||
| -rw-r--r-- | llamachat/providers.py | 9 | ||||
| -rwxr-xr-x | test_llamachat.py | 5 |
3 files changed, 14 insertions, 14 deletions
diff --git a/docs/superpowers/plans/2026-08-09-external-providers.md b/docs/superpowers/plans/2026-08-09-external-providers.md index d34fffc..158306b 100644 --- a/docs/superpowers/plans/2026-08-09-external-providers.md +++ b/docs/superpowers/plans/2026-08-09-external-providers.md @@ -589,8 +589,9 @@ def test_key_resolution(): assert "gpg-agent" in str(exc) # The partial stdout a timeout captures must never reach the message. assert "partial-secret" not in str(exc) - # `from None` suppresses the chained traceback. It does not clear - # __context__, so this pins the display behavior, not unreachability. + # `from None` suppresses the chained-traceback display. It does not + # clear __context__, and the chained traceback would not have shown + # the secret anyway, so this pins tidiness, not secret hygiene. assert exc.__suppress_context__ and exc.__cause__ is None # A non-zero exit quotes gpg's stderr, which is the only useful part, and @@ -712,11 +713,10 @@ class KeyResolver: def _from_pass(self, provider: Provider, entry: str) -> str: try: out = self._runner(["pass", "show", entry], timeout=KEY_TIMEOUT) - # Every raise below is `from None`. Both TimeoutExpired and - # CalledProcessError carry a .stdout that can hold a partial secret, - # and this keeps it out of any printed traceback. Note it suppresses - # display only: __context__ still references the original, so the - # real guarantee is that no handler here puts stdout in the message. + # Every raise below is `from None`. It suppresses the chained-traceback + # display only, __context__ still references the original with its + # .stdout, so the real guarantee is that no handler here puts stdout + # in the message. except subprocess.TimeoutExpired: # The likely cause is a pinentry that never appeared, not one # sitting in front of the user: no $DISPLAY inherited, no diff --git a/llamachat/providers.py b/llamachat/providers.py index 2c459e9..56466a3 100644 --- a/llamachat/providers.py +++ b/llamachat/providers.py @@ -219,11 +219,10 @@ class KeyResolver: def _from_pass(self, provider: Provider, entry: str) -> str: try: out = self._runner(["pass", "show", entry], timeout=KEY_TIMEOUT) - # Every raise below is `from None`. Both TimeoutExpired and - # CalledProcessError carry a .stdout that can hold a partial secret, - # and this keeps it out of any printed traceback. Note it suppresses - # display only: __context__ still references the original, so the - # real guarantee is that no handler here puts stdout in the message. + # Every raise below is `from None`. It suppresses the chained-traceback + # display only, __context__ still references the original with its + # .stdout, so the real guarantee is that no handler here puts stdout + # in the message. except subprocess.TimeoutExpired: # The likely cause is a pinentry that never appeared, not one # sitting in front of the user: no $DISPLAY inherited, no diff --git a/test_llamachat.py b/test_llamachat.py index 5ee2310..b943976 100755 --- a/test_llamachat.py +++ b/test_llamachat.py @@ -1154,8 +1154,9 @@ def test_key_resolution(): assert "gpg-agent" in str(exc) # The partial stdout a timeout captures must never reach the message. assert "partial-secret" not in str(exc) - # `from None` suppresses the chained traceback. It does not clear - # __context__, so this pins the display behavior, not unreachability. + # `from None` suppresses the chained-traceback display. It does not + # clear __context__, and the chained traceback would not have shown + # the secret anyway, so this pins tidiness, not secret hygiene. assert exc.__suppress_context__ and exc.__cause__ is None # A non-zero exit quotes gpg's stderr, which is the only useful part, and |
