hecks 3.12.0 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/examples/pizzas/bluebook/pizzas.bluebook +4 -4
  3. data/lib/hecks/adapters/driven/script_runner.adapter +3 -0
  4. data/lib/hecks/adapters/driven/script_runner.rb +93 -0
  5. data/lib/hecks/adapters/driven.rb +1 -0
  6. data/lib/hecks/bluebook/dsl/attribute_collector.rb +15 -5
  7. data/lib/hecks/bluebook/meta_validator/syntax_boot.rb +16 -12
  8. data/lib/hecks/bluebook/meta_validator.rb +28 -21
  9. data/lib/hecks/bluebook/named_pattern.rb +33 -0
  10. data/lib/hecks/bluebook.rb +1 -0
  11. data/lib/hecks/cli/domain_stub.rb +1 -1
  12. data/lib/hecks/cli/interview_aggregate.rb +4 -4
  13. data/lib/hecks/deploy/bluebook/deploy.bluebook +35 -35
  14. data/lib/hecks/framework/bluebook/change.behaviors +30 -0
  15. data/lib/hecks/framework/bluebook/change.bluebook +162 -0
  16. data/lib/hecks/framework/bluebook/change.hecksagon +21 -0
  17. data/lib/hecks/framework/change.oidc.json +34 -0
  18. data/lib/hecks/framework/console_settings.oidc.json +103 -0
  19. data/lib/hecks/framework/governance.oidc.json +28 -0
  20. data/lib/hecks/framework/identity.oidc.json +18 -0
  21. data/lib/hecks/framework/privacy.oidc.json +30 -0
  22. data/lib/hecks/fuzzing/domain_generator/block_rendering.rb +1 -1
  23. data/lib/hecks/gate/stages.yml +3 -0
  24. data/lib/hecks/grammar/translation.oidc.json +48 -0
  25. data/lib/hecks/hecks/adapters/codebase/test_runner.rb +12 -1
  26. data/lib/hecks/hecks/adapters/deploy_toolchain.rb +2 -1
  27. data/lib/hecks/hecks/codebase.bluebook +37 -37
  28. data/lib/hecks/hecks/custodian.bluebook +14 -14
  29. data/lib/hecks/hecks/hecks.bluebook +2 -2
  30. data/lib/hecks/hecks/rehearsal.bluebook +3 -3
  31. data/lib/hecks/hecks/tooling.bluebook +22 -22
  32. data/lib/hecks/language/bluebook/aggregate.bluebook +1 -0
  33. data/lib/hecks/language/bluebook/command.bluebook +1 -0
  34. data/lib/hecks/language/bluebook/entity.bluebook +1 -0
  35. data/lib/hecks/language/bluebook/query.bluebook +1 -0
  36. data/lib/hecks/language/bluebook/shape.bluebook +8 -7
  37. data/lib/hecks/language/hecksagon/port_operation.bluebook +1 -0
  38. data/lib/hecks/projections/deploy/fargate/cdn/lines.rb +12 -1
  39. data/lib/hecks/projections/site/admin_cms/templates/membership.rb +10 -7
  40. data/lib/hecks/projections/site/edge/behaviours.rb +10 -6
  41. data/lib/hecks/projections/site/edge/checks.rb +2 -0
  42. data/lib/hecks/projections/site/edge/function_checks.rb +104 -0
  43. data/lib/hecks/projections/site/edge/function_code.rb +86 -0
  44. data/lib/hecks/projections/site/edge/redirect_host.js.tmpl +65 -0
  45. data/lib/hecks/projections/site/edge.rb +35 -9
  46. data/lib/hecks/projections/site/site_cdn.rb +21 -7
  47. data/lib/hecks/projections/site/table/row_builder.rb +12 -2
  48. data/lib/hecks/projections/site/table.rb +4 -2
  49. data/lib/hecks/quality_control/quality_control.bluebook +51 -51
  50. data/lib/hecks/site/bluebook/site.bluebook +21 -6
  51. data/lib/hecks/sme/bluebook/sme.bluebook +12 -12
  52. data/lib/hecks/tickets/bluebook/tickets.bluebook +3 -3
  53. data/lib/hecks/tools/oidc_manifests.rb +44 -6
  54. data/lib/hecks/tools/site_routes/templates.rb +13 -9
  55. data/lib/hecks/version.rb +1 -1
  56. data/prebuilt/{d74a00e996222c1d8b676d5959092effc46b4dc59e0555f3bf9554ac58e3094a.marshal → 1a6f596be124228be93eba1d86dbc9d2933190fa389b284331241cb9f27115a0.marshal} +0 -0
  57. data/prebuilt/{9ee54e2f0d4d6d3fe046827779b221e02de665fba911a048ae5dd8b8fbfb7d90.marshal → a883a7e568667aa5ac904c82daff356bdf9e996252a36af6def4a4a43efb967e.marshal} +0 -0
  58. data/prebuilt/verdicts-872993b1aa26d73fe48f28251374b8585fed145d02aab42be0f00de386b6ff80.json +1 -0
  59. data/rust/host/HECKS_RELEASE +1 -1
  60. data/rust/host/src/auth.rs +58 -0
  61. data/rust/host/src/payments/roles.rs +159 -0
  62. data/rust/host/src/payments/tests.rs +25 -0
  63. data/rust/host/src/payments.rs +20 -11
  64. data/rust/host/src/platform_signin/session.rs +1 -1
  65. data/rust/parser/src/build/mod.rs +1 -0
  66. data/rust/parser/src/build/named_pattern.rs +23 -0
  67. data/rust/parser/src/keywords.rs +6 -0
  68. data/rust/parser/src/parse/mod.rs +22 -1
  69. metadata +24 -7
  70. data/prebuilt/verdicts-df19f35868d3284a70f55e42dcef87ef4e65e6a678e5135f72e1f6cff4c1357b.json +0 -1
  71. /data/lib/hecks/framework/{oidc.json → compliance.oidc.json} +0 -0
  72. /data/lib/hecks/grammar/{oidc.json → expression.oidc.json} +0 -0
@@ -0,0 +1,30 @@
1
+ {
2
+ "audience": "Privacy",
3
+ "scopes": [
4
+ {
5
+ "scope": "privacy:marking.mark",
6
+ "verb": "Privacy::Marking.Mark",
7
+ "role": "Deployment"
8
+ },
9
+ {
10
+ "scope": "privacy:marking.unmark",
11
+ "verb": "Privacy::Marking.Unmark",
12
+ "role": "Deployment"
13
+ },
14
+ {
15
+ "scope": "privacy:subject_key.issue",
16
+ "verb": "Privacy::SubjectKey.Issue",
17
+ "role": "System"
18
+ },
19
+ {
20
+ "scope": "privacy:subject_key.shred",
21
+ "verb": "Privacy::SubjectKey.Shred",
22
+ "role": "Privacy officer"
23
+ }
24
+ ],
25
+ "roles": [
26
+ "Deployment",
27
+ "Privacy officer",
28
+ "System"
29
+ ]
30
+ }
@@ -19,7 +19,7 @@ module Hecks
19
19
  end
20
20
 
21
21
  def string_body(name)
22
- ["attribute :value, String, pattern: '[^ \\t\\n\\r]'",
22
+ ["attribute :value, String, matches: :present",
23
23
  "invariant(#{"a #{name} is not blank".inspect}) { !value.to_s.empty? }"]
24
24
  end
25
25
 
@@ -20,8 +20,11 @@
20
20
  # with `only=`: several of them write generated files and compare, so the stage is not meant to
21
21
  # run whole in one checkout.
22
22
  pre_push:
23
+ # HECKS_PROCESS_SPECS keeps the examples tagged `process` (they start child processes, so a plain
24
+ # `rspec` leaves them out) in the suite this stage runs.
23
25
  env:
24
26
  HECKS_ENVIRONMENT: memory
27
+ HECKS_PROCESS_SPECS: "1"
25
28
  checks:
26
29
  - id: rspec
27
30
  title: rspec (parallel)
@@ -0,0 +1,48 @@
1
+ {
2
+ "audience": "Translation",
3
+ "scopes": [
4
+ {
5
+ "scope": "translation:map.declare",
6
+ "verb": "Translation::Map.Declare",
7
+ "role": "Author"
8
+ },
9
+ {
10
+ "scope": "translation:map.draft",
11
+ "verb": "Translation::Map.Draft",
12
+ "role": "Author"
13
+ },
14
+ {
15
+ "scope": "translation:map.seal",
16
+ "verb": "Translation::Map.Seal",
17
+ "role": "Author"
18
+ },
19
+ {
20
+ "scope": "translation:map.supersede",
21
+ "verb": "Translation::Map.Supersede",
22
+ "role": "Author"
23
+ },
24
+ {
25
+ "scope": "translation:rule.admit",
26
+ "verb": "Translation::Rule.Admit",
27
+ "role": "Author"
28
+ },
29
+ {
30
+ "scope": "translation:rule.execute",
31
+ "verb": "Translation::Rule.Execute",
32
+ "role": "Author"
33
+ },
34
+ {
35
+ "scope": "translation:rule.propose",
36
+ "verb": "Translation::Rule.Propose",
37
+ "role": "Author"
38
+ },
39
+ {
40
+ "scope": "translation:rule.retire",
41
+ "verb": "Translation::Rule.Retire",
42
+ "role": "Author"
43
+ }
44
+ ],
45
+ "roles": [
46
+ "Author"
47
+ ]
48
+ }
@@ -45,12 +45,23 @@ module Hecks
45
45
  # What the runner printed for the example, when it passed.
46
46
  def run_example(path, example)
47
47
  out = StringIO.new
48
- status = Dir.chdir(@tree.root) { runner.call(["--example", example, path], out, out) }
48
+ status = Dir.chdir(@tree.root) { at_reaction_depth_zero { runner.call(["--example", example, path], out, out) } }
49
49
  raise ConsoleCapture::Failure, out.string.strip unless status.zero?
50
50
 
51
51
  out.string.strip
52
52
  end
53
53
 
54
+ # The runner is asked for from inside a command's own reaction cascade, and the dispatcher
55
+ # keeps that cascade's depth on the thread. An example starts at depth zero, as a plain run
56
+ # does, so a spec that cascades four deep is not cut off by the cascade that launched it.
57
+ def at_reaction_depth_zero
58
+ depth = Thread.current[:hecks_reaction_depth]
59
+ Thread.current[:hecks_reaction_depth] = 0
60
+ yield
61
+ ensure
62
+ Thread.current[:hecks_reaction_depth] = depth
63
+ end
64
+
54
65
  def runner
55
66
  return self.class.runner if self.class.runner
56
67
 
@@ -74,7 +74,8 @@ module Hecks
74
74
  { report: { value: child(:lint, paths).dig(:output, :value) } }
75
75
  end
76
76
 
77
- # Projects each domain's OIDC client and scope manifest into its `oidc.json`, through
77
+ # Projects each domain's OIDC client and scope manifest into its `oidc.json`, or into one
78
+ # `<chapter>.oidc.json` for each chapter of a directory that holds several, through
78
79
  # `hecks deploy oidc_manifest.project_oidc`.
79
80
  #
80
81
  # @param held [Hash] the `OidcManifest` record: `domains` (comma separated directories; every
@@ -38,13 +38,13 @@ Hecks.bluebook "Hecks" do
38
38
  identified_by :run
39
39
 
40
40
  value_object "RunKey" do
41
- attribute :value, String, pattern: '[^ \t\n\r]'
41
+ attribute :value, String, matches: :present
42
42
 
43
43
  invariant("a run is named") { !value.to_s.empty? }
44
44
  end
45
45
 
46
46
  value_object "Operation" do
47
- attribute :value, String, pattern: '[^ \t\n\r]'
47
+ attribute :value, String, matches: :present
48
48
  end
49
49
 
50
50
  value_object "Switch" do
@@ -57,7 +57,7 @@ Hecks.bluebook "Hecks" do
57
57
 
58
58
  # A keyword of the language, or the keyword an argument belongs to.
59
59
  value_object "Word" do
60
- attribute :value, String, pattern: '[^ \t\n\r]'
60
+ attribute :value, String, matches: :present
61
61
 
62
62
  invariant("a word is named") { !value.to_s.empty? }
63
63
  end
@@ -94,7 +94,7 @@ Hecks.bluebook "Hecks" do
94
94
 
95
95
  # How a pairs argument is read, such as verbatim.
96
96
  value_object "Shape" do
97
- attribute :value, String, pattern: '[^ \t\n\r]'
97
+ attribute :value, String, matches: :present
98
98
  end
99
99
 
100
100
  lifecycle :status, default: "requested" do
@@ -641,13 +641,13 @@ Hecks.bluebook "Hecks" do
641
641
  identified_by :run
642
642
 
643
643
  value_object "RunKey" do
644
- attribute :value, String, pattern: '[^ \t\n\r]'
644
+ attribute :value, String, matches: :present
645
645
 
646
646
  invariant("a run is named") { !value.to_s.empty? }
647
647
  end
648
648
 
649
649
  value_object "Operation" do
650
- attribute :value, String, pattern: '[^ \t\n\r]'
650
+ attribute :value, String, matches: :present
651
651
  end
652
652
 
653
653
  value_object "Switch" do
@@ -796,13 +796,13 @@ Hecks.bluebook "Hecks" do
796
796
  identified_by :run
797
797
 
798
798
  value_object "RunKey" do
799
- attribute :value, String, pattern: '[^ \t\n\r]'
799
+ attribute :value, String, matches: :present
800
800
 
801
801
  invariant("a run is named") { !value.to_s.empty? }
802
802
  end
803
803
 
804
804
  value_object "Operation" do
805
- attribute :value, String, pattern: '[^ \t\n\r]'
805
+ attribute :value, String, matches: :present
806
806
  end
807
807
 
808
808
  value_object "Switch" do
@@ -971,13 +971,13 @@ Hecks.bluebook "Hecks" do
971
971
  identified_by :run
972
972
 
973
973
  value_object "RunKey" do
974
- attribute :value, String, pattern: '[^ \t\n\r]'
974
+ attribute :value, String, matches: :present
975
975
 
976
976
  invariant("a run is named") { !value.to_s.empty? }
977
977
  end
978
978
 
979
979
  value_object "Operation" do
980
- attribute :value, String, pattern: '[^ \t\n\r]'
980
+ attribute :value, String, matches: :present
981
981
  end
982
982
 
983
983
  value_object "Switch" do
@@ -990,7 +990,7 @@ Hecks.bluebook "Hecks" do
990
990
 
991
991
  # A `CiGate` row of the Vocabulary chapter, by name.
992
992
  value_object "GateName" do
993
- attribute :value, String, pattern: '[^ \t\n\r]'
993
+ attribute :value, String, matches: :present
994
994
  end
995
995
 
996
996
  lifecycle :status, default: "requested" do
@@ -1201,17 +1201,17 @@ Hecks.bluebook "Hecks" do
1201
1201
  identified_by :run
1202
1202
 
1203
1203
  value_object "RunKey" do
1204
- attribute :value, String, pattern: '[^ \t\n\r]'
1204
+ attribute :value, String, matches: :present
1205
1205
 
1206
1206
  invariant("a run is named") { !value.to_s.empty? }
1207
1207
  end
1208
1208
 
1209
1209
  value_object "Operation" do
1210
- attribute :value, String, pattern: '[^ \t\n\r]'
1210
+ attribute :value, String, matches: :present
1211
1211
  end
1212
1212
 
1213
1213
  value_object "Stage" do
1214
- attribute :value, String, pattern: '^[a-z][a-z0-9_]*$'
1214
+ attribute :value, String, matches: :snake_name
1215
1215
 
1216
1216
  invariant("a stage is named") { !value.to_s.empty? }
1217
1217
  end
@@ -1355,13 +1355,13 @@ Hecks.bluebook "Hecks" do
1355
1355
  identified_by :run
1356
1356
 
1357
1357
  value_object "RunKey" do
1358
- attribute :value, String, pattern: '[^ \t\n\r]'
1358
+ attribute :value, String, matches: :present
1359
1359
 
1360
1360
  invariant("a run is named") { !value.to_s.empty? }
1361
1361
  end
1362
1362
 
1363
1363
  value_object "Operation" do
1364
- attribute :value, String, pattern: '[^ \t\n\r]'
1364
+ attribute :value, String, matches: :present
1365
1365
  end
1366
1366
 
1367
1367
  value_object "Switch" do
@@ -1391,12 +1391,12 @@ Hecks.bluebook "Hecks" do
1391
1391
 
1392
1392
  # A revision a code comparison is made against.
1393
1393
  value_object "Ref" do
1394
- attribute :value, String, pattern: '^[^ \t\n\r]+$'
1394
+ attribute :value, String, matches: :no_whitespace
1395
1395
  end
1396
1396
 
1397
1397
  # A JSON file.
1398
1398
  value_object "FilePath" do
1399
- attribute :value, String, pattern: '[^\t\n\r]'
1399
+ attribute :value, String, matches: :not_empty
1400
1400
 
1401
1401
  invariant("a file is named") { !value.to_s.empty? }
1402
1402
  end
@@ -1676,13 +1676,13 @@ Hecks.bluebook "Hecks" do
1676
1676
  identified_by :run
1677
1677
 
1678
1678
  value_object "RunKey" do
1679
- attribute :value, String, pattern: '[^ \t\n\r]'
1679
+ attribute :value, String, matches: :present
1680
1680
 
1681
1681
  invariant("a run is named") { !value.to_s.empty? }
1682
1682
  end
1683
1683
 
1684
1684
  value_object "Operation" do
1685
- attribute :value, String, pattern: '[^ \t\n\r]'
1685
+ attribute :value, String, matches: :present
1686
1686
  end
1687
1687
 
1688
1688
  value_object "Switch" do
@@ -1891,13 +1891,13 @@ Hecks.bluebook "Hecks" do
1891
1891
  identified_by :run
1892
1892
 
1893
1893
  value_object "RunKey" do
1894
- attribute :value, String, pattern: '[^ \t\n\r]'
1894
+ attribute :value, String, matches: :present
1895
1895
 
1896
1896
  invariant("a run is named") { !value.to_s.empty? }
1897
1897
  end
1898
1898
 
1899
1899
  value_object "Operation" do
1900
- attribute :value, String, pattern: '[^ \t\n\r]'
1900
+ attribute :value, String, matches: :present
1901
1901
  end
1902
1902
 
1903
1903
  value_object "Switch" do
@@ -2064,13 +2064,13 @@ Hecks.bluebook "Hecks" do
2064
2064
  identified_by :run
2065
2065
 
2066
2066
  value_object "RunKey" do
2067
- attribute :value, String, pattern: '[^ \t\n\r]'
2067
+ attribute :value, String, matches: :present
2068
2068
 
2069
2069
  invariant("a run is named") { !value.to_s.empty? }
2070
2070
  end
2071
2071
 
2072
2072
  value_object "Operation" do
2073
- attribute :value, String, pattern: '[^ \t\n\r]'
2073
+ attribute :value, String, matches: :present
2074
2074
  end
2075
2075
 
2076
2076
  value_object "Switch" do
@@ -2090,19 +2090,19 @@ Hecks.bluebook "Hecks" do
2090
2090
 
2091
2091
  # A CI run's number.
2092
2092
  value_object "RunId" do
2093
- attribute :value, String, pattern: '^[0-9]+$'
2093
+ attribute :value, String, matches: :digits
2094
2094
  end
2095
2095
 
2096
2096
  # A file, relative to the checkout or absolute.
2097
2097
  value_object "FilePath" do
2098
- attribute :value, String, pattern: '[^\t\n\r]'
2098
+ attribute :value, String, matches: :not_empty
2099
2099
 
2100
2100
  invariant("a file is named") { !value.to_s.empty? }
2101
2101
  end
2102
2102
 
2103
2103
  # Part of an example's description.
2104
2104
  value_object "ExampleText" do
2105
- attribute :value, String, pattern: '[^\t\n\r]'
2105
+ attribute :value, String, matches: :not_empty
2106
2106
 
2107
2107
  invariant("an example is named") { !value.to_s.empty? }
2108
2108
  end
@@ -2114,7 +2114,7 @@ Hecks.bluebook "Hecks" do
2114
2114
 
2115
2115
  # A regular expression naming the specs to leave out.
2116
2116
  value_object "ExcludePattern" do
2117
- attribute :value, String, pattern: '[^\t\n\r]'
2117
+ attribute :value, String, matches: :not_empty
2118
2118
  end
2119
2119
 
2120
2120
  # The tag filter, as the test runner spells it.
@@ -2390,13 +2390,13 @@ Hecks.bluebook "Hecks" do
2390
2390
  identified_by :run
2391
2391
 
2392
2392
  value_object "RunKey" do
2393
- attribute :value, String, pattern: '[^ \t\n\r]'
2393
+ attribute :value, String, matches: :present
2394
2394
 
2395
2395
  invariant("a run is named") { !value.to_s.empty? }
2396
2396
  end
2397
2397
 
2398
2398
  value_object "Operation" do
2399
- attribute :value, String, pattern: '[^ \t\n\r]'
2399
+ attribute :value, String, matches: :present
2400
2400
  end
2401
2401
 
2402
2402
  value_object "Switch" do
@@ -2424,7 +2424,7 @@ Hecks.bluebook "Hecks" do
2424
2424
 
2425
2425
  # The name of one field of a construct.
2426
2426
  value_object "FieldName" do
2427
- attribute :value, String, pattern: '^[a-z][a-z0-9_]*$'
2427
+ attribute :value, String, matches: :snake_name
2428
2428
  end
2429
2429
 
2430
2430
  # A local port a server listens on.
@@ -2633,13 +2633,13 @@ Hecks.bluebook "Hecks" do
2633
2633
  identified_by :run
2634
2634
 
2635
2635
  value_object "RunKey" do
2636
- attribute :value, String, pattern: '[^ \t\n\r]'
2636
+ attribute :value, String, matches: :present
2637
2637
 
2638
2638
  invariant("a run is named") { !value.to_s.empty? }
2639
2639
  end
2640
2640
 
2641
2641
  value_object "Operation" do
2642
- attribute :value, String, pattern: '[^ \t\n\r]'
2642
+ attribute :value, String, matches: :present
2643
2643
  end
2644
2644
 
2645
2645
  value_object "Switch" do
@@ -2652,7 +2652,7 @@ Hecks.bluebook "Hecks" do
2652
2652
 
2653
2653
  # One word of a fact: a branch, a commit, whether a tag stands.
2654
2654
  value_object "Word" do
2655
- attribute :value, String, pattern: '[^ \t\n\r]'
2655
+ attribute :value, String, matches: :present
2656
2656
  end
2657
2657
 
2658
2658
  value_object "Version" do
@@ -2968,13 +2968,13 @@ Hecks.bluebook "Hecks" do
2968
2968
  identified_by :run
2969
2969
 
2970
2970
  value_object "RunKey" do
2971
- attribute :value, String, pattern: '[^ \t\n\r]'
2971
+ attribute :value, String, matches: :present
2972
2972
 
2973
2973
  invariant("a run is named") { !value.to_s.empty? }
2974
2974
  end
2975
2975
 
2976
2976
  value_object "Operation" do
2977
- attribute :value, String, pattern: '[^ \t\n\r]'
2977
+ attribute :value, String, matches: :present
2978
2978
  end
2979
2979
 
2980
2980
  value_object "Switch" do
@@ -2987,7 +2987,7 @@ Hecks.bluebook "Hecks" do
2987
2987
 
2988
2988
  # A branch name, or a commit.
2989
2989
  value_object "Word" do
2990
- attribute :value, String, pattern: '[^ \t\n\r]'
2990
+ attribute :value, String, matches: :present
2991
2991
  end
2992
2992
 
2993
2993
  # How long a lane has stood behind the lane it follows, or how long its row lets it.
@@ -27,14 +27,14 @@ Hecks.bluebook "Hecks" do
27
27
  identified_by :run
28
28
 
29
29
  value_object "OperationKey" do
30
- attribute :value, String, pattern: '[^ \t\n\r]'
30
+ attribute :value, String, matches: :present
31
31
 
32
32
  invariant("an operation is named") { !value.to_s.empty? }
33
33
  end
34
34
 
35
35
  # What the operation acts on: a domain directory, or a behaviors file or directory.
36
36
  value_object "Subject" do
37
- attribute :value, String, pattern: '[^\t\n\r]'
37
+ attribute :value, String, matches: :not_empty
38
38
  end
39
39
 
40
40
  value_object "Script" do
@@ -42,7 +42,7 @@ Hecks.bluebook "Hecks" do
42
42
  end
43
43
 
44
44
  value_object "Verb" do
45
- attribute :value, String, pattern: '[^ \t\n\r]'
45
+ attribute :value, String, matches: :present
46
46
  end
47
47
 
48
48
  # One `name=value` word of the verb a run dispatches.
@@ -59,7 +59,7 @@ Hecks.bluebook "Hecks" do
59
59
  end
60
60
 
61
61
  value_object "HeaderName" do
62
- attribute :value, String, pattern: '[^ \t\n\r]'
62
+ attribute :value, String, matches: :present
63
63
  end
64
64
 
65
65
  value_object "Scheme" do
@@ -71,7 +71,7 @@ Hecks.bluebook "Hecks" do
71
71
  end
72
72
 
73
73
  value_object "PayloadFile" do
74
- attribute :value, String, pattern: '[^\t\n\r]'
74
+ attribute :value, String, matches: :not_empty
75
75
  end
76
76
 
77
77
  value_object "Output" do
@@ -84,11 +84,11 @@ Hecks.bluebook "Hecks" do
84
84
  end
85
85
 
86
86
  value_object "PersonName" do
87
- attribute :value, String, pattern: '[^\t\n\r]'
87
+ attribute :value, String, matches: :not_empty
88
88
  end
89
89
 
90
90
  value_object "RoleName" do
91
- attribute :value, String, pattern: '^[^ \t\n\r]+$'
91
+ attribute :value, String, matches: :no_whitespace
92
92
  end
93
93
 
94
94
  lifecycle :status, default: "requested" do
@@ -361,7 +361,7 @@ Hecks.bluebook "Hecks" do
361
361
 
362
362
  # The file listing the eras that should be running, one per line.
363
363
  value_object "ExpectedFile" do
364
- attribute :value, String, pattern: '[^\t\n\r]'
364
+ attribute :value, String, matches: :not_empty
365
365
  end
366
366
 
367
367
  value_object "Seconds" do
@@ -371,7 +371,7 @@ Hecks.bluebook "Hecks" do
371
371
  end
372
372
 
373
373
  value_object "EraId" do
374
- attribute :value, String, pattern: '[^ \t\n\r]'
374
+ attribute :value, String, matches: :present
375
375
  end
376
376
 
377
377
  value_object "VersionText" do
@@ -546,14 +546,14 @@ policy "RecordTheEra" do
546
546
  identified_by :run
547
547
 
548
548
  value_object "RunKey" do
549
- attribute :value, String, pattern: '[^ \t\n\r]'
549
+ attribute :value, String, matches: :present
550
550
 
551
551
  invariant("a change is named") { !value.to_s.empty? }
552
552
  end
553
553
 
554
554
  # The domain whose journal is changed: its directory.
555
555
  value_object "DomainPath" do
556
- attribute :value, String, pattern: '[^\t\n\r]'
556
+ attribute :value, String, matches: :not_empty
557
557
  end
558
558
 
559
559
  value_object "OperationName" do
@@ -574,7 +574,7 @@ policy "RecordTheEra" do
574
574
 
575
575
  # Aggregate names, comma separated; every aggregate that keeps a journal when absent.
576
576
  value_object "AggregateList" do
577
- attribute :value, String, pattern: '[^\t\n\r]'
577
+ attribute :value, String, matches: :not_empty
578
578
  end
579
579
 
580
580
  value_object "Switch" do
@@ -588,11 +588,11 @@ policy "RecordTheEra" do
588
588
  # The rehearsal a compute or rekey edge is approved on: the snapshot it ran against, the host
589
589
  # that ran it, whether it passed, and when.
590
590
  value_object "Snapshot" do
591
- attribute :value, String, pattern: '[^\t\n\r]'
591
+ attribute :value, String, matches: :not_empty
592
592
  end
593
593
 
594
594
  value_object "HostVersion" do
595
- attribute :value, String, pattern: '[^ \t\n\r]'
595
+ attribute :value, String, matches: :present
596
596
  end
597
597
 
598
598
  value_object "Verdict" do
@@ -14,7 +14,7 @@ Hecks.bluebook "Hecks" do
14
14
  identified_by :version
15
15
 
16
16
  value_object "FindingKey" do
17
- attribute :value, String, pattern: '[^ \t\n\r]'
17
+ attribute :value, String, matches: :present
18
18
  end
19
19
 
20
20
  value_object "Version" do
@@ -94,7 +94,7 @@ Hecks.bluebook "Hecks" do
94
94
  identified_by :digest
95
95
 
96
96
  value_object "Digest" do
97
- attribute :value, String, pattern: '[^ \t\n\r]'
97
+ attribute :value, String, matches: :present
98
98
 
99
99
  invariant("a digest is present") { !value.to_s.empty? }
100
100
  end
@@ -53,14 +53,14 @@ Hecks.bluebook "Hecks" do
53
53
  identified_by :run
54
54
 
55
55
  value_object "RunKey" do
56
- attribute :value, String, pattern: '[^ \t\n\r]'
56
+ attribute :value, String, matches: :present
57
57
 
58
58
  invariant("a rehearsal is named") { !value.to_s.empty? }
59
59
  end
60
60
 
61
61
  # The domain's directory: where its bluebooks and its `.world` stand.
62
62
  value_object "DomainPath" do
63
- attribute :value, String, pattern: '[^\t\n\r]'
63
+ attribute :value, String, matches: :not_empty
64
64
  end
65
65
 
66
66
  # The Hecks the rehearsal must run on: a release (`3.9.0`) or a commit, whole or a prefix.
@@ -69,7 +69,7 @@ Hecks.bluebook "Hecks" do
69
69
  end
70
70
 
71
71
  value_object "HostVersion" do
72
- attribute :value, String, pattern: '[^ \t\n\r]'
72
+ attribute :value, String, matches: :present
73
73
  end
74
74
 
75
75
  # Which strategy the subject's world named for the copy of its data.