Skip to content

Mark include-gated Grain source_metadata fields nullable (API v0.7.4)#98

Merged
kdr merged 1 commit into
mainfrom
kdr-v074
Jun 6, 2026
Merged

Mark include-gated Grain source_metadata fields nullable (API v0.7.4)#98
kdr merged 1 commit into
mainfrom
kdr-v074

Conversation

@kdr

@kdr kdr commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bumps the spec to v0.7.4.
  • Marks the six include-gated GrainSourceMetadata fields — participants, highlights, ai_summary, ai_action_items, ai_template_sections, hubspot — as nullable: true.
  • Grain returns these fields as an explicit null (not omission) when they're requested but empty, so the API can legitimately serialize "ai_summary": null etc. The previous spec typed them as non-nullable, which is incorrect and makes generated SDK types reject valid responses. Mirrors the corresponding API fix.

Test plan

  • version is 0.7.4 and spec/openapi.json is valid JSON.
  • The six fields under GrainSourceMetadata carry nullable: true; no other schemas touched.
  • Regenerate the SDK from this spec and confirm the six fields are typed nullable (e.g. ai_summary?: {...} | null).

Summary by CodeRabbit

Documentation

  • API specification updated to version 0.7.4 with improved null-value semantics.
  • Multiple fields now explicitly support null values with clarified descriptions: meeting participants, highlights, AI summaries, action items, template sections, and HubSpot identifiers.
  • Updated documentation clarifies that null is returned when gated content is requested but empty, enabling more robust integrations.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Complex PR? Review this PR in Change Stack to move by importance, not file order.

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9521b700-b9ce-4dc4-9eb5-b16126d66726

📥 Commits

Reviewing files that changed from the base of the PR and between daa5cdb and 2d9e666.

📒 Files selected for processing (1)
  • spec/openapi.json

📝 Walkthrough

Walkthrough

The OpenAPI specification is updated from version 0.7.3 to 0.7.4. The GrainSourceMetadata schema contract is refined by explicitly marking six fields as nullable and updating their descriptions to clarify that null is returned when the corresponding gated content is requested but empty.

Changes

OpenAPI Schema Null-Safety Updates

Layer / File(s) Summary
GrainSourceMetadata nullable fields and version bump
spec/openapi.json
Version bumped to 0.7.4. Six fields in GrainSourceMetadata schema—meeting_participants, highlights, ai_summary, ai_action_items, ai_template_sections, and hubspot—are marked as nullable: true with updated descriptions clarifying that null is returned when gated content is requested but empty.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • cloudglue/cloudglue-api-spec#96: Earlier PR that introduced and expanded GrainSourceMetadata in the OpenAPI spec, which this PR builds upon by refining null-safety contracts.

Suggested reviewers

  • amyxst

Poem

🐰 The spec now speaks with clarity true,
Six fields declare what null will do—
When gated content comes up bare,
A null response shows we care!
Version bump, a hop and cheer,
The API contract's crystal clear!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main change: marking include-gated fields as nullable in API v0.7.4.
Description check ✅ Passed The description follows the template with a complete Summary section explaining the changes and rationale, and a Test plan section with specific, actionable items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kdr-v074

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kdr kdr requested a review from amyxst June 6, 2026 03:45
@kdr kdr merged commit 072eb3f into main Jun 6, 2026
1 check passed
@kdr kdr deleted the kdr-v074 branch June 6, 2026 13:33
kdr added a commit to cloudglue/cloudglue-js that referenced this pull request Jun 8, 2026
## Summary

- Bumps the `cloudglue-api-spec` submodule to **v0.7.4** ([api-spec
#98](cloudglue/cloudglue-api-spec#98)), which
marks the include-gated Grain `source_metadata` fields as nullable.
- Regenerates the client. The only generated change is in
`GrainSourceMetadata` (`generated/common.ts`): `participants`,
`highlights`, `ai_summary`, `ai_action_items`, `ai_template_sections`,
and `calendar_event` move from `.optional()` → `.nullish()`, with
matching `| null` TS types produced by the existing `generate.js`
nullish/nullable transforms.
- Bumps SDK version `0.7.12` → `0.7.13`.

## Verification

- `npm run generate` is reproducible — re-running yields byte-identical
output (only `common.ts` changes).
- `npm run build` (tsc) passes.
- Ran `getSourceMetadata()` against a live Grain connector: fetch + Zod
parse both succeed with the new nullable schema.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Version updated to 0.7.13
  * Submodule reference updated

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
kdr added a commit to cloudglue/cloudglue-python that referenced this pull request Jun 8, 2026
…#62)

## Summary

Regenerates the low-level SDK from
[cloudglue-api-spec#98](cloudglue/cloudglue-api-spec#98)
(API v0.7.4).

The only substantive change is in `GrainSourceMetadata`: include-gated
fields (`participants`, `highlights`, `ai_summary`, `ai_action_items`,
`ai_template_sections`, `hubspot`) are now nullable, with serializer
hooks so an explicit `null` round-trips instead of being dropped.
Everything else in the diff is the `0.7.3 → 0.7.4` version bump churn.

## Wrapper changes

None needed. The data-connector sync and source-metadata endpoints
landed previously (#60) and are already exposed via
`DataConnectors.get_source_metadata()` / `sync_file()`. The
source-metadata endpoint takes only `id`/`url` (no new params in #98),
so the lightweight wrapper is already complete.

## Verification

Built (`make build` → `cloudglue-0.7.11`) and ran a throwaway script
end-to-end against a live Grain connector:
- connector discovery, `list_files()`, and `get_source_metadata()` all
work
- nullable fields deserialize cleanly — `calendar_event`/`hubspot` come
back as `None` and round-trip through `to_dict()` as explicit `null`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants