Skip to content

fix: preserve durable setup metadata in Platform SDK - #544

Closed
alongubkin wants to merge 1 commit into
mainfrom
fix/platform-sdk-durable-setup-revision
Closed

alongubkin wants to merge 1 commit into
mainfrom
fix/platform-sdk-durable-setup-revision

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Summary

  • regenerate the checked-in Platform OpenAPI artifacts from the authoritative Platform schema
  • preserve durable setup revision metadata through generated reconciliation requests
  • add a regression for the generated SDK serialization boundary

Validation

  • cargo test -p alien-platform-api reconcile_state_preserves_runtime_update_metadata
  • repository generator is idempotent over the checked-in artifacts

@alongubkin

Copy link
Copy Markdown
Member Author

Superseded by the identical commit on a repository-conformant branch.

@alongubkin alongubkin closed this Aug 31, 2026
@greptile-apps

greptile-apps Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR adds durable direct-setup revision metadata to the checked-in Platform OpenAPI artifacts and extends the Rust SDK regression to verify serialization. However, the generated TypeScript Platform SDK was not regenerated and remains out of sync.

  • Adds nullable directSetupRevision fields to Platform runtime metadata schemas.
  • Verifies that the generated Rust reconciliation model preserves the revision.
  • Leaves TypeScript runtime-metadata models unable to preserve the new field.

Confidence Score: 4/5

The PR should not merge until the Platform TypeScript SDK is regenerated so it does not silently remove the durable setup revision.

The Rust artifacts preserve the new field, but the unchanged checked-in TypeScript runtime-metadata schemas strip it during parse-and-serialize round trips, leaving published client surfaces inconsistent.

Files Needing Attention: client-sdks/platform/openapi.json and the generated client-sdks/platform/typescript models

Important Files Changed

Filename Overview
client-sdks/platform/openapi.json Adds the metadata field to the shared contract without regenerating the affected TypeScript client.
client-sdks/platform/rust/openapi.json Updates the Rust generator input so the generated reconciliation model represents directSetupRevision.
client-sdks/platform/rust/openapi-3.0.json Keeps the Rust-compatible OpenAPI artifact aligned with the new runtime metadata field.
client-sdks/platform/rust/src/lib.rs Extends the generated-model round-trip regression to ensure directSetupRevision survives Rust serialization.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Platform OpenAPI schema] --> B[Rust SDK generation]
  A --> C[TypeScript SDK generation]
  B --> D[Reconciliation request preserves revision]
  C --> E[Stale runtimeMetadata schema]
  E --> F[directSetupRevision stripped]
Loading

Comments Outside Diff (1)

  1. client-sdks/platform/openapi.json, line 1 (link)

    P1 TypeScript SDK strips setup revision

    When a TypeScript SDK consumer parses and serializes deployment state containing runtimeMetadata.directSetupRevision, the unchanged generated Zod model strips the unrecognized field, causing the durable setup revision to be lost and setup-owned infrastructure to be refreshed again. Regenerate the checked-in TypeScript Platform SDK from this updated contract.

    Knowledge Base Used:

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: client-sdks/platform/openapi.json
    Line: 1
    
    Comment:
    **TypeScript SDK strips setup revision**
    
    When a TypeScript SDK consumer parses and serializes deployment state containing `runtimeMetadata.directSetupRevision`, the unchanged generated Zod model strips the unrecognized field, causing the durable setup revision to be lost and setup-owned infrastructure to be refreshed again. Regenerate the checked-in TypeScript Platform SDK from this updated contract.
    
    **Knowledge Base Used:**
    - [Client ecosystem](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/client-ecosystem.md)
    - [Client SDKs and TypeScript packages](https://app.greptile.com/alien/-/custom-context/knowledge-base/alienplatform/alien/-/docs/client-sdks-and-typescript-packages.md)
    
    ---
    
    For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

    Fix in Codex

Fix all with Greploop Fix All in Codex

Prompt To Fix All With AI
### Issue 1
client-sdks/platform/openapi.json:1
**TypeScript SDK strips setup revision**

When a TypeScript SDK consumer parses and serializes deployment state containing `runtimeMetadata.directSetupRevision`, the unchanged generated Zod model strips the unrecognized field, causing the durable setup revision to be lost and setup-owned infrastructure to be refreshed again. Regenerate the checked-in TypeScript Platform SDK from this updated contract.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix: preserve durable setup revision in ..." | Re-trigger Greptile

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.

1 participant