diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index be71fd6..92cc906 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -5726,3 +5726,10 @@ history stopped at v16. Updated that expectation through v17. clang-format 19.1. and `git diff --check` pass. This Linux-only test cannot compile in the Windows shell because its process fixture requires `poll.h`; awaiting CI compile and runtime confirmation. + +That CI run then passed the migration integration but failed the focused SQL +reservation check: it still expected v15's `EVL16` conflict, while v17 records a +durable `existing_life` refusal and allocates its own identity. Updated the check +to assert the returned identity and rejection value, and aligned the reservation +contract text with v17. PostgreSQL is unavailable in this Windows environment; +the focused and full database checks await CI. diff --git a/schemas/life-reservations-v1.md b/schemas/life-reservations-v1.md index b6ef4e5..3b50d51 100644 --- a/schemas/life-reservations-v1.md +++ b/schemas/life-reservations-v1.md @@ -34,7 +34,9 @@ and gets a new identity. There is no deletion API. `reserve_primitive_life` requires the exact region lease and current durable account-control generation. Exact retry returns the original identity, owner and -rejection without another allocation. A different pending request is `EVL16`. +rejection without another allocation. Under v17, a different request while an +unrejected reservation exists receives its own durable `existing_life` refusal +and allocated identity; earlier schemas raised `EVL16` for this conflict. Unsupported rules/invalid arguments are `22023`; missing provisioning is `EVL04`; exhaustion is `EVL05`; stale/expired control or lease is `EVL02`. diff --git a/tools/ci/life-reservations-check.sql b/tools/ci/life-reservations-check.sql index 6dbcf81..e3cce33 100644 --- a/tools/ci/life-reservations-check.sql +++ b/tools/ci/life-reservations-check.sql @@ -19,11 +19,6 @@ SELECT 1 / ((:life_identity = 1)::int); SELECT set_config('test.holder', :'lease_holder', false), set_config('test.epoch', :'lease_epoch', false); DO $$ BEGIN - BEGIN - PERFORM evolution.reserve_primitive_life(9750,1,current_setting('test.holder')::uuid, - current_setting('test.epoch')::numeric,'11111111-1111-1111-1111-111111111111',1,11,1); - RAISE EXCEPTION 'accepted a second outstanding life'; - EXCEPTION WHEN SQLSTATE 'EVL16' THEN NULL; END; BEGIN PERFORM evolution.reserve_primitive_life(9750,1,current_setting('test.holder')::uuid, current_setting('test.epoch')::numeric,'11111111-1111-1111-1111-111111111111',99,10,1); @@ -46,7 +41,8 @@ SELECT 1 / ((evolution.reject_primitive_life(9750,1,:'lease_holder',:lease_epoch '11111111-1111-1111-1111-111111111111',1,10,2::smallint) = 1)::int); SELECT * FROM evolution.reserve_primitive_life(9750,1,:'lease_holder',:lease_epoch, '11111111-1111-1111-1111-111111111111',1,11,1) \gset -SELECT 1 / ((:life_identity = 2)::int); +-- The conflicting request keeps its own allocated identity and immutable refusal. +SELECT 1 / ((:life_identity = 2 AND :rejection = 4)::int); SELECT * FROM evolution.reserve_primitive_life(9750,1,:'lease_holder',:lease_epoch, '11111111-1111-1111-1111-111111111111',1,10,1) \gset SELECT 1 / ((:life_identity = 1 AND :rejection = 1)::int);