File size: 27,557 Bytes
62a565f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
{
  "auth_semantics": {
    "account_database_scope": "site-isolated",
    "credential_storage": "salted-scrypt-hash",
    "legacy_write_policy": "read-compatible-write-rejected",
    "mail_default": "LOCAL_ONLY",
    "mail_statuses": [
      "LOCAL_ONLY",
      "SMTP_PENDING",
      "SMTP_SENT",
      "SMTP_FAILED"
    ],
    "password_reset_enumeration": "indistinguishable-public-response",
    "registration_account_creation": "after-email-verification",
    "rejected_secret_journaling": "forbidden",
    "session_storage": "opaque-cookie-digest-at-rest",
    "smtp_activation": "explicit-complete-config-only",
    "smtp_delivery_ceiling": 3,
    "verification_challenge_storage": "salted-hash"
  },
  "capabilities": [
    {
      "category": "authentication",
      "entities": [
        {
          "identity": "opaque pending id bound to one browser session",
          "name": "pending-registration",
          "owner_scope": "session",
          "persistence": "durable"
        },
        {
          "identity": "site-local account id and unique normalized email",
          "name": "local-account",
          "owner_scope": "account",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "account-registration",
      "implementation_status": "implemented",
      "invariant_ids": [
        "registration-requires-verification"
      ],
      "journey_ids": [
        "local-account-registration",
        "registration-invalid-code"
      ],
      "label": "Verified local account registration",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "invalid": [
            "clone/tests/test_backend.py::test_registration_rejects_invalid_details"
          ],
          "restart": [
            "clone/tests/test_backend.py::test_reset_state_is_deterministic"
          ],
          "stale": [
            "clone/tests/test_backend.py::test_registration_verifies_a_code_before_creating_the_account"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_registration_verifies_a_code_before_creating_the_account"
          ]
        },
        "not_applicable": [],
        "planned": [
          "duplicate",
          "foreign-owner",
          "unauthorized-role",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "The server normalizes identity and hashes password and code.",
        "An account is created only after successful verification.",
        "Duplicate normalized email creation is rejected transactionally."
      ],
      "state_machine": {
        "kind": "challenge-lifecycle",
        "states": [
          "collecting",
          "pending-verification",
          "verified",
          "account-created",
          "expired",
          "locked"
        ],
        "transitions": [
          {
            "from": "collecting",
            "to": "pending-verification",
            "trigger": "validated registration request"
          },
          {
            "from": "pending-verification",
            "to": "verified",
            "trigger": "correct unexpired code within attempt budget"
          },
          {
            "from": "verified",
            "to": "account-created",
            "trigger": "transactional account creation and session rotation"
          },
          {
            "from": "pending-verification",
            "to": "expired",
            "trigger": "challenge expiry"
          },
          {
            "from": "pending-verification",
            "to": "locked",
            "trigger": "verification attempt budget exhausted"
          }
        ]
      }
    },
    {
      "category": "authentication",
      "entities": [
        {
          "identity": "site-local account id and normalized email",
          "name": "local-account",
          "owner_scope": "account",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "account-sign-in",
      "implementation_status": "implemented",
      "invariant_ids": [
        "member-isolation"
      ],
      "journey_ids": [
        "member-account-surfaces"
      ],
      "label": "Password-based local account sign-in",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "foreign-owner": [
            "clone/tests/test_backend.py::test_orders_are_isolated_between_actors"
          ],
          "invalid": [
            "clone/tests/test_smoke.py::test_signin_rejects_unknown_account",
            "clone/tests/test_smoke.py::test_signin_requires_credentials"
          ],
          "restart": [
            "clone/tests/test_backend.py::test_reset_state_is_deterministic"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_member_sign_in_merges_the_anonymous_cart"
          ]
        },
        "not_applicable": [],
        "planned": [
          "duplicate",
          "stale",
          "unauthorized-role",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "The server verifies salted password hashes.",
        "The server rotates the authenticated session.",
        "Client-selected fixture identity is not authentication."
      ],
      "state_machine": {
        "kind": "entity-lifecycle",
        "states": [
          "signed-out",
          "identified",
          "authenticated",
          "rejected"
        ],
        "transitions": [
          {
            "from": "signed-out",
            "to": "identified",
            "trigger": "normalized email submitted"
          },
          {
            "from": "identified",
            "to": "authenticated",
            "trigger": "constant-time password verification succeeds"
          },
          {
            "from": "identified",
            "to": "rejected",
            "trigger": "credentials are invalid"
          }
        ]
      }
    },
    {
      "category": "authentication",
      "entities": [
        {
          "identity": "opaque cookie token with digest persisted at rest",
          "name": "browser-session",
          "owner_scope": "session",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "session-lifecycle",
      "implementation_status": "implemented",
      "invariant_ids": [
        "member-isolation"
      ],
      "journey_ids": [
        "member-account-surfaces"
      ],
      "label": "Anonymous and authenticated browser sessions",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "foreign-owner": [
            "clone/tests/test_backend.py::test_orders_are_isolated_between_actors"
          ],
          "invalid": [
            "clone/tests/test_smoke.py::test_account_routes_redirect_when_anonymous"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_member_order_history_and_detail"
          ]
        },
        "not_applicable": [],
        "planned": [
          "duplicate",
          "stale",
          "unauthorized-role",
          "restart",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "Raw session tokens are never stored in the database.",
        "Ownership is resolved from the server-side session record.",
        "Sign-out revokes server-side authority before deleting the cookie."
      ],
      "state_machine": {
        "kind": "session-lifecycle",
        "states": [
          "anonymous",
          "authenticated",
          "revoked",
          "expired"
        ],
        "transitions": [
          {
            "from": "anonymous",
            "to": "authenticated",
            "trigger": "successful sign-in or registration rotates session"
          },
          {
            "from": "authenticated",
            "to": "revoked",
            "trigger": "sign-out or security reset"
          },
          {
            "from": "anonymous",
            "to": "expired",
            "trigger": "session expiry"
          },
          {
            "from": "authenticated",
            "to": "expired",
            "trigger": "session expiry"
          }
        ]
      }
    },
    {
      "category": "authentication",
      "entities": [
        {
          "identity": "opaque reset id bound to one browser session",
          "name": "password-reset-challenge",
          "owner_scope": "session",
          "persistence": "durable"
        },
        {
          "identity": "nullable concealed account binding",
          "name": "local-account",
          "owner_scope": "account",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "password-recovery",
      "implementation_status": "implemented",
      "invariant_ids": [
        "password-recovery-is-non-enumerating"
      ],
      "journey_ids": [
        "local-password-recovery"
      ],
      "label": "Enumeration-resistant local password recovery",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "foreign-owner": [
            "clone/tests/test_backend.py::test_password_reset_does_not_disclose_unknown_accounts"
          ],
          "invalid": [
            "clone/tests/test_backend.py::test_password_reset_requires_the_emailed_code"
          ],
          "restart": [
            "clone/tests/test_backend.py::test_reset_state_is_deterministic"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_password_reset_requires_the_emailed_code"
          ]
        },
        "not_applicable": [],
        "planned": [
          "duplicate",
          "stale",
          "unauthorized-role",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "Known and unknown emails receive indistinguishable public responses.",
        "Only the server binds a reset flow to an account.",
        "Password replacement revokes prior authenticated sessions."
      ],
      "state_machine": {
        "kind": "challenge-lifecycle",
        "states": [
          "requested",
          "verified",
          "consumed",
          "expired",
          "locked"
        ],
        "transitions": [
          {
            "from": "requested",
            "to": "verified",
            "trigger": "correct unexpired code within attempt budget"
          },
          {
            "from": "verified",
            "to": "consumed",
            "trigger": "password is replaced and sessions are revoked"
          },
          {
            "from": "requested",
            "to": "expired",
            "trigger": "challenge expiry"
          },
          {
            "from": "requested",
            "to": "locked",
            "trigger": "verification attempt budget exhausted"
          }
        ]
      }
    },
    {
      "category": "communication",
      "entities": [
        {
          "identity": "site-local outbox id and purpose-bound flow id",
          "name": "mail-outbox-entry",
          "owner_scope": "system",
          "persistence": "durable"
        }
      ],
      "external_effect": "local-only",
      "id": "email-delivery",
      "implementation_status": "implemented",
      "invariant_ids": [
        "registration-requires-verification",
        "password-recovery-is-non-enumerating"
      ],
      "journey_ids": [
        "local-account-registration",
        "local-password-recovery"
      ],
      "label": "Truthful local verification and recovery mail outbox",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "invalid": [
            "clone/tests/test_backend.py::test_password_reset_requires_the_emailed_code"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_registration_verifies_a_code_before_creating_the_account",
            "clone/tests/test_backend.py::test_marketing_signup_lands_in_the_local_outbox"
          ]
        },
        "not_applicable": [
          {
            "obligation": "foreign-owner",
            "rationale": "Mail is written to the local outbox and never delivered, so ownership, role, migration and concurrency obligations do not apply to a delivery path that does not exist."
          },
          {
            "obligation": "unauthorized-role",
            "rationale": "Mail is written to the local outbox and never delivered, so ownership, role, migration and concurrency obligations do not apply to a delivery path that does not exist."
          },
          {
            "obligation": "migration",
            "rationale": "Mail is written to the local outbox and never delivered, so ownership, role, migration and concurrency obligations do not apply to a delivery path that does not exist."
          },
          {
            "obligation": "concurrency",
            "rationale": "Mail is written to the local outbox and never delivered, so ownership, role, migration and concurrency obligations do not apply to a delivery path that does not exist."
          }
        ],
        "planned": [
          "duplicate",
          "stale",
          "restart"
        ]
      },
      "server_authorities": [
        "Offline mode records LOCAL_ONLY and never claims external delivery.",
        "SMTP is disabled unless every required setting is present.",
        "Claim, retry, and startup replay share one delivery ceiling."
      ],
      "state_machine": {
        "kind": "delivery-lifecycle",
        "states": [
          "local-only",
          "smtp-pending",
          "smtp-sent",
          "smtp-failed"
        ],
        "transitions": [
          {
            "from": "local-only",
            "to": "smtp-pending",
            "trigger": "operator enables complete explicit SMTP configuration"
          },
          {
            "from": "smtp-pending",
            "to": "smtp-sent",
            "trigger": "SMTP transport confirms delivery handoff"
          },
          {
            "from": "smtp-pending",
            "to": "smtp-failed",
            "trigger": "delivery attempt fails or ceiling is reached"
          },
          {
            "from": "smtp-failed",
            "to": "smtp-pending",
            "trigger": "bounded idempotent retry below the delivery ceiling"
          }
        ]
      }
    },
    {
      "category": "commerce",
      "entities": [
        {
          "identity": "one row per actor key (member email or anonymous session)",
          "name": "cart",
          "owner_scope": "session",
          "persistence": "durable"
        },
        {
          "identity": "unique (cart, sku id) with quantity and captured prices",
          "name": "cart-line",
          "owner_scope": "session",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "cart",
      "implementation_status": "implemented",
      "invariant_ids": [
        "variant-integrity",
        "cart-arithmetic"
      ],
      "journey_ids": [
        "travel-hiking-pack-add-to-cart",
        "travel-browse-two-pages"
      ],
      "label": "Persistent local cart with variant-accurate lines",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "duplicate": [
            "clone/tests/test_backend.py::test_repeated_add_increments_one_line"
          ],
          "foreign-owner": [
            "clone/tests/test_backend.py::test_orders_are_isolated_between_actors"
          ],
          "invalid": [
            "clone/tests/test_backend.py::test_unavailable_variant_is_refused"
          ],
          "restart": [
            "clone/tests/test_backend.py::test_reset_state_is_deterministic"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_add_to_cart_persists_the_selected_variant"
          ]
        },
        "not_applicable": [],
        "planned": [
          "stale",
          "unauthorized-role",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "The server resolves the sku from the captured catalogue and refuses an unknown colour or size combination.",
        "The server owns line prices; the client cannot supply them.",
        "The server keys every cart on the resolved actor, never on a client-supplied identity.",
        "The server recomputes totals, shipping threshold and tax on read."
      ],
      "state_machine": {
        "kind": "entity-lifecycle",
        "states": [
          "empty",
          "holding-lines",
          "line-updated",
          "line-removed",
          "merged-on-sign-in"
        ],
        "transitions": [
          {
            "from": "empty",
            "to": "holding-lines",
            "trigger": "add an in-stock sku for the actor"
          },
          {
            "from": "holding-lines",
            "to": "holding-lines",
            "trigger": "re-add the same sku, incrementing its quantity"
          },
          {
            "from": "holding-lines",
            "to": "line-updated",
            "trigger": "set a line quantity"
          },
          {
            "from": "line-updated",
            "to": "line-removed",
            "trigger": "set a line quantity to zero or remove it"
          },
          {
            "from": "line-removed",
            "to": "empty",
            "trigger": "remove the last remaining line"
          },
          {
            "from": "holding-lines",
            "to": "merged-on-sign-in",
            "trigger": "sign in while an anonymous cart exists"
          }
        ]
      }
    },
    {
      "category": "commerce",
      "entities": [
        {
          "identity": "unique (actor, product slug, colour)",
          "name": "wishlist-entry",
          "owner_scope": "session",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "wish-list",
      "implementation_status": "implemented",
      "invariant_ids": [
        "member-isolation"
      ],
      "journey_ids": [
        "member-account-surfaces"
      ],
      "label": "Per-actor wish list",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "foreign-owner": [
            "clone/tests/test_backend.py::test_orders_are_isolated_between_actors"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_wishlist_toggles"
          ]
        },
        "not_applicable": [],
        "planned": [
          "invalid",
          "duplicate",
          "stale",
          "unauthorized-role",
          "restart",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "The server enforces one entry per actor, product and colour.",
        "The server scopes every read and write to the resolved actor."
      ],
      "state_machine": {
        "kind": "idempotent-set",
        "states": [
          "absent",
          "present"
        ],
        "transitions": [
          {
            "from": "absent",
            "to": "present",
            "trigger": "toggle a product and colour onto the actor's list"
          },
          {
            "from": "present",
            "to": "absent",
            "trigger": "toggle the same product and colour off again"
          }
        ]
      }
    },
    {
      "category": "commerce",
      "entities": [
        {
          "identity": "unique order number owned by one member account",
          "name": "order",
          "owner_scope": "account",
          "persistence": "durable"
        },
        {
          "identity": "labelled address owned by one member account",
          "name": "address",
          "owner_scope": "account",
          "persistence": "durable"
        }
      ],
      "external_effect": "none",
      "id": "order-history",
      "implementation_status": "implemented",
      "invariant_ids": [
        "member-isolation"
      ],
      "journey_ids": [
        "member-account-surfaces"
      ],
      "label": "Seeded member order history and order detail",
      "priority": "p0",
      "proofs": {
        "evidence": {
          "foreign-owner": [
            "clone/tests/test_backend.py::test_orders_are_isolated_between_actors"
          ],
          "invalid": [
            "clone/tests/test_backend.py::test_member_order_history_and_detail"
          ],
          "restart": [
            "clone/tests/test_backend.py::test_reset_state_is_deterministic"
          ],
          "valid": [
            "clone/tests/test_backend.py::test_member_order_history_and_detail"
          ]
        },
        "not_applicable": [],
        "planned": [
          "duplicate",
          "stale",
          "unauthorized-role",
          "migration",
          "concurrency"
        ]
      },
      "server_authorities": [
        "Orders are seeded server-side and are never written by a request.",
        "The server returns only orders owned by the resolved member and answers 404 for any other order number."
      ],
      "state_machine": {
        "kind": "immutable-receipt",
        "states": [
          "seeded",
          "readable"
        ],
        "transitions": [
          {
            "from": "seeded",
            "to": "readable",
            "trigger": "a signed-in member opens order history or an order detail"
          }
        ]
      }
    },
    {
      "category": "commerce",
      "entities": [
        {
          "identity": "derived from the actor's current cart; never persisted",
          "name": "checkout-summary",
          "owner_scope": "session",
          "persistence": "ephemeral"
        }
      ],
      "external_effect": "none",
      "id": "checkout",
      "implementation_status": "not-applicable",
      "invariant_ids": [
        "checkout-boundary"
      ],
      "journey_ids": [
        "cart-review-to-checkout-entry"
      ],
      "label": "Checkout entry only; no order submission or payment",
      "priority": "p1",
      "proofs": {
        "evidence": {
          "valid": [
            "clone/tests/test_backend.py::test_checkout_entry_stops_before_submission"
          ]
        },
        "not_applicable": [
          {
            "obligation": "invalid",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "duplicate",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "stale",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "foreign-owner",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "unauthorized-role",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "restart",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "migration",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          },
          {
            "obligation": "concurrency",
            "rationale": "Order submission and payment are outside the frozen scope: placing an order on the source site is an irreversible real-world effect that was never authorised, so the clone renders the entry summary and stops rather than simulating a purchase."
          }
        ],
        "planned": []
      },
      "server_authorities": [
        "The server derives the summary from the stored cart and persists nothing.",
        "No endpoint exists that could submit an order or take payment."
      ],
      "state_machine": {
        "kind": "entity-lifecycle",
        "states": [
          "cart-empty",
          "summary-rendered"
        ],
        "transitions": [
          {
            "from": "cart-empty",
            "to": "summary-rendered",
            "trigger": "open the checkout entry with a non-empty cart"
          }
        ]
      }
    }
  ],
  "common_capabilities": {
    "account_registration": "account-registration",
    "account_sign_in": "account-sign-in",
    "email_delivery": "email-delivery",
    "password_recovery": "password-recovery",
    "session_lifecycle": "session-lifecycle"
  },
  "database": {
    "concurrency_model": "wal-transactional-single-writer",
    "deterministic_reset": true,
    "engine": "sqlite",
    "location_policy": "runtime-data-outside-candidate",
    "migration_strategy": "versioned-forward-migrations",
    "proofs": [
      {
        "evidence": [
          "clone/backend/site_backend_integration.py",
          "backend/runtime.json (database.data_dir=data, volume websitebench-backcountry-data)",
          "scope/verify.json (boot env WEBSITEBENCH_SITE_BACKEND_DATABASE)"
        ],
        "obligation": "data-location",
        "status": "verified"
      },
      {
        "evidence": [
          "clone/store.py::SCHEMA",
          "websitebench.local_clone_auth ensure_schema"
        ],
        "obligation": "schema-migration",
        "status": "verified"
      },
      {
        "evidence": [
          "clone/tests/test_backend.py::test_reset_state_is_deterministic",
          "clone/store.py::reset_state"
        ],
        "obligation": "deterministic-reset",
        "status": "verified"
      },
      {
        "evidence": [
          "clone/tests/test_backend.py::test_member_order_history_and_detail",
          "offline-clone diagnostic live section boots the clone against its own data dir"
        ],
        "obligation": "restart-persistence",
        "status": "verified"
      },
      {
        "evidence": [],
        "obligation": "backup-restore",
        "status": "planned"
      },
      {
        "evidence": [],
        "obligation": "concurrency",
        "status": "planned"
      }
    ],
    "restart_persistence": true,
    "site_isolation": "one-database-per-site"
  },
  "profile": "offline-benchmark",
  "schema_version": "offline-clone.backend-model.v1",
  "site_id": "backcountry",
  "status": "verified"
}