Skip to content

P0: route context-installed Internal ID allocator through SQLite mutations #56

Closed

Description

@philipgreat

Tracked by teaql/teaql-conformance#92 (EXT-ID-INTERNAL). On current main@3f289aa, UserContext.with_internal_id_generator stores a generator and context.generate_id/next_id can call it, but the SQL INSERT path in src/teaql/sql/executor.py allocates via self.next_id and reserves explicit floors via self.ensure_id_floor; no SQL mutation calls context.generate_id. This makes the installed context capability ineffective for persisted INSERTs and risks a silent fallback to teaql_id_space.

Design one typed context-owned async allocator interface with next_id(entity) and ensure_id_floor(entity, floor), independent of the data service. Route direct INSERT, nested batch, explicit ID and graph saves through it, retaining the provider default only when no override is installed. Reject malformed installations before provider access; propagate allocator failures without fallback. Preserve transaction/uniqueness semantics and allow gaps after failure.

Acceptance: focused SQLite positive, concurrent, floor, failure/provider-not-called tests; runnable local-source example; exact-main CI; then immutable internal artifact consumer. No public release or generator adoption in this issue.

Activity

  1. philipgreat commented on Oct 19, 2026

    @philipgreat
    ContributorAuthor

    P0 Internal ID cut qualified: source PR #58 merged at 700afa3 and exact-main Example Gate passed (run 39328796133). Conformance evidence PR teaql/teaql-conformance#182 merged at 21fe93a; exact-main Community foundation gates passed (run 39329702686). Immutable internal wheel 0.3.2.dev20261020+g700afa38 was byte-verified, duplicate upload rejected HTTP 409, and an isolated Registry consumer ran the example twice. No public release or generator adoption claimed; broader P1 remains tracked by teaql/teaql-conformance#92 and #57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions