@fantastic.dev/better-stripe 0.90.0 → 0.92.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.
Files changed (239) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +41 -0
  4. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -0
  5. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +187 -0
  6. package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -0
  7. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +2 -23
  8. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -1
  9. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +1 -112
  10. package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -1
  11. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +8 -3
  12. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -1
  13. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +1 -0
  14. package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -1
  15. package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +1 -1
  16. package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts +14 -0
  17. package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts.map +1 -0
  18. package/dist/client/billing/renewalAttach/internal/configure/actor.js +444 -0
  19. package/dist/client/billing/renewalAttach/internal/configure/actor.js.map +1 -0
  20. package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts +12 -0
  21. package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts.map +1 -0
  22. package/dist/client/billing/renewalAttach/internal/configure/capture.js +99 -0
  23. package/dist/client/billing/renewalAttach/internal/configure/capture.js.map +1 -0
  24. package/dist/client/billing/renewalAttach/internal/configure/output.d.ts +16 -0
  25. package/dist/client/billing/renewalAttach/internal/configure/output.d.ts.map +1 -0
  26. package/dist/client/billing/renewalAttach/internal/configure/output.js +274 -0
  27. package/dist/client/billing/renewalAttach/internal/configure/output.js.map +1 -0
  28. package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.d.ts +3 -0
  29. package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.d.ts.map +1 -0
  30. package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.js +61 -0
  31. package/dist/client/billing/renewalAttach/internal/configure/ownedContinuation.js.map +1 -0
  32. package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts +3 -0
  33. package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts.map +1 -0
  34. package/dist/client/billing/renewalAttach/internal/configure/replay.js +9 -0
  35. package/dist/client/billing/renewalAttach/internal/configure/replay.js.map +1 -0
  36. package/dist/client/billing/renewalAttach/internal/configure/request.d.ts +39 -0
  37. package/dist/client/billing/renewalAttach/internal/configure/request.d.ts.map +1 -0
  38. package/dist/client/billing/renewalAttach/internal/configure/request.js +245 -0
  39. package/dist/client/billing/renewalAttach/internal/configure/request.js.map +1 -0
  40. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +88 -0
  41. package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -0
  42. package/dist/client/billing/renewalAttach/internal/configure/transport.js +289 -0
  43. package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -0
  44. package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts +16 -0
  45. package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts.map +1 -0
  46. package/dist/client/billing/renewalAttach/internal/observation/actor.js +383 -0
  47. package/dist/client/billing/renewalAttach/internal/observation/actor.js.map +1 -0
  48. package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts +9 -0
  49. package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts.map +1 -0
  50. package/dist/client/billing/renewalAttach/internal/observation/capture.js +216 -0
  51. package/dist/client/billing/renewalAttach/internal/observation/capture.js.map +1 -0
  52. package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.d.ts +5 -0
  53. package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.d.ts.map +1 -0
  54. package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.js +11 -0
  55. package/dist/client/billing/renewalAttach/internal/observation/configureAcknowledgement.js.map +1 -0
  56. package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts +7 -0
  57. package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts.map +1 -0
  58. package/dist/client/billing/renewalAttach/internal/observation/profile.js +190 -0
  59. package/dist/client/billing/renewalAttach/internal/observation/profile.js.map +1 -0
  60. package/dist/client/billing/renewalAttach/internal/observation/record.d.ts +5 -0
  61. package/dist/client/billing/renewalAttach/internal/observation/record.d.ts.map +1 -0
  62. package/dist/client/billing/renewalAttach/internal/observation/record.js +317 -0
  63. package/dist/client/billing/renewalAttach/internal/observation/record.js.map +1 -0
  64. package/dist/client/billing/renewalAttach/internal/observation/types.d.ts +84 -0
  65. package/dist/client/billing/renewalAttach/internal/observation/types.d.ts.map +1 -0
  66. package/dist/client/billing/renewalAttach/internal/observation/types.js +27 -0
  67. package/dist/client/billing/renewalAttach/internal/observation/types.js.map +1 -0
  68. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts +18 -0
  69. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts.map +1 -0
  70. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js +229 -0
  71. package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js.map +1 -0
  72. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +163 -0
  73. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -0
  74. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +443 -0
  75. package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -0
  76. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
  77. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -0
  78. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +467 -0
  79. package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -0
  80. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +6 -0
  81. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -0
  82. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +59 -0
  83. package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -0
  84. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts +10 -0
  85. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts.map +1 -0
  86. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js +48 -0
  87. package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js.map +1 -0
  88. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts +20 -0
  89. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts.map +1 -0
  90. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js +44 -0
  91. package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js.map +1 -0
  92. package/dist/client/billing/renewalAttach/internal/operations/types.d.ts +42 -0
  93. package/dist/client/billing/renewalAttach/internal/operations/types.d.ts.map +1 -0
  94. package/dist/client/billing/renewalAttach/internal/operations/types.js +158 -0
  95. package/dist/client/billing/renewalAttach/internal/operations/types.js.map +1 -0
  96. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts +5 -0
  97. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts.map +1 -0
  98. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js +214 -0
  99. package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js.map +1 -0
  100. package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts +33 -0
  101. package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts.map +1 -0
  102. package/dist/client/billing/renewalAttach/internal/preflight/grammar.js +208 -0
  103. package/dist/client/billing/renewalAttach/internal/preflight/grammar.js.map +1 -0
  104. package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts +4 -0
  105. package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts.map +1 -0
  106. package/dist/client/billing/renewalAttach/internal/preflight/output.js +25 -0
  107. package/dist/client/billing/renewalAttach/internal/preflight/output.js.map +1 -0
  108. package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts +16 -0
  109. package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts.map +1 -0
  110. package/dist/client/billing/renewalAttach/internal/preflight/record.js +93 -0
  111. package/dist/client/billing/renewalAttach/internal/preflight/record.js.map +1 -0
  112. package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts +7 -0
  113. package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts.map +1 -0
  114. package/dist/client/billing/renewalAttach/internal/preflight/relations.js +153 -0
  115. package/dist/client/billing/renewalAttach/internal/preflight/relations.js.map +1 -0
  116. package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts +22 -0
  117. package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts.map +1 -0
  118. package/dist/client/billing/renewalAttach/internal/recovery/material.js +221 -0
  119. package/dist/client/billing/renewalAttach/internal/recovery/material.js.map +1 -0
  120. package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +8 -0
  121. package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -0
  122. package/dist/client/billing/renewalAttach/internal/recovery/output.js +101 -0
  123. package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -0
  124. package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +12 -0
  125. package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -0
  126. package/dist/client/billing/renewalAttach/internal/recovery/record.js +186 -0
  127. package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -0
  128. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +5 -0
  129. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -0
  130. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +498 -0
  131. package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -0
  132. package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +21 -0
  133. package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -0
  134. package/dist/client/billing/renewalAttach/internal/recovery/relation.js +119 -0
  135. package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -0
  136. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +16 -16
  137. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +32 -32
  138. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  139. package/dist/component/financialObservations/settlementHelpers.d.ts +3 -3
  140. package/dist/component/usage/allowance.fixtures.d.ts +16 -16
  141. package/dist/component/usageCredits/accounting.fixtures.d.ts +16 -16
  142. package/docs/renewal-context-reads.md +26 -8
  143. package/docs/renewal-material-observation.md +58 -0
  144. package/docs/renewal-phase-assembly.md +68 -0
  145. package/docs/renewal-raw-acquisition.md +19 -5
  146. package/package.json +1 -1
  147. package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +304 -0
  148. package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +2 -160
  149. package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +15 -3
  150. package/src/client/billing/renewalAttach/internal/configure/actor.ts +586 -0
  151. package/src/client/billing/renewalAttach/internal/configure/capture.ts +117 -0
  152. package/src/client/billing/renewalAttach/internal/configure/dispatch.integration.test.ts +32 -0
  153. package/src/client/billing/renewalAttach/internal/configure/limits.test.ts +510 -0
  154. package/src/client/billing/renewalAttach/internal/configure/order.integration.test.ts +207 -0
  155. package/src/client/billing/renewalAttach/internal/configure/output.ts +372 -0
  156. package/src/client/billing/renewalAttach/internal/configure/ownedContinuation.ts +56 -0
  157. package/src/client/billing/renewalAttach/internal/configure/ownership.integration.test.ts +148 -0
  158. package/src/client/billing/renewalAttach/internal/configure/replay.integration.test.ts +173 -0
  159. package/src/client/billing/renewalAttach/internal/configure/replay.ts +13 -0
  160. package/src/client/billing/renewalAttach/internal/configure/request.ts +312 -0
  161. package/src/client/billing/renewalAttach/internal/configure/transport.integration.test.ts +507 -0
  162. package/src/client/billing/renewalAttach/internal/configure/transport.ts +348 -0
  163. package/src/client/billing/renewalAttach/internal/observation/actor.ts +487 -0
  164. package/src/client/billing/renewalAttach/internal/observation/capture.ts +251 -0
  165. package/src/client/billing/renewalAttach/internal/observation/configureAcknowledgement.ts +20 -0
  166. package/src/client/billing/renewalAttach/internal/observation/observation.integration.test.ts +220 -0
  167. package/src/client/billing/renewalAttach/internal/observation/observationConfigureACK.integration.test.ts +36 -0
  168. package/src/client/billing/renewalAttach/internal/observation/observationConfigureACKControls.integration.test.ts +48 -0
  169. package/src/client/billing/renewalAttach/internal/observation/observationConfigureACKLifecycle.integration.test.ts +44 -0
  170. package/src/client/billing/renewalAttach/internal/observation/observationConfiguredHistory.integration.test.ts +34 -0
  171. package/src/client/billing/renewalAttach/internal/observation/observationRetirement.integration.test.ts +60 -0
  172. package/src/client/billing/renewalAttach/internal/observation/profile.ts +264 -0
  173. package/src/client/billing/renewalAttach/internal/observation/record.ts +408 -0
  174. package/src/client/billing/renewalAttach/internal/observation/types.ts +107 -0
  175. package/src/client/billing/renewalAttach/internal/operations/configureReadTransport.ts +285 -0
  176. package/src/client/billing/renewalAttach/internal/operations/defaultBindings.test.ts +69 -0
  177. package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +574 -0
  178. package/src/client/billing/renewalAttach/internal/operations/initialAttach.integration.test.ts +34 -0
  179. package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +535 -0
  180. package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +63 -0
  181. package/src/client/billing/renewalAttach/internal/operations/providerFailure.integration.test.ts +61 -0
  182. package/src/client/billing/renewalAttach/internal/operations/providerFailure.ts +66 -0
  183. package/src/client/billing/renewalAttach/internal/operations/sourceOperations.ts +50 -0
  184. package/src/client/billing/renewalAttach/internal/operations/transport.integration.test.ts +116 -0
  185. package/src/client/billing/renewalAttach/internal/operations/types.ts +223 -0
  186. package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.integration.test.ts +285 -0
  187. package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.ts +258 -0
  188. package/src/client/billing/renewalAttach/internal/preflight/configureReads.integration.test.ts +139 -0
  189. package/src/client/billing/renewalAttach/internal/preflight/grammar.ts +257 -0
  190. package/src/client/billing/renewalAttach/internal/preflight/output.ts +42 -0
  191. package/src/client/billing/renewalAttach/internal/preflight/owner.integration.test.ts +82 -0
  192. package/src/client/billing/renewalAttach/internal/preflight/preflight.integration.test.ts +354 -0
  193. package/src/client/billing/renewalAttach/internal/preflight/record.ts +127 -0
  194. package/src/client/billing/renewalAttach/internal/preflight/relations.ts +209 -0
  195. package/src/client/billing/renewalAttach/internal/recovery/material.ts +311 -0
  196. package/src/client/billing/renewalAttach/internal/recovery/output.ts +136 -0
  197. package/src/client/billing/renewalAttach/internal/recovery/record.ts +230 -0
  198. package/src/client/billing/renewalAttach/internal/recovery/recovery.integration.test.ts +463 -0
  199. package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +599 -0
  200. package/src/client/billing/renewalAttach/internal/recovery/relation.ts +175 -0
  201. package/src/client/billing/renewalAttach/internal/test-fixtures/attachEntries.ts +217 -0
  202. package/src/client/billing/renewalAttach/internal/test-fixtures/attachObservations.ts +226 -0
  203. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenario.ts +556 -0
  204. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioAssertions.ts +180 -0
  205. package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioBarriers.ts +144 -0
  206. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightAssertions.ts +122 -0
  207. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightBarriers.ts +330 -0
  208. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightControls.ts +139 -0
  209. package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightOperation.ts +513 -0
  210. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadNativeBaseline.ts +344 -0
  211. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadOperation.ts +278 -0
  212. package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadPort.ts +17 -0
  213. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteAssertions.ts +537 -0
  214. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteBarriers.ts +125 -0
  215. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDeclarations.ts +325 -0
  216. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDelegate.ts +38 -0
  217. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteHistory.ts +471 -0
  218. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteObservations.ts +515 -0
  219. package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteOperation.ts +587 -0
  220. package/src/client/billing/renewalAttach/internal/test-fixtures/observationAssertions.ts +211 -0
  221. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKAssertions.ts +115 -0
  222. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKDeclarations.ts +141 -0
  223. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleAssertions.ts +74 -0
  224. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleDeclarations.ts +79 -0
  225. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleInstrumentation.ts +207 -0
  226. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKLifecycleOperation.ts +494 -0
  227. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfigureACKOperation.ts +452 -0
  228. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryAssertions.ts +88 -0
  229. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryDeclarations.ts +170 -0
  230. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryNative.ts +99 -0
  231. package/src/client/billing/renewalAttach/internal/test-fixtures/observationConfiguredHistoryOperation.ts +411 -0
  232. package/src/client/billing/renewalAttach/internal/test-fixtures/observationDeclarations.ts +192 -0
  233. package/src/client/billing/renewalAttach/internal/test-fixtures/observationHTTP.ts +197 -0
  234. package/src/client/billing/renewalAttach/internal/test-fixtures/observationObservations.ts +269 -0
  235. package/src/client/billing/renewalAttach/internal/test-fixtures/observationOperation.ts +262 -0
  236. package/src/client/billing/renewalAttach/internal/test-fixtures/observationProbe.ts +319 -0
  237. package/src/client/billing/renewalAttach/internal/test-fixtures/ownedOperations.ts +94 -0
  238. package/src/client/billing/renewalAttach/internal/test-fixtures/sourceOperationPort.ts +16 -0
  239. package/src/client/billing/renewalAttach/internal/test-fixtures/stockHttp.ts +21 -0
@@ -0,0 +1,463 @@
1
+ import { it } from "vitest";
2
+ import assert from "node:assert/strict";
3
+ import { scenario } from "../test-fixtures/attachScenario.js";
4
+ import { data } from "../test-fixtures/attachScenarioBarriers.js";
5
+
6
+ it("actual owned explicit recovery G01-scalar", async () => {
7
+ const h = await scenario("G01-scalar");
8
+ try {
9
+ await h.runInitial();
10
+ const out = await h.invokeB();
11
+ h.assertAcknowledged(out);
12
+ h.assertBInnerOwnership();
13
+ h.assertWholeMetrics();
14
+ } finally {
15
+ await h.cleanup();
16
+ }
17
+ h.health();
18
+ });
19
+
20
+ it("actual owned explicit recovery G02-expanded", async () => {
21
+ const h = await scenario("G02-expanded");
22
+ try {
23
+ await h.runInitial();
24
+ const out = await h.invokeB();
25
+ h.assertAcknowledged(out);
26
+ assert.equal(typeof data(out.observation).schedule, "object");
27
+ assert.equal(data(out.observation).conflict, true);
28
+ h.assertBInnerOwnership();
29
+ } finally {
30
+ await h.cleanup();
31
+ }
32
+ h.health();
33
+ });
34
+
35
+ it("actual owned explicit recovery G03-consumed", async () => {
36
+ const h = await scenario("G03-consumed");
37
+ try {
38
+ await h.runInitial();
39
+ const captured = await h.captureB();
40
+ const out = await captured.invoke();
41
+ h.assertAcknowledged(out);
42
+ const before = h.effectCounts();
43
+ const second = await captured.invoke();
44
+ assert.equal(data(second).reason, "invocation_consumed");
45
+ assert.deepEqual(h.effectCounts(), before);
46
+ } finally {
47
+ await h.cleanup();
48
+ }
49
+ h.health();
50
+ });
51
+
52
+ it("actual owned explicit recovery G04-entry", async () => {
53
+ const h = await scenario("G04-entry");
54
+ try {
55
+ await h.runInitial();
56
+ const out = await h.invokeB();
57
+ assert.equal(out.status, "not_dispatched");
58
+ assert.equal(out.reason, "replay_coverage_missing");
59
+ assert.equal(h.bPosts(), 0);
60
+ assert.equal(h.bGetCount(), 0);
61
+ } finally {
62
+ await h.cleanup();
63
+ }
64
+ h.health();
65
+ });
66
+
67
+ it("actual owned explicit recovery G05-record", async () => {
68
+ const h = await scenario("G05-record");
69
+ try {
70
+ await h.runInitial();
71
+ await assert.rejects(h.invokeB(), { message: "INITIAL_ACTOR_STOP" });
72
+ assert.equal(h.bPosts(), 0);
73
+ assert.equal(h.bGetCount(), 0);
74
+ } finally {
75
+ await h.cleanup();
76
+ }
77
+ h.health();
78
+ });
79
+
80
+ it("actual owned explicit recovery G06-current", async () => {
81
+ const h = await scenario("G06-current");
82
+ try {
83
+ await h.runInitial();
84
+ const out = await h.invokeB();
85
+ assert.equal(out.status, "not_dispatched");
86
+ assert.equal(out.reason, "replay_material_unsupported");
87
+ assert.equal(h.bPosts(), 0);
88
+ assert.equal(h.bRecords().length, 0);
89
+ } finally {
90
+ await h.cleanup();
91
+ }
92
+ h.health();
93
+ });
94
+
95
+ it("SAME original Owner retirement at actual B ACK boundary", async () => {
96
+ const h = await scenario("G07-ACK");
97
+ try {
98
+ await h.runInitial();
99
+ const observed = h.observe(h.invokeB());
100
+ try {
101
+ await h.enterOrSettled("B_ACK", observed);
102
+ h.OWNER.retire();
103
+ const outcome = await observed;
104
+ assert(
105
+ outcome.ok === false || outcome.value.status === "fulfilled_unverified",
106
+ );
107
+ assert.equal(h.bPosts(), 0);
108
+ assert(h.bRecords().length < 3);
109
+ } finally {
110
+ h.release("B_ACK");
111
+ h.releaseAck();
112
+ await observed;
113
+ }
114
+ } finally {
115
+ await h.cleanup();
116
+ }
117
+ h.health();
118
+ });
119
+
120
+ it("SAME original Owner retirement at actual B C10 boundary", async () => {
121
+ const h = await scenario("G07-C10");
122
+ try {
123
+ await h.runInitial();
124
+ const observed = h.observe(h.invokeB());
125
+ try {
126
+ await h.enterOrSettled("B_DIGEST", observed);
127
+ h.OWNER.retire();
128
+ const outcome = await observed;
129
+ assert(
130
+ outcome.ok === false || outcome.value.status === "fulfilled_unverified",
131
+ );
132
+ assert.equal(h.bPosts(), 0);
133
+ assert(h.bRecords().length < 3);
134
+ } finally {
135
+ h.release("B_DIGEST");
136
+ h.releaseAck();
137
+ await observed;
138
+ }
139
+ } finally {
140
+ await h.cleanup();
141
+ }
142
+ h.health();
143
+ });
144
+
145
+ it("SAME original Owner retirement at actual B C2 boundary", async () => {
146
+ const h = await scenario("G07-C2");
147
+ try {
148
+ await h.runInitial();
149
+ const observed = h.observe(h.invokeB());
150
+ try {
151
+ await h.enterOrSettled("B_DIGEST", observed);
152
+ h.OWNER.retire();
153
+ const outcome = await observed;
154
+ assert(
155
+ outcome.ok === false || outcome.value.status === "fulfilled_unverified",
156
+ );
157
+ assert.equal(h.bPosts(), 0);
158
+ assert(h.bRecords().length < 3);
159
+ } finally {
160
+ h.release("B_DIGEST");
161
+ h.releaseAck();
162
+ await observed;
163
+ }
164
+ } finally {
165
+ await h.cleanup();
166
+ }
167
+ h.health();
168
+ });
169
+
170
+ it("SAME original Owner retirement at actual B C3 boundary", async () => {
171
+ const h = await scenario("G07-C3");
172
+ try {
173
+ await h.runInitial();
174
+ const observed = h.observe(h.invokeB());
175
+ try {
176
+ await h.enterOrSettled("B_DIGEST", observed);
177
+ h.OWNER.retire();
178
+ const outcome = await observed;
179
+ assert(
180
+ outcome.ok === false || outcome.value.status === "fulfilled_unverified",
181
+ );
182
+ assert.equal(h.bPosts(), 1);
183
+ assert(h.bRecords().length < 3);
184
+ } finally {
185
+ h.release("B_DIGEST");
186
+ h.releaseAck();
187
+ await observed;
188
+ }
189
+ } finally {
190
+ await h.cleanup();
191
+ }
192
+ h.health();
193
+ });
194
+
195
+ it("SAME original Owner retirement at actual B GET boundary", async () => {
196
+ const h = await scenario("G07-GET");
197
+ try {
198
+ await h.runInitial();
199
+ const observed = h.observe(h.invokeB());
200
+ try {
201
+ await h.enterOrSettled("B_GET", observed);
202
+ h.OWNER.retire();
203
+ const outcome = await observed;
204
+ assert(
205
+ outcome.ok === false || outcome.value.status === "fulfilled_unverified",
206
+ );
207
+ assert.equal(h.bPosts(), 0);
208
+ assert(h.bRecords().length < 3);
209
+ } finally {
210
+ h.release("B_GET");
211
+ h.releaseAck();
212
+ await observed;
213
+ }
214
+ } finally {
215
+ await h.cleanup();
216
+ }
217
+ h.health();
218
+ });
219
+
220
+ it("SAME original Owner retirement at actual B replay boundary", async () => {
221
+ const h = await scenario("G07-replay");
222
+ try {
223
+ await h.runInitial();
224
+ const observed = h.observe(h.invokeB());
225
+ try {
226
+ await h.enterOrSettled("B_DIGEST", observed);
227
+ h.OWNER.retire();
228
+ const outcome = await observed;
229
+ assert(
230
+ outcome.ok === false || outcome.value.status === "fulfilled_unverified",
231
+ );
232
+ assert.equal(h.bPosts(), 0);
233
+ assert(h.bRecords().length < 3);
234
+ } finally {
235
+ h.release("B_DIGEST");
236
+ h.releaseAck();
237
+ await observed;
238
+ }
239
+ } finally {
240
+ await h.cleanup();
241
+ }
242
+ h.health();
243
+ });
244
+
245
+ it("retirement at result observer before final Owner gate preserves opaque uncertainty", async () => {
246
+ const h = await scenario("G07-result");
247
+ try {
248
+ await h.runInitial();
249
+ const out = await h.invokeB();
250
+ assert.equal(out.status, "fulfilled_unverified");
251
+ assert.equal(h.bRecords().length, 3);
252
+ assert.equal(h.c3Entries(), 1);
253
+ assert(Object.prototype.hasOwnProperty.call(out, "quarantine"));
254
+ } finally {
255
+ await h.cleanup();
256
+ }
257
+ h.health();
258
+ });
259
+
260
+ it("actual owned explicit recovery G07-retire", async () => {
261
+ const h = await scenario("G07-retire");
262
+ try {
263
+ await h.runInitial();
264
+ const observed = h.observe(h.invokeB());
265
+ try {
266
+ await h.enterOrSettled("B_DIGEST", observed);
267
+ h.OWNER.retire();
268
+ const out = await observed;
269
+ assert.equal(out.ok, false);
270
+ assert(!out.ok);
271
+ assert.equal(h.bPosts(), 0);
272
+ assert.equal(h.bGetCount(), 0);
273
+ } finally {
274
+ h.release("B_DIGEST");
275
+ await observed;
276
+ }
277
+ } finally {
278
+ await h.cleanup();
279
+ }
280
+ h.health();
281
+ });
282
+
283
+ it("actual owned explicit recovery G08-ack", async () => {
284
+ const h = await scenario("G08-ack");
285
+ try {
286
+ await h.runInitial();
287
+ const observed = h.observe(h.invokeB());
288
+ try {
289
+ await h.enterOrSettled("B_ACK", observed);
290
+ const record = h.bRecords()[0];
291
+ assert.equal(record.binding, h.aRecords()[0].binding);
292
+ h.oldAck({ sequence: record.sequence, binding: record.binding });
293
+ assert.equal(h.bPosts(), 0);
294
+ h.releaseAck();
295
+ const out = await observed;
296
+ assert.equal(out.ok, true);
297
+ assert(out.ok);
298
+ h.assertAcknowledged(out.value);
299
+ } finally {
300
+ h.releaseAck();
301
+ await observed;
302
+ }
303
+ } finally {
304
+ await h.cleanup();
305
+ }
306
+ h.health();
307
+ });
308
+
309
+ it("actual owned explicit recovery G09-q", async () => {
310
+ const h = await scenario("G09-q");
311
+ try {
312
+ await h.runInitial();
313
+ const observed = h.observe(h.invokeB());
314
+ try {
315
+ await h.enterOrSettled("B_GET", observed);
316
+ assert(h.aQuarantine);
317
+ assert.equal(h.controlB().takePostQuarantine(h.aQuarantine), null);
318
+ assert.equal(h.pairB().capability.consumePostCatch(h.aReply), null);
319
+ h.release("B_GET");
320
+ const out = await observed;
321
+ assert.equal(out.ok, true);
322
+ assert(out.ok);
323
+ h.assertAcknowledged(out.value);
324
+ } finally {
325
+ h.release("B_GET");
326
+ await observed;
327
+ }
328
+ } finally {
329
+ await h.cleanup();
330
+ }
331
+ h.health();
332
+ });
333
+
334
+ it("actual owned explicit recovery G10-delivery", async () => {
335
+ const h = await scenario("G10-delivery");
336
+ try {
337
+ await h.runInitial();
338
+ const observed = h.observe(h.invokeB());
339
+ try {
340
+ await h.enterOrSettled("B_DIGEST", observed);
341
+ h.mutateUnusedDelivery();
342
+ h.release("B_DIGEST");
343
+ const out = await observed;
344
+ assert.equal(out.ok, true);
345
+ assert(out.ok);
346
+ h.assertAcknowledged(out.value);
347
+ h.assertBInnerOwnership();
348
+ } finally {
349
+ h.release("B_DIGEST");
350
+ await observed;
351
+ }
352
+ } finally {
353
+ await h.cleanup();
354
+ }
355
+ h.health();
356
+ });
357
+
358
+ it("actual owned explicit recovery G11-rejected", async () => {
359
+ const h = await scenario("G11-rejected");
360
+ try {
361
+ await h.runInitial();
362
+ const observed = h.observe(h.invokeB());
363
+ try {
364
+ await h.enterOrSettled("B_GET", observed);
365
+ assert(h.aToken);
366
+ assert.equal(h.controlB().forward(h.aToken), null);
367
+ h.release("B_GET");
368
+ const out = await observed;
369
+ assert.equal(out.ok, false);
370
+ assert(!out.ok);
371
+ assert.equal(out.error.message, "INITIAL_PROVIDER_REJECTED");
372
+ const failureDescriptor = Object.getOwnPropertyDescriptor(
373
+ out.error,
374
+ "failure",
375
+ );
376
+ assert(failureDescriptor);
377
+ assert.equal(data(failureDescriptor.value).phase, "post");
378
+ assert.equal(h.bPosts(), 1);
379
+ assert.equal(h.bRecords().length, 1);
380
+ assert.equal(h.c3Entries(), 0);
381
+ } finally {
382
+ h.release("B_GET");
383
+ await observed;
384
+ }
385
+ } finally {
386
+ await h.cleanup();
387
+ }
388
+ h.health();
389
+ });
390
+
391
+ it("actual owned explicit recovery G12-wrong-identity", async () => {
392
+ const h = await scenario("G12-wrong-identity");
393
+ try {
394
+ await h.runInitial();
395
+ const out = await h.invokeB();
396
+ assert.equal(out.status, "fulfilled_unverified");
397
+ assert(Object.prototype.hasOwnProperty.call(out, "quarantine"));
398
+ assert.equal(h.bRecords().length, 2);
399
+ assert.equal(h.c3Entries(), 1);
400
+ assert.equal(out.quarantine !== null, true);
401
+ } finally {
402
+ await h.cleanup();
403
+ }
404
+ h.health();
405
+ });
406
+
407
+ it("actual owned explicit recovery G13-late", async () => {
408
+ const h = await scenario("G13-late");
409
+ try {
410
+ await h.runInitial();
411
+ const observed = h.observe(h.invokeB());
412
+ try {
413
+ await h.enterOrSettled("B_POST", observed);
414
+ h.OWNER.retire();
415
+ const first = await observed;
416
+ assert.equal(first.ok, false);
417
+ h.release("B_POST");
418
+ await h.joinObservers();
419
+ assert.equal(h.c3Entries(), 0);
420
+ assert.equal(h.bRecords().length, 1);
421
+ await assert.rejects(h.invokeNewCapture(), {
422
+ message: "INITIAL_ACTOR_STOP",
423
+ });
424
+ } finally {
425
+ h.release("B_POST");
426
+ await observed;
427
+ }
428
+ } finally {
429
+ await h.cleanup();
430
+ }
431
+ h.health();
432
+ });
433
+
434
+ it("actual owned explicit recovery G14-output", async () => {
435
+ const h = await scenario("G14-output");
436
+ try {
437
+ await h.runInitial();
438
+ const out = await h.invokeB();
439
+ h.assertOutputOnlyOverflow(out);
440
+ assert.equal(h.ordinaryCredentialRejected(), true);
441
+ } finally {
442
+ await h.cleanup();
443
+ }
444
+ h.health();
445
+ });
446
+
447
+ it("actual owned explicit recovery G15-prior", async () => {
448
+ const h = await scenario("G15-prior");
449
+ try {
450
+ await h.runInitial();
451
+ const before = h.priorSnapshot();
452
+ const out = await h.invokeB();
453
+ h.assertAcknowledged(out);
454
+ assert.deepEqual(h.priorSnapshot(), before);
455
+ assert.equal(h.priorIsFrozen(), false);
456
+ assert(Object.isFrozen(out));
457
+ assert(Object.isFrozen(out.receipt));
458
+ assert.notEqual(out.receipt, h.priorReceipt);
459
+ } finally {
460
+ await h.cleanup();
461
+ }
462
+ h.health();
463
+ });