Repository navigation
feat(api): derive OpenAPI operations and bearer security (#860) - #1063
Merged
Merged
Conversation
12 tasks done
athvin
marked this pull request as ready for review
November 9, 2026 21:23
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.
Closes #860
What
Generate source-derived OpenAPI operations, request bodies, response envelopes and bearer authorization requirements; regenerate the document and TypeScript paths.
Why
The existing document contains component schemas but no callable operations. #860 connects the shared derivation to the contract generator.
Proof
The new route-floor test was observed failing against the original empty paths. The implementation emits 93 paths/109 operations; 11 pure-library fixtures and all 13 OpenAPI assertions pass, including agreement with all six committed envelope classes. TypeScript generation succeeds. A deliberate empty-operation mutation made four library fixtures and all four new server contract gates fail; restoring the implementation returned the suites to green.
make frontendpassed (922 unit/component tests, production build, 662 browser passes/133 expected skips). The first CI run passed every test/integration job and the frontend/supply-chain gates; its only failure was a semicolon Clippy rule, now fixed locally. Fullmake checkpassed with that fix (exit 0). The final working tree was committed as2b364344and refreshed against unchanged main8453c27d; six independent house review passes found no candidates (library and server/artifact passes, each for instrumentation, execution tier and reuse). No candidate required verification. All 15 live required contexts were success/skipped on final head2b364344, with successful detection jobs in all four gated workflows. Preflight confirmed CLEAN/non-draft, unchanged main and no merge-bus race before squash merge.Risk & rollback
Derivation intentionally supports the source shapes exercised by this router and fails on unsupported inputs. Responses remain at envelope granularity, with typed payloads and query parameters owned by later epic tickets. No handler behavior or component schema changes; revert this commit and its generated artifacts to restore the previous schema-only document.
Post-merge ledger
Closed by: Codex · session
01a1be1b-0c92-7703-a4c2-25cb2c999baaonMac-46· 2026-11-09T22:03:57Zmainis green with this change on it — mergea367529f2165810faf2cb6d38c80da20f26b788a; Rust 42703573311, frontend 42703573170, infra 42703573344 and devcontainer 42703573581 all succeeded. The 30-minute watch completed at 22:03:11Z with no failures, including all six workflows on descendant0a208d9c8c6cd8e9275ec4e6da7bc1fd4e0145ae.images— 42703573308 succeeded for the merge SHA.deployconverged — runtime gap resolved at 2026-11-09T22:22:21Z using the independently recorded evidence in PR #1062’s post-merge ledger. Its deploy 42706442649 names0a208d9c8c6cd8e9275ec4e6da7bc1fd4e0145ae, verified locally to descend from this PR’s mergea367529f2165810faf2cb6d38c80da20f26b788a. The peer verified the production API’ser-server listeningline at 21:52:51.130164Z and dev startup at 21:55:09.394202Z, with both live pods at zero restarts; its ledger records live selectors/replicas and explains dev’s replacement as node eviction of the same ReplicaSet. This is attributed peer runtime evidence, not an inference from workflow success or a fresh AWS read by this session.Specific to this change
make checkandmake frontendpassed; six independent house-review passes found no candidates. Exact-head CI passed before merge, with all four detect jobs successful. Negative operation-derivation probes were observed failing and restored; details remain in Context.Context — plan, discoveries, measurements, files
Plan
make check,pnpm gen:apiand the applicable frontend gate.Discoveries
A webhook-deletion doc comment was attached to the unrelated TagIn struct; it has been moved to its actual handler. Request derivation preserves serde defaults, nullable options and deny_unknown_fields, resolves the mail module from caller-supplied source, and rejects unsupported extractors/types. Numeric model-version path parameters come from the Path tuple signature. Write envelopes follow returned expressions and local response helpers, so an unrelated Json local cannot become the response contract.
The current router exposes 109 non-internal method/path operations across more than 80 paths. Several write handlers delegate their final response to shared local helpers, the upload takes Multipart, and clear-task accepts an optional JSON body. The current GET envelope ledger intentionally cannot distinguish the payload type of bare values; this change must retain that honest granularity. Query parameters and typed response expansion remain owned by later epic children.
Security-role reference: https://spec.openapis.org/oas/v3.1.0.html#security-requirement-object (section 4.8.30.1).
Review
Reviewed BASE
8453c27debfd5b1b1a44ff86503662673d6de23a→ HEAD2b364344d0268675e67f8f60c8a368907d3d7f2bin six fresh-context, read-only passes. All reported no candidates. The library and server/artifact passes checked instrumentation consumers, execution placement, and shared-helper invariants. They declined generic parser bug hunting, gate-owned lint/test matters and the explicitly deferred typed-response/query expansion. No SQL changes required a SQL pass. No review comments were posted.Measurements
Files