Skip to content

refactor!: simplify SDK runtime and model declarations - #2045

Merged
Sau1707 merged 1 commit into
mainfrom
refactor/sdk-runtime-ownership
Dec 3, 2026
Merged

Sau1707 merged 1 commit into
mainfrom
refactor/sdk-runtime-ownership

Conversation

@Sau1707

@Sau1707 Sau1707 commented Dec 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Give SDK routes explicit ownership in a private runtime router instead of maintaining a route-ID registry.
  • Dispatch MCP through its complete ASGI application at /mcp, preserving authentication, sessions, and lifespan cleanup.
  • Resolve the embedded image version at the CLI boundary and remove parallel metadata inputs.
  • Remove the public longlink.Model and UserRelationship modeling layer in favor of standard SQLModel declarations.
  • Replace the API CompanyDB forwarding module with direct SDK imports and update SDK documentation.

Breaking migration: Inherit from SQLModel or Audit. Preserve existing *_id columns and nullability, declare Field(foreign_key="users.id"), and configure Relationship with foreign_keys and lazy="selectin". No database schema migration is needed when existing columns and constraints are preserved.

Validation

  • SDK: Ruff lint/format, ty, and pytest passed — 546 passed, 1 skipped. The opt-in real Docker test requires LONGLINK_DOCKER_TESTS=1.
  • API: changed-file Ruff lint/format, full-project ty, and 8 company tests passed.
  • Web: scoped documentation/scaffold formatting, scoped documentation lint, tsc -b, and typecheck:views passed.
  • git diff --check passed.
  • The full API suite and Docker build were not run.

Consolidate runtime route ownership and MCP dispatch, resolve build metadata once, and remove redundant CompanyDB forwarding.

BREAKING CHANGE: Remove longlink.Model and UserRelationship. Use SQLModel or Audit with explicit user foreign-key fields and relationships, preserving existing column names and nullability.
@Sau1707 Sau1707 added api Related to the control plane breaking Breaking changes requiring migration refactor Structural improvements without changing intended behavior sdk Related to the applications SDK web Related to the web frontend and runtime labels Dec 3, 2026
@Sau1707
Sau1707 merged commit e38d68c into main Dec 3, 2026
16 checks passed
@Sau1707
Sau1707 deleted the refactor/sdk-runtime-ownership branch December 3, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the control plane breaking Breaking changes requiring migration refactor Structural improvements without changing intended behavior sdk Related to the applications SDK web Related to the web frontend and runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant