Repository navigation
sdkharness: fail, not skip, on auth/connection/import errors; scrub proxies - #623
Merged
Merged
Conversation
Conformance leaves mapped Unauthorized/AccessDenied/ServiceError/ ConnectionError to COULD-NOT-RUN and any ImportError to missing-runtime, which the dispatcher turned into SKIP (exit 0). At a loopback simulator the harness supplies both server and credential, so those are defects. Only a genuinely absent b2sdk module (or a missing simulator URL) may be amber. - leaves: auth, access-denied, connection and service errors, URL errors and SDK ImportErrors are FAIL; only ModuleNotFoundError for b2sdk itself is missing-runtime - lib/contract.py: SKIP only for no-realm-option, missing-runtime, no-client-option, not-claimed; any other COULD-NOT-RUN reason is FAIL - scrub proxy variables in the dispatcher, the health check and every leaf (NO_PROXY pinned to 127.0.0.1) so a stray proxy cannot change a result - README: api.retry_after_503 and upload.retry_408 pass now - fix the garbled files.upload docstring and references to harness-only paths - unit tests: dead simulator port and SDK ImportError yield FAIL Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 4, 2026
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.
Summary
Review findings for the repo-owned
.sdkharness/Python checks.Unauthorized/InvalidAuthToken/AccessDeniedandgaierror/ConnectionError/ServiceError/B2ConnectionErrortoCOULD-NOT-RUN, and anyImportErrortomissing-runtime.lib/contract.pyturned that intoSKIP, exit 0. At a loopback simulator the harness supplies the server and the credential, so these are all defects now. OnlyModuleNotFoundErrorforb2sdkitself (and a missing simulator URL) may beCOULD-NOT-RUN; a broken or circular SDK import isFAIL. Theurls.native_downloadURLError paths and theclient.auth_persistencesecond-process mapping follow the same rule.lib/contract.pyonly acceptsno-realm-option,missing-runtime,no-client-option,not-claimedas SKIP; any otherCOULD-NOT-RUNreason becomes FAIL (the CLI's "SKIP policy FAIL"). The resilience leaves get the same import handling.HTTP_PROXY/HTTPS_PROXY/ALL_PROXY/FTP_PROXY(any case) are removed andNO_PROXYis pinned to127.0.0.1in the dispatcher child environment, in the health check, and in every leaf (vialoopback_guard.refusal()), so a proxy on the machine cannot turn a passing loopback scenario into an "unreachable" one.api.retry_after_503/upload.retry_408FAIL (both pass); the garbledfiles.uploaddocstring is fixed; references to harness-only paths (bin/conformance/README.md,docs/sdks/.../card.md,bin/resilience/...) are removed.changelog.d/+sdkharness-fail-not-skip.infrastructure.md.Test plan
test/unit/test_sdkharness_fail_not_skip.py: a dead loopback port and an SDKImportErroreach yield FAIL (leaf and dispatcher translation); a genuinely missingb2sdkis still SKIP; unreachable/unauthorized reasons from the leaf are FAIL in the dispatcher; proxy variables are scrubbed.pytest test/unit/test_sdkharness*.py: 116 passed.HTTP_PROXY/HTTPS_PROXY/ALL_PROXYset: no production endpoint was contacted.Follow-up outside this repo: the central Python conformance adapter (
python-repository-conformance-adapter.shin the harness) still leavesSKIP_POLICYat the amber default and should setSKIP_POLICY=fail.🤖 Generated with Claude Code