@fantastic.dev/better-stripe 0.101.0 → 0.103.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.js +13 -1
- package/dist/client/billing/renewalAttach/internal/c10/appendAck.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts +23 -0
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js +34 -2
- package/dist/client/billing/renewalAttach/internal/c10/configureEvents.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.js +16 -0
- package/dist/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.js +117 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureAdmission.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts +53 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js +198 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.js +49 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureLineage.d.ts +959 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureLineage.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureLineage.js +115 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureLineage.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +2 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +4 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.js +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/lineageAuthority.js.map +1 -1
- package/docs/renewal-context-reads.md +81 -3
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/c10/appendAck.ts +17 -0
- package/src/client/billing/renewalAttach/internal/c10/configureEvents.ts +45 -2
- package/src/client/billing/renewalAttach/internal/producer/classOwnedActionRoot.ts +21 -0
- package/src/client/billing/renewalAttach/internal/producer/configureAdmission.ts +179 -0
- package/src/client/billing/renewalAttach/internal/producer/configureJournalData.ts +248 -0
- package/src/client/billing/renewalAttach/internal/producer/configureJournalWork.ts +53 -0
- package/src/client/billing/renewalAttach/internal/producer/configureLineage.ts +166 -0
- package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +13 -0
- package/src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts +2 -0
- package/src/client/billing/renewalAttach/internal/producer/producerConfigureAdmission.integration.test.ts +203 -0
- package/src/client/billing/renewalAttach/internal/producer/producerConfigureChannelControls.integration.test.ts +542 -0
- package/src/client/billing/renewalAttach/internal/producer/producerConfigureChannels.integration.test.ts +321 -0
- package/src/client/billing/renewalAttach/internal/producer/producerConfigureControls.integration.test.ts +566 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/producerConfigureAdmission.ts +353 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/producerInitialOperation.ts +61 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureLineage.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/configureLineage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EACL,6BAA6B,EAK9B,MAAM,2BAA2B,CAAC;AAEnC,KAAK,MAAM,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,KAAK,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,KAAK,CAAC;CAC7B,CAAC,CAAC;AACH,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACnC,eAAe,EAAE,UAAU,CAAC,OAAO,mCAAmC,CAAC,CAAC;IACxE,QAAQ,EAAE,UAAU,CAAC,OAAO,8BAA8B,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYjD"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { consumeInitialClassReservation } from "../operationJournal.js";
|
|
2
|
+
import { readInitialLineage } from "./lineageAuthority.js";
|
|
3
|
+
import { readAttachAcknowledgementForLineage } from "./attachAcknowledgement.js";
|
|
4
|
+
import { ownerForInitialLineage } from "./ownerFactory.js";
|
|
5
|
+
import { journalWorkForInitialLineage } from "./journalWorkFactory.js";
|
|
6
|
+
import { checkConfigureJournalAssociation } from "./classOwnedActionRoot.js";
|
|
7
|
+
import { captureConfigureSource } from "../c10/eventCapture.js";
|
|
8
|
+
import { canonicalInitialBasis } from "../../../../../shared/renewalOperationJournal.js";
|
|
9
|
+
import { closed } from "../operations/types.js";
|
|
10
|
+
import { captureOperationalReservation, matchConfigureDATA, requireConfigure, object, text, } from "./configureJournalData.js";
|
|
11
|
+
const lineages = new WeakMap();
|
|
12
|
+
/** Original fresh CAS custody is spent before admission reflection or awaits. */
|
|
13
|
+
export function consumeConfigureLineage(parentToken, call, journal, arity) {
|
|
14
|
+
const consumed = consumeInitialClassReservation(call, journal);
|
|
15
|
+
requireConfigure(arity === 2);
|
|
16
|
+
const parent = readInitialLineage(parentToken);
|
|
17
|
+
const acknowledgement = readAttachAcknowledgementForLineage(parentToken);
|
|
18
|
+
const owner = ownerForInitialLineage(parentToken);
|
|
19
|
+
owner.check();
|
|
20
|
+
checkConfigureJournalAssociation(parent.binding, consumed.binding);
|
|
21
|
+
const reservation = captureOperationalReservation(consumed.reservation, "configure");
|
|
22
|
+
const parentReservation = captureOperationalReservation(parent.reservation, "attach");
|
|
23
|
+
const original = object(JSON.parse(reservation.recordJSON));
|
|
24
|
+
const parentOriginal = object(JSON.parse(parentReservation.recordJSON));
|
|
25
|
+
const source = closed(original.configureRecord, [
|
|
26
|
+
"configuration",
|
|
27
|
+
"request",
|
|
28
|
+
"attachReceipt",
|
|
29
|
+
"originalBundle",
|
|
30
|
+
]);
|
|
31
|
+
const configuration = captureConfigureSource(source.configuration);
|
|
32
|
+
matchConfigureDATA(source.configuration, configuration);
|
|
33
|
+
const receipt = object(acknowledgement.receipt);
|
|
34
|
+
const receiptJSON = JSON.stringify(acknowledgement.receipt);
|
|
35
|
+
const receiptBinding = text(receipt.binding);
|
|
36
|
+
matchConfigureDATA(original.parentAttachment, {
|
|
37
|
+
operationId: parentReservation.operationId,
|
|
38
|
+
attemptId: parentReservation.attemptId,
|
|
39
|
+
sourcePayloadId: parentReservation.payloadId,
|
|
40
|
+
receiptBinding,
|
|
41
|
+
});
|
|
42
|
+
matchConfigureDATA(source.attachReceipt, acknowledgement.receipt);
|
|
43
|
+
matchConfigureDATA(configuration.attachReceipt.attachRequest, parentOriginal.attachRequest);
|
|
44
|
+
matchConfigureDATA(source.originalBundle, parentOriginal.originalBundle);
|
|
45
|
+
matchConfigureDATA(original.account, parentOriginal.account);
|
|
46
|
+
requireConfigure(original.apiVersion === parentOriginal.apiVersion);
|
|
47
|
+
const policy = object(JSON.parse(reservation.timingPolicyJSON));
|
|
48
|
+
const parentPolicy = object(JSON.parse(parentReservation.timingPolicyJSON));
|
|
49
|
+
for (const key of ["workEndWallMs", "endWallMs", "periodStart", "periodEnd"])
|
|
50
|
+
requireConfigure(policy[key] === parentPolicy[key]);
|
|
51
|
+
const basis = canonicalInitialBasis(reservation.timingPolicyJSON, parent.basisJSON);
|
|
52
|
+
requireConfigure(basis.basisJSON === parent.basisJSON);
|
|
53
|
+
const token = Object.freeze({
|
|
54
|
+
owner,
|
|
55
|
+
basisJSON: parent.basisJSON,
|
|
56
|
+
operationalAuthority: false,
|
|
57
|
+
});
|
|
58
|
+
lineages.set(token, {
|
|
59
|
+
phase: "pending",
|
|
60
|
+
parentToken,
|
|
61
|
+
parent,
|
|
62
|
+
owner,
|
|
63
|
+
acknowledgement,
|
|
64
|
+
consumed,
|
|
65
|
+
reservation,
|
|
66
|
+
parentReservation,
|
|
67
|
+
configuration,
|
|
68
|
+
source,
|
|
69
|
+
original,
|
|
70
|
+
receiptJSON,
|
|
71
|
+
receiptBinding,
|
|
72
|
+
});
|
|
73
|
+
checkConfigureLineage(token);
|
|
74
|
+
return token;
|
|
75
|
+
}
|
|
76
|
+
/** Identity checks do not select a client, create an Owner or capture an origin. */
|
|
77
|
+
export function checkConfigureLineage(token) {
|
|
78
|
+
const state = lineages.get(token);
|
|
79
|
+
requireConfigure(state && state.phase !== "failed");
|
|
80
|
+
requireConfigure(readInitialLineage(state.parentToken) === state.parent);
|
|
81
|
+
state.owner.check();
|
|
82
|
+
checkConfigureJournalAssociation(state.parent.binding, state.consumed.binding);
|
|
83
|
+
const actual = readAttachAcknowledgementForLineage(state.parentToken);
|
|
84
|
+
requireConfigure(actual === state.acknowledgement &&
|
|
85
|
+
actual.receipt === state.acknowledgement.receipt &&
|
|
86
|
+
actual.output === state.acknowledgement.output);
|
|
87
|
+
requireConfigure(journalWorkForInitialLineage(state.parentToken).idle());
|
|
88
|
+
return state;
|
|
89
|
+
}
|
|
90
|
+
export function finishConfigureLineage(token) {
|
|
91
|
+
const state = checkConfigureLineage(token);
|
|
92
|
+
requireConfigure(state.phase === "pending");
|
|
93
|
+
state.phase = "ready";
|
|
94
|
+
return token;
|
|
95
|
+
}
|
|
96
|
+
export function closeConfigureLineage(token) {
|
|
97
|
+
const state = lineages.get(token);
|
|
98
|
+
if (state)
|
|
99
|
+
state.phase = "failed";
|
|
100
|
+
}
|
|
101
|
+
/** Trusted private consumers can only read a fully admitted original token. */
|
|
102
|
+
export function readConfigureLineage(token) {
|
|
103
|
+
const state = checkConfigureLineage(token);
|
|
104
|
+
requireConfigure(state.phase === "ready");
|
|
105
|
+
return Object.freeze({
|
|
106
|
+
parentToken: state.parentToken,
|
|
107
|
+
owner: state.owner,
|
|
108
|
+
parent: state.parent,
|
|
109
|
+
reservation: state.reservation,
|
|
110
|
+
originalReservation: state.consumed.reservation,
|
|
111
|
+
journal: state.consumed.journal,
|
|
112
|
+
configuration: state.configuration,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=configureLineage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureLineage.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/configureLineage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,qBAAqB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Admission } from "./configureAdmission.js";
|
|
1
2
|
import { captureLiveAttachRecovery } from "./recoveryEntry.js";
|
|
2
3
|
import { readAttachAcknowledgementForLineage } from "./attachAcknowledgement.js";
|
|
3
4
|
import { type InitialOwner } from "./ownerFactory.js";
|
|
@@ -20,6 +21,7 @@ export type InitialInvocationCore = Readonly<{
|
|
|
20
21
|
initialAttach(): ReturnType<typeof captureInitialAttachForLineage>;
|
|
21
22
|
recoverAttach(): ReturnType<typeof captureLiveAttachRecovery>;
|
|
22
23
|
attachAcknowledgement(): ReturnType<typeof readAttachAcknowledgementForLineage>;
|
|
24
|
+
admitConfigure(call: unknown, journal: unknown): ReturnType<typeof captureConfigureAdmission>;
|
|
23
25
|
operationalAuthority: false;
|
|
24
26
|
}>;
|
|
25
27
|
/** Node-only private construction. Does not admit an operational runtime profile. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocationProducer.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/invocationProducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"invocationProducer.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/invocationProducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,gCAAgC,E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{ mintInitialLineage, readInitialLineage } from "./lineageAuthority.js";
|
|
2
3
|
import { captureLiveAttachRecovery } from "./recoveryEntry.js";
|
|
3
4
|
import { readAttachAcknowledgementForLineage } from "./attachAcknowledgement.js";
|
|
@@ -76,6 +77,9 @@ export async function captureInitialInvocationCore(call, journal) {
|
|
|
76
77
|
throw Error("INITIAL_OPERATION_UNBOUND");
|
|
77
78
|
return readAttachAcknowledgementForLineage(token);
|
|
78
79
|
},
|
|
80
|
+
admitConfigure(call, journal) {
|
|
81
|
+
return captureConfigureAdmission(token, call, journal, arguments.length);
|
|
82
|
+
},
|
|
79
83
|
operationalAuthority: false,
|
|
80
84
|
});
|
|
81
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocationProducer.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/invocationProducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAqB,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EACL,4BAA4B,GAE7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"invocationProducer.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewal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AC;QACf,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { consumeInitialClassReservation } from "../operationJournal.js";
|
|
|
3
3
|
import { captureInitialJournalSelection } from "./classOwnedActionRoot.js";
|
|
4
4
|
type Lineage = Readonly<{
|
|
5
5
|
originAssociation: object;
|
|
6
|
+
binding: object;
|
|
6
7
|
journal: ReturnType<typeof consumeInitialClassReservation>["journal"];
|
|
7
8
|
reservation: ReturnType<typeof consumeInitialClassReservation>["reservation"];
|
|
8
9
|
selection: ReturnType<typeof captureInitialJournalSelection>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineageAuthority.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAgB3E,KAAK,OAAO,GAAG,QAAQ,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC;IACtE,WAAW,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC,aAAa,CAAC,CAAC;IAC9E,SAAS,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,QAAQ,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,QAAQ,CAAC;QACf,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,MAAM,CAAC;CACzB,CAAC,CAAC;AAGH,iFAAiF;AACjF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"lineageAuthority.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAgB3E,KAAK,OAAO,GAAG,QAAQ,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC;IACtE,WAAW,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC,aAAa,CAAC,CAAC;IAC9E,SAAS,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,QAAQ,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,QAAQ,CAAC;QACf,iBAAiB,EAAE,MAAM,CAAC;QAC1B,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,IAAI,EAAE,MAAM,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,MAAM,CAAC;CACzB,CAAC,CAAC;AAGH,iFAAiF;AACjF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,CAkGR;AAED,mEAAmE;AACnE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAYzD"}
|
|
@@ -72,6 +72,7 @@ export function mintInitialLineage(call, journal, arity) {
|
|
|
72
72
|
const token = Object.freeze(new InitialLineage());
|
|
73
73
|
lineages.set(token, Object.freeze({
|
|
74
74
|
originAssociation: Object.freeze(new InitialOrigin()),
|
|
75
|
+
binding,
|
|
75
76
|
journal: originalJournal,
|
|
76
77
|
reservation,
|
|
77
78
|
selection,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineageAuthority.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,MAAM,MAAM,GAAG,MAAM,CAAC,wBAAwB,CAC5C,MAAM,CAAC,SAAS,EAChB,YAAY,CACb,EAAE,KAAK,CAAC;AACT,MAAM,GAAG,GAAG,qBAAqB,CAAC;AAClC,SAAS,IAAI;IACX,MAAM,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACzC,CAAC;AACD,MAAM,EAAE,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAExE,iFAAiF;AACjF,MAAM,cAAc;CAAG;AACvB,MAAM,aAAa;CAAG;
|
|
1
|
+
{"version":3,"file":"lineageAuthority.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/lineageAuthority.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AAEzF,MAAM,MAAM,GAAG,MAAM,CAAC,wBAAwB,CAC5C,MAAM,CAAC,SAAS,EAChB,YAAY,CACb,EAAE,KAAK,CAAC;AACT,MAAM,GAAG,GAAG,qBAAqB,CAAC;AAClC,SAAS,IAAI;IACX,MAAM,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACzC,CAAC;AACD,MAAM,EAAE,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAExE,iFAAiF;AACjF,MAAM,cAAc;CAAG;AACvB,MAAM,aAAa;CAAG;AA2BtB,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAmB,CAAC;AAEhD,iFAAiF;AACjF,MAAM,UAAU,kBAAkB,CAChC,IAAa,EACb,OAAgB,EAChB,KAAa;IAEb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AAC;IAClD,QAAQ,CAAC,GAAG,CACV,KAAK,EACL,MAAM,CAAC,MAAM,CAAC;QACZ,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,aAAa,EAAE,CAAC;QACrD,OAAO;QACP,OAAO,EAAE,eAAe;QACxB,WAAW;QACX,SAAS;QACT,MAAM,EAAE,MAAgB;QACxB,MAAM,EAAE,MAA8B;QACtC,KAAK;QACL,SAAS;QACT,aAAa,EAAE,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;YAC3C,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC;QACF,IAAI;QACJ,SAAS;KACV,CAAC,CACH,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,mEAAmE;AACnE,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO;QAAE,IAAI,EAAE,CAAC;IACrB,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IAC1B,IACE,MAAM,CAAC,wBAAwB,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,KAAK;QACpE,OAAO,CAAC,MAAM;QAChB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC;QAClE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,SAAS;QAE1D,IAAI,EAAE,CAAC;IACT,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -219,12 +219,90 @@ changed predicates, removed class eligibility, copied DATA or unknown lineage
|
|
|
219
219
|
identities refuse. The same checks apply to cached views, and separate SDK roots
|
|
220
220
|
retain distinct output and receipt identities.
|
|
221
221
|
|
|
222
|
-
This reader
|
|
223
|
-
receipt.
|
|
224
|
-
|
|
222
|
+
This reader supplies private configure admission with the actual attachment
|
|
223
|
+
receipt. Admission uses a separately authorized stage operation and request/key.
|
|
224
|
+
Configure execution still requires its channels, transport, actors and complete
|
|
225
|
+
journal integration. The internal return record
|
|
225
226
|
does not establish delivery to a disconnected caller, qualify a provider profile
|
|
226
227
|
or create a public scheduling entrypoint.
|
|
227
228
|
|
|
229
|
+
## Private configure admission
|
|
230
|
+
|
|
231
|
+
The private initial invocation core accepts `admitConfigure(call, journal)` only
|
|
232
|
+
with the original winning child reservation call and its actual class-bound
|
|
233
|
+
journal. It spends that call before checking arity or parent custody. The parent
|
|
234
|
+
comes from the core's closure; callers cannot replace its Owner, receipt, ACK,
|
|
235
|
+
client, selector, clocks or basis. A copied admission view cannot reconstruct the
|
|
236
|
+
private identity.
|
|
237
|
+
|
|
238
|
+
Admission requires the actual returned attachment ACK from initial completion,
|
|
239
|
+
replay or no-POST resumption. A published receipt whose reply is still pending is
|
|
240
|
+
insufficient. The parent and child journals must share the actual checked SDK
|
|
241
|
+
root, root cell and component. Each retains its own checked Action receiver and
|
|
242
|
+
RPC pointers; different genuine Action contexts are supported.
|
|
243
|
+
|
|
244
|
+
The child retains the exact parent Owner, selected client, origin association,
|
|
245
|
+
clock functions and original basis. Admission performs no new selection, Owner
|
|
246
|
+
construction or origin capture. Normal Owner checks still sample its original
|
|
247
|
+
clocks. Complete C3/C6/C7 source, parent history and retained acknowledgement DATA
|
|
248
|
+
must agree, including typed dispatch/response contents before event hashing.
|
|
249
|
+
Every used reservation, load, history, event, acknowledgement and binding reply
|
|
250
|
+
receives complete bounded runtime DATA checks against the current source
|
|
251
|
+
contract. Generated attachment-only declarations and reference identities stay
|
|
252
|
+
unchanged; these checks do not establish genuine generation or deployed
|
|
253
|
+
compatibility.
|
|
254
|
+
|
|
255
|
+
The actual child basis transaction must commit and return its complete matching
|
|
256
|
+
descriptor. Reads after binding require the original basis, head zero and no
|
|
257
|
+
known child ACK. The no-ACK read precedes the final head read; no later journal
|
|
258
|
+
await precedes readiness. This is a read fence, with no atomic lock against
|
|
259
|
+
subsequent journal changes. Future execution must check its frontier again.
|
|
260
|
+
Owner retirement rejects a pending admission even if its basis mutation has
|
|
261
|
+
committed; retained DATA and failed or lost replies cannot remint the consumed
|
|
262
|
+
call.
|
|
263
|
+
|
|
264
|
+
The result is an opaque private view containing `owner`, `basisJSON` and
|
|
265
|
+
`operationalAuthority: false`. The separate private C10 factory below can use
|
|
266
|
+
that identity. Configure transport, preflight/write actors and public scheduling
|
|
267
|
+
remain required, as do genuine generation and operational qualification.
|
|
268
|
+
Production Source profile arrays remain empty.
|
|
269
|
+
|
|
270
|
+
## Private configure C10 channel
|
|
271
|
+
|
|
272
|
+
`createAdmittedConfigureEventCompiler(token)` accepts only the actual admitted
|
|
273
|
+
child identity. It captures one configure channel, including when capture fails;
|
|
274
|
+
callers cannot replace its source, sender, Owner or options. Copied views and
|
|
275
|
+
proxy identities cannot create another channel. The retained raw C6 configuration
|
|
276
|
+
supplies its source. The compiler reconstructs C7 dispatch and complete C9 receipt
|
|
277
|
+
DATA and compares each event before appending sequences 1 through 3 to the child
|
|
278
|
+
attempt. The parent attachment history remains separate.
|
|
279
|
+
|
|
280
|
+
The channel derives the canonical Owner from the original parent token. A fixed
|
|
281
|
+
synchronous child guard adds binding and custody checks at every channel gate,
|
|
282
|
+
including after hashing and around append/ACK handling and awaits. The guard
|
|
283
|
+
must return undefined; asynchronous or other non-void results refuse. It cannot
|
|
284
|
+
replace the Owner checks or retirement subscription. The guarded parent kernel
|
|
285
|
+
stays independent of configure lineage code, preserving the existing legacy
|
|
286
|
+
compiler and avoiding an import cycle.
|
|
287
|
+
|
|
288
|
+
The sender receives the exact original reservation object from the actual child
|
|
289
|
+
CAS and uses its original class-bound journal. A captured DATA copy is
|
|
290
|
+
insufficient. The actual component append must commit and return its matching
|
|
291
|
+
complete reply before C10 acknowledgement. Per-child work tracking follows the
|
|
292
|
+
actual append RPC promise independently of a channel timeout. A timed-out channel
|
|
293
|
+
can remain closed while a committed mutation reply is still pending. Late replies
|
|
294
|
+
cannot reopen it. Separate child and SDK-root channels retain their own sequence,
|
|
295
|
+
work and retirement state.
|
|
296
|
+
|
|
297
|
+
C10 append acknowledgement establishes DATA consistency only. Dispatch intent,
|
|
298
|
+
a committed response or receipt event, and a retained C9 do not establish provider
|
|
299
|
+
custody, returned configure ACK custody, pending/effective replacement or fresh
|
|
300
|
+
dispatch permission. Receipt retention remains a separate operation; a future
|
|
301
|
+
configure completion pipeline must retain the complete C9 before publishing
|
|
302
|
+
receipt event 3 and returning its actual acknowledgement. Future execution also
|
|
303
|
+
requires its own frontier checks. This channel factory supplies no provider
|
|
304
|
+
transport or preflight/write actor and activates no operational Source profile.
|
|
305
|
+
|
|
228
306
|
## Component operation journal
|
|
229
307
|
|
|
230
308
|
The component's `renewalOperations` functions retain host-authorized operation
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Stage and append share one irreversible latch and the same original owner. */
|
|
2
|
+
import { types } from "node:util";
|
|
2
3
|
import { SOURCE_OWNER } from "./ownerBinding.js";
|
|
3
4
|
import { ownerForInitialLineage } from "../producer/ownerFactory.js";
|
|
4
5
|
import {
|
|
@@ -24,9 +25,23 @@ export function createStageChannel(raw: unknown) {
|
|
|
24
25
|
export function createInitialStageChannel(token: object, raw: unknown) {
|
|
25
26
|
return stageChannel(raw, ownerForInitialLineage(token));
|
|
26
27
|
}
|
|
28
|
+
/** A fixed internal guard can add checks, never replace the canonical Owner. */
|
|
29
|
+
export function createGuardedInitialStageChannel(
|
|
30
|
+
token: object,
|
|
31
|
+
raw: unknown,
|
|
32
|
+
guard: () => unknown,
|
|
33
|
+
) {
|
|
34
|
+
need(
|
|
35
|
+
arguments.length === 3 &&
|
|
36
|
+
typeof guard === "function" &&
|
|
37
|
+
!types.isProxy(guard),
|
|
38
|
+
);
|
|
39
|
+
return stageChannel(raw, ownerForInitialLineage(token), guard);
|
|
40
|
+
}
|
|
27
41
|
function stageChannel(
|
|
28
42
|
raw: unknown,
|
|
29
43
|
owner: Pick<typeof SOURCE_OWNER, "basis" | "check" | "subscribe">,
|
|
44
|
+
guard?: () => unknown,
|
|
30
45
|
) {
|
|
31
46
|
let closedChannel = false,
|
|
32
47
|
unsubscribe = () => {},
|
|
@@ -44,7 +59,9 @@ function stageChannel(
|
|
|
44
59
|
const gate = (): Time => {
|
|
45
60
|
try {
|
|
46
61
|
need(!closedChannel);
|
|
62
|
+
if (guard) need(guard() === undefined);
|
|
47
63
|
const t = owner.check();
|
|
64
|
+
if (guard) need(guard() === undefined);
|
|
48
65
|
need(
|
|
49
66
|
basis &&
|
|
50
67
|
Number.isSafeInteger(basis.startWallMs) &&
|
|
@@ -12,13 +12,56 @@ import {
|
|
|
12
12
|
captureConfigureReceipt,
|
|
13
13
|
} from "./eventCapture.js";
|
|
14
14
|
import { materialize } from "./eventCodec.js";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
createStageChannel,
|
|
17
|
+
createGuardedInitialStageChannel,
|
|
18
|
+
} from "./appendAck.js";
|
|
19
|
+
import { readConfigureLineage } from "../producer/configureLineage.js";
|
|
20
|
+
import { journalWorkForConfigureLineage } from "../producer/configureJournalWork.js";
|
|
16
21
|
import {
|
|
17
22
|
projectRenewalConfigurationV2,
|
|
18
23
|
constructRenewalConfigurationReceiptV2,
|
|
19
24
|
} from "./publicApi.js";
|
|
20
25
|
export function createConfigureEventCompiler(raw: unknown, options: unknown) {
|
|
21
|
-
|
|
26
|
+
return configureEventCompiler(raw, createStageChannel(options));
|
|
27
|
+
}
|
|
28
|
+
const admittedChannels = new WeakSet<object>();
|
|
29
|
+
/** One exact admitted child, without replacement source, sender or Owner inputs. */
|
|
30
|
+
export function createAdmittedConfigureEventCompiler(token: object) {
|
|
31
|
+
if (typeof token !== "object" || token === null)
|
|
32
|
+
throw Error("CONFIGURE_CHANNEL_UNBOUND");
|
|
33
|
+
if (admittedChannels.has(token)) throw Error("CONFIGURE_CHANNEL_CONSUMED");
|
|
34
|
+
admittedChannels.add(token);
|
|
35
|
+
if (arguments.length !== 1) throw Error("CONFIGURE_CHANNEL_UNBOUND");
|
|
36
|
+
const lineage = readConfigureLineage(token);
|
|
37
|
+
const send = journalWorkForConfigureLineage(token).captureSend();
|
|
38
|
+
const guard = () => {
|
|
39
|
+
readConfigureLineage(token);
|
|
40
|
+
};
|
|
41
|
+
const channel = createGuardedInitialStageChannel(
|
|
42
|
+
lineage.parentToken,
|
|
43
|
+
{
|
|
44
|
+
timeoutMs: 5000,
|
|
45
|
+
send(
|
|
46
|
+
record: Parameters<typeof send>[0],
|
|
47
|
+
ack: Parameters<typeof send>[1],
|
|
48
|
+
) {
|
|
49
|
+
guard();
|
|
50
|
+
return send(record, (value) => {
|
|
51
|
+
guard();
|
|
52
|
+
ack(value);
|
|
53
|
+
guard();
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
guard,
|
|
58
|
+
);
|
|
59
|
+
return configureEventCompiler(lineage.configuration, channel);
|
|
60
|
+
}
|
|
61
|
+
function configureEventCompiler(
|
|
62
|
+
raw: unknown,
|
|
63
|
+
channel: ReturnType<typeof createStageChannel>,
|
|
64
|
+
) {
|
|
22
65
|
let source: ReturnType<typeof captureConfigureSource>;
|
|
23
66
|
try {
|
|
24
67
|
channel.gate();
|
|
@@ -391,3 +391,24 @@ export function captureInitialJournalSelection(
|
|
|
391
391
|
},
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
|
+
|
|
395
|
+
/** Same maintained SDK root; each Action retains its own checked RPC pointers. */
|
|
396
|
+
export function checkConfigureJournalAssociation(
|
|
397
|
+
parent: object,
|
|
398
|
+
child: object,
|
|
399
|
+
): void {
|
|
400
|
+
if (arguments.length !== 2) journalUnbound();
|
|
401
|
+
readCheckedJournalActionRPC(parent);
|
|
402
|
+
readCheckedJournalActionRPC(child);
|
|
403
|
+
const original = journalBindings.get(parent);
|
|
404
|
+
const next = journalBindings.get(child);
|
|
405
|
+
if (
|
|
406
|
+
!original ||
|
|
407
|
+
!next ||
|
|
408
|
+
original.root !== next.root ||
|
|
409
|
+
original.cell !== next.cell ||
|
|
410
|
+
original.rpc.component !== next.rpc.component ||
|
|
411
|
+
original.rpc.operationId === next.rpc.operationId
|
|
412
|
+
)
|
|
413
|
+
journalUnbound();
|
|
414
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import {
|
|
2
|
+
captureAttachDispatch,
|
|
3
|
+
captureAttachResponse,
|
|
4
|
+
captureAttachReceipt,
|
|
5
|
+
} from "../c10/eventCapture.js";
|
|
6
|
+
import { reconstructConfigurationV2 } from "../../../renewalV2/index.js";
|
|
7
|
+
import { canonicalJournalEvent } from "../../../../../shared/renewalOperationJournal.js";
|
|
8
|
+
import { ownedAwaitForInitialLineage } from "./ownedAwaitFactory.js";
|
|
9
|
+
import { closed } from "../operations/types.js";
|
|
10
|
+
import {
|
|
11
|
+
consumeConfigureLineage,
|
|
12
|
+
checkConfigureLineage,
|
|
13
|
+
finishConfigureLineage,
|
|
14
|
+
closeConfigureLineage,
|
|
15
|
+
} from "./configureLineage.js";
|
|
16
|
+
import {
|
|
17
|
+
checkOperationLoad,
|
|
18
|
+
checkEmptyConfigureHistory,
|
|
19
|
+
configureBasisDescriptor,
|
|
20
|
+
captureParentHistory,
|
|
21
|
+
checkParentAcknowledgement,
|
|
22
|
+
matchConfigureDATA,
|
|
23
|
+
requireConfigure,
|
|
24
|
+
object,
|
|
25
|
+
text,
|
|
26
|
+
} from "./configureJournalData.js";
|
|
27
|
+
|
|
28
|
+
/** Bind actual child custody to the live parent's exact basis; no execution profile. */
|
|
29
|
+
export async function captureConfigureAdmission(
|
|
30
|
+
parentToken: object,
|
|
31
|
+
call: unknown,
|
|
32
|
+
journal: unknown,
|
|
33
|
+
arity: number,
|
|
34
|
+
) {
|
|
35
|
+
const token = consumeConfigureLineage(parentToken, call, journal, arity);
|
|
36
|
+
const state = checkConfigureLineage(token);
|
|
37
|
+
const owned = ownedAwaitForInitialLineage(parentToken);
|
|
38
|
+
async function checked<T>(work: () => T | PromiseLike<T>): Promise<T> {
|
|
39
|
+
checkConfigureLineage(token);
|
|
40
|
+
const result = await owned(work);
|
|
41
|
+
checkConfigureLineage(token);
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
async function parentFrontier() {
|
|
45
|
+
checkOperationLoad(
|
|
46
|
+
await checked(() => state.parent.journal.loadAuthorizedOperation()),
|
|
47
|
+
state.parentReservation,
|
|
48
|
+
state.parent.basisJSON,
|
|
49
|
+
);
|
|
50
|
+
const events = captureParentHistory(
|
|
51
|
+
await checked(() =>
|
|
52
|
+
state.parent.journal.readAttempt({
|
|
53
|
+
attemptId: state.parentReservation.attemptId,
|
|
54
|
+
}),
|
|
55
|
+
),
|
|
56
|
+
state.parentReservation,
|
|
57
|
+
);
|
|
58
|
+
for (const descriptor of events) {
|
|
59
|
+
const raw: unknown = await checked(() =>
|
|
60
|
+
state.parent.journal.readStageEvent({
|
|
61
|
+
attemptId: state.parentReservation.attemptId,
|
|
62
|
+
sequence: descriptor.sequence,
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
const event = closed(raw, [...Object.keys(descriptor), "dataJSON"]);
|
|
66
|
+
const dataJSON = text(event.dataJSON);
|
|
67
|
+
const parsed: unknown = JSON.parse(dataJSON);
|
|
68
|
+
const receipt = object(state.acknowledgement.receipt);
|
|
69
|
+
// Typed privacy/bounds capture and complete C3 equality precede hashing.
|
|
70
|
+
if (descriptor.sequence === 1) {
|
|
71
|
+
captureAttachDispatch(parsed);
|
|
72
|
+
matchConfigureDATA(parsed, {
|
|
73
|
+
event: "dispatch",
|
|
74
|
+
stage: "attach",
|
|
75
|
+
request: receipt.request,
|
|
76
|
+
});
|
|
77
|
+
} else if (descriptor.sequence === 2) {
|
|
78
|
+
captureAttachResponse(parsed);
|
|
79
|
+
const response = object(parsed);
|
|
80
|
+
matchConfigureDATA(parsed, {
|
|
81
|
+
event: "response",
|
|
82
|
+
stage: "attach",
|
|
83
|
+
request: receipt.request,
|
|
84
|
+
body: receipt.providerSnapshot,
|
|
85
|
+
status: response.status,
|
|
86
|
+
});
|
|
87
|
+
} else {
|
|
88
|
+
captureAttachReceipt(parsed);
|
|
89
|
+
matchConfigureDATA(parsed, {
|
|
90
|
+
event: "receipt",
|
|
91
|
+
stage: "attach",
|
|
92
|
+
request: receipt.request,
|
|
93
|
+
receipt: state.acknowledgement.receipt,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const canonical = await checked(() =>
|
|
97
|
+
canonicalJournalEvent(descriptor.sequence, dataJSON),
|
|
98
|
+
);
|
|
99
|
+
requireConfigure(
|
|
100
|
+
canonical.json === dataJSON && canonical.binding === descriptor.binding,
|
|
101
|
+
);
|
|
102
|
+
matchConfigureDATA(raw, { ...descriptor, dataJSON });
|
|
103
|
+
}
|
|
104
|
+
checkParentAcknowledgement(
|
|
105
|
+
await checked(() => state.parent.journal.readProviderAcknowledgement()),
|
|
106
|
+
state.parentReservation,
|
|
107
|
+
events,
|
|
108
|
+
state.receiptJSON,
|
|
109
|
+
state.receiptBinding,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
async function childFrontier(allowUnbound: boolean) {
|
|
113
|
+
checkOperationLoad(
|
|
114
|
+
await checked(() => state.consumed.journal.loadAuthorizedOperation()),
|
|
115
|
+
state.reservation,
|
|
116
|
+
state.parent.basisJSON,
|
|
117
|
+
allowUnbound,
|
|
118
|
+
);
|
|
119
|
+
matchConfigureDATA(
|
|
120
|
+
await checked(() => state.consumed.journal.readProviderAcknowledgement()),
|
|
121
|
+
null,
|
|
122
|
+
);
|
|
123
|
+
// Best-effort frontier fence, not an atomic lock. No later journal await.
|
|
124
|
+
return checked(() =>
|
|
125
|
+
state.consumed.journal.readAttempt({
|
|
126
|
+
attemptId: state.reservation.attemptId,
|
|
127
|
+
}),
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
const rebuilt = await checked(() =>
|
|
132
|
+
reconstructConfigurationV2(state.configuration),
|
|
133
|
+
);
|
|
134
|
+
requireConfigure(rebuilt.material && "requestIdentity" in rebuilt.result);
|
|
135
|
+
const request = rebuilt.result;
|
|
136
|
+
matchConfigureDATA(state.source.request, request);
|
|
137
|
+
matchConfigureDATA(state.source.attachReceipt, rebuilt.material.receipt);
|
|
138
|
+
const { scope, apiVersion, method, path, payload, key, firstDispatchedAt } =
|
|
139
|
+
request;
|
|
140
|
+
matchConfigureDATA(state.original.dispatch, {
|
|
141
|
+
scope,
|
|
142
|
+
apiVersion,
|
|
143
|
+
method,
|
|
144
|
+
path,
|
|
145
|
+
payload,
|
|
146
|
+
key,
|
|
147
|
+
firstDispatchedAt,
|
|
148
|
+
});
|
|
149
|
+
requireConfigure(
|
|
150
|
+
state.reservation.requestBinding === request.requestIdentity.binding &&
|
|
151
|
+
state.reservation.key === key &&
|
|
152
|
+
state.reservation.apiVersion === apiVersion &&
|
|
153
|
+
state.reservation.firstDispatchedAt === firstDispatchedAt,
|
|
154
|
+
);
|
|
155
|
+
await parentFrontier();
|
|
156
|
+
checkEmptyConfigureHistory(await childFrontier(true), state.reservation);
|
|
157
|
+
const reply: unknown = await checked(() =>
|
|
158
|
+
state.consumed.journal.bindInitialBasis({
|
|
159
|
+
attemptId: state.reservation.attemptId,
|
|
160
|
+
policyJSON: state.reservation.timingPolicyJSON,
|
|
161
|
+
basisJSON: state.parent.basisJSON,
|
|
162
|
+
}),
|
|
163
|
+
);
|
|
164
|
+
matchConfigureDATA(reply, {
|
|
165
|
+
status: "bound",
|
|
166
|
+
operationId: state.reservation.operationId,
|
|
167
|
+
initialBasis: configureBasisDescriptor(
|
|
168
|
+
state.reservation,
|
|
169
|
+
state.parent.basisJSON,
|
|
170
|
+
),
|
|
171
|
+
});
|
|
172
|
+
await parentFrontier();
|
|
173
|
+
checkEmptyConfigureHistory(await childFrontier(false), state.reservation);
|
|
174
|
+
return finishConfigureLineage(token);
|
|
175
|
+
} catch (error) {
|
|
176
|
+
closeConfigureLineage(token);
|
|
177
|
+
throw error;
|
|
178
|
+
}
|
|
179
|
+
}
|