fix(api): align maintained CodeAPI contracts - #21
Draft
rschlaefli wants to merge 8 commits into
Draft
Conversation
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What This Maintains
This optional PR aligns CodeAPI's maintained OpenAPI documents and TypeScript
names with behavior that already exists:
/v1execution and file-management routesand their current wire shapes.
/api/v2/executerequest, response, error, andstatus contract separately.
ExecuteResponsetype and introducesPublicExecuteResponsefor the existing flat public execution result.boundaries, response codes, and TypeScript relationships.
This package is runtime-neutral and independent. No UZH feature, source gate,
image publication, or deployment depends on it. PR #19 owns issuer trust and
PR #20 owns values-free logging plus generic public download failures.
How It Works
service/openapi.ymldescribes the seven stable public routes mounted at/v1.api/openapi.yamlis explicitly internal and describes only/api/v2/execute.PublicExecuteResponsealiases the existing flatExecuteResult; onlyproven internal type sites that consume that shape use the clearer name.
ExecuteResponseexport remains unchanged for the sandboxadapter and any unindexed downstream source consumer.
anyOf; disjoint wirealternatives retain
oneOf.Important Details
exportsorpublishConfigsurface.found no external
ExecuteResponseor direct source-import consumer. Theexisting export is preserved regardless.
document describes supported fields only.
lockfile, authentication, logging-policy, database, deployment, image, or
telemetry change.
Branch Coverage
main@83c4f7b105b6b3e69eda12701ad4ec437acba08f8e20bd97a921d79ae6574561fc13db295b1442ad83c4f7b..8e20bd9runtime, or deployment delta.
internal flat-result type sites, focused contract tests, and fork ledger.
Review Focus
/v1handlers and middleware./api/v2/executewithout presenting itas a public client surface.
ExecuteResponseremains unchanged and the new alias changes noruntime or persisted-data behavior.
shapes.
Verification
At the exact head:
bun test ./src/openapi-contract.test.tsfromservice/-> 6 pass, 0 fail,172 assertions.
service/test suite -> exit 0.api/test suite -> 369 pass, 0 fail; API source is unchanged by thefinal correction.
bun run buildfromservice/-> exit 0.git diff --check origin/main...HEAD-> pass.correcting three overlapping response unions.
session-scope query parameters and correcting the file-list response union.
-> all five required jobs passed at
8e20bd9.The service build retains existing Rollup/TypeScript warnings outside this
package. No image, deployment, cluster, live API, or consumer rollout proof was
performed.
Security / Privacy
payloads, tokens, or raw logs.
exposure.
Blocking Before Merge
Independence From Rollout
CodeAPI feature/deployment gate.
mainSHA containing only accepted PRfix(auth): bind JWT trust by issuer #19 issuer trust and PR fix(logging): enforce values-free operational logs #20 privacy/logging behavior.