code wiki / _hdl_build / nx_apistack_idempotency.nx
nx_apistack_idempotency.nx
buildroot/runtime/_hdl_build/nx_apistack_idempotency.nx
about
nx_apistack_idempotency.nx -- CAP-API-IDEMPOTENCY: exactly-once writes over /api. A control plane's write actions
(deploy/rollback/restart) MUST be safe to retry -- a dropped response must not double-execute. Answer: an
append-only Idempotency-Key ledger (key<TAB>result). On a keyed write: if the key is SEEN, return the CACHED
result and SKIP execution; else execute then record. Deterministic, first-write-wins, replay-safe by construction.
(IETF Idempotency-Key draft, done sovereign + append-only.) license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_site_lock_lib.nx
imported by: nx_apistack_idempotency_gate.nx
structs
| none |
consts
| 8 | const K_MAGIC_262144: i64 = 262144 |
| 9 | const K_MAGIC_4096: i64 = 4096 |
functions
| 11 | func id_read_file(path: *u8, out: *u8, cap: i64) -> i64 |
| 27 | func id_lookup(ledger_path: *u8, key: *u8, key_n: i64, out: *u8, cap: i64) -> i64 |
| 52 | func id_seen(ledger_path: *u8, key: *u8, key_n: i64) -> i64 |
| 60 | func id_record(ledger_path: *u8, key: *u8, key_n: i64, result: *u8, result_n: i64) -> i64 |