fix: SDK bug fixes — truthiness guards, goal owner overwrite, meeting details rewrite#15
Merged
franccesco merged 10 commits intomainfrom Mar 20, 2026
Merged
fix: SDK bug fixes — truthiness guards, goal owner overwrite, meeting details rewrite#15franccesco merged 10 commits intomainfrom
franccesco merged 10 commits intomainfrom
Conversation
Replace `if user_id and meeting_id:` with `if user_id is not None and meeting_id is not None:` in issues, headlines, and scorecard operations (sync + async). The truthiness check failed silently when user_id=0, allowing both params to be used simultaneously instead of raising ValueError. Also fix downstream `if meeting_id:` to `if meeting_id is not None:` and headline create DetailsUrl null handling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ccess Goal update() previously always defaulted accountable_user to the current user, silently overwriting the existing owner when only updating the title or status. Now accountable_user is only included in the API payload when explicitly provided. Also add safety checks for empty or malformed Origins arrays in goal transform functions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Meeting details() previously called self.list() which only returned the
current user's meetings, then filtered by ID. This meant meetings the
user was an attendee of (but didn't own) could not be found, and fields
like start_date_utc, created_date, and organization_id were always None.
Now calls GET L10/{meeting_id} directly, populating all fields from the
API response. Also harden metrics transform measurable_id check and
Owner null handling in meeting issues transform.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip whitespace from API keys in Configuration to reject whitespace-only keys. Make UserSearchResult and UserListItem model fields optional where API may return None. Use timezone-aware UTC datetime in todo create fallback. Fix user list placeholder filtering to use email check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update mock expectations in meeting tests to match the new direct API
call pattern (GET L10/{id} instead of list-then-filter). Update goal
tests to reflect that accountable_user is no longer auto-populated.
Update bulk operation tests for new meeting details behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 134 integration tests that validate all operations against the real Bloom Growth API, covering users, meetings, scorecard, todos, goals, issues, and headlines (sync + async). Tests are marked with @pytest.mark.integration and can be deselected for CI with -m "not integration". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 185 adversarial tests covering edge cases: zero IDs bypassing truthiness guards, malformed API responses, missing/None fields in transforms, empty Origins arrays, whitespace-only API keys, and Pydantic model coercion boundaries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Exclude integration tests from CI runs with -m "not integration" since they require BG_API_KEY. Fix pyright type error in meetings transform by extracting Owner dict to a typed local variable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Systematic bug hunt across the entire SDK using a team of 8 specialized agents (4 dev + 4 QA) running TDD and adversarial code review against the real Bloom Growth API. Found and fixed 8 bugs, added 319 new tests.
Bug Fixes
if user_id and meeting_id:silently failed whenuser_id=0, replaced with properis not Nonechecks in issues, headlines, and scorecard operations (6 files)update()overwrites owner — Previously always defaultedaccountable_userto the current user, silently overwriting the existing owner when only updating title or status. Now truly optional.details()only found user's own meetings — Rewrote to callGET L10/{id}directly instead of filtering fromlist(). Fieldsstart_date_utc,created_date,organization_idare now populated.DetailsUrl=Nonecrash —data.get("DetailsUrl", "")didn't handle explicit None; fixed todata.get("DetailsUrl") or ""datetime.now()todatetime.now(UTC)for timezone-aware fallbackif not measurable_idfiltered out ID=0; fixed tois NonecheckTest Changes
integrationpytest marker for selective test executionTest plan
uv run pytest)uv run ruff check .)uv run ruff format --check .)🤖 Generated with Claude Code