-
Notifications
You must be signed in to change notification settings - Fork 2
639 lines (624 loc) · 30.1 KB
/
Copy pathp-model-check.yaml
File metadata and controls
639 lines (624 loc) · 30.1 KB
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
name: P Model Check
on:
push:
branches:
- main
pull_request:
paths:
- 'p/**'
- '.github/workflows/p-model-check.yaml'
schedule:
- cron: '0 6 * * 1' # Every Monday at 06:00 UTC
permissions:
contents: read
env:
# Enforce NuGet package signature verification on the install steps below.
# On Linux/macOS this verification is opt-in (it defaults on only on Windows),
# so without this the signatureValidationMode=require in NuGet.config is a
# no-op on these runners.
# https://learn.microsoft.com/en-us/nuget/reference/signed-package-verification-options
DOTNET_NUGET_SIGNATURE_VERIFICATION: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
gc_reset: ${{ steps.filter.outputs.gc_reset }}
gc_reset_multinode: ${{ steps.filter.outputs.gc_reset_multinode }}
gc_leading_group: ${{ steps.filter.outputs.gc_leading_group }}
gc_reset_leading_group: ${{ steps.filter.outputs.gc_reset_leading_group }}
gc_decision: ${{ steps.filter.outputs.gc_decision }}
delete_stream_anchor: ${{ steps.filter.outputs.delete_stream_anchor }}
read_resolution: ${{ steps.filter.outputs.read_resolution }}
trimmed_segment: ${{ steps.filter.outputs.trimmed_segment }}
orphan_leak: ${{ steps.filter.outputs.orphan_leak }}
tier_routing: ${{ steps.filter.outputs.tier_routing }}
writer_fencing: ${{ steps.filter.outputs.writer_fencing }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Detect changed paths
id: filter
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE=${{ github.event.pull_request.base.sha }}
else
BASE=${{ github.event.before }}
fi
CHANGED=$(git diff --name-only "$BASE" HEAD)
echo "gc_reset=false" >> "$GITHUB_OUTPUT"
echo "gc_reset_multinode=false" >> "$GITHUB_OUTPUT"
echo "gc_leading_group=false" >> "$GITHUB_OUTPUT"
echo "gc_reset_leading_group=false" >> "$GITHUB_OUTPUT"
echo "gc_decision=false" >> "$GITHUB_OUTPUT"
echo "delete_stream_anchor=false" >> "$GITHUB_OUTPUT"
echo "read_resolution=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED" | grep -q '^p/gc-reset/' && echo "gc_reset=true" >> "$GITHUB_OUTPUT" || true
echo "$CHANGED" | grep -q '^p/gc-reset-multinode/' && echo "gc_reset_multinode=true" >> "$GITHUB_OUTPUT" || true
echo "$CHANGED" | grep -q '^p/gc-leading-group/' && echo "gc_leading_group=true" >> "$GITHUB_OUTPUT" || true
echo "$CHANGED" | grep -q '^p/gc-reset-leading-group/' && echo "gc_reset_leading_group=true" >> "$GITHUB_OUTPUT" || true
echo "$CHANGED" | grep -q '^p/gc-decision/' && echo "gc_decision=true" >> "$GITHUB_OUTPUT" || true
echo "$CHANGED" | grep -q '^p/delete-stream-anchor/' && echo "delete_stream_anchor=true" >> "$GITHUB_OUTPUT" || true
echo "$CHANGED" | grep -q '^p/read-resolution/' && echo "read_resolution=true" >> "$GITHUB_OUTPUT" || true
echo "trimmed_segment=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED" | grep -q '^p/trimmed-segment/' && echo "trimmed_segment=true" >> "$GITHUB_OUTPUT" || true
echo "orphan_leak=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED" | grep -q '^p/orphan-leak/' && echo "orphan_leak=true" >> "$GITHUB_OUTPUT" || true
echo "tier_routing=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED" | grep -q '^p/tier-routing/' && echo "tier_routing=true" >> "$GITHUB_OUTPUT" || true
echo "writer_fencing=false" >> "$GITHUB_OUTPUT"
echo "$CHANGED" | grep -q '^p/writer-fencing/' && echo "writer_fencing=true" >> "$GITHUB_OUTPUT" || true
if echo "$CHANGED" | grep -q '^\.github/workflows/p-model-check\.yaml'; then
echo "gc_reset=true" >> "$GITHUB_OUTPUT"
echo "gc_reset_multinode=true" >> "$GITHUB_OUTPUT"
echo "gc_leading_group=true" >> "$GITHUB_OUTPUT"
echo "gc_reset_leading_group=true" >> "$GITHUB_OUTPUT"
echo "gc_decision=true" >> "$GITHUB_OUTPUT"
echo "delete_stream_anchor=true" >> "$GITHUB_OUTPUT"
echo "read_resolution=true" >> "$GITHUB_OUTPUT"
echo "trimmed_segment=true" >> "$GITHUB_OUTPUT"
echo "orphan_leak=true" >> "$GITHUB_OUTPUT"
echo "tier_routing=true" >> "$GITHUB_OUTPUT"
echo "writer_fencing=true" >> "$GITHUB_OUTPUT"
fi
gc-reset:
needs: changes
if: needs.changes.outputs.gc_reset == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/gc-reset
p compile
- name: Tests that must hold
run: |
cd p/gc-reset
for tc in tcGcResetGuarded tcGcResetExplore tcEpochAxisSafe; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
# PCT surfaces rare interleavings the random strategy misses.
echo "::group::tcGcResetExplore (PCT)"
p check -tc tcGcResetExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (the guard-removed model must reproduce GC x reset)
run: |
cd p/gc-reset
rm -rf PCheckerOutput/
echo "::group::tcGcResetUnguarded (expect the GC x reset counterexample)"
if p check -tc tcGcResetUnguarded -i 2000; then
echo "ERROR: tcGcResetUnguarded passed; the model no longer reproduces GC x reset."
echo "The guard-removed model must fail, otherwise the guarded result is not trustworthy."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted live object (offset=850, uid=2)' PCheckerOutput/BugFinding/; then
echo "ERROR: the unguarded run failed, but not with the expected INV#2 (850, uid 2) counterexample."
exit 1
fi
echo "Gate satisfied: guard-removed model fails with the expected dangling reference."
echo "::endgroup::"
- name: Validation gate (the reset atomic-prefix ordering is load-bearing)
run: |
cd p/gc-reset
rm -rf PCheckerOutput/
# The floor-last ordering deletes a live object even with the guard on.
# It is a rare interleaving that the random strategy misses, so use PCT.
echo "::group::tcGcResetFloorLast (expect the GC x reset counterexample under PCT)"
if p check -tc tcGcResetFloorLast --sch-pct 10 -i 5000; then
echo "ERROR: tcGcResetFloorLast passed; lowering the floor after the re-tier no longer"
echo "deletes a live object. The atomic-prefix ordering is supposed to be necessary."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted live object (offset=850, uid=2)' PCheckerOutput/BugFinding/; then
echo "ERROR: the floor-last run failed, but not with the expected INV#2 (850, uid 2) counterexample."
exit 1
fi
echo "Gate satisfied: floor-last ordering fails with the expected dangling reference."
echo "::endgroup::"
gc-reset-multinode:
needs: changes
if: needs.changes.outputs.gc_reset_multinode == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/gc-reset-multinode
p compile
- name: Tests that must hold
run: |
cd p/gc-reset-multinode
for tc in tcMultiNodeStaleGuarded tcMultiNodeSyncedGuarded tcMultiNodeExplore; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
# PCT surfaces rare interleavings the random strategy misses.
echo "::group::tcMultiNodeExplore (PCT)"
p check -tc tcMultiNodeExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (a stale replica cache must defeat still_dangling)
run: |
cd p/gc-reset-multinode
rm -rf PCheckerOutput/
echo "::group::tcMultiNodeStaleUnguarded (expect the cross-node GC x reset counterexample)"
if p check -tc tcMultiNodeStaleUnguarded -i 2000; then
echo "ERROR: tcMultiNodeStaleUnguarded passed; the model no longer reproduces the stale-cache delete."
echo "With the epoch guard off and the reset sync dropped, the shipped still_dangling/1 guard"
echo "must re-read the stale floor and delete a live object, otherwise the guarded result is not trustworthy."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted live object (offset=850, uid=2)' PCheckerOutput/BugFinding/; then
echo "ERROR: the unguarded run failed, but not with the expected INV#2 (850, uid 2) counterexample."
exit 1
fi
echo "Gate satisfied: a stale replica cache defeats still_dangling and deletes the re-tiered live object."
echo "::endgroup::"
gc-leading-group:
needs: changes
if: needs.changes.outputs.gc_leading_group == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/gc-leading-group
p compile
- name: Tests that must hold
run: |
cd p/gc-leading-group
echo "::group::tcLeadingGroupGuarded (expect hold)"
p check -tc tcLeadingGroupGuarded -i 5000
echo "::endgroup::"
- name: Validation gate (removing the carve-out must delete the leading group)
run: |
cd p/gc-leading-group
echo "::group::tcLeadingGroupUnguarded (expect the INV#2 dangling reference)"
if p check -tc tcLeadingGroupUnguarded -i 2000; then
echo "ERROR: tcLeadingGroupUnguarded passed; the model no longer deletes the leading group."
echo "Removing the referenced_group_key carve-out must delete a live group."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted referenced object (offset=80, uid=2)' PCheckerOutput/BugFinding/; then
echo "ERROR: the carve-out-removed run failed, but not with the expected INV#2 (80, uid 2) counterexample."
exit 1
fi
echo "Gate satisfied: carve-out-removed model deletes the referenced leading group."
echo "::endgroup::"
gc-reset-leading-group:
needs: changes
if: needs.changes.outputs.gc_reset_leading_group == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/gc-reset-leading-group
p compile
- name: Tests that must hold
run: |
cd p/gc-reset-leading-group
for tc in tcLeadingGroupResetFixed tcLeadingGroupResetExplore tcLeadingGroupRetentionOnly; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
# PCT surfaces rare interleavings the random strategy misses.
echo "::group::tcLeadingGroupResetExplore (PCT)"
p check -tc tcLeadingGroupResetExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (offset-only re-check must delete the live leading group)
run: |
cd p/gc-reset-leading-group
rm -rf PCheckerOutput/
echo "::group::tcLeadingGroupResetBug (expect the GC x reset x leading-group counterexample)"
if p check -tc tcLeadingGroupResetBug -i 2000; then
echo "ERROR: tcLeadingGroupResetBug passed; the model no longer deletes the live leading group."
echo "The offset-only still_dangling re-check must delete a reset-installed leading group,"
echo "otherwise the carve-out re-validation result is not trustworthy."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted live object (offset=850, uid=2) still referenced by the manifest (live leading group)' PCheckerOutput/BugFinding/; then
echo "ERROR: the offset-only run failed, but not with the expected INV#2 (850, uid 2) leading-group counterexample."
exit 1
fi
echo "Gate satisfied: the offset-only re-check deletes the live leading group."
echo "::endgroup::"
gc-decision:
needs: changes
if: needs.changes.outputs.gc_decision == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/gc-decision
p compile
- name: Tests that must hold
run: |
cd p/gc-decision
for tc in tcGcBasicReclaim tcGcCrossNodeStaleGuarded tcGcCrossNodeSynced \
tcGcResetRereadHolds tcGcLeadingGroupHolds tcGcResetAfterSnapshotGuarded \
tcGcExploreGuarded; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
# PCT surfaces rare interleavings the random strategy misses.
echo "::group::tcGcExploreGuarded (PCT)"
p check -tc tcGcExploreGuarded --sch-pct 20 -i 6000
echo "::endgroup::"
- name: Validation gate (each shipped guard is load-bearing)
run: |
cd p/gc-decision
# Each gate removes one shipped guard and must reproduce a live deletion
# with the specific counterexample object, otherwise the guarded result
# is not trustworthy.
check_gate() {
tc="$1"; expected="$2"
rm -rf PCheckerOutput/
echo "::group::$tc (expect $expected)"
if p check -tc "$tc" -i 2000; then
echo "ERROR: $tc passed; the model no longer reaps live data with this guard removed."
exit 1
fi
if ! grep -rqF "$expected" PCheckerOutput/BugFinding/; then
echo "ERROR: $tc failed, but not with the expected counterexample: $expected"
exit 1
fi
echo "Gate satisfied: $tc reaps live data as expected."
echo "::endgroup::"
}
check_gate tcGcCrossNodeStaleUnguarded 'INV#2 violated: GC deleted live object (kind=0, offset=850, uid=2, epoch=0)'
check_gate tcGcNoReread 'INV#2 violated: GC deleted live object (kind=0, offset=80, uid=3, epoch=0)'
check_gate tcGcNoLeadingReread 'INV#2 violated: GC deleted live object (kind=1, offset=80, uid=820, epoch=0)'
- name: Validation gate (the reset-after-snapshot gap, shipped guards only)
run: |
cd p/gc-decision
# With all three shipped guards on, a reset that commits after the sweep
# snapshots still reaps the live re-tier: the epoch gate was already
# sampled and still_dangling re-reads the same stale floor. The proposed
# GUARD D (tcGcResetAfterSnapshotGuarded above) closes it; these must fail.
rm -rf PCheckerOutput/
echo "::group::tcGcResetAfterSnapshotStale (expect the reset-after-snapshot counterexample)"
if p check -tc tcGcResetAfterSnapshotStale -i 2000; then
echo "ERROR: tcGcResetAfterSnapshotStale passed; the shipped-guard gap is no longer reproduced."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted live object (kind=0, offset=80, uid=3, epoch=0)' PCheckerOutput/BugFinding/; then
echo "ERROR: the run failed, but not with the expected (offset=80, uid=3) counterexample."
exit 1
fi
echo "Gate satisfied: reset-after-snapshot reaps the live re-tier under shipped guards."
echo "::endgroup::"
rm -rf PCheckerOutput/
echo "::group::tcGcExploreShipped (PCT, expect the same gap)"
if p check -tc tcGcExploreShipped --sch-pct 20 -i 6000; then
echo "ERROR: tcGcExploreShipped passed; PCT no longer reaches the reset-after-snapshot gap."
exit 1
fi
if ! grep -rqF 'INV#2 violated: GC deleted live object' PCheckerOutput/BugFinding/; then
echo "ERROR: tcGcExploreShipped failed, but not via the INV#2 dangling reference."
exit 1
fi
echo "Gate satisfied: PCT reaches the reset-after-snapshot live deletion."
echo "::endgroup::"
delete-stream-anchor:
needs: changes
if: needs.changes.outputs.delete_stream_anchor == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/delete-stream-anchor
p compile
- name: Tests that must hold
run: |
cd p/delete-stream-anchor
for tc in tcAnchorReclaimsAcrossCrash tcAnchorExplore; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
# PCT surfaces rare interleavings the random strategy misses.
echo "::group::tcAnchorExplore (PCT)"
p check -tc tcAnchorExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (a stale read or out-of-order anchor must reap live data)
run: |
cd p/delete-stream-anchor
# Both MUST fail with the NOREAPLIVE counterexample. A green here means
# the model no longer reaches the live-data reap, i.e. the consistent-read
# or anchor-before-fragment requirement is no longer load-bearing in the
# model and the by-construction result is not trustworthy.
for tc in tcAnchorStaleReadReapsLive tcAnchorOrderingViolated; do
rm -rf PCheckerOutput/
echo "::group::$tc (expect the live-reap counterexample)"
if p check -tc "$tc" -i 2000; then
echo "ERROR: $tc passed; the model no longer reaps live data."
echo "A stale anchor read (or a fragment written before the anchor) must reap a live"
echo "stream, otherwise the consistent-read / ordering requirement is not load-bearing."
exit 1
fi
if ! grep -rqF 'INV NOREAPLIVE violated' PCheckerOutput/BugFinding/; then
echo "ERROR: $tc failed, but not with the expected NOREAPLIVE counterexample."
exit 1
fi
echo "Gate satisfied: $tc reaps live data as expected."
echo "::endgroup::"
done
read-resolution:
needs: changes
if: needs.changes.outputs.read_resolution == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/read-resolution
p compile
- name: Tests that must hold
run: |
cd p/read-resolution
for tc in tcReadResolveGuarded tcReadResolveExplore; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
echo "::group::tcReadResolveExplore (PCT)"
p check -tc tcReadResolveExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (the catch-all model must reproduce the silent skip)
run: |
cd p/read-resolution
echo "::group::tcReadResolveBuggy (expect the INV#4 silent remote skip)"
if p check -tc tcReadResolveBuggy -i 2000; then
echo "ERROR: tcReadResolveBuggy passed; the model no longer reproduces the silent remote skip."
echo "The catch-all model must fail, otherwise the guarded result is not trustworthy."
exit 1
fi
if ! grep -rqF 'INV#4 violated: resolved' PCheckerOutput/BugFinding/; then
echo "ERROR: the catch-all run failed, but not with the expected INV#4 silent-skip counterexample."
exit 1
fi
echo "Gate satisfied: catch-all model fails with the expected silent remote skip."
echo "::endgroup::"
trimmed-segment:
needs: changes
if: needs.changes.outputs.trimmed_segment == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/trimmed-segment
p compile
- name: Tests that must hold
run: |
cd p/trimmed-segment
for tc in tcTrimGuarded tcTrimExplore; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
echo "::group::tcTrimExplore (PCT)"
p check -tc tcTrimExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (removing local_log_ahead must wedge the transfer)
run: |
cd p/trimmed-segment
echo "::group::tcTrimBuggy (expect the liveness obligation to fail)"
if p check -tc tcTrimBuggy -i 2000; then
echo "ERROR: tcTrimBuggy passed; the model no longer wedges on a trimmed segment."
echo "Removing the local_log_ahead recovery must leave the transfer unresolved forever."
exit 1
fi
if ! grep -rqF "hot state 'AwaitingResolution'" PCheckerOutput/BugFinding/; then
echo "ERROR: the buggy run failed, but not via the TransferEventuallyResolves liveness obligation."
exit 1
fi
echo "Gate satisfied: the check-removed model leaves the transfer permanently unresolved."
echo "::endgroup::"
orphan-leak:
needs: changes
if: needs.changes.outputs.orphan_leak == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/orphan-leak
p compile
- name: Tests that must hold
run: |
cd p/orphan-leak
for tc in tcOrphanGuarded tcOrphanExplore; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
echo "::group::tcOrphanExplore (PCT)"
p check -tc tcOrphanExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (removing the GC re-sweep must leak an orphan)
run: |
cd p/orphan-leak
echo "::group::tcOrphanBuggy (expect the liveness obligation to fail)"
if p check -tc tcOrphanBuggy -i 2000; then
echo "ERROR: tcOrphanBuggy passed; the model no longer leaks a transiently-failed delete."
echo "Removing the GC re-sweep must leave an orphan permanently outstanding."
exit 1
fi
if ! grep -rqF "hot state 'Dirty'" PCheckerOutput/BugFinding/; then
echo "ERROR: the buggy run failed, but not via the OrphanEventuallyReclaimed liveness obligation."
exit 1
fi
echo "Gate satisfied: the re-sweep-removed model leaks an orphan forever."
echo "::endgroup::"
tier-routing:
needs: changes
if: needs.changes.outputs.tier_routing == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/tier-routing
p compile
- name: Tests that must hold
run: |
cd p/tier-routing
echo "::group::tcTierRoutingGuarded (expect hold)"
p check -tc tcTierRoutingGuarded -i 5000
echo "::endgroup::"
- name: Validation gate (removing the first_chunk_id == -1 guard must misroute)
run: |
cd p/tier-routing
echo "::group::tcTierRoutingBuggy (expect the INV#4 silent remote skip)"
if p check -tc tcTierRoutingBuggy -i 2000; then
echo "ERROR: tcTierRoutingBuggy passed; the model no longer misroutes an empty-local read."
echo "Removing the first_chunk_id =/= -1 guard must route a remote-only offset locally."
exit 1
fi
if ! grep -rqF 'INV#4 violated: an offset held only by the remote tier' PCheckerOutput/BugFinding/; then
echo "ERROR: the guard-removed run failed, but not with the expected INV#4 misrouting counterexample."
exit 1
fi
echo "Gate satisfied: the guard-removed model routes a remote-only offset to the local tier."
echo "::endgroup::"
writer-fencing:
needs: changes
if: needs.changes.outputs.writer_fencing == 'true' || github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0
with:
dotnet-version: '8.0.x'
- name: Install the P checker
run: |
dotnet tool install --global P --version 3.1.0 --configfile "$GITHUB_WORKSPACE/p/NuGet.config"
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Compile
run: |
cd p/writer-fencing
p compile
- name: Tests that must hold
run: |
cd p/writer-fencing
for tc in tcFencingGuarded tcFencingExplore; do
echo "::group::$tc (expect hold)"
p check -tc "$tc" -i 5000
echo "::endgroup::"
done
echo "::group::tcFencingExplore (PCT)"
p check -tc tcFencingExplore --sch-pct 10 -i 5000
echo "::endgroup::"
- name: Validation gate (removing the epoch fence must allow split-brain)
run: |
cd p/writer-fencing
echo "::group::tcFencingUnguarded (expect the epoch regression)"
if p check -tc tcFencingUnguarded -i 2000; then
echo "ERROR: tcFencingUnguarded passed; the model no longer regresses the committed epoch."
echo "Removing the epoch fence must let a deposed writer overwrite a newer one."
exit 1
fi
if ! grep -rqF 'split-brain: committed epoch regressed' PCheckerOutput/BugFinding/; then
echo "ERROR: the fence-removed run failed, but not with the expected split-brain regression."
exit 1
fi
echo "Gate satisfied: the fence-removed model regresses the committed epoch."
echo "::endgroup::"