Skip to content

[15/15] Table registration with explicit names and pre-deploy preparation - #168

Open
UnknownJoe796 wants to merge 15 commits into
v53/predeploy-tasksfrom
v53/table-registration
Open

[15/15] Table registration with explicit names and pre-deploy preparation#168
UnknownJoe796 wants to merge 15 commits into
v53/predeploy-tasksfrom
v53/table-registration

Conversation

@UnknownJoe796

Copy link
Copy Markdown
Contributor

Reworks table handling on top of the pre-deploy task infrastructure.

  • registerTable defines, registers and creates the once-per-deploy prepare
    task for a table in one call
  • Table names are explicit and required rather than derived
  • Docs, guide samples and the demo move to the new pattern

Most of the file count is the documentation sweep; the behavioural change is in
DatabaseTableRegistration.kt, ModelInfo.kt and Extensions.kt.

Includes a fix passing the now-required tableName where the explicitness pass
missed it (sessions-oauth, demo, notifications tests). Without it those modules
do not compile.

@UnknownJoe796
UnknownJoe796 force-pushed the v53/table-registration branch from 6b47c05 to 106ac7b Compare July 29, 2026 22:54
UnknownJoe796 and others added 15 commits July 29, 2026 17:00
Rewrite docs/files.md to the v5 API: single UploadEarlyEndpoint with the
upload-then-reference flow, jail/ready scanner quarantine, ServerFile in
models, signed URLs, and the one-instance-per-server footgun. Replace the
v4 HttpContent/FileObject examples with the TypedData/PublicFileSystem API
and drop the removed Azure backend.

Replace the docs/websockets.md TODO stub with real docs: WebSocketHandler
lifecycle, pub/sub topics, MultiplexWebSocketHandler, typed
ApiWebsocketHandler, and local vs AWS execution models.

Add docs/migration-v4-to-v5.md covering the service-abstractions
extraction, ServerBuilder / definition-vs-runtime split, dependency and
import moves, and common pitfalls, deferring KiteUI client details to the
ls5-kui7-migration skill.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 3c6c27e)
(cherry picked from commit 5bd3d6f)
Covers the complete set of changes to move a consumer from 5.1.x to
5.2.0, all verified against a real downstream app (USBE) that then ran
locally and served its KiteUI web client unchanged:

- Bump service-abstractions to the version 5.2 was built against
  (1.2.0-1-b2f7bd67); a mismatch compiles but throws NoSuchMethodError
  at runtime (SettingContext.getOpenTelemetry()).
- New required AuthEndpoints/SessionManager `cache` parameter.
- Telemetry moved from OpenTelemetrySettings to TelemetryBackend.Settings
  (both the code setting and the settings.json `"telemetry"` entry, which
  was previously `null`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uur4dHcoa1a259iiTzvin3
(cherry picked from commit 84978bc)
(cherry picked from commit d2fd0af)
PasswordProofEndpoints, TimeBasedOTPProofEndpoints, and BackupCodeEndpoints
built their constrainAttemptRate cache key from the raw input value while
normalization happened only inside the rate-limited action. An attacker
could therefore vary case/whitespace of an identifier to get a fresh
limiter bucket per variant, dodging the limiter and its new exponential
backoff. Resolve the principal handler and normalize the value before
constructing the key, matching PinBasedProofEndpoints. Credential-matching
behavior is unchanged. Tests assert case variants of one identifier share
a single bucket.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 7a2d926)
(cherry picked from commit afcde3e)
Typed endpoints declare errorCases (LSError with status/detail/message),
but only the success response was emitted. Emit each declared error case
as a documented response grouped by HTTP status, using the LSError
schema and an example, mirroring the success-response emission. Adds a
test confirming error responses and path parameters appear in the spec
(path parameters were already emitted at path-item level; the test locks
that in).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 9a9c0ef)
(cherry picked from commit a2a3563)
Several auto-CRUD endpoints threw BadRequestException(detail="unique")
on unique-constraint violations and NotFoundException on upsert/replace
without declaring them, producing W6 "undeclared error" warnings at boot.
Add shared notFoundError (404) and uniqueViolationError (400, "unique")
LSError constants to the errorCases of every endpoint that throws them,
so the errors are documented and the warnings stop. Read-only endpoints
that never throw keep empty error lists. A test asserts each throwing
endpoint declares the error it can raise.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit acc5281)
(cherry picked from commit 69959ea)
The committed golden TS snapshots had drifted from the current generator.
Regenerating disambiguates nested type names (Mode -> UpdateRestrictions
Mode, Part -> UpdateRestrictionsPart), matching the generator's intended
output. Changes are confined to the type definitions and their imports.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 22272fc)
(cherry picked from commit 6286e37)
(cherry picked from commit 28d3789)
(cherry picked from commit 2b93895)
(cherry picked from commit 4692421)
(cherry picked from commit c4f2074)
(cherry picked from commit 6998b45)
(cherry picked from commit 5f5f18e)
(cherry picked from commit 94057f3)
(cherry picked from commit 8d4d610)
Making tableName required updated call sites in sessions, typed and files, but
missed sessions-oauth, demo and the notifications tests.

(cherry picked from commit 106ac7b)
@UnknownJoe796
UnknownJoe796 force-pushed the v53/table-registration branch from 106ac7b to 1a5280d Compare July 30, 2026 02:20
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.

1 participant