Skip to content

chore(openapi): regenerate api.yaml after docstring + dep drift#9651

Closed
mscolnick wants to merge 1 commit into
mainfrom
ms/chore/regen-openapi
Closed

chore(openapi): regenerate api.yaml after docstring + dep drift#9651
mscolnick wants to merge 1 commit into
mainfrom
ms/chore/regen-openapi

Conversation

@mscolnick
Copy link
Copy Markdown
Contributor

Summary

packages/openapi/api.yaml drifted out of sync with the generator, breaking tests/_cli/test_cli_development.py::test_openapi_up_to_date on every PR since yesterday afternoon.

Two changes that touched docstring rendering both landed without regenerating the schema file:

  1. pydantic-ai-slim v1.96.0 changed docstrings on types referenced by marimo's schema (e.g. pydantic_ai.ui.vercel_ai.request_types.UIMessage). The CLI test installs deps freely via uv pip install --group=test-optional --group=dev marimo*.whl, so it picked up the new version as soon as it was released.
  2. style: enforce single backticks in Python docstrings (markdown, not RST) #9645 ("enforce single backticks in Python docstrings") rewrote docstrings across the codebase but didn't regenerate api.yaml.

This PR regenerates via:

marimo development openapi > packages/openapi/api.yaml
pnpm -w run codegen

The diff is description-only — no schema additions, removals, or renames. Just docstring formatting (RST → Markdown backticks, multi-line dedenting, etc).

Followups (separate)

test_openapi_up_to_date is fragile because the CLI test resolves deps freely — any minor docstring change in a transitive dep silently breaks it until someone regenerates. Worth either pinning deps for that test or stripping description fields from the comparison.

Test plan

  • uv run --group test-optional pytest tests/_cli/test_cli_development.py::test_openapi_up_to_date -v passes locally

Copilot AI review requested due to automatic review settings May 21, 2026 17:19
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment May 21, 2026 5:26pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR brings the repository’s checked-in OpenAPI artifacts back in sync with the OpenAPI generator output after upstream/docstring formatting drift, restoring the “OpenAPI up to date” CLI test signal.

Changes:

  • Regenerates packages/openapi/api.yaml to reflect updated docstring rendering (description-only changes).
  • Updates the generated TypeScript OpenAPI types (packages/openapi/src/api.ts) to match the regenerated schema.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
packages/openapi/api.yaml Regenerated OpenAPI schema; updates description fields/docstring formatting while preserving schema structure.
packages/openapi/src/api.ts Regenerated TS types/comments to match the updated OpenAPI schema descriptions.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Architecture diagram
sequenceDiagram
    participant Doc as Docstring in Python Source
    participant Gen as OpenAPI Generator (CLI cmd: marimo development openapi)
    participant YAML as packages/openapi/api.yaml
    participant TSGen as TypeScript Codegen (pnpm run codegen)
    participant API as packages/openapi/src/api.ts
    participant Test as test_openapi_up_to_date (CI)

    Note over Doc,API: PR regenerates api.yaml and api.ts after docstring formatting changes

    Doc->>Gen: Reads Python docstrings with formatting changes (RST→Markdown backticks, dedented)
    Gen->>Gen: Parses pydantic models & docstrings
    Gen->>YAML: Writes OpenAPI 3.1 spec with updated descriptions only
    YAML->>TSGen: Input: regenerated api.yaml
    TSGen->>API: Generates updated TypeScript types with formatted descriptions
    Note over Test: CI checks docstring sync

    alt CI test passes
        Test->>YAML: Compares generated YAML to committed version
        YAML-->>Test: Matches (docstrings now in sync)
        Test->>API: Compares generated TS to committed version
        API-->>Test: Matches
    else CI test fails (pre-PR state)
        Doc->>YAML: Drifted docstrings (old formatting)
        Doc->>API: Drifted docstrings (old formatting)
        Test->>YAML: Comparison fails
        Test->>API: Comparison fails
    end
Loading

Re-trigger cubic

@mscolnick mscolnick added the internal A refactor or improvement that is not user facing label May 21, 2026
`packages/openapi/api.yaml` was last regenerated several commits ago and
drifted out of sync due to two changes that touched docstring output:

1. `pydantic-ai-slim` v1.96.0 changed docstrings on types referenced by
   marimo's schema (e.g. `pydantic_ai.ui.vercel_ai.request_types.UIMessage`).
2. #9645 ("enforce single backticks in Python docstrings") rewrote
   docstrings across the codebase but didn't regenerate `api.yaml`.

Together these broke `test_openapi_up_to_date` on main.

Regenerated via `marimo development openapi > packages/openapi/api.yaml`
plus `pnpm -w run codegen`. The diff is description-only — no schema
additions, removals, or renames.
@mscolnick
Copy link
Copy Markdown
Contributor Author

Closing — investigation was wrong. PR #9645 already regenerated api.yaml as part of the docstring style change; main has been correct since that merged at 17:12 UTC. The failures on PRs based on earlier main commits will resolve on rebase.

@mscolnick mscolnick closed this May 21, 2026
@mscolnick mscolnick deleted the ms/chore/regen-openapi branch May 21, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash internal A refactor or improvement that is not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants