Repository navigation
fix: preserve durable setup metadata in Platform SDK - #544
alongubkin wants to merge 1 commit into
Conversation
|
Superseded by the identical commit on a repository-conformant branch. |
Greptile SummaryThe 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.
Confidence Score: 4/5The 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
|
| 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]
Comments Outside Diff (1)
-
client-sdks/platform/openapi.json, line 1 (link)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.
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
Summary
Validation
cargo test -p alien-platform-api reconcile_state_preserves_runtime_update_metadata