feat(@siax/access): universell idempotenskontrakt #489

Merged
admin merged 2 commits from feat/universal-idempotency-tuple into main 2026-11-06 10:02:00 +00:00
Owner

@siax/access får en universell idempotenskontrakt — härledd från 0pt:s durable upload attempts, så DOC0/N0D/fremtidprodukter kan anta samma form i stället för att reimplementera.

  • operationIdentity binder tenant/projekt/aktör + alla resultatpåverkande indata i ett stabilt fingerprint; ändrat payload under samma nyckel = KONFLIKT, aldrig replay av någons annans kvitto.
  • runIdempotentOperation kodar den beprövade ordningen (durable claim → downstream dispatch → spara kvitto → replay) och commit-gränserna.
  • Strukturellt IdempotencyStore<Identity,Receipt> - varje produkt behöver bara skriva en Postgres-adapter.
  • 7 tester: payloadkonflikt, replay av lifetime-kvitto, order (claim → dispatch → save), store-fel = conflict, ingen om-dispatch efter sparfel.
`@siax/access` får en **universell idempotenskontrakt** — härledd från 0pt:s durable upload attempts, så DOC0/N0D/fremtidprodukter kan anta samma form i stället för att reimplementera. - `operationIdentity` binder tenant/projekt/aktör + **alla resultatpåverkande indata** i ett stabilt fingerprint; ändrat payload under samma nyckel = **KONFLIKT**, aldrig replay av någons annans kvitto. - `runIdempotentOperation` kodar den beprövade ordningen (durable claim → downstream dispatch → spara kvitto → replay) och commit-gränserna. - Strukturellt `IdempotencyStore<Identity,Receipt>` - varje produkt behöver bara skriva en Postgres-adapter. - 7 tester: payloadkonflikt, replay av lifetime-kvitto, order (claim → dispatch → save), store-fel = conflict, ingen om-dispatch efter sparfel.
admin added 1 commit 2026-11-06 09:48:01 +00:00
feat(@siax/access): universal idempotency contract
CI (SIAX Cloud) / sonar (pull_request) Skipped
masterplan-lock / check (pull_request) Successful in 4s
masterplan-lock / check (push) Successful in 3s
CI (SIAX Cloud) / security (pull_request) Successful in 14s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 14s
CI (SIAX Cloud) / quality (pull_request) Failing after 30s
CI (SIAX Cloud) / integration (pull_request) Canceled after 1m12s
f77a4fec96
operationIdentity binds tenant/project/actor + every result-affecting input
into a stable fingerprint; a changed payload under the same key is a CONFLICT,
never a replay of someone else's receipt. runIdempotentOperation encodes the
0pt-proven order (durable claim -> downstream dispatch -> save receipt ->
replay) and the commit boundaries. Structural IdempotencyStore lets each
product ship its own Postgres adapter while sharing the contract.

Derived from 0pt's durable upload attempts; DOC0/N0D can adopt the same
shape instead of re-implementing it.
CODEOWNERS rules requested review from sax3l 2026-11-06 09:48:01 +00:00
admin added 1 commit 2026-11-06 09:49:14 +00:00
fix(@siax/access): restore relationships.ts that disappeared when the package split into two files
CI (SIAX Cloud) / sonar (pull_request) Skipped
masterplan-lock / check (push) Successful in 5s
masterplan-lock / check (pull_request) Successful in 4s
CI (SIAX Cloud) / security (pull_request) Successful in 13s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 17s
CI (SIAX Cloud) / integration (pull_request) Successful in 9m48s
CI (SIAX Cloud) / quality (pull_request) Successful in 9m59s
a424cf1581
b323948 shipped the OpenFGA relationship client inside src/index.ts; when
src/idempotency.ts was added, index.ts was rewritten as the diff of both,
losing every relationship export and breaking the existing tests. Move the
original module to src/relationships.ts and let index.ts re-export both.

Restores 7 pre-existing relationship tests (both suites 14 passed).
admin merged commit 9ca16b7f6c into main 2026-11-06 10:02:00 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/0pt#489