@afokapu/atdd-bun 0.3.2 → 0.5.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 (208) hide show
  1. package/PLANNER_PORT.md +1 -1
  2. package/README.md +111 -4
  3. package/conventions/coder.bun/coder.bun.complexity-cyclomatic.convention.yaml +1 -3
  4. package/conventions/coder.bun/coder.bun.complexity-length.convention.yaml +1 -2
  5. package/conventions/coder.bun/coder.bun.complexity-nesting.convention.yaml +1 -2
  6. package/conventions/coder.bun/coder.bun.dead-code-reachability.convention.yaml +1 -2
  7. package/conventions/coder.bun/coder.bun.design-token-color.convention.yaml +1 -1
  8. package/conventions/coder.bun/coder.bun.design-token-hardcoded.convention.yaml +1 -1
  9. package/conventions/coder.bun/coder.bun.dto-mapper.convention.yaml +2 -1
  10. package/conventions/coder.bun/coder.bun.dto-placement.convention.yaml +2 -1
  11. package/conventions/coder.bun/coder.bun.dto-purity.convention.yaml +2 -1
  12. package/conventions/coder.bun/coder.bun.duplication-intra-layer.convention.yaml +1 -2
  13. package/conventions/coder.bun/coder.bun.green-header-order.convention.yaml +2 -11
  14. package/conventions/coder.bun/coder.bun.green-header-purpose.convention.yaml +2 -11
  15. package/conventions/coder.bun/coder.bun.green-header-runtime.convention.yaml +2 -11
  16. package/conventions/coder.bun/coder.bun.green-header-tested-by.convention.yaml +2 -11
  17. package/conventions/coder.bun/coder.bun.green-urn-layer.convention.yaml +2 -11
  18. package/conventions/coder.bun/coder.bun.green-urn-marker.convention.yaml +2 -12
  19. package/conventions/coder.bun/coder.bun.green-urn-name-matches.convention.yaml +3 -12
  20. package/conventions/coder.bun/coder.bun.green-urn-pattern.convention.yaml +2 -11
  21. package/conventions/coder.bun/coder.bun.green-urn-side.convention.yaml +2 -11
  22. package/conventions/coder.bun/coder.bun.green-urn-wagon-feature.convention.yaml +2 -11
  23. package/conventions/coder.bun/coder.bun.layer-naming.convention.yaml +2 -1
  24. package/conventions/coder.bun/coder.bun.logging-structured.convention.yaml +2 -4
  25. package/conventions/coder.bun/coder.bun.quality-comments.convention.yaml +1 -2
  26. package/conventions/coder.bun/coder.bun.quality-mi.convention.yaml +1 -2
  27. package/conventions/coder.bun/coder.bun.responsive-breakpoints-declared.convention.yaml +31 -0
  28. package/conventions/coder.bun/coder.bun.responsive-no-fixed-width.convention.yaml +30 -0
  29. package/conventions/coder.bun/coder.bun.responsive-viewport-meta.convention.yaml +31 -0
  30. package/conventions/coder.bun/coder.bun.runtime-executes-the-declaration.convention.yaml +2 -18
  31. package/conventions/coder.bun/coder.bun.runtime-typecheck-enforced.convention.yaml +2 -15
  32. package/conventions/coder.htmx/coder.htmx.swap-no-inline-handler.convention.yaml +3 -3
  33. package/conventions/coder.htmx/coder.htmx.verb-endpoint-is-routed.convention.yaml +2 -2
  34. package/conventions/coder.htmx/coder.htmx.verb-mutation-signals-progress.convention.yaml +3 -2
  35. package/conventions/planner.docs/planner.docs.adr-registry-derived.convention.yaml +2 -12
  36. package/conventions/planner.docs/planner.docs.area-index-required.convention.yaml +2 -12
  37. package/conventions/planner.docs/planner.docs.artifact-path-shape.convention.yaml +2 -12
  38. package/conventions/planner.docs/planner.docs.asciidoc-only.convention.yaml +2 -13
  39. package/conventions/planner.docs/planner.docs.doc-id-unique.convention.yaml +2 -12
  40. package/conventions/planner.docs/planner.docs.graph-target-resolves.convention.yaml +2 -12
  41. package/conventions/planner.docs/planner.docs.identity-required.convention.yaml +2 -12
  42. package/conventions/planner.docs/planner.docs.journey-view-current.convention.yaml +53 -0
  43. package/conventions/planner.docs/planner.docs.reference-integrity.convention.yaml +2 -12
  44. package/conventions/planner.docs/planner.docs.undeclared-change.convention.yaml +2 -12
  45. package/conventions/tester.bun/tester.bun.acceptance-binding-declared.convention.yaml +2 -6
  46. package/conventions/tester.bun/tester.bun.acceptance-covers-tag-well-formed.convention.yaml +1 -5
  47. package/conventions/tester.bun/tester.bun.interlocking-train-sequence-is-exercised.convention.yaml +2 -14
  48. package/conventions/tester.bun/tester.bun.red-behavioral-assertion.convention.yaml +1 -5
  49. package/conventions/tester.bun/tester.bun.routing-runtime-family.convention.yaml +2 -1
  50. package/conventions/tester.bun/tester.bun.smoke-no-collaborator-substitution.convention.yaml +2 -7
  51. package/conventions/tester.bun/tester.bun.smoke-observable-assertion.convention.yaml +2 -7
  52. package/conventions/tester.bun/tester.bun.telemetry-emit.convention.yaml +2 -1
  53. package/conventions/tester.bun/tester.bun.test-carries-urn-identity.convention.yaml +2 -6
  54. package/conventions/tester.bun/tester.bun.test-isolation-no-live-state.convention.yaml +1 -5
  55. package/conventions/tester.bun/tester.bun.test-no-self-skip.convention.yaml +1 -5
  56. package/conventions/tester.bun/tester.bun.test-phase-declared.convention.yaml +2 -6
  57. package/conventions/tester.htmx/tester.htmx.a11y-harness.convention.yaml +32 -0
  58. package/conventions/tester.htmx/tester.htmx.covered-train-is-routed.convention.yaml +30 -0
  59. package/conventions/tester.htmx/tester.htmx.e2e-binds-declared-subject.convention.yaml +31 -0
  60. package/conventions/tester.htmx/tester.htmx.e2e-spec-naming.convention.yaml +32 -0
  61. package/conventions/tester.htmx/tester.htmx.exposed-journey-e2e-coverage.convention.yaml +31 -0
  62. package/conventions/tester.htmx/tester.htmx.fragment-asserts-returned-markup.convention.yaml +2 -6
  63. package/conventions/tester.htmx/tester.htmx.journey-binding-header.convention.yaml +32 -0
  64. package/conventions/tester.htmx/tester.htmx.journey-layer-assembly.convention.yaml +29 -0
  65. package/conventions/tester.htmx/tester.htmx.journey-no-acceptance-marker.convention.yaml +29 -0
  66. package/conventions/tester.htmx/tester.htmx.journey-urn-format.convention.yaml +32 -0
  67. package/conventions/tester.htmx/tester.htmx.presentation-smoke-coverage.convention.yaml +31 -0
  68. package/conventions/tester.htmx/tester.htmx.responsive-harness.convention.yaml +33 -0
  69. package/conventions/tester.htmx/tester.htmx.responsive-journey-coverage.convention.yaml +30 -0
  70. package/conventions/tester.htmx/tester.htmx.swap-oob-asserts-destination-id.convention.yaml +2 -1
  71. package/conventions/tester.htmx/tester.htmx.train-e2e-coverage.convention.yaml +32 -0
  72. package/conventions/tester.htmx/tester.htmx.verb-endpoint-coverage.convention.yaml +2 -1
  73. package/conventions/tester.htmx/tester.htmx.visual-harness.convention.yaml +28 -0
  74. package/conventions/traceability/traceability.plan.executable-acceptance-has-test.convention.yaml +5 -0
  75. package/conventions/traceability/traceability.source.tested-by-present.convention.yaml +5 -0
  76. package/conventions/traceability/traceability.source.tested-by-resolves.convention.yaml +5 -0
  77. package/conventions/traceability/traceability.test.binding-resolves.convention.yaml +5 -0
  78. package/detectors/bun_green_traceability_detector/urn_header.mjs +2 -1
  79. package/detectors/bun_responsive_detector/atdd.implementation.yaml +18 -0
  80. package/detectors/bun_responsive_detector/checks/_map.json +5 -0
  81. package/detectors/bun_responsive_detector/checks/_responsive.mjs +20 -0
  82. package/detectors/bun_responsive_detector/checks/responsive_breakpoints_declared.mjs +21 -0
  83. package/detectors/bun_responsive_detector/checks/responsive_no_fixed_width.mjs +13 -0
  84. package/detectors/bun_responsive_detector/checks/responsive_viewport_meta.mjs +20 -0
  85. package/detectors/bun_responsive_detector/detect.mjs +46 -0
  86. package/detectors/bun_responsive_detector/fixtures/clean/public/index.html +9 -0
  87. package/detectors/bun_responsive_detector/fixtures/clean/src/app.css +13 -0
  88. package/detectors/bun_responsive_detector/fixtures/clean/src/document.ts +7 -0
  89. package/detectors/bun_responsive_detector/fixtures/clean/src/fragment.html +1 -0
  90. package/detectors/bun_responsive_detector/fixtures/clean/src/head.ts +1 -0
  91. package/detectors/bun_responsive_detector/fixtures/clean/src/layout.tsx +8 -0
  92. package/detectors/bun_responsive_detector/fixtures/clean/src/range.css +3 -0
  93. package/detectors/bun_responsive_detector/fixtures/clean/src/viewport-expression.tsx +5 -0
  94. package/detectors/bun_responsive_detector/fixtures/dirty/public/fixed-viewport.html +5 -0
  95. package/detectors/bun_responsive_detector/fixtures/dirty/public/no-meta.html +5 -0
  96. package/detectors/bun_responsive_detector/fixtures/dirty/public/no-zoom.html +5 -0
  97. package/detectors/bun_responsive_detector/fixtures/dirty/public/scale.html +5 -0
  98. package/detectors/bun_responsive_detector/fixtures/dirty/src/app.css +4 -0
  99. package/detectors/bun_responsive_detector/fixtures/dirty/src/render.ts +2 -0
  100. package/detectors/bun_responsive_detector/fixtures/dirty/src/units.css +3 -0
  101. package/detectors/bun_responsive_detector/fixtures/dirty/src/wide.tsx +3 -0
  102. package/detectors/htmx_e2e_detector/atdd.implementation.yaml +40 -0
  103. package/detectors/htmx_e2e_detector/checks/_e2e.mjs +98 -0
  104. package/detectors/htmx_e2e_detector/checks/_map.json +16 -0
  105. package/detectors/htmx_e2e_detector/checks/a11y_harness.mjs +21 -0
  106. package/detectors/htmx_e2e_detector/checks/covered_train_is_routed.mjs +6 -0
  107. package/detectors/htmx_e2e_detector/checks/e2e_binds_declared_subject.mjs +11 -0
  108. package/detectors/htmx_e2e_detector/checks/e2e_spec_naming.mjs +6 -0
  109. package/detectors/htmx_e2e_detector/checks/exposed_journey_e2e_coverage.mjs +7 -0
  110. package/detectors/htmx_e2e_detector/checks/journey_binding_header.mjs +13 -0
  111. package/detectors/htmx_e2e_detector/checks/journey_layer_assembly.mjs +11 -0
  112. package/detectors/htmx_e2e_detector/checks/journey_no_acceptance_marker.mjs +6 -0
  113. package/detectors/htmx_e2e_detector/checks/journey_urn_format.mjs +18 -0
  114. package/detectors/htmx_e2e_detector/checks/presentation_smoke_coverage.mjs +15 -0
  115. package/detectors/htmx_e2e_detector/checks/responsive_harness.mjs +30 -0
  116. package/detectors/htmx_e2e_detector/checks/responsive_journey_coverage.mjs +7 -0
  117. package/detectors/htmx_e2e_detector/checks/train_e2e_coverage.mjs +7 -0
  118. package/detectors/htmx_e2e_detector/checks/visual_harness.mjs +7 -0
  119. package/detectors/htmx_e2e_detector/detect.mjs +46 -0
  120. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy-alias.a11y.e2e.ts +12 -0
  121. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy-inline.responsive.e2e.ts +11 -0
  122. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.a11y.e2e.ts +12 -0
  123. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.responsive.e2e.ts +14 -0
  124. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/buy.visual.e2e.ts +10 -0
  125. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/checkout-buy.smoke.e2e.ts +10 -0
  126. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/crlf.e2e.ts +10 -0
  127. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/place-order.e2e.ts +10 -0
  128. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/reject-empty-cart.e2e.ts +10 -0
  129. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/support/fixtures.ts +3 -0
  130. package/detectors/htmx_e2e_detector/fixtures/clean/e2e/take-payment.e2e.ts +10 -0
  131. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_journeys/buy.yaml +19 -0
  132. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_journeys/settle.yaml +14 -0
  133. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +21 -0
  134. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/payment.yaml +16 -0
  135. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/_interlockings/settlement.yaml +16 -0
  136. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/place-order.yaml +11 -0
  137. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/reject-empty-cart.yaml +11 -0
  138. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/settle-ledger.yaml +11 -0
  139. package/detectors/htmx_e2e_detector/fixtures/clean/plan/_trains/orders/take-payment.yaml +11 -0
  140. package/detectors/htmx_e2e_detector/fixtures/clean/playwright.config.ts +3 -0
  141. package/detectors/htmx_e2e_detector/fixtures/clean/src/wagons/checkout/presentation/cart.tsx +3 -0
  142. package/detectors/htmx_e2e_detector/fixtures/clean/tests/urn-parser.test.ts +7 -0
  143. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/acceptance.e2e.ts +6 -0
  144. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/bad-id.e2e.ts +10 -0
  145. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/bad-urn.e2e.ts +10 -0
  146. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/both.e2e.ts +6 -0
  147. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.a11y.e2e.ts +10 -0
  148. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.responsive.e2e.ts +11 -0
  149. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/buy.visual.e2e.ts +10 -0
  150. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/covered.e2e.ts +10 -0
  151. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/first-only.responsive.e2e.ts +13 -0
  152. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/ghost.e2e.ts +10 -0
  153. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/misnamed.spec.ts +10 -0
  154. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-binding.e2e.ts +4 -0
  155. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-layer.e2e.ts +4 -0
  156. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/no-urn.e2e.ts +4 -0
  157. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/tautology.a11y.e2e.ts +11 -0
  158. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/two-trains.e2e.ts +6 -0
  159. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/unrouted.e2e.ts +10 -0
  160. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/wrong-layer.e2e.ts +5 -0
  161. package/detectors/htmx_e2e_detector/fixtures/dirty/e2e/wrong-urn.e2e.ts +10 -0
  162. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_journeys/browse.yaml +16 -0
  163. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_journeys/buy.yaml +16 -0
  164. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/_interlockings/checkout.yaml +21 -0
  165. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/covered.yaml +11 -0
  166. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/uncovered.yaml +11 -0
  167. package/detectors/htmx_e2e_detector/fixtures/dirty/plan/_trains/orders/unrouted.yaml +11 -0
  168. package/detectors/htmx_e2e_detector/fixtures/dirty/src/wagons/billing/presentation/invoice.tsx +3 -0
  169. package/detectors/planner_docs_capability/atdd.implementation.yaml +2 -0
  170. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/index.adoc +170 -0
  171. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/journey-buy.svg +61 -0
  172. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/path-buy-nominal.svg +81 -0
  173. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-archive-order.svg +13 -0
  174. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-place-order.svg +31 -0
  175. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-reject-empty-cart.svg +22 -0
  176. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-retry-payment.svg +22 -0
  177. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-ship-order.svg +35 -0
  178. package/detectors/planner_docs_capability/fixtures/clean/docs/purpose/journeys/svg/train-orders-take-payment.svg +27 -0
  179. package/detectors/planner_docs_capability/fixtures/clean/plan/_journeys/buy.yaml +24 -0
  180. package/detectors/planner_docs_capability/fixtures/clean/plan/_themes.yaml +3 -0
  181. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/checkout.yaml +43 -0
  182. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/fulfilment.yaml +33 -0
  183. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/payment.yaml +43 -0
  184. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/_interlockings/returns.yaml +33 -0
  185. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/archive-order.yaml +11 -0
  186. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/place-order.yaml +21 -0
  187. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/reject-empty-cart.yaml +16 -0
  188. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/retry-payment.yaml +16 -0
  189. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/ship-order.yaml +21 -0
  190. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/take-payment.yaml +21 -0
  191. package/detectors/planner_docs_capability/fixtures/clean/plan/_trains/orders/unrouted-refund.yaml +11 -0
  192. package/detectors/planner_docs_capability/fixtures/dirty_journey_view/docs/index.adoc +3 -0
  193. package/detectors/planner_docs_capability/fixtures/dirty_journey_view/plan/_trains/_interlockings/fulfilment.yaml +33 -0
  194. package/detectors/planner_static_validators/atdd.implementation.yaml +2 -0
  195. package/detectors/planner_static_validators/fixtures/dirty/plan/_trains/_interlockings/uncomposed.yaml +4 -0
  196. package/integrity.json +207 -70
  197. package/lib/frontend.mjs +17 -0
  198. package/lib/scan.mjs +6 -2
  199. package/package.json +7 -2
  200. package/planner-nodes/ENFORCEMENT_SCOPE.yaml +25 -2
  201. package/planner-nodes/nodes/planner.journey.interlocking-composed.convention.yaml +43 -0
  202. package/relationships.yaml +4790 -0
  203. package/src/cli.ts +9 -0
  204. package/src/docs-capability.ts +10 -1
  205. package/src/enforce.ts +4 -4
  206. package/src/index.ts +2 -0
  207. package/src/journey-docs.ts +355 -0
  208. package/src/planner-validators.ts +29 -0
@@ -0,0 +1,43 @@
1
+ schema_version: 1.0.0
2
+ interlocking_id: interlocking:checkout
3
+ title: Checkout decision
4
+ theme: orders
5
+ status: checked
6
+ source:
7
+ path: plan/_trains/_interlockings/checkout.yaml
8
+ content_digest: fixture
9
+ entrypoint:
10
+ exposed: true
11
+ actions: [place-order]
12
+ reason: null
13
+ surfaces: [frontend]
14
+ route_resolution:
15
+ strategy: fail_on_multiple_match
16
+ lifelines:
17
+ - ref: wagon:checkout
18
+ messages: []
19
+ fragments:
20
+ - id: fragment:checkout
21
+ kind: alt
22
+ guards:
23
+ - id: guard:nominal
24
+ expression: cart.items > 0
25
+ - id: guard:empty-cart
26
+ expression: cart.items == 0
27
+ routes:
28
+ - route_id: nominal
29
+ category: nominal
30
+ priority: 1
31
+ guard_ref: guard:nominal
32
+ train_id: train:orders:place-order
33
+ train_path: plan/_trains/orders/place-order.yaml
34
+ projection:
35
+ expected_sequence_digest: fixture
36
+ - route_id: empty-cart
37
+ category: error
38
+ priority: 2
39
+ guard_ref: guard:empty-cart
40
+ train_id: train:orders:reject-empty-cart
41
+ train_path: plan/_trains/orders/reject-empty-cart.yaml
42
+ projection:
43
+ expected_sequence_digest: fixture
@@ -0,0 +1,33 @@
1
+ schema_version: 1.0.0
2
+ interlocking_id: interlocking:fulfilment
3
+ title: Fulfilment decision
4
+ theme: orders
5
+ status: checked
6
+ source:
7
+ path: plan/_trains/_interlockings/fulfilment.yaml
8
+ content_digest: fixture
9
+ entrypoint:
10
+ exposed: false
11
+ actions: []
12
+ reason: internal-transition-only
13
+ surfaces: [backend]
14
+ route_resolution:
15
+ strategy: fail_on_multiple_match
16
+ lifelines:
17
+ - ref: wagon:checkout
18
+ messages: []
19
+ fragments:
20
+ - id: fragment:fulfilment
21
+ kind: alt
22
+ guards:
23
+ - id: guard:ship
24
+ expression: order.paid
25
+ routes:
26
+ - route_id: ship
27
+ category: nominal
28
+ priority: 1
29
+ guard_ref: guard:ship
30
+ train_id: train:orders:ship-order
31
+ train_path: plan/_trains/orders/ship-order.yaml
32
+ projection:
33
+ expected_sequence_digest: fixture
@@ -0,0 +1,43 @@
1
+ schema_version: 1.0.0
2
+ interlocking_id: interlocking:payment
3
+ title: Payment decision
4
+ theme: orders
5
+ status: checked
6
+ source:
7
+ path: plan/_trains/_interlockings/payment.yaml
8
+ content_digest: fixture
9
+ entrypoint:
10
+ exposed: false
11
+ actions: []
12
+ reason: internal-transition-only
13
+ surfaces: [backend]
14
+ route_resolution:
15
+ strategy: fail_on_multiple_match
16
+ lifelines:
17
+ - ref: wagon:checkout
18
+ messages: []
19
+ fragments:
20
+ - id: fragment:payment
21
+ kind: alt
22
+ guards:
23
+ - id: guard:charged
24
+ expression: quote.accepted and card.valid
25
+ - id: guard:declined
26
+ expression: card.declined
27
+ routes:
28
+ - route_id: charged
29
+ category: nominal
30
+ priority: 1
31
+ guard_ref: guard:charged
32
+ train_id: train:orders:take-payment
33
+ train_path: plan/_trains/orders/take-payment.yaml
34
+ projection:
35
+ expected_sequence_digest: fixture
36
+ - route_id: declined
37
+ category: alternate
38
+ priority: 2
39
+ guard_ref: guard:declined
40
+ train_id: train:orders:retry-payment
41
+ train_path: plan/_trains/orders/retry-payment.yaml
42
+ projection:
43
+ expected_sequence_digest: fixture
@@ -0,0 +1,33 @@
1
+ schema_version: 1.0.0
2
+ interlocking_id: interlocking:returns
3
+ title: Returns decision
4
+ theme: orders
5
+ status: checked
6
+ source:
7
+ path: plan/_trains/_interlockings/returns.yaml
8
+ content_digest: fixture
9
+ entrypoint:
10
+ exposed: false
11
+ actions: []
12
+ reason: internal-transition-only
13
+ surfaces: [backend]
14
+ route_resolution:
15
+ strategy: fail_on_multiple_match
16
+ lifelines:
17
+ - ref: wagon:checkout
18
+ messages: []
19
+ fragments:
20
+ - id: fragment:returns
21
+ kind: alt
22
+ guards:
23
+ - id: guard:archive
24
+ expression: order.cancelled
25
+ routes:
26
+ - route_id: archive
27
+ category: nominal
28
+ priority: 1
29
+ guard_ref: guard:archive
30
+ train_id: train:orders:archive-order
31
+ train_path: plan/_trains/orders/archive-order.yaml
32
+ projection:
33
+ expected_sequence_digest: fixture
@@ -0,0 +1,11 @@
1
+ train_id: train:orders:archive-order
2
+ title: Archive a cancelled order
3
+ description: Archive a cancelled order.
4
+ themes: [orders]
5
+ participants: [wagon:checkout]
6
+ sequence:
7
+ - step: 1
8
+ intent: Archive the cancelled order
9
+ from: wagon:checkout
10
+ to: wagon:checkout
11
+ artifact: orders:archived
@@ -0,0 +1,21 @@
1
+ train_id: train:orders:place-order
2
+ title: Place an order
3
+ description: Place an order.
4
+ themes: [orders]
5
+ participants: [user:buyer, wagon:checkout, wagon:pricing]
6
+ sequence:
7
+ - step: 1
8
+ intent: Submit the cart for checkout
9
+ from: user:buyer
10
+ to: wagon:checkout
11
+ artifact: orders:cart
12
+ - step: 2
13
+ intent: Price the cart with current promotions
14
+ from: wagon:checkout
15
+ to: wagon:pricing
16
+ artifact: orders:priced-cart
17
+ - step: 3
18
+ intent: Return the priced quote
19
+ from: wagon:pricing
20
+ to: wagon:checkout
21
+ artifact: orders:quote
@@ -0,0 +1,16 @@
1
+ train_id: train:orders:reject-empty-cart
2
+ title: Reject an empty cart
3
+ description: Reject an empty cart.
4
+ themes: [orders]
5
+ participants: [user:buyer, wagon:checkout]
6
+ sequence:
7
+ - step: 1
8
+ intent: Submit an empty cart
9
+ from: user:buyer
10
+ to: wagon:checkout
11
+ artifact: orders:cart
12
+ - step: 2
13
+ intent: Refuse the empty cart and say why
14
+ from: wagon:checkout
15
+ to: user:buyer
16
+ artifact: orders:rejection
@@ -0,0 +1,16 @@
1
+ train_id: train:orders:retry-payment
2
+ title: Retry a declined payment
3
+ description: Retry a declined payment.
4
+ themes: [orders]
5
+ participants: [user:buyer, wagon:checkout]
6
+ sequence:
7
+ - step: 1
8
+ intent: Ask the buyer for another payment method
9
+ from: wagon:checkout
10
+ to: user:buyer
11
+ artifact: orders:decline
12
+ - step: 2
13
+ intent: Provide a new payment method
14
+ from: user:buyer
15
+ to: wagon:checkout
16
+ artifact: orders:payment-method
@@ -0,0 +1,21 @@
1
+ train_id: train:orders:ship-order
2
+ title: Ship the order
3
+ description: Ship the order.
4
+ themes: [orders]
5
+ participants: [system:carrier, user:buyer, wagon:checkout, wagon:fulfilment]
6
+ sequence:
7
+ - step: 1
8
+ intent: Hand the paid order to fulfilment
9
+ from: wagon:checkout
10
+ to: wagon:fulfilment
11
+ artifact: orders:paid
12
+ - step: 2
13
+ intent: Book the shipment with the carrier
14
+ from: wagon:fulfilment
15
+ to: system:carrier
16
+ artifact: orders:shipment
17
+ - step: 3
18
+ intent: Send tracking to the buyer
19
+ from: wagon:fulfilment
20
+ to: user:buyer
21
+ artifact: orders:tracking
@@ -0,0 +1,21 @@
1
+ train_id: train:orders:take-payment
2
+ title: Take payment
3
+ description: Take payment.
4
+ themes: [orders]
5
+ participants: [system:payment-gateway, wagon:checkout]
6
+ sequence:
7
+ - step: 1
8
+ intent: Request the charge from the payment gateway
9
+ from: wagon:checkout
10
+ to: system:payment-gateway
11
+ artifact: orders:charge
12
+ - step: 2
13
+ intent: Report whether the charge succeeded
14
+ from: system:payment-gateway
15
+ to: wagon:checkout
16
+ artifact: orders:charge-result
17
+ - step: 3
18
+ intent: Record the order as paid
19
+ from: wagon:checkout
20
+ to: wagon:checkout
21
+ artifact: orders:paid
@@ -0,0 +1,11 @@
1
+ train_id: train:orders:unrouted-refund
2
+ title: Refund an order
3
+ description: Refund an order.
4
+ themes: [orders]
5
+ participants: [user:buyer, wagon:checkout]
6
+ sequence:
7
+ - step: 1
8
+ intent: Ask for a refund
9
+ from: user:buyer
10
+ to: wagon:checkout
11
+ artifact: orders:refund-request
@@ -0,0 +1,3 @@
1
+ = Docs
2
+ :doc-id: root
3
+ :status: current
@@ -0,0 +1,33 @@
1
+ schema_version: 1.0.0
2
+ interlocking_id: interlocking:fulfilment
3
+ title: Fulfilment decision
4
+ theme: orders
5
+ status: checked
6
+ source:
7
+ path: plan/_trains/_interlockings/fulfilment.yaml
8
+ content_digest: fixture
9
+ entrypoint:
10
+ exposed: false
11
+ actions: []
12
+ reason: internal-transition-only
13
+ surfaces: [backend]
14
+ route_resolution:
15
+ strategy: fail_on_multiple_match
16
+ lifelines:
17
+ - ref: wagon:checkout
18
+ messages: []
19
+ fragments:
20
+ - id: fragment:fulfilment
21
+ kind: alt
22
+ guards:
23
+ - id: guard:ship
24
+ expression: order.paid
25
+ routes:
26
+ - route_id: ship
27
+ category: nominal
28
+ priority: 1
29
+ guard_ref: guard:ship
30
+ train_id: train:orders:ship-order
31
+ train_path: plan/_trains/orders/ship-order.yaml
32
+ projection:
33
+ expected_sequence_digest: fixture
@@ -18,6 +18,7 @@ emits_rule_ids:
18
18
  - planner.wagon.telemetry-filesystem
19
19
  - planner.train.registry-coherence
20
20
  - planner.journey.continuation-closure
21
+ - planner.journey.interlocking-composed
21
22
  realizes_convention:
22
23
  - planner.wagon.urn
23
24
  - planner.wagon.urn-naming
@@ -32,5 +33,6 @@ realizes_convention:
32
33
  - planner.wagon.telemetry-filesystem
33
34
  - planner.train.registry-coherence
34
35
  - planner.journey.continuation-closure
36
+ - planner.journey.interlocking-composed
35
37
  entrypoint: detect.mjs
36
38
  report: detect.mjs
@@ -0,0 +1,4 @@
1
+ interlocking_id: interlocking:uncomposed
2
+ routes:
3
+ - route_id: nominal
4
+ train_id: train:journey:a