Repository navigation
Add typed endpoint paths and PostgreSQL transaction locks - #252
Merged
andrewzolotukhin merged 1 commit intoOct 15, 2026
Merged
Conversation
andrewzolotukhin
deleted the
feat/typed-endpoint-paths-and-transactions
branch
October 15, 2026 15:32
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.
Typed contracts currently require consumers to reconstruct asset paths, PostgreSQL transaction locks require repeated raw SQL, and open object schemas can throw a descriptor exception for primitive values nested in arrays. This adds reusable path and transaction APIs and fixes the schema boundary.
Original request
Provide the missing Framework APIs in a separate PR against
development, with regression tests and documentation. Leave review and beta publication to the maintainer.What changed
endpointPathandmatchEndpointPathfrom server contracts. Client URL construction and server routing share the implementation, encode/decode each parameter once, preserve route precedence and multi-segment captures, and validate parameters through their declared schemas.db.transaction(callback, { advisoryLocks })for PostgreSQL. Locks use bound, namespaced keys, are deduplicated/sorted, and remain owned by the transaction on commit or rollback. Both tracked and untracked contexts support the option.Reasoning
Contracts should remain the source of path names and parameter types. Transaction locking belongs on the transaction connection so callbacks cannot accidentally run outside the lock. Fixing schema validation removes the need for consumer-side primitive guards.
Advisory locks are opt-in and PostgreSQL-specific; transactions without lock options retain their existing dialect support. They do not replace authorization or relational constraints.
Validation
npm run lint,npm run build,npm run test: pass; 5,338 tests, no type errors.npm run test:coverage: pass, including every published-package floor; 92.92% lines and 86.10% branches overall.npm run test:queries:integration: 105 tests pass against an isolated PostgreSQL 16 fixture, including same-key serialization, unrelated keys, commit and rollback lock release.39c02341, including lint/build/tests, packed packages, documentation, PostgreSQL, Garage and demo API/browser/telemetry E2E. The external Striff check also passes.Screenshots / preview evidence
Not applicable to these non-visual library APIs. A real HTTP server round-trip test verifies reserved characters, slashes and percent escapes. Database tests use real PostgreSQL connections. No persistent application preview or external SigNoz deployment is configured for this library PR; the demo E2E CI job provides its isolated browser/telemetry coverage.
Blog post
Skipped: internal library primitives and a validation bug fix. Public API documentation and the changeset cover the changes.
Release
Target:
development. Maintainer review and the normal beta publication workflow must precede consumer dependency pins. This PR is not auto-merged or published by this task.PR-ready notification: skipped for this upstream library change because it has no persistent preview environment or project notification configuration.