Skip to content

fix(docs): sync discriminator and calendar GET response contracts - #80

Merged
roshanjonah merged 2 commits into
mainfrom
agent/sdk-current-contract-897
Nov 3, 2026
Merged

roshanjonah merged 2 commits into
mainfrom
agent/sdk-current-contract-897

Conversation

@roshanjonah

@roshanjonah roshanjonah commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Emit explicit webhook discriminator mappings from qubrics/qubrics#917, unblocking normal current-contract SDK generation. Include its approved GET-only Calendar JSON etag response schema and changelog so headerless CLI/MCP callers can obtain the version needed for empty-calendar deletion. Calendar list/create schemas stay unchanged.

Part of qubrics/qubrics#897; companion SDK prerequisite qubrics/qubrics-sdk#346. Snapshot emitted from the producer, with normal Postman generation and drift checks. npm run postman:emit, npm run postman:check and npm run confidentiality:check exit 0. New prose passed the fresh-reader critique, one humanize pass and protected-set check.

Evidence: evidence/sdk-current-contract-897-20261103.md. Delegated source merge after all prerequisite CI and review settle. No manual publish or deploy authorised here.

Summary by CodeRabbit

  • Bug Fixes

    • Calendar GET responses now include the calendar’s ETag in the JSON body, matching the ETag response header. This helps CLI and MCP callers use it when deleting an empty calendar.
  • Documentation

    • Updated the API specification to describe calendar and mail webhook payloads separately, and to document the ETag in calendar responses.

@roshanjonah roshanjonah added the major Requires review for substantial logic, schema, API, auth, or rollout changes label Nov 3, 2026
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The OpenAPI snapshot adds an ETag to the Calendar GET response schema and defines separate mail and calendar webhook payload schemas. The changelog describes the ETag use with If-Match. An evidence note records the reported validation results and merge status.

Changes: API contract updates

Layer / File(s) Summary
Add ETag to the Calendar GET response
openapi-app.json, changelog.mdx, evidence/sdk-current-contract-897-20261103.md
The Calendar GET response now references a schema with a required etag. The changelog states that the JSON value matches the ETag header and can be used with If-Match when deleting an empty calendar. The evidence note records the companion schema scope and reported validation status.
Define and connect webhook payload schemas
openapi-app.json
The snapshot adds separate calendar and mail event payload schemas. WebhookEventPayload maps event types to these schemas with a type discriminator and references both through oneOf.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • qubrics/docs#78: Defines the same webhook payload schemas and discriminator mapping in openapi-app.json. It also changes WebhookEventData, which this pull request does not change.
Merge Risk: Minimal · up to 6dd1c

The change adds an etag to the Calendar GET response and explicit webhook payload discriminators. No concrete merge-blocking defect remains. Only an external consumer that strictly validates against the old closed schema could notice the new field, and none is shown in this repository.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the two main contract changes: webhook discriminator synchronization and the Calendar GET response contract update.
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.
Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/scala/security/command-injection-sys-process-scala.yml

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@roshanjonah roshanjonah changed the title fix(openapi): emit explicit webhook payload discriminators fix(docs): sync discriminator and calendar GET response contracts Nov 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comments: 1
openapi-app.json-3254-3254: 1

3254-3254: Major · Data Integrity & Integration · Heavy lift

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Preserve compatibility with the previous calendar response.

The previous response used the closed MailboxCalendar schema. A consumer that validates against that schema will reject every response containing the new etag field. (github.com)

Use a versioned or opt-in response, or coordinate a migration before returning the new field.

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 398bb2c9-262c-45b4-924f-529b66bb5df0
Commits

Reviewing files that changed from the base of the PR and between b0bb1e7 and 6dd1c64.

Files selected for processing: 3
  • changelog.mdx
  • evidence/sdk-current-contract-897-20261103.md
  • openapi-app.json
Files skipped from review as they are similar to previous changes: 1
  • evidence/sdk-current-contract-897-20261103.md

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.

@roshanjonah

Copy link
Copy Markdown
Member Author

Reviewed the compatibility concern. This is the intentional GET-only contract addition approved for #897: the previous closed Calendar GET schema cannot describe data.etag, while headerless CLI/MCP callers need that value for conditional empty-calendar deletion. The updated closed GET schema is coordinated with API qubrics/qubrics#917 and all normal generated clients in qubrics/qubrics-sdk#346; list/create keep their previous schemas. Consumers that strictly validate the previous GET contract must adopt the updated schema before the operator-controlled rollout. This PR does not deploy the API or publish SDK packages. Adding a versioned or opt-in API is outside the approved narrow scope.

@roshanjonah
roshanjonah merged commit 12ef510 into main Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Requires review for substantial logic, schema, API, auth, or rollout changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant