Repository navigation
Expand file tree
/
Copy pathparity-matrix.yaml
More file actions
4039 lines (3719 loc) · 272 KB
/
Copy pathparity-matrix.yaml
File metadata and controls
4039 lines (3719 loc) · 272 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
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
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# =============================================================================
# @devcontainers/cli — Parity Matrix TS ↔ Go
# Complementary source to cli-flags-inventory.yaml
# Goal: reduce iterations by separating parity by lanes and by small cases
# =============================================================================
meta:
generated_for_branch: go-rewrite
scope:
languages: [ts, go]
commands: [features-info, read-configuration, exec, run-user-commands, set-up, up, build]
global_flags: [oci-auth-hardening, allow-cross-origin-auth-host]
lanes:
contract:
description: "Parsing, required args, enums, error formats, output shape"
docker_required: false
semantic:
description: "Logical behavior with fixtures or controlled metadata"
docker_required: mixed
runtime:
description: "Flows with real Docker, compose, lifecycle, buildx"
docker_required: true
statuses:
- missing
- mismatch
- match
- blocked-infra
- deferred-runtime
execution_order:
- phase: 1
lane: contract
commands: [features-info, read-configuration, exec, run-user-commands, set-up]
reason: "Highest return on cost; detects contract gaps without Docker noise"
- phase: 2
lane: contract
commands: [up, build]
reason: "Closes out validations and envelopes before runtime"
- phase: 3
lane: semantic
commands: [features-info, read-configuration, exec, run-user-commands]
reason: "Detects partially wired flags or divergent semantics"
- phase: 4
lane: runtime
commands: [set-up, up]
reason: "Minimal happy path and error path"
- phase: 5
lane: runtime
commands: [build]
reason: "Highest infrastructure noise; leave for last"
normalization:
stdout_json:
- sort_keys
- drop_nulls
- drop_absolute_paths
- drop_volatile_ids
stderr:
- redact_timestamps
- redact_host_paths
- redact_container_ids
- optionally_non_fatal
assertions:
- exit_code
- stdout_normalized
- stderr_normalized
initial_cases:
- id: features-info.invalid-mode
lane: contract
command: features-info
priority: p0
docker_required: false
ts_cmd: "features info invalid ghcr.io/devcontainers/features/go"
asserts: [exit_code, stderr_normalized]
class: mode-validation
current_status: match
notes: "Keep as a guardrail; previously missing in Go"
- id: features-info.manifest-json
lane: contract
command: features-info
priority: p0
docker_required: false
network_required: true
ts_cmd: "features info manifest ghcr.io/devcontainers/features/go --output-format json"
asserts: [exit_code, stdout_normalized]
class: output-shape
current_status: match
- id: features-info.tags-json
lane: contract
command: features-info
priority: p0
docker_required: false
network_required: true
ts_cmd: "features info tags ghcr.io/devcontainers/features/go --output-format json"
asserts: [exit_code, stdout_normalized]
class: output-shape
current_status: match
- id: features-info.dependencies-text
lane: semantic
command: features-info
priority: p0
docker_required: false
network_required: true
ts_cmd: "features info dependencies ghcr.io/devcontainers/features/go"
asserts: [exit_code, stdout_normalized, stderr_normalized]
class: dependency-graph
current_status: match
notes: "The normalized output now converges in the A/B comparison"
- id: features-info.invalid-output-format
lane: contract
command: features-info
priority: p1
docker_required: false
ts_cmd: "features info manifest ghcr.io/devcontainers/features/go --output-format yaml"
asserts: [exit_code, stderr_normalized]
class: enum-validation
current_status: match
- id: features-info.invalid-log-level
lane: contract
command: features-info
priority: p1
docker_required: false
ts_cmd: "features info manifest ghcr.io/devcontainers/features/go --log-level warning"
asserts: [exit_code, stderr_normalized]
class: enum-validation
current_status: match
- id: features-info.invalid-feature-id-text
lane: contract
command: features-info
priority: p1
docker_required: false
ts_cmd: "features info manifest not-a-feature-id"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
- id: features-info.invalid-feature-id-json
lane: contract
command: features-info
priority: p1
docker_required: false
ts_cmd: "features info manifest not-a-feature-id --output-format json"
asserts: [exit_code, stdout_normalized]
class: parse-validation
current_status: match
# --- Cases that pin down divergences uncovered by the coverage audit ---
- id: up.invalid-workspace-mount-consistency
lane: contract
command: up
priority: p1
docker_required: false
ts_cmd: "up --workspace-folder src/test/configs/image --workspace-mount-consistency bogus"
asserts: [exit_code, stderr_normalized]
class: enum-validation
current_status: match
notes: "TS validates the yargs enum [consistent,cached,delegated]; Go previously passed the raw value to docker."
- id: features-publish.invalid-log-level
lane: contract
command: features-publish
priority: p1
docker_required: false
ts_cmd: "features publish src/test/configs --namespace o/r --log-level bogus"
asserts: [exit_code, stderr_normalized]
class: enum-validation
current_status: match
notes: "TS rejects --log-level outside [info,debug,trace]; Go previously defaulted to Info and continued."
- id: features.resolve-dependencies-no-features
lane: contract
command: features
priority: p1
docker_required: false
ts_cmd: "features resolve-dependencies --workspace-folder src/test/configs/image"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
notes: "config with no features → TS errors to stderr exit 1; Go previously printed {installOrder:[]} exit 0."
- id: features.resolve-dependencies-malformed-lockfile-error
lane: contract
command: features
priority: p1
docker_required: false
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; printf '%s' '{\"features\":{} x' > $WORKSPACE/.devcontainer/devcontainer-lock.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "features resolve-dependencies --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_normalized, stderr_normalized]
class: lockfile-error
current_status: match
notes: "readLockfile rethrows JSON.parse's SyntaxError and runAsyncHandler console.errors it: 'SyntaxError: Expected ',' or '}' after property value in JSON at position 15 (line 1 column 16)' on stderr, exit 1, nothing on stdout. Go used to ignore the lockfile and print the graph."
# --- Wave A: new cases (some uncovered divergences, now fixed) ---
- id: features-publish.missing-required
lane: contract
command: features-publish
priority: p1
docker_required: false
ts_cmd: "features publish src/test/configs"
asserts: [exit_code, stderr_normalized]
class: required-args
current_status: match
notes: "TS: 'Missing required argument: namespace'. Go emitted the cobra phrasing (MarkFlagRequired); now publishCollection validates an empty namespace with the same message."
- id: templates.publish-missing-namespace
lane: contract
command: templates
priority: p1
docker_required: false
ts_cmd: "templates publish src/test/configs"
asserts: [exit_code, stderr_normalized]
class: required-args
current_status: match
notes: "Identical to features-publish.missing-required: message 'Missing required argument: namespace'."
- id: up.invalid-default-user-env-probe
lane: contract
command: up
priority: p1
docker_required: false
ts_cmd: "up --workspace-folder src/test/configs/image --default-user-env-probe bogus"
asserts: [exit_code, stderr_normalized]
class: enum-validation
current_status: match
notes: "TS rejects the yargs enum; Go validates the same enum before touching Docker."
- id: build.compose-output-not-supported
lane: contract
command: build
priority: p1
docker_required: false
ts_cmd: "build --workspace-folder src/test/configs/compose-image-with-features --output type=local"
asserts: [exit_code, stdout_normalized, stderr_normalized]
class: wired-flags
current_status: match
notes: "compose + --output → TS throws '--output not supported.'"
- id: features.test-reject-global-scenarios-and-features
lane: contract
command: features
priority: p1
docker_required: false
ts_cmd: "features test --global-scenarios-only --features x"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
notes: "Mutual exclusion. Go emitted different wording; now it uses the oracle's ('Cannot combine --global-scenarios-only and --features')."
- id: features.test-reject-skip-scenarios-and-global-scenarios
lane: contract
command: features
priority: p1
docker_required: false
ts_cmd: "features test --skip-scenarios --global-scenarios-only"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
notes: "Go aligned with the oracle's text+order ('Cannot combine --skip-scenarios and --global-scenarios-only')."
- id: templates.apply-invalid-template-args-exit1
lane: contract
command: templates
priority: p1
docker_required: false
ts_cmd: "templates apply --template-id ghcr.io/x/y:1 --template-args [1,2,3]"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
notes: "Go emitted the parser detail; now a fixed message 'Invalid template arguments provided.' like TS."
- id: set-up.invalid-remote-env
lane: contract
command: set-up
priority: p1
docker_required: false
ts_cmd: "set-up --container-id fake --remote-env BROKEN"
asserts: [exit_code, stderr_normalized]
class: format-validation
current_status: match
notes: "set-up did not validate --remote-env; now it calls validateRemoteEnvs like its sibling commands."
# --- Wave A batch 2: new cases (6 more divergences fixed) ---
- id: upgrade.err-invalid-target-version-format
lane: contract
command: upgrade
priority: p1
docker_required: false
ts_cmd: "upgrade --workspace-folder src/test/configs/image-with-features --feature ghcr.io/devcontainers/features/node --target-version abc"
asserts: [exit_code, stderr_normalized]
class: version-validation
current_status: match
notes: "TS validates in yargs .check() before the handler: --target-version must be x / x.y / x.y.z. 'abc' => exit 1 'Invalid version 'abc'. Must be in the form of 'x', 'x.y', or 'x.y.z''. Go previously declared --feature/--target-version as hidden but never read them (normal upgrade, exit 0); now RunE validates the format with the same regex and text."
- id: upgrade.err-feature-without-target-version
lane: contract
command: upgrade
priority: p1
docker_required: false
ts_cmd: "upgrade --workspace-folder src/test/configs/image-with-features --feature ghcr.io/devcontainers/features/node"
asserts: [exit_code, stderr_normalized]
class: version-validation
current_status: match
notes: "XOR from yargs .check(): --feature and --target-version must be used together. Only --feature => exit 1 'The '--target-version' and '--feature' flag must be used together.'. Go ignored both flags; now RunE applies the XOR with the same message."
- id: upgrade.err-invalid-log-level
lane: contract
command: upgrade
priority: p1
docker_required: false
ts_cmd: "upgrade --workspace-folder src/test/configs/image-with-features --log-level warn --feature ghcr.io/devcontainers/features/node"
asserts: [exit_code, stderr_normalized]
class: format-validation
current_status: match
notes: "upgrade's --log-level is a yargs choice of error/info/debug/trace (featuresUpgradeOptions), checked before .check(): 'warn' => exit 1 with the invalid-choice error, not the --feature/--target-version one. Go accepted any value and ran."
- id: upgrade.err-no-features
lane: contract
command: upgrade
priority: p1
docker_required: false
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE; printf '%s' '{\"image\":\"alpine:3\"}' > $WORKSPACE/.devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "test ! -e ${WORKSPACE}/.devcontainer-lock.json"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "upgrade --workspace-folder ${WORKSPACE}"
asserts: [exit_code]
class: upgrade-runtime
current_status: match
notes: "Without Features generateFeaturesConfig returns undefined and upgrade throws ContainerError 'Failed to update lockfile' (upgradeCommand.ts): exit 1 and no lockfile written (verify_cmd). TS logs the inspected error object, whose last line is '}', so only the exit code is compared; TestUpgradeFailsWithoutFeatures holds the message. Go wrote {\"features\":{}} and exited 0."
- id: outdated.json-not-a-terminal-success
lane: contract
command: outdated
priority: p1
docker_required: false
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "outdated --workspace-folder ${WORKSPACE} --output-format json"
asserts: [exit_code, stdout_text]
class: outdated
current_status: match
notes: "outdated writes JSON.stringify(outdated, undefined, process.stdout.isTTY ? ' ' : undefined): with stdout not a terminal, as here, the result is one unindented line ({\"features\":{}}, a local Feature having no versions). Go used to indent it always."
- id: outdated.text-without-features-success
lane: contract
command: outdated
priority: p1
docker_required: false
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"image\":\"alpine:3\"}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "outdated --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_text]
class: outdated
current_status: match
notes: "Without Features, loadVersionInfo returns no Features and outdated writes its text table with no rows: the header alone ('Feature Current Wanted Latest'). Go used to print 'No features configured.'."
- id: outdated.malformed-lockfile-error
lane: contract
command: outdated
priority: p1
docker_required: false
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"ghcr.io/devcontainers/features/node:1\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; printf '%s' 'not json' > $WORKSPACE/.devcontainer/devcontainer-lock.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "outdated --workspace-folder ${WORKSPACE} --output-format json"
asserts: [exit_code, stdout_normalized, stderr_normalized]
class: lockfile-error
current_status: match
notes: "readLockfile rethrows JSON.parse's SyntaxError; outdated's catch logs its stack at debug level and exits 1, so at the default log level stdout and stderr say nothing (TS prints only its banner). Go used to ignore the lockfile and report the versions."
- id: outdated.image-with-features-text
lane: runtime
command: outdated
priority: p1
network_required: true
ts_cmd: "outdated --workspace-folder src/test/configs/image-with-features --output-format text"
asserts: [exit_code, stdout_normalized]
class: outdated-runtime
current_status: match
notes: "outdated --output-format text: the Feature column is the full userFeatureId without tag (getFeatureIdWithoutVersion), rows follow the config's insertion order, and the format is the npm text-table (minimum widths, 2-space separator, left-aligned, no trailing spaces). Go previously shortened to the last 2 segments with tag, sorted alphabetically (map), and padded to %-50s with trailing spaces."
- id: features.package-single-feature-success
lane: runtime
command: features-package
priority: p1
docker_required: false
ts_cmd: "features package reference/src/test/container-features/example-v2-features-sets/simple/src/color -o ${PKG_OUT} -f"
setup_cmd: "PKG_OUT=/tmp/parity-pkg-single-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf ${PKG_OUT}; echo PKG_OUT=$PKG_OUT"
verify_cmd: "test -f ${PKG_OUT}/devcontainer-feature-color.tgz && test -f ${PKG_OUT}/devcontainer-collection.json && printf ok"
cleanup_cmd: "rm -rf ${PKG_OUT}"
asserts: [exit_code, stdout_normalized]
class: collection-packaging
current_status: match
notes: "--target points to a folder for a SINGLE feature (devcontainer-feature.json + install.sh directly). TS dispatches packageSingleFeature (exit 0: tgz + a 1-element collection); Go iterated only subdirectories → empty collection → 'Failed to package'. Fix: packageCollection detects the metadata in the root folder and packages it as single."
- id: features.test-missing-src-test-folders
lane: contract
command: features
priority: p1
docker_required: false
ts_cmd: "features test --project-folder src/test/configs/image"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
notes: "project-folder with neither src/ nor test/. TS prints the banner and then the error to STDOUT (chalk.red, prefix '[-]') and exits 1; Go wrote the error to STDERR via the logger and without a banner. Fix: banner before the check + error to STDOUT with the exact text ('does not contain the required ''src'' and ''test'' folders.'). Both sides leave STDERR empty, so extractErrorReason canonicalizes to '' on both and stderr_normalized matches. stdout_normalized is not asserted: the TS banner carries the literal version 'vX.Y.Z' that the normalizer does not scrub (it would need a version-scrub, wave B)."
- id: build.no-lockfile-frozen-lockfile-mutually-exclusive
lane: contract
command: build
priority: p1
docker_required: false
ts_cmd: "build --no-lockfile --frozen-lockfile"
asserts: [exit_code, stderr_normalized]
class: parse-validation
current_status: match
notes: "TS registers --no-lockfile/--frozen-lockfile as public and rejects all 3 no-lockfile+frozen combinations ('--no-lockfile and --frozen-lockfile are mutually exclusive.'). Go previously registered only the hidden --experimental-* → 'unknown flag: --no-lockfile'."
- id: exec.workspace-image-nonzero-exit
lane: runtime
command: exec
priority: p1
docker_required: true
ts_cmd: "exec --workspace-folder src/test/configs/image --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} sh -c \"exit 7\""
setup_cmd: "if [ \"${PARITY_SIDE}\" = \"ts\" ]; then ${PARITY_CLI_TS} up --workspace-folder src/test/configs/image --buildkit=never --skip-post-create --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} --remove-existing-container >/dev/null; else ${PARITY_CLI_GO} up --workspace-folder src/test/configs/image --buildkit=never --skip-post-create --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} --remove-existing-container >/dev/null; fi"
cleanup_cmd: "IDS=$(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}); [ -n \"$IDS\" ] && docker rm -f $IDS >/dev/null 2>&1 || true"
asserts: [exit_code]
class: container-runtime
current_status: match
notes: "exec propagates the remote command's exit code (sh -c 'exit 7' -> exit 7 on both CLIs). Only exit_code is asserted: stdout is empty on both; stderr differs (Go emits a banner + bash noise 'no job control', TS does not)."
- id: exec.container-not-found
lane: runtime
command: exec
priority: p1
docker_required: true
ts_cmd: "exec --workspace-folder src/test/configs/image --id-label parity.case=missing echo hi"
asserts: [exit_code, stderr_normalized]
class: container-runtime
current_status: match
notes: "With no container running: both CLIs fail with 'Dev container not found.' exit 1. extractErrorReason normalizes Go's banner and TS's stack trace to the same reason."
- id: templates.publish-collection-success
lane: runtime
command: templates
priority: p1
docker_required: true
setup_cmd: "REG_NAME=parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE}; docker rm -f $REG_NAME >/dev/null 2>&1; docker run -d --name $REG_NAME -p 127.0.0.1::5000 registry:3 >/dev/null; PORT=$(docker port $REG_NAME 5000/tcp | head -1 | sed s/.*://); curl -s --retry 30 --retry-delay 1 --retry-connrefused http://localhost:$PORT/v2/ >/dev/null 2>&1; echo REGISTRY=localhost:$PORT"
cleanup_cmd: "docker rm -f parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1 || true"
ts_cmd: "templates publish reference/src/test/container-templates/example-templates-sets/simple/src -r ${REGISTRY} -n octocat/templates"
asserts: [exit_code, stdout_normalized]
class: templates-runtime
current_status: match
notes: "publishes the template collection (alpine, cpp, mytemplate, node-mongo) to a LOCAL registry:3, one per side started in setup_cmd with host 'localhost' (not 127.0.0.1) so that the TS OCI client uses plain HTTP. The random host port is captured via echo REGISTRY=localhost:PORT (the harness reSetupEnv injects it into the ts_cmd env). stdout = result-map JSON { id: {publishedTags:[1,1.0,1.0.0,latest], digest, version} }; the tarball digest differs between sides (Go tar vs node-tar) but is scrubbed to sha256:<HASH>, and the keys are ordered by normalizeValue. Each side uses its own fresh registry -> deterministic publishedTags."
- id: features-publish.legacy-ids-single-segment-namespace-success
lane: runtime
command: features-publish
priority: p1
docker_required: true
setup_cmd: "REG_NAME=parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE}; docker rm -f $REG_NAME >/dev/null 2>&1; docker run -d --name $REG_NAME -p 127.0.0.1::5000 registry:3 >/dev/null; PORT=$(docker port $REG_NAME 5000/tcp | head -1 | sed s/.*://); curl -s --retry 30 --retry-delay 1 --retry-connrefused http://localhost:$PORT/v2/ >/dev/null 2>&1; echo REGISTRY=localhost:$PORT"
verify_cmd: "curl -s http://${REGISTRY}/v2/myorg/tags/list"
cleanup_cmd: "docker rm -f parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1 || true"
ts_cmd: "features publish reference/src/test/container-features/example-v2-features-sets/renaming-feature/src -r ${REGISTRY} -n myorg"
asserts: [exit_code, stdout_normalized]
class: features-runtime
current_status: match
notes: "renaming-feature publishes hello and new-color; new-color's legacyIds (color, old-color) are republished and reported inside the item as publishedLegacyIds (featuresCLI/publish.ts), not as items of their own. The one-segment namespace is a valid collection (getCollectionRef): verify_cmd lists the collection's tags (latest). Go used to report the aliases as items and to skip the collection metadata for a one-segment namespace."
- id: features-publish.already-published-success
lane: runtime
command: features-publish
priority: p1
docker_required: true
setup_cmd: "REG_NAME=parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE}; docker rm -f $REG_NAME >/dev/null 2>&1; docker run -d --name $REG_NAME -p 127.0.0.1::5000 registry:3 >/dev/null; PORT=$(docker port $REG_NAME 5000/tcp | head -1 | sed s/.*://); curl -s --retry 30 --retry-delay 1 --retry-connrefused http://localhost:$PORT/v2/ >/dev/null 2>&1; ${PARITY_CLI_TS} features publish reference/src/test/container-features/example-v2-features-sets/renaming-feature/src -r localhost:$PORT -n myorg >/dev/null 2>&1; echo REGISTRY=localhost:$PORT"
cleanup_cmd: "docker rm -f parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1 || true"
ts_cmd: "features publish reference/src/test/container-features/example-v2-features-sets/renaming-feature/src -r ${REGISTRY} -n myorg"
asserts: [exit_code, stdout_normalized]
class: features-runtime
current_status: match
notes: "setup_cmd publishes the collection once (with the oracle); publishing the same versions again skips each item, which TS reports as an empty object: {hello:{}, new-color:{}}. Go used to report {digest:'', publishedTags:[]}."
- id: build.disallowed-feature-error
lane: runtime
command: build
priority: p1
docker_required: true
network_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"ghcr.io/devcontainers/features/node:1\":{},\"ghcr.io/devcontainers/features/disallowed-feature:1\":{},\"ghcr.io/chrmarti/test-features/test-disallowed-feature\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "build --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_normalized]
class: build-runtime
current_status: match
compare_nulls: true
notes: "The containers.dev control manifest disallows ghcr.io/devcontainers/features/disallowed-feature. The first disallowed feature in the config's key order is reported (TS Object.keys), and build's error envelope carries only outcome/message/description (devContainersSpecCLI.ts build)."
- id: up.disallowed-feature-error
lane: runtime
command: up
priority: p1
docker_required: true
network_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"ghcr.io/devcontainers/features/node:1\":{},\"ghcr.io/devcontainers/features/disallowed-feature:1\":{},\"ghcr.io/chrmarti/test-features/test-disallowed-feature\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
compare_nulls: true
notes: "up reports disallowedFeatureId, didStopContainer (false: no container) and learnMoreUrl (disallowedFeatures.ts, doProvision). Go used to emit only the description, and to report a random one of two disallowed features."
- id: up.disallowed-feature-stops-running-container
lane: runtime
command: up
priority: p1
docker_required: true
network_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"ghcr.io/devcontainers/features/node:1\":{},\"ghcr.io/devcontainers/features/disallowed-feature:1\":{},\"ghcr.io/chrmarti/test-features/test-disallowed-feature\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; docker run -d --label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} alpine:3 sleep infinity >/dev/null; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker inspect -f '{{.State.Status}}' $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE})"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
compare_nulls: true
notes: "A running container with the workspace's id labels is stopped (docker stop -t 0), the description says so and didStopContainer is true; verify_cmd shows it exited. Go used to take the --id-label shortcut, reuse the container and report success without reading the config."
- id: up.id-label-only-existing-container-error
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "docker run -d --label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} alpine:3 sleep infinity >/dev/null"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; true"
ts_cmd: "up --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "TS reads the config before looking for a container (configContainer.ts): with no workspace and no config it fails with 'No dev container config and no workspace found.' even though --id-label finds a container. Go used to reuse the container and report success with an empty remoteWorkspaceFolder."
- id: build.malformed-lockfile-error
lane: runtime
command: build
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '#!/bin/sh\\necho installed\\n' > $WORKSPACE/.devcontainer/feat/install.sh; chmod +x $WORKSPACE/.devcontainer/feat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; printf '%s' 'not json' > $WORKSPACE/.devcontainer/devcontainer-lock.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "build --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_normalized]
class: lockfile-error
current_status: match
notes: "readLockfile rethrows JSON.parse's SyntaxError while the Features are resolved; build wraps it in a ContainerError: message the SyntaxError's, description 'An error occurred building the container.'. Go used to ignore the lockfile and build."
- id: up.malformed-lockfile-error
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '#!/bin/sh\\necho installed\\n' > $WORKSPACE/.devcontainer/feat/install.sh; chmod +x $WORKSPACE/.devcontainer/feat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; printf '%s' 'not json' > $WORKSPACE/.devcontainer/devcontainer-lock.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: lockfile-error
current_status: match
notes: "As build.malformed-lockfile-error, with up's description 'An error occurred setting up the container.'; no container is created."
- id: build.compose-malformed-lockfile-error
lane: runtime
command: build
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '#!/bin/sh\\necho installed\\n' > $WORKSPACE/.devcontainer/feat/install.sh; chmod +x $WORKSPACE/.devcontainer/feat/install.sh; printf 'services:\\n app:\\n image: alpine:3\\n command: sleep infinity\\n' > $WORKSPACE/.devcontainer/docker-compose.yml; printf '%s' '{\"dockerComposeFile\":\"docker-compose.yml\",\"service\":\"app\",\"workspaceFolder\":\"/workspace\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; printf '%s' 'not json' > $WORKSPACE/.devcontainer/devcontainer-lock.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "build --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_normalized]
class: lockfile-error
current_status: match
notes: "A Compose configuration reads the lockfile while its Features are resolved for the build override; readLockfile's SyntaxError is build's message under 'An error occurred building the container.'. Go used to ignore the lockfile and build."
- id: up.compose-malformed-lockfile-error
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '#!/bin/sh\\necho installed\\n' > $WORKSPACE/.devcontainer/feat/install.sh; chmod +x $WORKSPACE/.devcontainer/feat/install.sh; printf 'services:\\n app:\\n image: alpine:3\\n command: sleep infinity\\n' > $WORKSPACE/.devcontainer/docker-compose.yml; printf '%s' '{\"dockerComposeFile\":\"docker-compose.yml\",\"service\":\"app\",\"workspaceFolder\":\"/workspace\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; printf '%s' 'not json' > $WORKSPACE/.devcontainer/devcontainer-lock.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: lockfile-error
current_status: match
notes: "As build.compose-malformed-lockfile-error, with up's description 'An error occurred setting up the container.'; no service is started."
- id: up.config-without-workspace-success
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE; printf '%s' '{\"image\":\"alpine:3\"}' > $WORKSPACE/devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker inspect -f 'mounts=[{{range .Mounts}}{{.Destination}} {{end}}] wd={{.Config.WorkingDir}}' $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE})"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --config ${WORKSPACE}/devcontainer.json --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "With --config and no --workspace-folder there is no workspace: nothing is mounted and remoteWorkspaceFolder is left out (getWorkspaceConfiguration with an undefined workspace). Go used to mount '' at /workspaces/. and report remoteWorkspaceFolder '/workspaces/.'."
- id: up.feature-hook-failure-error
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/myfeat; printf '%s' '{\"id\":\"myfeat\",\"version\":\"1.0.0\",\"postCreateCommand\":\"exit 3\"}' > $WORKSPACE/.devcontainer/myfeat/devcontainer-feature.json; printf '#!/bin/sh\necho installed\n' > $WORKSPACE/.devcontainer/myfeat/install.sh; chmod +x $WORKSPACE/.devcontainer/myfeat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./myfeat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: lifecycle-runtime
current_status: match
notes: "A Feature's failing postCreateCommand: description 'postCreateCommand from Feature ./myfeat failed.', message the command's error, and the containerId (injectHeadless.ts runLifecycleCommand, ContainerError message = originalError.message). Go used to say 'from devcontainer.json' and leave the container out."
- id: up.parallel-hook-failure-error
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/myfeat; printf '%s' '{\"image\":\"alpine:3\",\"postCreateCommand\":{\"a\":\"true\",\"b\":\"exit 4\"}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: lifecycle-runtime
current_status: match
notes: "An object postCreateCommand whose b command fails: 'b of postCreateCommand from devcontainer.json failed.'. Go used to drop the command's name."
- id: run-user-commands.hook-failure-error
lane: runtime
command: run-user-commands
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/myfeat; printf '%s' '{\"id\":\"myfeat\",\"version\":\"1.0.0\",\"postCreateCommand\":\"exit 3\"}' > $WORKSPACE/.devcontainer/myfeat/devcontainer-feature.json; printf '#!/bin/sh\necho installed\n' > $WORKSPACE/.devcontainer/myfeat/install.sh; chmod +x $WORKSPACE/.devcontainer/myfeat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./myfeat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; ${PARITY_CLI_TS} up --workspace-folder $WORKSPACE --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} --skip-post-create >/dev/null 2>&1; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "run-user-commands --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: lifecycle-runtime
current_status: match
notes: "The container was created with --skip-post-create, so postCreateCommand runs here and fails: TS run-user-commands reports only message and description, with the Feature origin. Go used to say 'from devcontainer.json'."
- id: run-user-commands.after-failed-post-create-success
lane: runtime
command: run-user-commands
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/myfeat; printf '%s' '{\"id\":\"myfeat\",\"version\":\"1.0.0\",\"postCreateCommand\":\"exit 3\"}' > $WORKSPACE/.devcontainer/myfeat/devcontainer-feature.json; printf '#!/bin/sh\necho installed\n' > $WORKSPACE/.devcontainer/myfeat/install.sh; chmod +x $WORKSPACE/.devcontainer/myfeat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./myfeat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; ${PARITY_CLI_TS} up --workspace-folder $WORKSPACE --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "run-user-commands --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: lifecycle-runtime
current_status: match
notes: "up already ran (and failed) postCreateCommand; its marker was written before it ran (updateMarkerFile), so run-user-commands does not run it again and succeeds with result done. Go used no markers in run-user-commands and failed again."
- id: set-up.after-failed-post-create-success
lane: runtime
command: set-up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/myfeat; printf '%s' '{\"id\":\"myfeat\",\"version\":\"1.0.0\",\"postCreateCommand\":\"exit 3\"}' > $WORKSPACE/.devcontainer/myfeat/devcontainer-feature.json; printf '#!/bin/sh\necho installed\n' > $WORKSPACE/.devcontainer/myfeat/install.sh; chmod +x $WORKSPACE/.devcontainer/myfeat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./myfeat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; ${PARITY_CLI_TS} up --workspace-folder $WORKSPACE --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1; CONTAINER=$(docker ps -q --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}); echo CONTAINER=$CONTAINER; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "set-up --container-id ${CONTAINER}"
asserts: [exit_code, stdout_normalized]
class: lifecycle-runtime
current_status: match
notes: "set-up shares runLifecycleHooks with up: the marker up wrote keeps the failed postCreateCommand from running again. Go used no markers in set-up and reported 'An error occurred running user commands: ...'."
- id: up.container-entrypoint-and-command-success
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"image\":\"alpine:3\"}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker inspect -f '{{json .Config.Entrypoint}} {{json .Config.Cmd}}' $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE})"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "The container's keep-alive script is TS spawnDevContainer's byte for byte: with no Feature entrypoint, an empty line stands between trap and exec. Go used to drop that line, so the containers' Cmd differed."
- id: templates.publish-template-metadata-success
lane: runtime
command: templates
priority: p1
docker_required: true
setup_cmd: "REG_NAME=parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE}; docker rm -f $REG_NAME >/dev/null 2>&1; docker run -d --name $REG_NAME -p 127.0.0.1::5000 registry:3 >/dev/null; PORT=$(docker port $REG_NAME 5000/tcp | head -1 | sed s/.*://); curl -s --retry 30 --retry-delay 1 --retry-connrefused http://localhost:$PORT/v2/ >/dev/null 2>&1; echo REGISTRY=localhost:$PORT"
verify_cmd: "for t in alpine node-mongo; do ${PARITY_CLI_TS} templates metadata ${REGISTRY}/octocat/templates/$t 2>/dev/null | tail -1 | node -e 'let s=\"\";process.stdin.on(\"data\",d=>s+=d).on(\"end\",()=>{const o=JSON.parse(s);o.files.sort();console.log(JSON.stringify(o))})'; done"
cleanup_cmd: "docker rm -f parity-reg-${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1 || true"
ts_cmd: "templates publish reference/src/test/container-templates/example-templates-sets/simple/src -r ${REGISTRY} -n octocat/templates"
asserts: [exit_code, stdout_normalized]
class: templates-runtime
current_status: match
notes: "The published dev.containers.metadata annotation carries what TS addsAdditionalTemplateProps adds while packaging: type, files, fileCount and featureIds. verify_cmd reads each side's annotation with the oracle and sorts files: TS recursive-readdir lists them in the order their asynchronous stat calls complete, which is not defined. Go used to publish the template JSON without them."
- id: features-package.legacy-ids-current-id-success
lane: contract
command: features-package
priority: p1
docker_required: false
setup_cmd: "OUT=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $OUT; echo OUT=$OUT"
verify_cmd: "cat ${OUT}/devcontainer-collection.json; tar -xOf ${OUT}/devcontainer-feature-new-color.tgz ./devcontainer-feature.json"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "features package reference/src/test/container-features/example-v2-features-sets/renaming-feature/src -o ${OUT}"
asserts: [exit_code]
class: features-package
current_status: match
notes: "new-color lists legacyIds, so TS addsAdditionalFeatureProps adds currentId to its metadata and rewrites the packaged devcontainer-feature.json as JSON.stringify(…, null, 4). Go used to package the file untouched and leave currentId out."
- id: features-package.parent-of-src-error
lane: contract
command: features-package
priority: p1
docker_required: false
setup_cmd: "OUT=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $OUT; echo OUT=$OUT"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "features package reference/src/test/container-features/example-v2-features-sets/renaming-feature -o ${OUT}"
asserts: [exit_code, stderr_normalized]
class: features-package
current_status: match
notes: "TS does not descend into src/: the only entry, src, has no devcontainer-feature.json, so it is skipped with a warning and the package fails (exit 1). Go used to descend into src/ and succeed."
- id: features-package.missing-install-sh-error
lane: contract
command: features-package
priority: p1
docker_required: false
setup_cmd: "OUT=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $OUT; mkdir -p $OUT/src/a; printf '%s' '{\"id\":\"a\",\"version\":\"1.0.0\",\"name\":\"A\"}' > $OUT/src/a/devcontainer-feature.json; echo OUT=$OUT"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "features package ${OUT}/src -o ${OUT}/out"
asserts: [exit_code, stderr_normalized]
class: features-package
current_status: match
notes: "A Feature without install.sh fails the package: 'Feature a is missing an install.sh', then 'Failed to package features', exit 1. Go used to package it."
- id: features-package.existing-output-error
lane: contract
command: features-package
priority: p1
docker_required: false
setup_cmd: "OUT=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $OUT; mkdir -p $OUT/out; echo OUT=$OUT"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "features package reference/src/test/container-features/example-v2-features-sets/renaming-feature/src -o ${OUT}/out"
asserts: [exit_code, stderr_normalized]
class: features-package
current_status: match
notes: "An output folder that exists is an error unless -f is passed: '(!) ERR: Output directory ... already exists. Manually delete, or pass -f to continue.', exit 1. Go used to package into it."
- id: features-package.missing-target
lane: contract
command: features-package
priority: p1
docker_required: false
ts_cmd: "features package"
asserts: [exit_code, stderr_normalized]
class: required-args
current_status: match
notes: "TS declares <target> as a required positional: yargs stops with 'Not enough non-option arguments: got 0, need at least 1' (exit 1). Go used to default it to the current folder."
- id: features-publish.missing-target
lane: contract
command: features-publish
priority: p1
docker_required: false
ts_cmd: "features publish -n x"
asserts: [exit_code, stderr_normalized]
class: required-args
current_status: match
notes: "TS declares <target> as a required positional: yargs stops with 'Not enough non-option arguments: got 0, need at least 1' (exit 1). Go used to default it to the current folder."
- id: templates.publish-missing-target
lane: contract
command: templates
priority: p1
docker_required: false
ts_cmd: "templates publish -n x"
asserts: [exit_code, stderr_normalized]
class: required-args
current_status: match
notes: "TS declares <target> as a required positional: yargs stops with 'Not enough non-option arguments: got 0, need at least 1' (exit 1). Go used to default it to the current folder."
- id: up.compose-image-without-features-wraps-entrypoint-success
lane: runtime
command: up
priority: p1
docker_required: true
ts_cmd: "up --workspace-folder src/test/configs/compose-image-without-features --buildkit=never --skip-post-create --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE} --remove-existing-container"
verify_cmd: "docker inspect -f '{{json .Config.Entrypoint}} {{json .Config.Cmd}}' ${CONTAINER_ID}"
cleanup_cmd: "docker compose --project-name ${COMPOSE_PROJECT_NAME} -f src/test/configs/compose-image-without-features/.devcontainer/docker-compose.yml down -t 0 >/dev/null 2>&1 || true"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "TS startContainer always writes the containerFeatures override (dockerCompose.ts generateFeaturesComposeOverrideContent), with or without Features: the service entrypoint becomes the keep-alive script followed by the image's entrypoint, and the compose command is kept. Go only wrote it with Features, so the container ran the bare image entrypoint."
- id: up.compose-merged-runtime-properties-without-features-success
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s\\n' 'services:' ' app:' ' image: alpine:3' ' command: sleep infinity' > $WORKSPACE/.devcontainer/docker-compose.yml; printf '%s' '{\"dockerComposeFile\":\"docker-compose.yml\",\"service\":\"app\",\"workspaceFolder\":\"/\",\"updateRemoteUserUID\":false,\"capAdd\":[\"SYS_PTRACE\"],\"securityOpt\":[\"seccomp=unconfined\"],\"privileged\":true,\"init\":true,\"containerUser\":\"nobody\",\"containerEnv\":{\"FOO\":\"a$b c\"},\"mounts\":[\"type=volume,source=paritydata,target=/data\"]}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
ts_cmd: "up --workspace-folder ${WORKSPACE} --buildkit=never --skip-post-create --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
verify_cmd: "docker inspect -f '{{json .HostConfig.CapAdd}} {{json .HostConfig.SecurityOpt}} {{.HostConfig.Privileged}} {{json .HostConfig.Init}} {{.Config.User}} {{range .Mounts}}{{.Type}}:{{.Name}}:{{.Destination}} {{end}}' ${CONTAINER_ID}; docker inspect -f '{{range .Config.Env}}{{println .}}{{end}}' ${CONTAINER_ID} | grep '^FOO='"
cleanup_cmd: "docker compose --project-name ${COMPOSE_PROJECT_NAME} -f ${WORKSPACE}/.devcontainer/docker-compose.yml down -t 0 --volumes >/dev/null 2>&1; rm -rf ${WORKSPACE}; true"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "Without Features TS still applies the merged capAdd, securityOpt, privileged, init, containerUser, containerEnv and mounts through the containerFeatures override (dockerCompose.ts generateFeaturesComposeOverrideContent). Go applied only containerEnv and mounts, in separate overrides."
- id: up.compose-dockerfile-without-features-update-uid-success
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s\\n' 'FROM alpine:3' 'RUN adduser -D -u 4321 dev' > $WORKSPACE/.devcontainer/Dockerfile; printf '%s\\n' 'services:' ' app:' ' build: .' ' command: sleep infinity' > $WORKSPACE/.devcontainer/docker-compose.yml; printf '%s' '{\"dockerComposeFile\":\"docker-compose.yml\",\"service\":\"app\",\"workspaceFolder\":\"/\",\"remoteUser\":\"dev\"}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
ts_cmd: "up --workspace-folder ${WORKSPACE} --buildkit=never --skip-post-create --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
verify_cmd: "printf 'uid=%s ' \"$(docker exec ${CONTAINER_ID} id -u dev)\"; I=$(docker inspect -f '{{.Image}}' ${CONTAINER_ID}); test -n \"$(docker image inspect -f '{{index .Config.Labels \"devcontainer.metadata\"}}' $I)\" && printf 'image-metadata=ok'"
cleanup_cmd: "docker compose --project-name ${COMPOSE_PROJECT_NAME} -f ${WORKSPACE}/.devcontainer/docker-compose.yml down -t 0 >/dev/null 2>&1; rm -rf ${WORKSPACE}; true"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "TS builds a Dockerfile service through a build override even without Features (getImageBuildOptions adds the devcontainer.metadata label to the image) and then runs updateRemoteUserUID on the built image (dockerCompose.ts startContainer). Go built the service unchanged and never remapped the remote user's UID for compose."
- id: up.compose-image-with-local-feature-image-name-success
lock: feature-content-image
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/myfeature; printf '%s\\n' 'services:' ' app:' ' image: alpine:3' ' command: sleep infinity' > $WORKSPACE/.devcontainer/docker-compose.yml; printf '%s' '{\"id\":\"myfeature\",\"version\":\"1.0.0\",\"name\":\"myfeature\"}' > $WORKSPACE/.devcontainer/myfeature/devcontainer-feature.json; printf '%s\\n' '#!/bin/sh' 'touch /feature-marker' > $WORKSPACE/.devcontainer/myfeature/install.sh; chmod +x $WORKSPACE/.devcontainer/myfeature/install.sh; printf '%s' '{\"dockerComposeFile\":\"docker-compose.yml\",\"service\":\"app\",\"workspaceFolder\":\"/\",\"features\":{\"./myfeature\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
ts_cmd: "up --workspace-folder ${WORKSPACE} --buildkit=never --skip-post-create --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
verify_cmd: "docker inspect -f '{{.Config.Image}}' ${CONTAINER_ID}; docker exec ${CONTAINER_ID} test -f /feature-marker && printf ok"
cleanup_cmd: "docker compose --project-name ${COMPOSE_PROJECT_NAME} -f ${WORKSPACE}/.devcontainer/docker-compose.yml down -t 0 >/dev/null 2>&1; rm -rf ${WORKSPACE}; true"
asserts: [exit_code, stdout_normalized]
class: up-runtime
current_status: match
notes: "An image-only service with Features is built by `docker compose build` through a build override that tags the folder image name (TS buildAndExtendDockerCompose: `image: getFolderImageName`, `FROM <image> AS dev_container_auto_added_stage_label`, Features content from the temp image without BuildKit). Go built it with a separate docker build tagged <image>-features. The workspace path is side-independent so both sides compute the same folder image name."
- id: read-configuration.legacy-feature-id-error
lane: contract
command: read-configuration
priority: p1
docker_required: false
ts_cmd: "read-configuration --workspace-folder reference/src/test/configs/image-with-local-feature --include-merged-configuration"
asserts: [exit_code, stderr_normalized]
class: features
current_status: match
notes: "A bare Feature id ('myfeature') is a legacy id TS rejects ('Legacy feature myfeature not supported...'), exit 1 with no result. Go used to drop the Feature error silently and print a configuration without the Feature."
- id: read-configuration.local-feature-outside-devcontainer-error
lane: contract
command: read-configuration
priority: p1
docker_required: false
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer $WORKSPACE/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/feat/devcontainer-feature.json; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"../feat\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "read-configuration --workspace-folder ${WORKSPACE} --include-merged-configuration"
asserts: [exit_code, stdout_normalized]
class: features
current_status: match
notes: "A local Feature must lie in the workspace's .devcontainer folder (processFeatureIdentifier, containerFeaturesConfiguration.ts): '../feat' logs 'Local file path parse error. Resolved path must be a child of the .devcontainer/ folder.' and the Feature fails as one that could not be processed, exit 1 with no result. Go used to resolve the folder next to the configuration wherever it was and print a configuration with the Feature. stderr is not compared: Go also logs the thrown error at error level, which TS's read-configuration catch writes at debug level, a divergence common to every read-configuration failure."
- id: build.local-feature-absolute-path-error
lane: runtime
command: build
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/.devcontainer/feat/devcontainer-feature.json; printf '#!/bin/sh\\necho installed\\n' > $WORKSPACE/.devcontainer/feat/install.sh; chmod +x $WORKSPACE/.devcontainer/feat/install.sh; printf '{\"image\":\"alpine:3\",\"features\":{\"%s/.devcontainer/feat\":{}}}' $WORKSPACE > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "build --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_normalized]
class: features
current_status: match
notes: "An absolute Feature id is a local Feature (getFeatureIdType: './', '../' or '/') that processFeatureIdentifier refuses, even for a folder inside .devcontainer: it logs 'An Absolute path to a local feature is not allowed.' and build reports {\"outcome\":\"error\",\"message\":\"ERR: Feature '<path>' could not be processed. You may not have permission ...\",\"description\":\"An error occurred building the container.\"}, exit 1. Go used to take it for a legacy id and fail with the legacy Feature error."
- id: build.local-feature-config-outside-devcontainer-error
lane: runtime
command: build
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/feat; printf '%s' '{\"id\":\"feat\",\"version\":\"1.0.0\"}' > $WORKSPACE/feat/devcontainer-feature.json; printf '#!/bin/sh\\n' > $WORKSPACE/feat/install.sh; printf '%s' '{\"image\":\"alpine:3\",\"features\":{\"./feat\":{}}}' > $WORKSPACE/.devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "build --workspace-folder ${WORKSPACE}"
asserts: [exit_code, stdout_normalized]
class: features
current_status: match
notes: "With the configuration at the workspace root (.devcontainer.json), './feat' resolves outside the .devcontainer folder, which processFeatureIdentifier refuses; build reports the plain Error buildDependencyGraph throws as its message: {\"outcome\":\"error\",\"message\":\"ERR: Feature './feat' could not be processed. You may not have permission ...\",\"description\":\"An error occurred building the container.\"}, exit 1. Go used to build the Feature."
- id: up.update-uid-remote-user-from-image-metadata-success
lane: runtime
command: up
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; IMG=parity-uid-meta-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/img $WORKSPACE/.devcontainer; printf 'FROM debian:latest\\nRUN groupadd --gid 4321 foo && useradd --uid 1234 --gid 4321 --create-home foo\\nLABEL devcontainer.metadata=\\047[{\\042remoteUser\\042:\\042foo\\042}]\\047\\n' > $WORKSPACE/img/Dockerfile; docker build -q -t $IMG $WORKSPACE/img >/dev/null; printf '{\\042image\\042:\\042%s\\042}' $IMG > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker exec -u foo ${CONTAINER_ID} sh -c 'printf %s:%s $(id -u) $(id -g)'"
cleanup_cmd: "docker rm -f $(docker ps -aq --filter label=parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}) >/dev/null 2>&1; docker rmi -f parity-uid-meta-${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
ts_cmd: "up --workspace-folder ${WORKSPACE} --id-label parity.case=${PARITY_CASE_ID}-${PARITY_SIDE}"
asserts: [exit_code]
class: up-runtime
current_status: match
notes: "The remote user comes from the image's devcontainer.metadata label, not the config: TS updateRemoteUserUID decides on the merged configuration, so foo is remapped to the host UID/GID. Go used to read only the config's remoteUser and left foo at 1234:4321."
- id: read-configuration.merged-dockerfile-registry-base-success
lane: runtime
command: read-configuration
priority: p1
docker_required: true
network_required: true
serial: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; docker rmi -f mcr.microsoft.com/devcontainers/base:alpine-3.19 >/dev/null 2>&1; printf 'ARG VARIANT=3.18\\nFROM mcr.microsoft.com/devcontainers/base:alpine-${VARIANT}\\n' > $WORKSPACE/.devcontainer/Dockerfile; printf '%s' '{\"build\":{\"dockerfile\":\"Dockerfile\",\"args\":{\"VARIANT\":\"3.19\"}},\"remoteEnv\":{\"A\":\"b\"}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker image inspect mcr.microsoft.com/devcontainers/base:alpine-3.19 >/dev/null 2>&1 && echo base-image-pulled || echo base-image-not-pulled"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "read-configuration --workspace-folder ${WORKSPACE} --include-merged-configuration"
asserts: [exit_code, stdout_normalized]
class: merged-configuration
current_status: match
notes: "Without a container, mergedConfiguration starts from the Dockerfile's base image (getImageBuildInfo -> internalGetImageBuildInfoFromDockerfile, imageMetadata.ts): the FROM is resolved with the build args (VARIANT=3.19) and the image, absent locally, is read from its registry (inspectDockerImage -> inspectImageInRegistry, utils.ts) without pulling it, so its devcontainer.metadata gives remoteUser vscode. The verify_cmd checks the image was not pulled. Go used to skip the base image and leave remoteUser out. serial: the image must stay absent locally."
- id: read-configuration.merged-image-registry-features-success
lane: runtime
command: read-configuration
priority: p1
docker_required: true
network_required: true
serial: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; docker rmi -f mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm >/dev/null 2>&1; printf '%s' '{\"image\":\"mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm\",\"features\":{\"ghcr.io/devcontainers/features/github-cli:1\":{}}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker image inspect mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm >/dev/null 2>&1 && echo image-pulled || echo image-not-pulled"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "read-configuration --workspace-folder ${WORKSPACE} --include-merged-configuration"
asserts: [exit_code, stdout_normalized]
class: merged-configuration
current_status: match
notes: "An image config whose image is not present locally: getImageBuildInfoFromImage reads the config from the registry (image index entry for the host platform), so mergedConfiguration carries the image's remoteUser node and its customizations (dbaeumer.vscode-eslint) plus the Feature's metadata (getDevcontainerMetadata). Go used to inspect only the local image and lose the image metadata. serial: the image must stay absent locally."
- id: read-configuration.merged-compose-build-registry-base-success
lane: runtime
command: read-configuration
priority: p1
docker_required: true
network_required: true
serial: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; docker rmi -f mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm >/dev/null 2>&1; printf 'FROM mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm\\nUSER root\\n' > $WORKSPACE/.devcontainer/Dockerfile; printf 'services:\\n app:\\n build:\\n context: .\\n dockerfile: Dockerfile\\n command: sleep infinity\\n' > $WORKSPACE/.devcontainer/compose.yml; printf '%s' '{\"dockerComposeFile\":\"compose.yml\",\"service\":\"app\",\"workspaceFolder\":\"/workspace\"}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
verify_cmd: "docker image inspect mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm >/dev/null 2>&1 && echo base-image-pulled || echo base-image-not-pulled"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "read-configuration --workspace-folder ${WORKSPACE} --include-merged-configuration"
asserts: [exit_code, stdout_normalized]
class: merged-configuration
current_status: match
notes: "A compose service built from a Dockerfile: getImageBuildInfo reads `docker compose config`, takes the service's build (getBuildInfoForService) and reads the Dockerfile's base image from its registry, so mergedConfiguration has remoteUser node and the image's customizations. Go used to skip compose configs. serial: the image must stay absent locally."
- id: read-configuration.merged-dockerfile-not-found
lane: runtime
command: read-configuration
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"build\":{\"dockerfile\":\"missing.Dockerfile\"}}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "read-configuration --workspace-folder ${WORKSPACE} --include-merged-configuration"
asserts: [exit_code, stdout_normalized]
class: merged-configuration
current_status: match
notes: "getImageBuildInfo throws 'Dockerfile (<path>) not found.' when the configured Dockerfile is missing: exit 1 and no result on stdout. Go used to print a merged configuration without the image metadata."
- id: read-configuration.merged-image-missing
lane: runtime
command: read-configuration
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/.devcontainer; printf '%s' '{\"remoteUser\":\"me\"}' > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
cleanup_cmd: "rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
ts_cmd: "read-configuration --workspace-folder ${WORKSPACE} --include-merged-configuration"
asserts: [exit_code, stdout_normalized]
class: merged-configuration
current_status: match
notes: "A config with no image, Dockerfile or compose file: getImageBuildInfo throws 'No image information specified in devcontainer.json.', exit 1 and no result on stdout. Go used to print a merged configuration."
- id: build.features-staging-layout-success
lane: runtime
command: build
priority: p1
docker_required: true
setup_cmd: "WORKSPACE=/tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; IMG=parity-feat-base-${PARITY_CASE_ID}-${PARITY_SIDE}; rm -rf $WORKSPACE; mkdir -p $WORKSPACE/img $WORKSPACE/.devcontainer/hello; printf 'FROM alpine:3\\nLABEL devcontainer.metadata=\\047[{\"remoteUser\":\"nobody\"}]\\047\\n' > $WORKSPACE/img/Dockerfile; docker build -q -t $IMG $WORKSPACE/img >/dev/null; printf '%s' '{\"id\":\"hello\",\"version\":\"1.0.0\",\"name\":\"Hello\",\"options\":{\"zeta\":{\"type\":\"string\",\"default\":\"z\"},\"greeting\":{\"type\":\"string\",\"default\":\"hi\"},\"alpha\":{\"type\":\"boolean\",\"default\":true}},\"containerEnv\":{\"HELLO_HOME\":\"/opt/hello\"}}' > $WORKSPACE/.devcontainer/hello/devcontainer-feature.json; printf '%s\\n' '#!/bin/sh' 'set -e' '{ pwd; ls -A; cat ../devcontainer-features.builtin.env; env | grep -E \"^(_CONTAINER_USER|_REMOTE_USER|_CONTAINER_USER_HOME|_REMOTE_USER_HOME|ZETA|GREETING|ALPHA|HELLO_HOME)=\" | sort; } > /feature-out.txt' > $WORKSPACE/.devcontainer/hello/install.sh; chmod +x $WORKSPACE/.devcontainer/hello/install.sh; printf '{\"image\":\"%s\",\"containerEnv\":{\"CFG_VAR\":\"a$b\"},\"features\":{\"./hello\":{\"greeting\":\"yo\"}}}' $IMG > $WORKSPACE/.devcontainer/devcontainer.json; echo WORKSPACE=$WORKSPACE"
ts_cmd: "build --workspace-folder ${WORKSPACE} --image-name parity-${PARITY_CASE_ID}-${PARITY_SIDE}"
verify_cmd: "docker run --rm ${IMAGE_NAME} sh -c 'cat /feature-out.txt; echo ---; ls -A /tmp/dev-container-features; cat /tmp/dev-container-features/devcontainer-features.builtin.env'; docker image inspect -f '{{.Config.User}} {{json .Config.Env}}' ${IMAGE_NAME}"
cleanup_cmd: "docker rmi -f parity-${PARITY_CASE_ID}-${PARITY_SIDE} parity-feat-base-${PARITY_CASE_ID}-${PARITY_SIDE} >/dev/null 2>&1; rm -rf /tmp/parity-${PARITY_CASE_ID}-${PARITY_SIDE}; true"
asserts: [exit_code, stdout_normalized]
class: build-runtime
current_status: match
notes: "BuildKit Features build (TS getFeaturesBuildOptions + getFeatureLayers, containerFeaturesConfiguration.ts): the Feature is staged at its consecutiveId (hello_0), bind-mounted from the dev_containers_feature_content_source build context, copied to /tmp/dev-container-features/hello_0 and installed through devcontainer-features-install.sh, which sources ../devcontainer-features.builtin.env (_CONTAINER_USER/_REMOTE_USER plus the _*_HOME lines the first RUN appends) and devcontainer-features.env (options in devcontainer-feature.json order); the folder is removed afterwards, the builtin env stays. The Feature's containerEnv and the config's containerEnv are ENV lines and the image keeps its own user (USER $_DEV_CONTAINERS_IMAGE_USER). Go used to copy _dev_container_feature_0 to /tmp/build-features and run install.sh with inline env prefixes, so ../devcontainer-features.builtin.env did not exist."
- id: build.features-staging-layout-no-buildkit-success