Repository navigation
fix: align nullable profile types and OpenAPI 3.1 schemas - #90
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The type, runtime conversion, generated contract, and regression coverage are consistent and complete.
0 open findings
What changed in this PR
Aligns legacy nullable profile topics with core types and emits valid OpenAPI 3.1 schemas.
Changes:
- Allows
nullweak-point topics while excluding them from vector-memory entries. - Uses Hono’s OpenAPI 3.1 generator and regenerates the specification.
- Adds legacy-data and nullable-schema regression coverage.
| File | Description |
|---|---|
apps/api/src/http/openapi.ts |
Switches to OpenAPI 3.1 generation. |
packages/contracts/openapi.json |
Regenerates 3.1-compatible schemas. |
packages/core/src/profile/model.ts |
Makes weak-point topics nullable. |
packages/core/src/profile/profile-service.ts |
Omits null topics from vector memory. |
tests-ts/contracts/legacy-data-compatibility.test.ts |
Type-checks the legacy nullable fixture. |
tests-ts/contracts/phase-two-openapi.test.ts |
Verifies OpenAPI 3.1 nullable unions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Legacy profile observations now allow null topics at the HTTP boundary. Update the core WeakPoint type to represent that stored value, and omit null topics when constructing vector-memory entries.
Use Hono's OpenAPI 3.1 generator for the document advertised as 3.1.0. This emits standard string/null unions instead of the OpenAPI 3.0 nullable keyword. Regenerate the document; generated frontend types remain unchanged.
Validation: 540 backend/contract tests, frontend tests, Bun/Node/frontend type checks, architecture boundaries, lint, API and web builds pass. Add a regression requiring standard nullable topic schemas and no obsolete nullable keywords. Existing file/SQLite/HTTP compatibility regressions continue to pass, with the legacy profile fixture now checked against the core type.