ref(argv): Update integration #6155
1 issue
code-review: Found 1 issue (1 high)
High
Existing argv test will fail because send_default_pii defaults to False - `sentry_sdk/integrations/argv.py:25-26`
The change gates extra['sys.argv'] behind should_send_default_pii(), which defaults to False. The existing test tests/integrations/argv/test_argv.py::test_basic initializes the SDK without send_default_pii=True and asserts event['extra']['sys.argv'] == argv, which will now raise KeyError because extra is set but sys.argv is never assigned to it. The test must be updated (e.g. pass send_default_pii=True) and a second test added covering the default (PII-off) path.
Duration: 30.9s · Tokens: 105.1k in / 2.0k out · Cost: $0.67 (+merge: $0.00)
Annotations
Check failure on line 26 in sentry_sdk/integrations/argv.py
sentry-warden / warden: code-review
Existing argv test will fail because send_default_pii defaults to False
The change gates `extra['sys.argv']` behind `should_send_default_pii()`, which defaults to False. The existing test `tests/integrations/argv/test_argv.py::test_basic` initializes the SDK without `send_default_pii=True` and asserts `event['extra']['sys.argv'] == argv`, which will now raise `KeyError` because `extra` is set but `sys.argv` is never assigned to it. The test must be updated (e.g. pass `send_default_pii=True`) and a second test added covering the default (PII-off) path.