Repository navigation
fix(test): implement JsonClient.authorization on TestCampusRequest (sdk #119 drift) - #975
Merged
Merged
Conversation
This was referenced Oct 27, 2026
sdk #119 (91d674b) added an abstract authorization property to campus_python's JsonClient ABC, breaking every contract-suite service fixture: patch_campus_python swaps CampusRequest for TestCampusRequest, which did not implement the new member ('Can't instantiate abstract class TestCampusRequest with abstract method authorization'). The stale locally-built sdk in existing venvs had masked the drift (#971). The test double now mirrors the production peek: return the value of the Authorization header that would be sent, without mutating state.
nycomp
force-pushed
the
fix/harness-sdk-authorization
branch
from
October 27, 2026 15:51
a4cfd75 to
4a0e201
Compare
3 tasks
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.
Refs #971 (second incident of the same disease). Unblocks the phase-1 stack (#970) whose CI gates on contract.
Problem
With a current
campus_pythonbuild (sdk #119, 91d674b — "expose JsonClient.authorization"), every contract-suite service fixture fails at setup:patch_campus_pythonswapsCampusRequestforTestCampusRequestthroughout the cross-service test harness; the sdk added an abstractauthorizationproperty to theJsonClientABC, and the test double never implemented it. This is currently red onweeklyitself in any venv with the current sdk — the stale locally-built sdk in older venvs had masked the drift in both directions (see #971).Fix
TestCampusRequestimplements the property, mirroring production semantics: peek the value of theAuthorizationheader that would be sent (override headers if set, else env-derived),Nonewhen unset. No state change, no behavior change for existing tests.Verification
tests.contract.api.test_api_circles(the failing class) green on this branch alone; full unit (842), contract, integration, andruff check .green at the tip of the stacked series.