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
Commit 6cf4e24
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: conformance/stack-encrypt/lifecycle-contract.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@ process. Python and TypeScript are explicitly not enrolled.
12
12
|---|---|---|
13
13
|`lifecycle-ownership-v1`| Actual record operations and owned `Vec<S>` to `Vec<T>` conversions release fulfilment captures exactly once on success, provider failure and unpolled drop; zipped fulfilments do not share key material. | Client keys are consumed/redacted; explicit close and unreachable-client cleanup release guest memory; calls on a closed client fail. GC cleanup is eventual, so callers should close explicitly. |
14
14
|`lifecycle-cancellation-v1`| Dropping a future paused in generation, for a record operation or an owned column, drops the provider future and operation captures; subsequent work on the cipher succeeds. Guest ABI abort spends the handle and drops the operation. | Cancellation before a call sends no request; cancellation between steps or during token fetch leaves unrelated operations usable. A guest step that overruns cancellation closes the client. Discarded late output is wiped. |
15
-
|`lifecycle-partial-output-v1`| A batch with a valid first row and a later authenticated type mismatch releases its decoded prefix without marked heap residue, through the dynamic record path and the owned `Vec<Ciphertext>` to `Vec<String>` conversion alike. Existing context cases reject late authentication failures without returning partial output. | Generated and raw batch APIs return no partial rows on failure; interrupted HTTP bodies fail; cancelled output is wiped. SDK conversion diagnostics contain no decrypted values. This does not assert erasure of partially populated caller-owned Go objects. |
16
-
|`lifecycle-buffer-cleanup-v1`| The existing allocator observer checks selected write/read/JSON parse paths, including an owned `Vec<String>` column sealed through its guard, and has a negative control. Guest ABI tests check buffer-registry cleanup, error-buffer release and protected text drop. | Request bodies survive until their owner closes them, then wipe; refused requests wipe; heap growth wipes abandoned backing arrays; guest runtime close releases memory. Post-encryption memory scans are supplementary observations. |
15
+
|`lifecycle-partial-output-v1`| A batch with a valid first row and a later authenticated type mismatch releases its decoded prefix without marked heap residue, through the dynamic record path and the owned `Vec<Ciphertext>` to `Vec<String>` conversion alike; owned-column drop witnesses show that prefix is wiped, not leaked, after a late failure or a panicking element conversion. Existing context cases reject late authentication failures without returning partial output. | Generated and raw batch APIs return no partial rows on failure; interrupted HTTP bodies fail; cancelled output is wiped. SDK conversion diagnostics contain no decrypted values. This does not assert erasure of partially populated caller-owned Go objects. |
16
+
|`lifecycle-buffer-cleanup-v1`| The existing allocator observer checks selected write/read/JSON parse paths, including an owned `Vec<String>` column sealed through its guard, and has a negative control. Drop witnesses show an owned column's source is wiped before its pending is returned, including on a refused or panicking context. Guest ABI tests check buffer-registry cleanup, error-buffer release and protected text drop. | Request bodies survive until their owner closes them, then wipe; refused requests wipe; heap growth wipes abandoned backing arrays; guest runtime close releases memory. Post-encryption memory scans are supplementary observations. |
17
17
|`lifecycle-diagnostics-v1`| Guest errors discard untrusted foreign cause messages; failed/successful exports do not hand over stale diagnostics. | Structured errors remain available after failures; SDK errors and redacted display/logging expose types or fields rather than plaintext values. |
18
18
|`lifecycle-validation-before-io-v1`| Existing runtime/read/context cases count provider calls. Wrong shape, independently detectable context mismatch and oversized descriptors fail before key I/O; lazy assembly stops after local failure. | Host refusals happen before entering the guest, and shared runtime/read cases exercise the uninitialised guest's preflight boundary. Go does not yet expose native provider counters. |
19
19
|`lifecycle-logical-batching-v1`| Instrumented `DataKeySource` calls establish one logical generation batch, retrieval grouping by keyset, descriptor ordering and no work for empty batches, for record operations and for an owned `Vec<S>` column of any length including zero. | Go uses the same engine, but this profile does not claim independently instrumented Go key-request counts. |
@@ -59,7 +59,11 @@ These entries in the index are limitations, not successful requirements:
59
59
sealing frame by backtrace and reports excluded frees. It scrubs stack residue
60
60
before observing heap frees; it does not prove stack erasure. Its JSON query
61
61
paths use borrowed/static path text because owned path copies have separate
62
-
cleanup limitations. The lifecycle runner preserves the observer's output.
62
+
cleanup limitations. It sees only blocks that are freed: plaintext leaked and
63
+
never freed is not observed. For the owned `Vec<S>` conversion, drop
64
+
witnesses in `packages/stack-encrypt/tests/collections.rs` observe the wipe
65
+
itself, so a leaked source or recovered prefix fails there. The lifecycle
66
+
runner preserves the observer's output.
63
67
-**`caller-owned-host-values` — outside the guarantee.** Caller-owned strings,
64
68
bytes, objects, returned plaintext, aliases and copies remain the caller's
65
69
responsibility. Ownership transfer or protected borrowing must be stated by
0 commit comments