@nodii/dsar 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bind-pattern-a.d.ts +6 -19
- package/dist/bind-pattern-a.d.ts.map +1 -1
- package/dist/bind-pattern-a.js +97 -30
- package/dist/bind-pattern-a.js.map +1 -1
- package/dist/bind-pattern-b.d.ts.map +1 -1
- package/dist/bind-pattern-b.js +6 -3
- package/dist/bind-pattern-b.js.map +1 -1
- package/dist/hold-failure-mode.d.ts +116 -18
- package/dist/hold-failure-mode.d.ts.map +1 -1
- package/dist/hold-failure-mode.js +230 -27
- package/dist/hold-failure-mode.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/orchestrator.d.ts +11 -16
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +127 -47
- package/dist/orchestrator.js.map +1 -1
- package/dist/state-store/postgres-lifecycle.d.ts +29 -0
- package/dist/state-store/postgres-lifecycle.d.ts.map +1 -1
- package/dist/state-store/postgres-lifecycle.js +54 -0
- package/dist/state-store/postgres-lifecycle.js.map +1 -1
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// The hold-gate refusal vocabulary + the ONE bind-time validator that survives
|
|
2
|
+
// the removal of the fail-open leg (`resolveFailClosedHolds`). Nothing here
|
|
3
|
+
// DECIDES open-vs-closed any more — the gate has exactly one mode. This module
|
|
4
|
+
// owns: the two refusal reason codes, the memoization rule that keeps an
|
|
5
|
+
// infrastructure refusal retryable, and the shared refusal-audit payload.
|
|
3
6
|
//
|
|
4
7
|
// THE DEFAULT WAS BACKWARDS (fixed in 0.16.0)
|
|
5
8
|
// -------------------------------------------
|
|
@@ -22,22 +25,207 @@
|
|
|
22
25
|
//
|
|
23
26
|
// So the doctrine's own worked example was live and fail-open in production.
|
|
24
27
|
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
28
|
+
// 0.16.0 flipped the DEFAULT to fail-closed but kept an explicit opt-out
|
|
29
|
+
// (`allowFailOpenHolds: true`).
|
|
30
|
+
//
|
|
31
|
+
// THE OPT-OUT IS GONE (operator ruling 2026-07-30)
|
|
32
|
+
// ------------------------------------------------
|
|
33
|
+
// The fail-open escape hatch itself is REMOVED. Operator ruling, verbatim:
|
|
34
|
+
//
|
|
35
|
+
// "all three MUST HAVE THE SAME POSTURE. If holds is inaccessible - we deny
|
|
36
|
+
// the write. ... if there is a hold and we fail open - then information
|
|
37
|
+
// that would be required for courts or an investigation gets lost. But if
|
|
38
|
+
// there isn't a hold and we fail closed - it's just a matter of a retry
|
|
39
|
+
// when holds is accessible. Safer. Fail CLOSED."
|
|
40
|
+
//
|
|
41
|
+
// The hold gate is now UNCONDITIONALLY fail-closed, in all three language
|
|
42
|
+
// twins (ts / python / go). There is no configuration that makes a hold-read
|
|
43
|
+
// error (or a HELD terminal-write error) let the operation proceed. A
|
|
44
|
+
// dev/CI environment with no holds table gets the holds migration
|
|
45
|
+
// (`applyDsarMigrations`), not a bypass flag.
|
|
30
46
|
//
|
|
31
47
|
// `failClosedHolds` survives as a DEPRECATED alias so the six services that
|
|
32
48
|
// correctly set `true` keep compiling and behaving identically. Passing
|
|
33
|
-
// `failClosedHolds: false` — the value that used to mean "fail open" —
|
|
34
|
-
// THROWS at bind time
|
|
35
|
-
//
|
|
36
|
-
// and "I pinned the old default and never revisited it", and the compliance
|
|
37
|
-
// cost of guessing wrong is an unrecoverable erasure. Zero services in the
|
|
38
|
-
// fleet pass `false` today, so nothing regresses; anyone who genuinely wants
|
|
39
|
-
// fail-open says so in the new vocabulary.
|
|
49
|
+
// `failClosedHolds: false` — the value that used to mean "fail open" — still
|
|
50
|
+
// THROWS at bind time: fail-open no longer exists, so an explicit `false`
|
|
51
|
+
// cannot be honored and must not be silently reinterpreted.
|
|
40
52
|
import { DsarError } from "./types.js";
|
|
53
|
+
// ── THE REFUSAL VOCABULARY (two distinguishable corners) ───────────────────
|
|
54
|
+
//
|
|
55
|
+
// A fail-closed refusal has TWO causes with OPPOSITE remedies, and until now
|
|
56
|
+
// both reported the same `reason` with the raw driver error stuffed into
|
|
57
|
+
// `statute_citation` — so a caller could not tell them apart, and an automated
|
|
58
|
+
// retry loop treated the futile one as the transient one:
|
|
59
|
+
//
|
|
60
|
+
// (a) the CONSULT failed — missing table, dead connection, permission error.
|
|
61
|
+
// Hold existence is UNKNOWN. Transient: RETRY once holds are reachable.
|
|
62
|
+
// (b) the consult SUCCEEDED and positively identified an active hold, but the
|
|
63
|
+
// HELD terminal record (aggregator row / refusal audit) could not be
|
|
64
|
+
// written. The hold is KNOWN. Retrying is futile until the write path is
|
|
65
|
+
// repaired — and the hold's REAL statutory citation is in hand and must
|
|
66
|
+
// not be discarded.
|
|
67
|
+
//
|
|
68
|
+
// Both refuse. Neither is memoizable (see below). `statute_citation` is
|
|
69
|
+
// CITATION-ONLY on both: "" for (a) (nothing is known), the identified hold's
|
|
70
|
+
// citation for (b). The raw driver error rides `LifecycleResponse.hold_gate_error`
|
|
71
|
+
// (diagnostic; NOT a proto field) + the refusal audit payload — never the
|
|
72
|
+
// compliance-facing citation field a consumer may render to a data subject.
|
|
73
|
+
/**
|
|
74
|
+
* Corner (a) — the hold CONSULT itself failed; hold existence is UNKNOWN.
|
|
75
|
+
* The value is load-bearing across the three twins and the fleet's
|
|
76
|
+
* fail-closed compliance suites: do NOT rename it.
|
|
77
|
+
*/
|
|
78
|
+
export const HOLD_CONSULT_FAILED_REASON = "hold_consult_failed_fail_closed";
|
|
79
|
+
/**
|
|
80
|
+
* Corner (b) — a hold WAS positively identified; only its HELD terminal record
|
|
81
|
+
* failed. Distinct from {@link HOLD_CONSULT_FAILED_REASON} so a caller can tell
|
|
82
|
+
* "unknown, retry" from "known hold, recording broken".
|
|
83
|
+
*/
|
|
84
|
+
export const HELD_WRITE_FAILED_REASON = "held_write_failed_fail_closed";
|
|
85
|
+
/**
|
|
86
|
+
* The hold-gate refusal codes that are INFRASTRUCTURE failures rather than
|
|
87
|
+
* business outcomes. Exported so consumers can classify a refusal without
|
|
88
|
+
* string-matching, and so the go/python twins have one list to mirror.
|
|
89
|
+
*/
|
|
90
|
+
export const HOLD_GATE_INFRA_REFUSAL_REASONS = [
|
|
91
|
+
HOLD_CONSULT_FAILED_REASON,
|
|
92
|
+
HELD_WRITE_FAILED_REASON,
|
|
93
|
+
];
|
|
94
|
+
/**
|
|
95
|
+
* THE MEMOIZATION RULE (operator ruling 2026-07-30 — "it's just a matter of a
|
|
96
|
+
* retry when holds is accessible").
|
|
97
|
+
*
|
|
98
|
+
* The ruling's safety argument rests entirely on the refusal being RETRYABLE.
|
|
99
|
+
* It was not: `withLifecycleIdempotency` wrote every resolved response into
|
|
100
|
+
* `lifecycle_requests.response_cached`, and `request_id` IS the DSAR
|
|
101
|
+
* idempotency key — so the natural idempotent retry replayed the cached
|
|
102
|
+
* refusal without ever re-consulting holds. One transient holds outage poisoned
|
|
103
|
+
* that statutory request identity FOREVER; the only escapes were minting a new
|
|
104
|
+
* request_id (new SLA clock, new audit lineage) or hand-deleting the row.
|
|
105
|
+
*
|
|
106
|
+
* So: an infrastructure refusal is NOT a terminal business outcome. It is not
|
|
107
|
+
* memoized, and it does not hold the idempotency claim — an identical
|
|
108
|
+
* subsequent request RE-CONSULTS holds. Genuine business outcomes (COMPLETED /
|
|
109
|
+
* PARTIAL / NO_DATA / HELD / a FAILED produced by a handler or a sibling) are
|
|
110
|
+
* memoized exactly as before: replaying those must NOT re-run the side effect.
|
|
111
|
+
*
|
|
112
|
+
* The rule is deliberately keyed on the two library-generated gate codes and
|
|
113
|
+
* NOT on "status === FAILED" — a handler's FAILED (a real attempt that really
|
|
114
|
+
* failed) stays memoized, because re-running an erase is not free.
|
|
115
|
+
*
|
|
116
|
+
* SCOPE: this is the CONSUMER-FACING classifier — the exported half of the wire
|
|
117
|
+
* contract, so a consumer that receives `{status, reason}` off the wire (where
|
|
118
|
+
* nothing but those two strings survives) can still tell an infrastructure
|
|
119
|
+
* refusal from a business outcome. It is deliberately string-only, and it is
|
|
120
|
+
* therefore NOT what the idempotency wrap decides on: see
|
|
121
|
+
* {@link isLibraryHoldGateRefusal}.
|
|
122
|
+
*/
|
|
123
|
+
export function isNonMemoizableOutcome(response) {
|
|
124
|
+
return (response.status === "FAILED" &&
|
|
125
|
+
HOLD_GATE_INFRA_REFUSAL_REASONS.includes(response.reason ?? ""));
|
|
126
|
+
}
|
|
127
|
+
// ── THE MEMOIZATION DECISION IS UNFORGEABLE ────────────────────────────────
|
|
128
|
+
//
|
|
129
|
+
// `isNonMemoizableOutcome` keys on the `reason` STRING, and every participant
|
|
130
|
+
// catch puts the RAW handler error text into `reason` (bind-pattern-a.ts's five
|
|
131
|
+
// handler catches: `reason: err instanceof Error ? err.message : String(err)`).
|
|
132
|
+
// So the two reserved codes lived in the SAME namespace as arbitrary handler
|
|
133
|
+
// error strings, and a handler that raised `new Error(
|
|
134
|
+
// "hold_consult_failed_fail_closed")` — a copy-pasted constant, a re-thrown
|
|
135
|
+
// upstream refusal, a log line echoed into an exception — got the library's
|
|
136
|
+
// non-memoized treatment: its idempotency claim DELETED and the erase RE-RUN on
|
|
137
|
+
// the idempotent retry. Measured (2026-07-30 panel probe S12, real pg, all
|
|
138
|
+
// three twins): claim_rows_after_r1 = 0, handler_runs after replay = 2.
|
|
139
|
+
//
|
|
140
|
+
// The classification therefore cannot key on handler-supplied DATA. It keys on
|
|
141
|
+
// a BRAND that only this module can apply, and which only the library's own
|
|
142
|
+
// gate-construction paths (bind-pattern-a.ts `checkHold`, orchestrator.ts's two
|
|
143
|
+
// corner responses) ever apply.
|
|
144
|
+
//
|
|
145
|
+
// WHY IT CANNOT BE SPOOFED
|
|
146
|
+
// * The brand key is a `Symbol()` — a fresh, unique symbol created at module
|
|
147
|
+
// load. It is NOT `Symbol.for()`, so it is absent from the global symbol
|
|
148
|
+
// registry and cannot be re-derived by name. The binding is module-private
|
|
149
|
+
// (never exported, never re-exported from `index.ts`), so no consumer holds
|
|
150
|
+
// a reference to the only key that would set or read it.
|
|
151
|
+
// * The property is `enumerable: false, writable: false, configurable: false`:
|
|
152
|
+
// invisible to `Object.keys`, object spread, `JSON.stringify`, structural
|
|
153
|
+
// equality — so it never reaches the wire, `response_cached`, or a test's
|
|
154
|
+
// `toEqual`, and it cannot be overwritten once set.
|
|
155
|
+
// * `reason` stays EXACTLY as before on the wire, and
|
|
156
|
+
// `isNonMemoizableOutcome` (the exported classifier) is unchanged — the
|
|
157
|
+
// reason-code vocabulary is still the contract consumers match on. Only the
|
|
158
|
+
// memoization DECISION moved to the brand.
|
|
159
|
+
/**
|
|
160
|
+
* Module-private brand for a refusal THIS LIBRARY constructed at a hold gate.
|
|
161
|
+
* Deliberately `Symbol()` (unique, unregistered) rather than `Symbol.for()`.
|
|
162
|
+
*/
|
|
163
|
+
const HOLD_GATE_REFUSAL_BRAND = Symbol("nodii.dsar.libraryHoldGateRefusal");
|
|
164
|
+
/**
|
|
165
|
+
* Brand a hold-gate refusal the library itself constructed. Internal — exported
|
|
166
|
+
* for `bind-pattern-a.ts` / `orchestrator.ts` only, and NOT re-exported from
|
|
167
|
+
* `index.ts`.
|
|
168
|
+
*/
|
|
169
|
+
export function brandHoldGateRefusal(response) {
|
|
170
|
+
Object.defineProperty(response, HOLD_GATE_REFUSAL_BRAND, {
|
|
171
|
+
value: true,
|
|
172
|
+
enumerable: false,
|
|
173
|
+
writable: false,
|
|
174
|
+
configurable: false,
|
|
175
|
+
});
|
|
176
|
+
return response;
|
|
177
|
+
}
|
|
178
|
+
function hasHoldGateRefusalBrand(value) {
|
|
179
|
+
return (typeof value === "object" &&
|
|
180
|
+
value !== null &&
|
|
181
|
+
value[HOLD_GATE_REFUSAL_BRAND] === true);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Carry the brand across a copy. The participant gate sites re-stamp
|
|
185
|
+
* `request_id` onto the refusal with `{ ...held, request_id }`, and a
|
|
186
|
+
* non-enumerable property is NOT copied by spread — so the brand has to be
|
|
187
|
+
* carried explicitly. `from` unbranded (e.g. a HELD outcome, which IS
|
|
188
|
+
* memoizable) leaves `to` unbranded.
|
|
189
|
+
*/
|
|
190
|
+
export function carryHoldGateRefusalBrand(from, to) {
|
|
191
|
+
return hasHoldGateRefusalBrand(from) ? brandHoldGateRefusal(to) : to;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* THE MEMOIZATION DECISION — the predicate `withLifecycleIdempotency` uses.
|
|
195
|
+
*
|
|
196
|
+
* Requires BOTH the library's own brand AND one of the two reserved reason
|
|
197
|
+
* codes. A handler's FAILED can carry either reserved string as its `reason`
|
|
198
|
+
* (deliberately, accidentally, or by echoing an upstream refusal) and is still
|
|
199
|
+
* memoized, because it carries no brand.
|
|
200
|
+
*
|
|
201
|
+
* Internal — not re-exported from `index.ts`. Consumers classify with
|
|
202
|
+
* {@link isNonMemoizableOutcome} / {@link HOLD_GATE_INFRA_REFUSAL_REASONS}.
|
|
203
|
+
*/
|
|
204
|
+
export function isLibraryHoldGateRefusal(response) {
|
|
205
|
+
return hasHoldGateRefusalBrand(response) && isNonMemoizableOutcome(response);
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The shared hold-gate refusal AUDIT payload — one shape for every refusal, on
|
|
209
|
+
* both the participant (`<svc>.dsar.<verb>_failed`) and the orchestrator
|
|
210
|
+
* (`tenant.dsar.<verb>_failed`) sides, for all three refusal kinds (HELD,
|
|
211
|
+
* consult-failed, HELD-write-failed).
|
|
212
|
+
*
|
|
213
|
+
* This is where the technical detail lives. The audit row is operator-facing
|
|
214
|
+
* and tamper-evident; the response envelope is compliance-facing. Keeping the
|
|
215
|
+
* driver error here (and out of `statute_citation`) is what lets the citation
|
|
216
|
+
* field mean only ever "a statute".
|
|
217
|
+
*/
|
|
218
|
+
export function holdGateRefusalAuditPayload(args) {
|
|
219
|
+
return {
|
|
220
|
+
gate: "hold",
|
|
221
|
+
// The load-bearing compliance fact: the operation did NOT proceed.
|
|
222
|
+
blocked: true,
|
|
223
|
+
reason: args.reason,
|
|
224
|
+
...(args.holdKind ? { hold_kind: args.holdKind } : {}),
|
|
225
|
+
...(args.statuteCitation ? { statute_citation: args.statuteCitation } : {}),
|
|
226
|
+
...(args.error !== undefined ? { hold_gate_error: args.error } : {}),
|
|
227
|
+
};
|
|
228
|
+
}
|
|
41
229
|
/**
|
|
42
230
|
* The invariant half of {@link AmbiguousHoldFailureMode}'s message.
|
|
43
231
|
*
|
|
@@ -47,32 +235,47 @@ import { DsarError } from "./types.js";
|
|
|
47
235
|
* single 700-column one. Literal-to-literal `+` is not a `useTemplate`
|
|
48
236
|
* violation — only concatenation with an interpolation is.
|
|
49
237
|
*/
|
|
50
|
-
const AMBIGUOUS_HOLD_FAILURE_MODE_DETAIL = "the hold consult is fail-CLOSED
|
|
51
|
-
"(status FAILED, reason `hold_consult_failed_fail_closed`) instead of
|
|
52
|
-
"proceed.
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
238
|
+
const AMBIGUOUS_HOLD_FAILURE_MODE_DETAIL = "the hold consult is UNCONDITIONALLY fail-CLOSED — a hold-read error BLOCKS the " +
|
|
239
|
+
"erase (status FAILED, reason `hold_consult_failed_fail_closed`) instead of " +
|
|
240
|
+
"letting it proceed. Per the operator ruling of 2026-07-30 there is NO fail-open " +
|
|
241
|
+
"opt-out (the former `allowFailOpenHolds` flag is removed): if holds are " +
|
|
242
|
+
"inaccessible the write is denied — a spurious denial is just a retry once holds " +
|
|
243
|
+
"are reachable again, while a spurious erase under a hold destroys information " +
|
|
244
|
+
"that courts or an investigation may require. DELETE the option: fail-closed is " +
|
|
245
|
+
"the only behaviour.";
|
|
57
246
|
/**
|
|
58
247
|
* Thrown at BIND time when a caller passes the deprecated
|
|
59
|
-
* `failClosedHolds: false`. R1 fail-fast:
|
|
60
|
-
*
|
|
248
|
+
* `failClosedHolds: false`. R1 fail-fast: fail-open no longer exists
|
|
249
|
+
* (operator ruling 2026-07-30 — fail CLOSED, all twins), so an explicit
|
|
250
|
+
* `false` cannot be honored and must not be silently reinterpreted.
|
|
61
251
|
*/
|
|
62
252
|
export class AmbiguousHoldFailureMode extends DsarError {
|
|
63
253
|
constructor(who) {
|
|
64
|
-
super(
|
|
254
|
+
super(
|
|
255
|
+
// VERSION ATTRIBUTION (corrected): 0.16.0 flipped the DEFAULT to
|
|
256
|
+
// fail-closed but KEPT the `allowFailOpenHolds` opt-out — it was never
|
|
257
|
+
// unconditional. The unconditional posture ships in THIS release, with
|
|
258
|
+
// the opt-out removed. The old wording ("As of @nodii/dsar 0.16.0 the
|
|
259
|
+
// hold consult is UNCONDITIONALLY fail-CLOSED") asserted a version fact
|
|
260
|
+
// this file contradicts 60 lines up, to the one audience — a booting
|
|
261
|
+
// operator — that cannot check.
|
|
262
|
+
`${who}: \`failClosedHolds: false\` is no longer accepted. @nodii/dsar 0.16.0 flipped the DEFAULT to fail-closed but still accepted an \`allowFailOpenHolds\` opt-out; as of THIS release ${AMBIGUOUS_HOLD_FAILURE_MODE_DETAIL}`);
|
|
65
263
|
this.name = "AmbiguousHoldFailureMode";
|
|
66
264
|
}
|
|
67
265
|
}
|
|
68
266
|
/**
|
|
69
|
-
*
|
|
267
|
+
* Validate the (deprecated) hold-failure-mode options.
|
|
268
|
+
*
|
|
269
|
+
* The hold gate is UNCONDITIONALLY fail-closed (operator ruling 2026-07-30 —
|
|
270
|
+
* "If holds is inaccessible - we deny the write. ... Fail CLOSED."). This
|
|
271
|
+
* function survives only to reject the deprecated `failClosedHolds: false`
|
|
272
|
+
* loudly at bind time.
|
|
70
273
|
*
|
|
71
|
-
* @returns `true
|
|
274
|
+
* @returns `true`, always — a consult error ALWAYS blocks the operation.
|
|
72
275
|
*/
|
|
73
276
|
export function resolveFailClosedHolds(who, opts) {
|
|
74
277
|
if (opts.failClosedHolds === false)
|
|
75
278
|
throw new AmbiguousHoldFailureMode(who);
|
|
76
|
-
return
|
|
279
|
+
return true;
|
|
77
280
|
}
|
|
78
281
|
//# sourceMappingURL=hold-failure-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hold-failure-mode.js","sourceRoot":"","sources":["../src/hold-failure-mode.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"hold-failure-mode.js","sourceRoot":"","sources":["../src/hold-failure-mode.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,0EAA0E;AAC1E,EAAE;AACF,8CAA8C;AAC9C,8CAA8C;AAC9C,qEAAqE;AACrE,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,uEAAuE;AACvE,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,+EAA+E;AAC/E,+EAA+E;AAC/E,2EAA2E;AAC3E,kEAAkE;AAClE,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,mEAAmE;AACnE,EAAE;AACF,6EAA6E;AAC7E,EAAE;AACF,yEAAyE;AACzE,gCAAgC;AAChC,EAAE;AACF,mDAAmD;AACnD,mDAAmD;AACnD,2EAA2E;AAC3E,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,oDAAoD;AACpD,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,sEAAsE;AACtE,kEAAkE;AAClE,8CAA8C;AAC9C,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,6EAA6E;AAC7E,0EAA0E;AAC1E,4DAA4D;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEv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C,CAAC,CAAC,EAAE,CAAC;QAC3E,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACrE,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,kCAAkC,GACtC,iFAAiF;IACjF,6EAA6E;IAC7E,kFAAkF;IAClF,0EAA0E;IAC1E,kFAAkF;IAClF,gFAAgF;IAChF,iFAAiF;IACjF,qBAAqB,CAAC;AAExB;;;;;GAKG;AACH,MAAM,OAAO,wBAAyB,SAAQ,SAAS;IACrD,YAAY,GAAW;QACrB,KAAK;QACH,iEAAiE;QACjE,uEAAuE;QACvE,uEAAuE;QACvE,sEAAsE;QACtE,wEAAwE;QACxE,qEAAqE;QACrE,gCAAgC;QAChC,GAAG,GAAG,sLAAsL,kCAAkC,EAAE,CACjO,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF;AAaD;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CACpC,GAAW,EACX,IAAyB;IAEzB,IAAI,IAAI,CAAC,eAAe,KAAK,KAAK;QAAE,MAAM,IAAI,wBAAwB,CAAC,GAAG,CAAC,CAAC;IAC5E,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { beginDsar, getDsar, listDsars, accessData, eraseData, portabilityExport
|
|
|
8
8
|
export type { BeginDsarArgs, BeginDsarResult, GetDsarArgs, ListDsarsArgs, AccessDataArgs, AccessDataResult, EraseDataArgs, EraseDataResult, PortabilityExportArgs, PortabilityExportResult, RectifyArgs, RectifyResult, MarkCompleteArgs, MarkCompleteResult, AppealRejectionArgs, AppealRejectionResult, } from "./handlers.js";
|
|
9
9
|
export { canonicalJson, CanonicalSerializationError, EventNonCanonical, } from "./canonical.js";
|
|
10
10
|
export type { CanonicalValue } from "./canonical.js";
|
|
11
|
-
export { AmbiguousHoldFailureMode, resolveFailClosedHolds, } from "./hold-failure-mode.js";
|
|
11
|
+
export { AmbiguousHoldFailureMode, HELD_WRITE_FAILED_REASON, HOLD_CONSULT_FAILED_REASON, HOLD_GATE_INFRA_REFUSAL_REASONS, holdGateRefusalAuditPayload, isNonMemoizableOutcome, resolveFailClosedHolds, } from "./hold-failure-mode.js";
|
|
12
12
|
export type { HoldFailureModeOpts } from "./hold-failure-mode.js";
|
|
13
13
|
export { applyRetention } from "./retention.js";
|
|
14
14
|
export type { RetentionMatch } from "./retention.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,SAAS,EACT,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,eAAe,EACf,IAAI,EACJ,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,eAAe,EACf,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAOvB,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,SAAS,EACT,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,eAAe,EACf,IAAI,EACJ,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,eAAe,EACf,WAAW,EACX,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAOvB,OAAO,EACL,aAAa,EACb,2BAA2B,EAC3B,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,C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AAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,12 +31,21 @@ export { beginDsar, getDsar, listDsars, accessData, eraseData, portabilityExport
|
|
|
31
31
|
// of that same class (so `instanceof` is unchanged) but is no longer a
|
|
32
32
|
// `DsarError` subclass. See src/canonical.ts for the full rationale.
|
|
33
33
|
export { canonicalJson, CanonicalSerializationError, EventNonCanonical, } from "./canonical.js";
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
// `
|
|
38
|
-
//
|
|
39
|
-
|
|
34
|
+
// The hold-consult failure mode. Fail-CLOSED, UNCONDITIONALLY (operator
|
|
35
|
+
// ruling 2026-07-30 — "If holds is inaccessible - we deny the write. ...
|
|
36
|
+
// Fail CLOSED.", all three twins): a hold-read error BLOCKS the erase. The
|
|
37
|
+
// former `allowFailOpenHolds` opt-out is REMOVED; the deprecated
|
|
38
|
+
// `failClosedHolds: false` throws `AmbiguousHoldFailureMode` at bind time —
|
|
39
|
+
// there is no fail-open to opt into.
|
|
40
|
+
//
|
|
41
|
+
// The refusal vocabulary is exported so a consumer can classify a refusal
|
|
42
|
+
// WITHOUT string-matching: `HOLD_CONSULT_FAILED_REASON` (holds unreadable —
|
|
43
|
+
// transient, retry) vs `HELD_WRITE_FAILED_REASON` (a hold is KNOWN, only its
|
|
44
|
+
// record failed — retrying is futile until the write path is fixed). Both are
|
|
45
|
+
// in `HOLD_GATE_INFRA_REFUSAL_REASONS`, and `isNonMemoizableOutcome` is the
|
|
46
|
+
// rule that keeps them out of the `lifecycle_requests` response cache so the
|
|
47
|
+
// ruling's "just a matter of a retry" is actually true.
|
|
48
|
+
export { AmbiguousHoldFailureMode, HELD_WRITE_FAILED_REASON, HOLD_CONSULT_FAILED_REASON, HOLD_GATE_INFRA_REFUSAL_REASONS, holdGateRefusalAuditPayload, isNonMemoizableOutcome, resolveFailClosedHolds, } from "./hold-failure-mode.js";
|
|
40
49
|
export { applyRetention } from "./retention.js";
|
|
41
50
|
export { DsarError, DsarNotInitialized, DsarNotFound, DsarStoreRequired, JustificationRequired, SubjectKindNotRegistered, DsarTerminalStateViolation, ExportGatherFailed, EraseExecutionFailed, HandlerAlreadyRegistered, CmkAdapterNotConfigured, CmkResolutionFailed, tenantCmkAliasAdapter, } from "./types.js";
|
|
42
51
|
export { DEFAULT_ERASE_BLOCKING_HOLD_KINDS, STATUTORY_HOLD_KINDS, CITATION_REQUIRED_HOLD_KINDS,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,mEAAmE;AACnE,6CAA6C;AAC7C,EAAE;AACF,kBAAkB;AAClB,4DAA4D;AAC5D,4EAA4E;AAC5E,sEAAsE;AACtE,uEAAuE;AACvE,0EAA0E;AAC1E,0CAA0C;AAC1C,sDAAsD;AACtD,sEAAsE;AACtE,yEAAyE;AACzE,iFAAiF;AACjF,mDAAmD;AACnD,oEAAoE;AACpE,sEAAsE;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC/B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,sBAAsB;AACtB,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,Y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qBAAqB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,4CAA4C;AAC5C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,UAAU,GACX,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAOzD,iDAAiD;AACjD,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,qCAAqC,CAAC;AAM7C,4EAA4E;AAC5E,OAAO,EACL,8BAA8B,EAC9B,aAAa,EACb,kCAAkC,EAClC,qCAAqC,GACtC,MAAM,6BAA6B,CAAC;AAQrC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,mDAAmD;AACnD,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG1E,yCAAyC;AACzC,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAS1B,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAG7D,gEAAgE;AAChE,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
|
package/dist/orchestrator.d.ts
CHANGED
|
@@ -23,19 +23,12 @@ export interface BindOrchestratorOpts {
|
|
|
23
23
|
/** Defaults to `data_residency_holds`. */
|
|
24
24
|
holdsTableName?: string;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* COMPLIANCE-GATE BYPASS. Default `false`.
|
|
33
|
-
*/
|
|
34
|
-
allowFailOpenHolds?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated Since 0.16.0 fail-closed is the DEFAULT. `true` is a no-op;
|
|
37
|
-
* `false` THROWS {@link AmbiguousHoldFailureMode} at bind time — pass
|
|
38
|
-
* `allowFailOpenHolds: true` if you really want fail-open.
|
|
26
|
+
* @deprecated The orchestrator-side hold gate is UNCONDITIONALLY
|
|
27
|
+
* fail-CLOSED (operator ruling 2026-07-30 — "If holds is inaccessible - we
|
|
28
|
+
* deny the write. ... Fail CLOSED.", all three twins). The former
|
|
29
|
+
* `allowFailOpenHolds` opt-out is REMOVED. `true` is a no-op; `false`
|
|
30
|
+
* THROWS {@link AmbiguousHoldFailureMode} at bind time — there is no
|
|
31
|
+
* fail-open to opt into.
|
|
39
32
|
*/
|
|
40
33
|
failClosedHolds?: boolean;
|
|
41
34
|
/**
|
|
@@ -44,9 +37,11 @@ export interface BindOrchestratorOpts {
|
|
|
44
37
|
*/
|
|
45
38
|
eraseBlockingHoldKinds?: readonly HoldKind[];
|
|
46
39
|
/**
|
|
47
|
-
* Per
|
|
48
|
-
*
|
|
49
|
-
*
|
|
40
|
+
* Per-`subject_kind` → siblings static map (D486 subject_kind-only routing;
|
|
41
|
+
* SUPERSEDES the pre-D486 `"<data_class>:<subject_kind>"` key). Used when a
|
|
42
|
+
* sqlClient isn't supplied (unit tests / dev). Keyed by the bare subject_kind
|
|
43
|
+
* (e.g. `"customer"`, `"user"`) — `data_class` is NEVER part of the key.
|
|
44
|
+
* Sibling names must match `siblingClients` keys.
|
|
50
45
|
*/
|
|
51
46
|
retentionPolicies?: Record<string, string[]>;
|
|
52
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceR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