Skip to content

fix: align nullable profile types and OpenAPI 3.1 schemas - #90

Merged
AnnaSuSu merged 1 commit into
mainfrom
codex/legacy-compatibility-contracts
Oct 14, 2026
Merged

AnnaSuSu merged 1 commit into
mainfrom
codex/legacy-compatibility-contracts

Conversation

@AnnaSuSu

Copy link
Copy Markdown
Owner

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.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 10:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 null weak-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.

@AnnaSuSu
AnnaSuSu merged commit 5ac31d9 into main Oct 14, 2026
7 checks passed
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.

2 participants