You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validate existing Business ID table shape before allocation #171
JdbcBusinessIdAllocator.ensureSchema() currently accepts an existing table when scope_key, current_value, version, and updated_at names are present. It does not verify that scope_key is unique/primary or that the counter and version columns are integral, non-null, and large enough. The example JDBC adapter currently returns only column_name, so allocator-only checks cannot prove this contract.
A pre-existing wrong-shape table can pass startup and fail later or compromise allocation correctness. This is separate from #169, which makes table creation portable and checks required column presence.
Acceptance
Define a provider-neutral metadata contract for column type, nullability, and the unique/primary key needed by Business ID allocation.
Fail closed at explicit context.ensureSchema() with a table/column-specific diagnostic when an existing table cannot satisfy the allocator contract; do not silently rewrite production tables.
Add negative tests for missing uniqueness, nullable counters, and incompatible/narrow counter types, plus repeat-ensure positive tests.
Exercise SQLite and the available live PostgreSQL/MySQL/SQL Server gates; document any database-specific metadata limits rather than treating skipped or absent gates as passing.
Draft implementation is PR #172, exact head bb3d5b4. Local SQLite example tests pass 12/12 and the concurrent wrong-shape race test passes 1/1, all zero skips. Exact-head hosted Build and Test, examples, PostgreSQL/MySQL Business ID (2/2), and SQL Server Business ID (2/2) checks all pass with zero failures/errors/skips. This remains a stacked, unpublished change: signed 1.549 release and prerequisite PRs #166/#170 must land before merge. DM8/Oracle shape validation and released-package replay are not claimed.
Additional local live evidence on exact PR #172 head bb3d5b4: isolated DM8 and Oracle tests ran together with TEAQL_REQUIRE_LIVE_DB=true and an isolated DM8 guard; Surefire reported 2 tests, 0 failures, 0 errors, 0 skips. Each covers repeat ensure, 80 allocations across independent connections, and restart continuation. These are local-only checks, not hosted CI or published-package evidence. The two dedicated test containers and their nonpersistent databases were removed afterward.
Exact-head d3958bf strengthens PR #172 with live malformed-table negatives. Hosted PostgreSQL/MySQL Business ID suite: 4/4; hosted SQL Server Business ID suite: 3/3; each zero failures/errors/skips. Full Build and Test plus examples also pass on the same head. This adds real-provider fail-closed evidence but remains draft/unmerged pending signed 1.549 release and prerequisite PRs #166/#170.
Activity
philipgreat commentedon Sep 23, 2026
Draft implementation is PR #172, exact head bb3d5b4. Local SQLite example tests pass 12/12 and the concurrent wrong-shape race test passes 1/1, all zero skips. Exact-head hosted Build and Test, examples, PostgreSQL/MySQL Business ID (2/2), and SQL Server Business ID (2/2) checks all pass with zero failures/errors/skips. This remains a stacked, unpublished change: signed 1.549 release and prerequisite PRs #166/#170 must land before merge. DM8/Oracle shape validation and released-package replay are not claimed.
philipgreat commentedon Sep 23, 2026
Additional local live evidence on exact PR #172 head bb3d5b4: isolated DM8 and Oracle tests ran together with TEAQL_REQUIRE_LIVE_DB=true and an isolated DM8 guard; Surefire reported 2 tests, 0 failures, 0 errors, 0 skips. Each covers repeat ensure, 80 allocations across independent connections, and restart continuation. These are local-only checks, not hosted CI or published-package evidence. The two dedicated test containers and their nonpersistent databases were removed afterward.
philipgreat commentedon Sep 23, 2026
Exact-head d3958bf strengthens PR #172 with live malformed-table negatives. Hosted PostgreSQL/MySQL Business ID suite: 4/4; hosted SQL Server Business ID suite: 3/3; each zero failures/errors/skips. Full Build and Test plus examples also pass on the same head. This adds real-provider fail-closed evidence but remains draft/unmerged pending signed 1.549 release and prerequisite PRs #166/#170.