@cosmicdrift/kumiko-bundled-features 0.416.0 → 0.418.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/agent-tools/api-docs/schema-fields.js +9 -0
- package/dist/auth-email-password/index.d.ts +2 -1
- package/dist/auth-email-password/index.js +2 -1
- package/dist/auth-email-password/signup-activation.js +2 -1
- package/dist/auth-email-password/signup-token-store.d.ts +1 -6
- package/dist/auth-email-password/signup-token-store.js +0 -5
- package/dist/cap-counter/stock-cap-guard.d.ts +9 -2
- package/dist/cap-counter/stock-cap-guard.js +9 -11
- package/dist/document-ingest-foundation/feature.js +5 -1
- package/dist/document-ingest-foundation/report-ingest-progress.js +19 -6
- package/dist/helpdesk/screens.js +5 -1
- package/dist/signature/entity.d.ts +8 -6
- package/dist/signature/entity.js +3 -1
- package/dist/signature/feature.js +27 -14
- package/dist/signature/handlers/cancel.write.d.ts +2 -1
- package/dist/signature/handlers/cancel.write.js +10 -3
- package/dist/signature/handlers/issue-link.write.d.ts +2 -1
- package/dist/signature/handlers/issue-link.write.js +4 -1
- package/dist/signature/handlers/lifecycle.write.d.ts +9 -0
- package/dist/signature/handlers/lifecycle.write.js +23 -1
- package/dist/signature/handlers/request.write.d.ts +3 -2
- package/dist/signature/handlers/request.write.js +23 -4
- package/dist/signature/handlers/revoke-link.write.d.ts +2 -1
- package/dist/signature/handlers/revoke-link.write.js +10 -1
- package/dist/signature/handlers/sign-in-person.write.d.ts +2 -1
- package/dist/signature/handlers/sign-in-person.write.js +4 -1
- package/dist/signature/i18n.js +1 -0
- package/dist/signature/index.d.ts +1 -1
- package/dist/signature/list-cursor-seal.d.ts +3 -0
- package/dist/signature/list-cursor-seal.js +44 -0
- package/dist/signature/options.d.ts +10 -1
- package/dist/signature/payloads.d.ts +17 -1
- package/dist/signature/payloads.js +11 -2
- package/dist/signature/png.js +23 -3
- package/dist/signature/screens.js +2 -0
- package/dist/signature/static-sign.d.ts +2 -0
- package/dist/signature/static-sign.js +2 -1
- package/dist/signature/subject-queries.d.ts +5 -0
- package/dist/signature/subject-queries.js +135 -0
- package/dist/signature/subject-scope.d.ts +11 -0
- package/dist/signature/subject-scope.js +20 -0
- package/dist/signature/sweep.js +26 -9
- package/dist/signature/web/constants.d.ts +9 -0
- package/dist/signature/web/constants.js +8 -0
- package/dist/subscription-stripe/plugin-methods.js +2 -0
- package/dist/subscription-stripe/verify-webhook.js +17 -16
- package/dist/tenant-inactivity/handlers/keep-account.write.js +5 -2
- package/dist/tenant-lifecycle/run-tenant-destroy.js +65 -33
- package/package.json +11 -11
- package/src/agent-tools/changes.json +6 -0
- package/src/cap-counter/changes.json +6 -0
- package/src/channel-whatsapp/changes.json +1 -1
- package/src/document-ingest-foundation/changes.json +6 -0
- package/src/signature/changes.json +25 -0
- package/src/subscription-paddle/changes.json +1 -1
- package/src/subscription-stripe/changes.json +6 -0
- package/src/tenant-lifecycle/changes.json +6 -0
|
@@ -300,9 +300,11 @@ function dropPaidSession(event, session, reason) {
|
|
|
300
300
|
async function parsePaymentEvent(event, stripe) {
|
|
301
301
|
const session = event.data.object; // @cast-boundary engine-bridge
|
|
302
302
|
// mode !== "payment" excludes subscription-checkout sessions (same event types);
|
|
303
|
-
//
|
|
304
|
-
// error — maps to foundation's 200 "ignored",
|
|
305
|
-
|
|
303
|
+
// any status but paid / no_payment_required (a 100% promotion code) excludes an
|
|
304
|
+
// unpaid/expired session. Null here — not an error — maps to foundation's 200 "ignored",
|
|
305
|
+
// same as the subscription-path's filters.
|
|
306
|
+
if (session.mode !== "payment" ||
|
|
307
|
+
(session.payment_status !== "paid" && session.payment_status !== "no_payment_required")) {
|
|
306
308
|
return null;
|
|
307
309
|
}
|
|
308
310
|
// Lazy-fetch with expand: the raw webhook payload carries neither
|
|
@@ -321,21 +323,20 @@ async function parsePaymentEvent(event, stripe) {
|
|
|
321
323
|
return null;
|
|
322
324
|
throw transientProviderRejection(error);
|
|
323
325
|
}
|
|
324
|
-
// Tenant-resolution:
|
|
325
|
-
//
|
|
326
|
-
//
|
|
327
|
-
//
|
|
328
|
-
// Stripe-verified PaymentIntent (not a freely-choosable payload field) is
|
|
329
|
-
// what keeps tenant-attribution trustworthy: the webhook signature proves
|
|
330
|
-
// this whole object chain came from Stripe, and the metadata itself was
|
|
331
|
-
// set by our own backend at checkout-creation time.
|
|
326
|
+
// Tenant-resolution: plugin-methods.ts sets tenantId on the PaymentIntent metadata and on the
|
|
327
|
+
// session metadata. A 100% promotion code creates no PaymentIntent, so the session metadata
|
|
328
|
+
// is only read then. Both are set by our own backend at checkout-creation time and reach us
|
|
329
|
+
// through the signature-verified webhook chain, not as a freely-choosable payload field.
|
|
332
330
|
const paymentIntent = expanded.payment_intent;
|
|
333
|
-
if (
|
|
334
|
-
|
|
331
|
+
if (typeof paymentIntent === "string" ||
|
|
332
|
+
(paymentIntent === null && session.payment_status === "paid")) {
|
|
333
|
+
// Not expanded (Stripe-API-drift) or absent on a paid session — no verified tenant-claim
|
|
335
334
|
// to trust.
|
|
336
335
|
return dropPaidSession(event, session, "payment_intent_not_expanded");
|
|
337
336
|
}
|
|
338
|
-
const tenantId = paymentIntent
|
|
337
|
+
const tenantId = paymentIntent
|
|
338
|
+
? paymentIntent.metadata?.["tenantId"]
|
|
339
|
+
: expanded.metadata?.["tenantId"];
|
|
339
340
|
if (!tenantId || tenantId.length === 0) {
|
|
340
341
|
return dropPaidSession(event, session, "missing_tenant_id");
|
|
341
342
|
}
|
|
@@ -348,9 +349,9 @@ async function parsePaymentEvent(event, stripe) {
|
|
|
348
349
|
// customer, which Stripe sets independently of the session-level field.
|
|
349
350
|
const sessionCustomer = expanded.customer;
|
|
350
351
|
const providerCustomerId = (typeof sessionCustomer === "string" ? sessionCustomer : sessionCustomer?.id) ??
|
|
351
|
-
(typeof paymentIntent
|
|
352
|
+
(typeof paymentIntent?.customer === "string"
|
|
352
353
|
? paymentIntent.customer
|
|
353
|
-
: paymentIntent
|
|
354
|
+
: paymentIntent?.customer?.id);
|
|
354
355
|
if (!providerCustomerId) {
|
|
355
356
|
return dropPaidSession(event, session, "missing_customer");
|
|
356
357
|
}
|
|
@@ -6,6 +6,7 @@ import { tenantTable } from "../../tenant/index.js";
|
|
|
6
6
|
import { redeemKeepAccountToken } from "../keep-token.js";
|
|
7
7
|
import { lockInactivityCycle } from "../state-store.js";
|
|
8
8
|
import { tenantInactivityStateTable } from "../state-table.js";
|
|
9
|
+
const KEEPABLE_TENANT_STATUS = "active";
|
|
9
10
|
const KEEP_ACCOUNT_ESCAPE_HATCH_REASON = "the anonymous link holder has no tenant scope; the tenant comes from the signed token and every statement filters by that tenantId";
|
|
10
11
|
export function createKeepAccountHandler(opts) {
|
|
11
12
|
return defineWriteHandler({
|
|
@@ -37,8 +38,10 @@ export function createKeepAccountHandler(opts) {
|
|
|
37
38
|
commitKeep: async (tenantId, cycleId) => {
|
|
38
39
|
await lockInactivityCycle(runner, tenantId);
|
|
39
40
|
// A destruction request that won the lock owns the tenant now; reporting "kept" would be a lie.
|
|
40
|
-
const tenant = await fetchOne(runner, tenantTable, {
|
|
41
|
-
|
|
41
|
+
const tenant = await fetchOne(runner, tenantTable, {
|
|
42
|
+
id: tenantId,
|
|
43
|
+
});
|
|
44
|
+
if (tenant?.status !== KEEPABLE_TENANT_STATUS)
|
|
42
45
|
return false;
|
|
43
46
|
const updated = await updateMany(runner, tenantInactivityStateTable, {
|
|
44
47
|
lastActivityAt: now,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createEventStoreExecutor, createTenantDb, fetchOne, selectMany, WritePurposes, } from "@cosmicdrift/kumiko-framework/db";
|
|
1
|
+
import { createEventStoreExecutor, createTenantDb, fetchOne, selectMany, tryWithSessionAdvisoryLock, WritePurposes, } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import { createSystemUser, SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
3
|
import { append, loadAggregate, VersionConflictError, } from "@cosmicdrift/kumiko-framework/event-store";
|
|
4
4
|
import { getTemporal } from "@cosmicdrift/kumiko-framework/time";
|
|
@@ -9,6 +9,19 @@ import { invalidateTenantLifecycleGate, TEARDOWN_GATE_SETTLE_MS } from "./lifecy
|
|
|
9
9
|
import { isDestructionPipelineComplete, pickNextStage, } from "./stages.js";
|
|
10
10
|
const tenantCrud = createEventStoreExecutor(tenantTable, tenantEntity, { entityName: "tenant" });
|
|
11
11
|
const FEATURE_PREFIX = "tenant-lifecycle:event:";
|
|
12
|
+
const TENANT_DESTRUCTION_LOCK_NAMESPACE = 0x74_64_65_73; // 'tdes'
|
|
13
|
+
const FNV32_OFFSET = 0x81_1c_9d_c5;
|
|
14
|
+
const FNV32_PRIME = 0x01_00_01_93;
|
|
15
|
+
// Cron ticks of the destruction job overlap (concurrency:"skip" does not hold across ticks),
|
|
16
|
+
// and two sweeps on one tenant make the loser's version conflict count as a failed stage
|
|
17
|
+
// attempt. A hash collision between tenants only skips one tick for the other tenant.
|
|
18
|
+
function tenantDestructionLockKey(tenantId) {
|
|
19
|
+
let hash = FNV32_OFFSET;
|
|
20
|
+
for (let i = 0; i < tenantId.length; i++) {
|
|
21
|
+
hash = Math.imul(hash ^ tenantId.charCodeAt(i), FNV32_PRIME);
|
|
22
|
+
}
|
|
23
|
+
return (hash ^ TENANT_DESTRUCTION_LOCK_NAMESPACE) | 0;
|
|
24
|
+
}
|
|
12
25
|
function qualified(short) {
|
|
13
26
|
return `${FEATURE_PREFIX}${short}`;
|
|
14
27
|
}
|
|
@@ -150,6 +163,7 @@ async function tenantOwnsRetentionHeldRows(args) {
|
|
|
150
163
|
return await tenantHasBlockDeleteRows(args);
|
|
151
164
|
}
|
|
152
165
|
async function haltPipelineOnAbandon(args) {
|
|
166
|
+
args.log?.(`[tenant-lifecycle] destruction halted: tenant ${args.tenantId} stage "${args.stage}" abandoned after ${args.attempts} attempt(s): ${args.error}`);
|
|
153
167
|
const T = getTemporal();
|
|
154
168
|
const failedAt = T.Now.instant();
|
|
155
169
|
// Reload fresh instead of trusting a caller-supplied version: the failed
|
|
@@ -179,6 +193,7 @@ async function maybeAppendDestructionCompleted(db, tenantId, completed) {
|
|
|
179
193
|
// `version` differs per caller: the catch path appends against the pre-run
|
|
180
194
|
// version, the no-progress path against the version reloaded after run().
|
|
181
195
|
async function recordFailedStageAttempt(args) {
|
|
196
|
+
args.log?.(`[tenant-lifecycle] stage attempt failed: tenant ${args.tenantId} stage "${args.stage.name}" attempt ${args.attempt}/${args.stage.maxAttempts}: ${args.error}`);
|
|
182
197
|
if (args.attempt >= args.stage.maxAttempts) {
|
|
183
198
|
await haltPipelineOnAbandon({
|
|
184
199
|
db: args.db,
|
|
@@ -186,6 +201,7 @@ async function recordFailedStageAttempt(args) {
|
|
|
186
201
|
stage: args.stage.name,
|
|
187
202
|
attempts: args.attempt,
|
|
188
203
|
error: args.error,
|
|
204
|
+
log: args.log,
|
|
189
205
|
});
|
|
190
206
|
return { done: false, error: args.error, halted: true };
|
|
191
207
|
}
|
|
@@ -216,6 +232,7 @@ async function recordIdleStageTick(args) {
|
|
|
216
232
|
? `stage "${args.stage.name}" still pending after ${DESTRUCTION_STAGE_MAX_PENDING_MS / 60_000} min`
|
|
217
233
|
: `stage "${args.stage.name}" made no progress`,
|
|
218
234
|
version: lastEventVersion(args.events),
|
|
235
|
+
log: args.log,
|
|
219
236
|
});
|
|
220
237
|
}
|
|
221
238
|
export async function runNextDestructionStage(args) {
|
|
@@ -276,6 +293,7 @@ export async function runNextDestructionStage(args) {
|
|
|
276
293
|
pending: outcome.pending === true,
|
|
277
294
|
events: eventsAfterRun,
|
|
278
295
|
now,
|
|
296
|
+
log: args.log,
|
|
279
297
|
});
|
|
280
298
|
}
|
|
281
299
|
if (!outcome.done) {
|
|
@@ -295,6 +313,7 @@ export async function runNextDestructionStage(args) {
|
|
|
295
313
|
attempt,
|
|
296
314
|
error: err instanceof Error ? err.message : String(err),
|
|
297
315
|
version,
|
|
316
|
+
log: args.log,
|
|
298
317
|
});
|
|
299
318
|
}
|
|
300
319
|
}
|
|
@@ -339,26 +358,33 @@ export async function runTenantDestructionSweep(args) {
|
|
|
339
358
|
let triggered = 0;
|
|
340
359
|
for (const row of due) {
|
|
341
360
|
const tenantId = row.id;
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
361
|
+
const locked = await tryWithSessionAdvisoryLock(args.db, tenantDestructionLockKey(tenantId), async () => {
|
|
362
|
+
// A peer sweep may have started this tenant after our `due` select.
|
|
363
|
+
if ((await tenantStatusOf(args.db, tenantId)) !== "destroyRequested")
|
|
364
|
+
return false;
|
|
365
|
+
const events = await loadAggregate(args.db, tenantId, SYSTEM_TENANT_ID);
|
|
366
|
+
const version = lastEventVersion(events);
|
|
367
|
+
const user = createSystemUser(tenantId);
|
|
368
|
+
const scopedDb = createTenantDb({
|
|
369
|
+
db: args.db,
|
|
370
|
+
tenantId,
|
|
371
|
+
mode: "system",
|
|
372
|
+
reason: "tenant destruction updates the tenant being destroyed, outside its request scope",
|
|
373
|
+
});
|
|
374
|
+
// Version-guarded (no skipOptimisticLock): a concurrent cancel-destruction
|
|
375
|
+
// between the `due` select above and this write also appends to the same
|
|
376
|
+
// tenant stream, so an unguarded overwrite here would silently revert the
|
|
377
|
+
// cancellation. A version conflict means we lost that race — skip, the
|
|
378
|
+
// tenant is no longer due and the next tick re-evaluates it.
|
|
379
|
+
const result = await tenantCrud.update({ id: tenantId, version, changes: { status: "destroying", destroyStartedAt: now } }, user, scopedDb, { writePurpose: WritePurposes.erasure });
|
|
380
|
+
if (!result.isSuccess)
|
|
381
|
+
return false;
|
|
382
|
+
invalidateTenantLifecycleGate(tenantId);
|
|
383
|
+
await appendTenantStageEvent(args.db, tenantId, qualified(TENANT_DESTRUCTION_STARTED_EVENT_SHORT), { startedAt: now.toString() }, version + 1);
|
|
384
|
+
return true;
|
|
350
385
|
});
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
// tenant stream, so an unguarded overwrite here would silently revert the
|
|
354
|
-
// cancellation. A version conflict means we lost that race — skip, the
|
|
355
|
-
// tenant is no longer due and the next tick re-evaluates it.
|
|
356
|
-
const result = await tenantCrud.update({ id: tenantId, version, changes: { status: "destroying", destroyStartedAt: now } }, user, scopedDb, { writePurpose: WritePurposes.erasure });
|
|
357
|
-
if (!result.isSuccess)
|
|
358
|
-
continue;
|
|
359
|
-
invalidateTenantLifecycleGate(tenantId);
|
|
360
|
-
await appendTenantStageEvent(args.db, tenantId, qualified(TENANT_DESTRUCTION_STARTED_EVENT_SHORT), { startedAt: now.toString() }, version + 1);
|
|
361
|
-
triggered++;
|
|
386
|
+
if (locked.acquired && locked.value)
|
|
387
|
+
triggered++;
|
|
362
388
|
}
|
|
363
389
|
let advanced = 0;
|
|
364
390
|
const destroying = await selectMany(args.db, tenantTable, destroyingWhere);
|
|
@@ -370,20 +396,26 @@ export async function runTenantDestructionSweep(args) {
|
|
|
370
396
|
for (const row of destroying) {
|
|
371
397
|
const tenantDeadlineAt = Date.now() + sliceMs;
|
|
372
398
|
try {
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
399
|
+
const locked = await tryWithSessionAdvisoryLock(args.db, tenantDestructionLockKey(row.id), async () => {
|
|
400
|
+
// A peer sweep may have finished or halted this tenant after our `destroying` select.
|
|
401
|
+
if ((await tenantStatusOf(args.db, row.id)) !== "destroying")
|
|
402
|
+
return undefined;
|
|
403
|
+
return await runNextDestructionStage({
|
|
404
|
+
deadlineAt: tenantDeadlineAt,
|
|
405
|
+
now,
|
|
406
|
+
db: args.db,
|
|
407
|
+
registry: args.registry,
|
|
408
|
+
tenantId: row.id,
|
|
409
|
+
log: args.log,
|
|
410
|
+
fileProviderResolver: args.fileProviderResolver,
|
|
411
|
+
searchAdapter: args.searchAdapter,
|
|
412
|
+
escapeHatchAuditSink: args.escapeHatchAuditSink,
|
|
413
|
+
escapeHatchAuditLog: args.escapeHatchAuditLog,
|
|
414
|
+
actor: args.actor,
|
|
415
|
+
});
|
|
385
416
|
});
|
|
386
|
-
|
|
417
|
+
const result = locked.acquired ? locked.value : undefined;
|
|
418
|
+
if (result && !result.error && !result.halted && !result.held)
|
|
387
419
|
advanced++;
|
|
388
420
|
}
|
|
389
421
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-bundled-features",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.418.0",
|
|
4
4
|
"description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -642,9 +642,9 @@
|
|
|
642
642
|
}
|
|
643
643
|
},
|
|
644
644
|
"dependencies": {
|
|
645
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
646
|
-
"@cosmicdrift/kumiko-renderer": "0.
|
|
647
|
-
"@cosmicdrift/kumiko-types": "0.
|
|
645
|
+
"@cosmicdrift/kumiko-framework": "0.418.0",
|
|
646
|
+
"@cosmicdrift/kumiko-renderer": "0.418.0",
|
|
647
|
+
"@cosmicdrift/kumiko-types": "0.418.0",
|
|
648
648
|
"@mollie/api-client": "^4.6.0",
|
|
649
649
|
"@node-rs/argon2": "^2.2.2",
|
|
650
650
|
"@tiptap/core": "^3.32.2",
|
|
@@ -1310,19 +1310,19 @@
|
|
|
1310
1310
|
"LICENSE"
|
|
1311
1311
|
],
|
|
1312
1312
|
"devDependencies": {
|
|
1313
|
-
"@cosmicdrift/kumiko-locale-de": "0.
|
|
1314
|
-
"@cosmicdrift/kumiko-locale-es": "0.
|
|
1315
|
-
"@cosmicdrift/kumiko-locale-fr": "0.
|
|
1316
|
-
"@cosmicdrift/kumiko-locale-it": "0.
|
|
1317
|
-
"@cosmicdrift/kumiko-renderer-mail-html": "0.
|
|
1318
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
1313
|
+
"@cosmicdrift/kumiko-locale-de": "0.418.0",
|
|
1314
|
+
"@cosmicdrift/kumiko-locale-es": "0.418.0",
|
|
1315
|
+
"@cosmicdrift/kumiko-locale-fr": "0.418.0",
|
|
1316
|
+
"@cosmicdrift/kumiko-locale-it": "0.418.0",
|
|
1317
|
+
"@cosmicdrift/kumiko-renderer-mail-html": "0.418.0",
|
|
1318
|
+
"@cosmicdrift/kumiko-testing": "0.418.0",
|
|
1319
1319
|
"@testing-library/user-event": "^14.6.8",
|
|
1320
1320
|
"@types/sanitize-html": "^2.16.2",
|
|
1321
1321
|
"jsqr": "^1.4.0",
|
|
1322
1322
|
"unpdf": "^1.9.1"
|
|
1323
1323
|
},
|
|
1324
1324
|
"peerDependencies": {
|
|
1325
|
-
"@cosmicdrift/kumiko-testing": "0.
|
|
1325
|
+
"@cosmicdrift/kumiko-testing": "0.418.0"
|
|
1326
1326
|
},
|
|
1327
1327
|
"peerDependenciesMeta": {
|
|
1328
1328
|
"@cosmicdrift/kumiko-testing": {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.418.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "API docs label nullable types",
|
|
6
|
+
"detail": "A JSON Schema type array such as `[\"string\", \"null\"]` (Zod nullable) was labelled `any` in the generated API docs. Each element is now labelled (string keeps its format) and joined with ` | `, with null last, e.g. `string | null`."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.416.0",
|
|
4
10
|
"type": "improvement",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.418.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "withStockCap keeps the handler type",
|
|
6
|
+
"detail": "`withStockCap` is generic over the write handler definition and returns the type it received, so a `defineWriteHandler` result passes in without an `as unknown as WriteHandlerDef` cast. Callers passing a `WriteHandlerDef` compile unchanged."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.414.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"version": "0.415.0",
|
|
16
16
|
"type": "fix",
|
|
17
17
|
"title": "WhatsApp webhook skips oversized ids and survives absurd timestamps",
|
|
18
|
-
"detail": "An entry with a wamid or phone number id above its limit is counted as skipped instead of failing the whole delivery with a 5xx. Overlong context ids
|
|
18
|
+
"detail": "An entry with a wamid or phone number id above its limit is counted as skipped instead of failing the whole delivery with a 5xx. Overlong context ids and media ids are dropped to null and overlong mime types are clipped, and a timestamp beyond the Temporal range falls back to the receive time."
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"version": "0.415.0",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.418.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "Ingest progress only moves forward",
|
|
6
|
+
"detail": "Parallel `reportIngestProgress` calls for one file can land in any order; the progress row now keeps the highest `pagesDone`, a report whose progress is already stored stops early, and after 10 version conflicts the call throws instead of returning silently."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.415.0",
|
|
4
10
|
"type": "fix",
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.418.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "List cursor of subject-scoped users is sealed",
|
|
6
|
+
"detail": "The request list returned the plain cursor of the last base page, which could name a request of a foreign subject. Scoped users now get an encrypted cursor bound to their user and tenant, a plain or foreign cursor is answered with access denied, and `authorizeSubject` now requires a non-empty `linkSecret` because the cursor key is derived from it. A scoped user asking for `limit: 0` is refused like `offset`."
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"version": "0.418.0",
|
|
10
|
+
"type": "fix",
|
|
11
|
+
"title": "Unrecoverable finalisation ends in status failed",
|
|
12
|
+
"detail": "A request whose original PDF changed or went missing, or whose signature image is missing, used to stay `all-signed` forever while the sweep warned every five minutes. It now ends in the status `failed` with the event `signature:event:failed` and a reason (`document-changed` or `signature-image-missing`). Renderer outages and storage errors still retry on the next run."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"version": "0.418.0",
|
|
16
|
+
"type": "fix",
|
|
17
|
+
"title": "Empty signatures are rejected on every background",
|
|
18
|
+
"detail": "The ink check treats an image as having a solid background only when all four corners are opaque and identical; a lone opaque pixel no longer counts the whole image as ink, and signer emails must be valid addresses."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"version": "0.417.0",
|
|
22
|
+
"type": "breaking",
|
|
23
|
+
"title": "Subject check for the signature feature and a readable-file check on requests",
|
|
24
|
+
"detail": "`createSignatureFeature({ ..., authorizeSubject, unscopedRoles })`: `authorizeSubject(ctx, user, { subjectType, subjectId })` runs for `request`, `cancel`, `issue-link`, `revoke-link`, `sign-in-person` and the queries, except for users holding a role of `unscopedRoles`; `false` answers like a missing record (not found, `null` or an empty page). `signatureRequest:list` keeps only the rows of allowed subjects for a scoped user and reads up to ten base pages to fill one answer (no 403; an answer can still hold fewer rows than `limit`, and it has no `total`); screens and nav stay at `access`. A scoped user must pass a `requestId` eq filter to `signatureSigner:list`, otherwise the query answers 403. `request` now also checks that the caller may read the document through the same decision as GET /files/:id; a file that is unknown or not readable answers `document_not_a_pdf`. `SIGNATURE_INVALID_LINK_REASON` is exported from `signature/static-sign`.",
|
|
25
|
+
"migration": "Apps that request a signature on a file the caller cannot open through GET /files/:id bind it to a record the caller can read first. Apps with authorizeSubject pass a requestId eq filter to signatureSigner:list and do not rely on `total` of signatureRequest:list for scoped users."
|
|
26
|
+
},
|
|
2
27
|
{
|
|
3
28
|
"version": "0.416.0",
|
|
4
29
|
"type": "improvement",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "0.415.0",
|
|
4
4
|
"type": "fix",
|
|
5
5
|
"title": "unreadable ledger backfill marker no longer causes endless 503",
|
|
6
|
-
"detail": "shouldRedeliverLegacyCheckout answers 200 and logs when the marker dispatch fails, because custom_data.tenantBinding is client-settable."
|
|
6
|
+
"detail": "shouldRedeliverLegacyCheckout answers 200 and logs only when the marker dispatch fails with a configuration error (access_denied, not_found, feature_disabled), because custom_data.tenantBinding is client-settable; other dispatch failures still answer 503 so Paddle redelivers a bounded number of times."
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"version": "0.414.0",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.418.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "One-off checkouts with a 100% promo code are booked",
|
|
6
|
+
"detail": "A Stripe checkout session in payment mode that a 100% promo code makes free is now booked like a paid one: the handler reads the session metadata in payment mode. Sessions created before the upgrade carry no session metadata and are still discarded."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.416.0",
|
|
4
10
|
"type": "improvement",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "0.418.0",
|
|
4
|
+
"type": "fix",
|
|
5
|
+
"title": "The tenant destruction sweep locks per tenant",
|
|
6
|
+
"detail": "Overlapping sweeps no longer push a tenant into `destroyFailed`. Each sweep takes a session advisory lock per tenant and skips tenants another sweep holds for that tick; failed stage attempts and abandoned stages are now logged with tenant and stage."
|
|
7
|
+
},
|
|
2
8
|
{
|
|
3
9
|
"version": "0.415.0",
|
|
4
10
|
"type": "fix",
|