hecks 3.13.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/examples/pizzas/bluebook/pizzas.bluebook +4 -4
  3. data/lib/hecks/bluebook/dsl/attribute_collector.rb +15 -5
  4. data/lib/hecks/bluebook/named_pattern.rb +33 -0
  5. data/lib/hecks/bluebook.rb +1 -0
  6. data/lib/hecks/cli/domain_stub.rb +1 -1
  7. data/lib/hecks/cli/interview_aggregate.rb +4 -4
  8. data/lib/hecks/deploy/bluebook/deploy.bluebook +34 -34
  9. data/lib/hecks/framework/bluebook/change.bluebook +2 -2
  10. data/lib/hecks/fuzzing/domain_generator/block_rendering.rb +1 -1
  11. data/lib/hecks/hecks/codebase.bluebook +37 -37
  12. data/lib/hecks/hecks/custodian.bluebook +14 -14
  13. data/lib/hecks/hecks/hecks.bluebook +2 -2
  14. data/lib/hecks/hecks/rehearsal.bluebook +3 -3
  15. data/lib/hecks/hecks/tooling.bluebook +22 -22
  16. data/lib/hecks/language/bluebook/aggregate.bluebook +1 -0
  17. data/lib/hecks/language/bluebook/command.bluebook +1 -0
  18. data/lib/hecks/language/bluebook/entity.bluebook +1 -0
  19. data/lib/hecks/language/bluebook/query.bluebook +1 -0
  20. data/lib/hecks/language/bluebook/shape.bluebook +8 -7
  21. data/lib/hecks/language/hecksagon/port_operation.bluebook +1 -0
  22. data/lib/hecks/quality_control/quality_control.bluebook +51 -51
  23. data/lib/hecks/site/bluebook/site.bluebook +5 -5
  24. data/lib/hecks/sme/bluebook/sme.bluebook +12 -12
  25. data/lib/hecks/tickets/bluebook/tickets.bluebook +3 -3
  26. data/lib/hecks/version.rb +1 -1
  27. data/prebuilt/{2b59737fbdbd5f44edda0fddce2611f45d76087b3a7c782d1f1a17ea58c77948.marshal → 1a6f596be124228be93eba1d86dbc9d2933190fa389b284331241cb9f27115a0.marshal} +0 -0
  28. data/prebuilt/{58208399bada10b0db99928c48e38789288fc58f7b71a72b21bfa386680e32ed.marshal → a883a7e568667aa5ac904c82daff356bdf9e996252a36af6def4a4a43efb967e.marshal} +0 -0
  29. data/prebuilt/verdicts-872993b1aa26d73fe48f28251374b8585fed145d02aab42be0f00de386b6ff80.json +1 -0
  30. data/rust/host/HECKS_RELEASE +1 -1
  31. data/rust/host/src/payments/roles.rs +159 -0
  32. data/rust/host/src/payments/tests.rs +25 -0
  33. data/rust/host/src/payments.rs +20 -11
  34. data/rust/parser/src/build/mod.rs +1 -0
  35. data/rust/parser/src/build/named_pattern.rs +23 -0
  36. data/rust/parser/src/keywords.rs +6 -0
  37. data/rust/parser/src/parse/mod.rs +22 -1
  38. metadata +7 -4
  39. data/prebuilt/verdicts-48318ca172edd21443b1ad02801c697fff100b746e828f09db987647641a5df2.json +0 -1
@@ -19,14 +19,14 @@ Hecks.bluebook "Bluebook" do
19
19
  end
20
20
 
21
21
  value_object "ValueObjectName" do
22
- attribute :value, String, pattern: '[^ \t\n\r]'
22
+ attribute :value, String, matches: :present
23
23
  invariant("a value object is named") { !value.to_s.empty? }
24
24
  end
25
25
 
26
26
  value_object "ShapeField" do
27
- attribute :name, String, pattern: '[^ \t\n\r]'
28
- attribute :type, String, pattern: '[^ \t\n\r]'
29
- attribute :list, String, pattern: '[^ \t\n\r]'
27
+ attribute :name, String, matches: :present
28
+ attribute :type, String, matches: :present
29
+ attribute :list, String, matches: :present
30
30
  attribute :optional, String, optional: true
31
31
  attribute :pattern, String, optional: true
32
32
  # optional: a declaration with no default has none
@@ -40,8 +40,8 @@ Hecks.bluebook "Bluebook" do
40
40
  end
41
41
 
42
42
  value_object "Assertion" do
43
- attribute :description, String, pattern: '[^ \t\n\r]'
44
- attribute :canonical, String, pattern: '[^ \t\n\r]'
43
+ attribute :description, String, matches: :present
44
+ attribute :canonical, String, matches: :present
45
45
  invariant("an assertion description is present") { !description.to_s.empty? }
46
46
  invariant("an assertion canonical form is present") { !canonical.to_s.empty? }
47
47
  end
@@ -59,7 +59,7 @@ Hecks.bluebook "Bluebook" do
59
59
  end
60
60
 
61
61
  value_object "Pair" do
62
- attribute :key, String, pattern: '[^ \t\n\r]'
62
+ attribute :key, String, matches: :present
63
63
  attribute :value, String
64
64
  # Keys must be named; values may be empty or numeric.
65
65
  invariant("a pair key is present") { !key.to_s.empty? }
@@ -230,6 +230,7 @@ Hecks.bluebook "Bluebook" do
230
230
  member keyword: "attribute", context: "ValueObject", at: "", named: "default", kind: "literal", required: "false", fills: "default"
231
231
  member keyword: "attribute", context: "ValueObject", at: "", named: "optional", kind: "flag", required: "false", fills: "optional"
232
232
  member keyword: "attribute", context: "ValueObject", at: "", named: "pattern", kind: "text", required: "false", fills: "pattern"
233
+ member keyword: "attribute", context: "ValueObject", at: "", named: "matches", kind: "symbol", required: "false", fills: "matches"
233
234
  member keyword: "attribute", context: "ValueObject", at: "", named: "admits", kind: "text", required: "false", fills: "admits"
234
235
  member keyword: "attribute", context: "ValueObject", at: "", named: "one_of", kind: "list", required: "false", fills: "one_of"
235
236
  member keyword: "invariant", context: "ValueObject", at: "1", named: "", kind: "text", required: "true", fills: "description"
@@ -80,6 +80,7 @@ Hecks.bluebook "Hecksagon" do
80
80
  member keyword: "attribute", context: "PortOperation", at: "", named: "default", kind: "literal", required: "false", fills: "default"
81
81
  member keyword: "attribute", context: "PortOperation", at: "", named: "optional", kind: "flag", required: "false", fills: "optional"
82
82
  member keyword: "attribute", context: "PortOperation", at: "", named: "pattern", kind: "text", required: "false", fills: "pattern"
83
+ member keyword: "attribute", context: "PortOperation", at: "", named: "matches", kind: "symbol", required: "false", fills: "matches"
83
84
  member keyword: "attribute", context: "PortOperation", at: "", named: "admits", kind: "text", required: "false", fills: "admits"
84
85
  member keyword: "attribute", context: "PortOperation", at: "", named: "one_of", kind: "list", required: "false", fills: "one_of"
85
86
  member keyword: "emits", context: "PortOperation", at: "1", named: "", kind: "text", required: "true", fills: "emits"
@@ -54,13 +54,13 @@ Hecks.bluebook "QualityControl" do
54
54
  attribute :reason, TargetReason
55
55
 
56
56
  value_object "TargetReference" do
57
- attribute :value, String, pattern: '[^ \t\n\r]'
57
+ attribute :value, String, matches: :present
58
58
  invariant("a target is referenced") { !value.to_s.empty? }
59
59
  end
60
60
 
61
61
  # Required: a name can be disputed, a path can be opened.
62
62
  value_object "TargetPath" do
63
- attribute :value, String, pattern: '[^ \t\n\r]'
63
+ attribute :value, String, matches: :present
64
64
  invariant("a target says where it is") { !value.to_s.empty? }
65
65
  end
66
66
 
@@ -87,7 +87,7 @@ Hecks.bluebook "QualityControl" do
87
87
  end
88
88
 
89
89
  value_object "TargetReason" do
90
- attribute :value, String, pattern: '[^ \t\n\r]'
90
+ attribute :value, String, matches: :present
91
91
  invariant("shelving a target says why") { !value.to_s.empty? }
92
92
  end
93
93
 
@@ -99,7 +99,7 @@ Hecks.bluebook "QualityControl" do
99
99
 
100
100
  # One mode name, as `EligibleFor`'s argument; a query attribute, never stored.
101
101
  value_object "Capability" do
102
- attribute :value, String, pattern: '[^ \t\n\r]'
102
+ attribute :value, String, matches: :present
103
103
  invariant("a mode is named") { !value.to_s.empty? }
104
104
  end
105
105
 
@@ -300,7 +300,7 @@ Hecks.bluebook "QualityControl" do
300
300
  end
301
301
 
302
302
  value_object "DomainPath" do
303
- attribute :value, String, pattern: '[^\t\n\r]'
303
+ attribute :value, String, matches: :not_empty
304
304
 
305
305
  invariant("a domain is named by its path") { !value.to_s.empty? }
306
306
  end
@@ -361,12 +361,12 @@ Hecks.bluebook "QualityControl" do
361
361
  attribute :checks, list_of(Check)
362
362
 
363
363
  value_object "SweepReference" do
364
- attribute :value, String, pattern: '[^ \t\n\r]'
364
+ attribute :value, String, matches: :present
365
365
  invariant("a sweep is referenced") { !value.to_s.empty? }
366
366
  end
367
367
 
368
368
  value_object "Engineer" do
369
- attribute :value, String, pattern: '[^ \t\n\r]'
369
+ attribute :value, String, matches: :present
370
370
  invariant("a sweep says who ran it") { !value.to_s.empty? }
371
371
  end
372
372
 
@@ -381,13 +381,13 @@ Hecks.bluebook "QualityControl" do
381
381
  end
382
382
 
383
383
  value_object "SweepNotes" do
384
- attribute :value, String, pattern: '[^ \t\n\r]'
384
+ attribute :value, String, matches: :present
385
385
  # The number is in the sentence because the sentence is the refusal message.
386
386
  invariant("a sweep says what it learned, in at least 40 characters") { value.to_s.size >= 40 }
387
387
  end
388
388
 
389
389
  value_object "WaiverReason" do
390
- attribute :value, String, pattern: '[^ \t\n\r]'
390
+ attribute :value, String, matches: :present
391
391
  invariant("a waived gate says why") { !value.to_s.empty? }
392
392
  end
393
393
 
@@ -395,7 +395,7 @@ Hecks.bluebook "QualityControl" do
395
395
  # literals, so `spec/quality_control_spec.rb` pins the two equal. "nobody" is refused: unsigned
396
396
  # is anonymous.
397
397
  value_object "WaivedBy" do
398
- attribute :value, String, pattern: '[^ \t\n\r]'
398
+ attribute :value, String, matches: :present
399
399
  invariant("a gate is waived by a person, never by the loop") { value != "qa_sweep" }
400
400
  invariant("a waiver is signed") { value != "nobody" }
401
401
  end
@@ -418,13 +418,13 @@ Hecks.bluebook "QualityControl" do
418
418
  end
419
419
 
420
420
  value_object "Subject" do
421
- attribute :value, String, pattern: '[^ \t\n\r]'
421
+ attribute :value, String, matches: :present
422
422
  invariant("a check names what it put to the system") { !value.to_s.empty? }
423
423
  end
424
424
 
425
425
  # Written before the answer exists: an expectation fitted to the answer cannot be surprised.
426
426
  value_object "Expectation" do
427
- attribute :value, String, pattern: '[^ \t\n\r]'
427
+ attribute :value, String, matches: :present
428
428
  invariant("a check says what it expected") { !value.to_s.empty? }
429
429
  end
430
430
 
@@ -637,37 +637,37 @@ Hecks.bluebook "QualityControl" do
637
637
  end
638
638
 
639
639
  value_object "DomainPath" do
640
- attribute :value, String, pattern: '[^\t\n\r]'
640
+ attribute :value, String, matches: :not_empty
641
641
 
642
642
  invariant("a domain is named by its path") { !value.to_s.empty? }
643
643
  end
644
644
 
645
645
  value_object "DataPath" do
646
- attribute :value, String, pattern: '[^\t\n\r]'
646
+ attribute :value, String, matches: :not_empty
647
647
 
648
648
  invariant("a data directory is named by its path") { !value.to_s.empty? }
649
649
  end
650
650
 
651
651
  value_object "DatabaseName" do
652
- attribute :value, String, pattern: '[^ \t\n\r]'
652
+ attribute :value, String, matches: :present
653
653
 
654
654
  invariant("a database is named") { !value.to_s.empty? }
655
655
  end
656
656
 
657
657
  value_object "RoleName" do
658
- attribute :value, String, pattern: '[^ \t\n\r]'
658
+ attribute :value, String, matches: :present
659
659
 
660
660
  invariant("a role is named") { !value.to_s.empty? }
661
661
  end
662
662
 
663
663
  value_object "SchemaName" do
664
- attribute :value, String, pattern: '[^ \t\n\r]'
664
+ attribute :value, String, matches: :present
665
665
 
666
666
  invariant("a schema is named") { !value.to_s.empty? }
667
667
  end
668
668
 
669
669
  value_object "StepVerb" do
670
- attribute :value, String, pattern: '[^ \t\n\r]'
670
+ attribute :value, String, matches: :present
671
671
 
672
672
  invariant("a step names its verb") { !value.to_s.empty? }
673
673
  end
@@ -770,7 +770,7 @@ Hecks.bluebook "QualityControl" do
770
770
  attribute :window, StaleAfter
771
771
 
772
772
  value_object "BugReference" do
773
- attribute :value, String, pattern: '[^ \t\n\r]'
773
+ attribute :value, String, matches: :present
774
774
  invariant("a bug is referenced") { !value.to_s.empty? }
775
775
  end
776
776
 
@@ -783,56 +783,56 @@ Hecks.bluebook "QualityControl" do
783
783
  # value object sharing a word with any aggregate resolves to that class once the other domain
784
784
  # boots.
785
785
  value_object "BugTitle" do
786
- attribute :value, String, pattern: '[^ \t\n\r]'
786
+ attribute :value, String, matches: :present
787
787
  invariant("a bug is titled") { !value.to_s.empty? }
788
788
  end
789
789
 
790
790
  # Required at `Log`, which is what makes the one absolute rule absolute.
791
791
  value_object "Demonstration" do
792
- attribute :value, String, pattern: '[^ \t\n\r]'
792
+ attribute :value, String, matches: :present
793
793
  invariant("a bug is proven by a test somebody can re-run") { !value.to_s.empty? }
794
794
  end
795
795
 
796
796
  value_object "Symptom" do
797
- attribute :value, String, pattern: '[^ \t\n\r]'
797
+ attribute :value, String, matches: :present
798
798
  invariant("a bug says what actually happened") { !value.to_s.empty? }
799
799
  end
800
800
 
801
801
  value_object "Expectation" do
802
- attribute :value, String, pattern: '[^ \t\n\r]'
802
+ attribute :value, String, matches: :present
803
803
  invariant("a bug says what should have happened") { !value.to_s.empty? }
804
804
  end
805
805
 
806
806
  value_object "BugSite" do
807
- attribute :value, String, pattern: '[^ \t\n\r]'
807
+ attribute :value, String, matches: :present
808
808
  invariant("an investigation names where the bug lives") { !value.to_s.empty? }
809
809
  end
810
810
 
811
811
  value_object "BugCause" do
812
- attribute :value, String, pattern: '[^ \t\n\r]'
812
+ attribute :value, String, matches: :present
813
813
  invariant("an investigation says why the code is wrong") { !value.to_s.empty? }
814
814
  end
815
815
 
816
816
  # 7 to 40 hex: a fix that lives only in a working tree is not a fix.
817
817
  value_object "CommitRef" do
818
- attribute :value, String, pattern: '^[0-9a-fA-F]{7,40}$'
818
+ attribute :value, String, matches: :git_sha
819
819
  end
820
820
 
821
821
  # What was actually run, e.g. "rspec --order random, 1335 examples, 0 failures, seed 12345":
822
822
  # a count and a seed are checkable, "tests pass" is not.
823
823
  value_object "Verification" do
824
- attribute :value, String, pattern: '[^ \t\n\r]'
824
+ attribute :value, String, matches: :present
825
825
  invariant("a verification says what was actually run") { !value.to_s.empty? }
826
826
  end
827
827
 
828
828
  value_object "BugReason" do
829
- attribute :value, String, pattern: '[^ \t\n\r]'
829
+ attribute :value, String, matches: :present
830
830
  invariant("stopping on a bug says why") { !value.to_s.empty? }
831
831
  end
832
832
 
833
833
  # Who decides and what would unblock it, so "deferred" does not become "forgotten".
834
834
  value_object "NextStep" do
835
- attribute :value, String, pattern: '[^ \t\n\r]'
835
+ attribute :value, String, matches: :present
836
836
  invariant("stopping on a bug says what would move it") { !value.to_s.empty? }
837
837
  end
838
838
 
@@ -842,14 +842,14 @@ Hecks.bluebook "QualityControl" do
842
842
  end
843
843
 
844
844
  value_object "WaiverReason" do
845
- attribute :value, String, pattern: '[^ \t\n\r]'
845
+ attribute :value, String, matches: :present
846
846
  invariant("a waived gate says why") { !value.to_s.empty? }
847
847
  end
848
848
 
849
849
  # Redeclared, as elsewhere in this file; the "qa_sweep" literal is pinned to AUTOMATED_ENGINEER
850
850
  # by spec.
851
851
  value_object "WaivedBy" do
852
- attribute :value, String, pattern: '[^ \t\n\r]'
852
+ attribute :value, String, matches: :present
853
853
  invariant("a gate is waived by a person, never by the loop") { value != "qa_sweep" }
854
854
  invariant("a waiver is signed") { value != "nobody" }
855
855
  end
@@ -881,7 +881,7 @@ Hecks.bluebook "QualityControl" do
881
881
  # Not an `Engineer`: that type defaults to "nobody" (an unclaimed bug is held by nobody), which
882
882
  # would let a report omit its submitter. This type has no default and refuses "nobody".
883
883
  value_object "Submitter" do
884
- attribute :value, String, pattern: '[^ \t\n\r]'
884
+ attribute :value, String, matches: :present
885
885
 
886
886
  invariant("a bug is reported by somebody") { value != "nobody" }
887
887
  end
@@ -1237,27 +1237,27 @@ Hecks.bluebook "QualityControl" do
1237
1237
  attribute :reason, AngleReason
1238
1238
 
1239
1239
  value_object "AngleReference" do
1240
- attribute :value, String, pattern: '[^ \t\n\r]'
1240
+ attribute :value, String, matches: :present
1241
1241
  invariant("an angle is referenced") { !value.to_s.empty? }
1242
1242
  end
1243
1243
 
1244
1244
  # The number is in the sentence because the sentence is the refusal; 60 characters trips a
1245
1245
  # stub.
1246
1246
  value_object "AnglePremise" do
1247
- attribute :value, String, pattern: '[^ \t\n\r]'
1247
+ attribute :value, String, matches: :present
1248
1248
  invariant("an angle says enough to be acted on without its proposer in the room, in at least 60 characters") { value.to_s.size >= 60 }
1249
1249
  end
1250
1250
 
1251
1251
  # A Bug reference, ADR number or named gap that a reader can check for themselves.
1252
1252
  value_object "AngleCitation" do
1253
- attribute :value, String, pattern: '[^ \t\n\r]'
1253
+ attribute :value, String, matches: :present
1254
1254
  invariant("an angle cites something concrete, not a mood") { !value.to_s.empty? }
1255
1255
  end
1256
1256
 
1257
1257
  # Not an `Engineer`, for the reason `Submitter` is not: that default would let authorship go
1258
1258
  # unrecorded.
1259
1259
  value_object "Proposer" do
1260
- attribute :value, String, pattern: '[^ \t\n\r]'
1260
+ attribute :value, String, matches: :present
1261
1261
  invariant("an angle is proposed by somebody") { value != "nobody" }
1262
1262
  end
1263
1263
 
@@ -1268,13 +1268,13 @@ Hecks.bluebook "QualityControl" do
1268
1268
 
1269
1269
  # What came of it (a Target, a PR number, a domain path); set once, at `Build`.
1270
1270
  value_object "AngleResolution" do
1271
- attribute :value, String, pattern: '[^ \t\n\r]'
1271
+ attribute :value, String, matches: :present
1272
1272
  invariant("a built angle says what actually got built") { !value.to_s.empty? }
1273
1273
  end
1274
1274
 
1275
1275
  # Redeclared as `Target::Shelve` does: a discard with no reason looks like a lead nobody read.
1276
1276
  value_object "AngleReason" do
1277
- attribute :value, String, pattern: '[^ \t\n\r]'
1277
+ attribute :value, String, matches: :present
1278
1278
  invariant("discarding an angle says why") { !value.to_s.empty? }
1279
1279
  end
1280
1280
 
@@ -1401,7 +1401,7 @@ Hecks.bluebook "QualityControl" do
1401
1401
  attribute :max_attempts, MaxAttempts
1402
1402
 
1403
1403
  value_object "TicketReference" do
1404
- attribute :value, String, pattern: '[^ \t\n\r]'
1404
+ attribute :value, String, matches: :present
1405
1405
  invariant("a ticket is referenced") { !value.to_s.empty? }
1406
1406
  end
1407
1407
 
@@ -1410,7 +1410,7 @@ Hecks.bluebook "QualityControl" do
1410
1410
  end
1411
1411
 
1412
1412
  value_object "TicketTitle" do
1413
- attribute :value, String, pattern: '[^ \t\n\r]'
1413
+ attribute :value, String, matches: :present
1414
1414
  invariant("a ticket is titled") { !value.to_s.empty? }
1415
1415
  end
1416
1416
 
@@ -1421,7 +1421,7 @@ Hecks.bluebook "QualityControl" do
1421
1421
  end
1422
1422
 
1423
1423
  value_object "TicketBody" do
1424
- attribute :value, String, pattern: '[^ \t\n\r]'
1424
+ attribute :value, String, matches: :present
1425
1425
  invariant("a ticket says something") { !value.to_s.empty? }
1426
1426
  end
1427
1427
 
@@ -1647,22 +1647,22 @@ Hecks.bluebook "QualityControl" do
1647
1647
  end
1648
1648
 
1649
1649
  value_object "PatchUrl" do
1650
- attribute :value, String, pattern: '[^ \t\n\r]'
1650
+ attribute :value, String, matches: :present
1651
1651
  invariant("a patch says where it lives") { !value.to_s.empty? }
1652
1652
  end
1653
1653
 
1654
1654
  value_object "PatchBranch" do
1655
- attribute :value, String, pattern: '[^ \t\n\r]'
1655
+ attribute :value, String, matches: :present
1656
1656
  invariant("a patch says which branch it is on") { !value.to_s.empty? }
1657
1657
  end
1658
1658
 
1659
1659
  # Recorded at `Open` so the commit is in hand when the PR needs checking, as `Bug.commit` is.
1660
1660
  value_object "CommitRef" do
1661
- attribute :value, String, pattern: '^[0-9a-fA-F]{7,40}$'
1661
+ attribute :value, String, matches: :git_sha
1662
1662
  end
1663
1663
 
1664
1664
  value_object "PatchTitle" do
1665
- attribute :value, String, pattern: '[^ \t\n\r]'
1665
+ attribute :value, String, matches: :present
1666
1666
  invariant("a patch is titled") { !value.to_s.empty? }
1667
1667
  end
1668
1668
 
@@ -1840,23 +1840,23 @@ Hecks.bluebook "QualityControl" do
1840
1840
  end
1841
1841
 
1842
1842
  value_object "ImprovementUrl" do
1843
- attribute :value, String, pattern: '[^ \t\n\r]'
1843
+ attribute :value, String, matches: :present
1844
1844
  invariant("an improvement says where it lives") { !value.to_s.empty? }
1845
1845
  end
1846
1846
 
1847
1847
  value_object "ImprovementBranch" do
1848
- attribute :value, String, pattern: '[^ \t\n\r]'
1848
+ attribute :value, String, matches: :present
1849
1849
  invariant("an improvement says which branch it is on") { !value.to_s.empty? }
1850
1850
  end
1851
1851
 
1852
1852
  # Redeclared per aggregate. Absent until `Land`: there is nothing to watch until a commit
1853
1853
  # exists.
1854
1854
  value_object "CommitRef" do
1855
- attribute :value, String, pattern: '^[0-9a-fA-F]{7,40}$'
1855
+ attribute :value, String, matches: :git_sha
1856
1856
  end
1857
1857
 
1858
1858
  value_object "ImprovementTitle" do
1859
- attribute :value, String, pattern: '[^ \t\n\r]'
1859
+ attribute :value, String, matches: :present
1860
1860
  invariant("an improvement is titled") { !value.to_s.empty? }
1861
1861
  end
1862
1862
 
@@ -1977,11 +1977,11 @@ Hecks.bluebook "QualityControl" do
1977
1977
  attribute :summary, RunSummary
1978
1978
 
1979
1979
  value_object "CommitRef" do
1980
- attribute :value, String, pattern: '^[0-9a-fA-F]{7,40}$'
1980
+ attribute :value, String, matches: :git_sha
1981
1981
  end
1982
1982
 
1983
1983
  value_object "RunSummary" do
1984
- attribute :value, String, pattern: '[^ \t\n\r]'
1984
+ attribute :value, String, matches: :present
1985
1985
  invariant("a run says what it ran and what came back") { !value.to_s.empty? }
1986
1986
  end
1987
1987
 
@@ -129,14 +129,14 @@ Hecks.bluebook "Site" do
129
129
  identified_by :run
130
130
 
131
131
  value_object "RunKey" do
132
- attribute :value, String, pattern: '[^ \t\n\r]'
132
+ attribute :value, String, matches: :present
133
133
 
134
134
  invariant("a run is named") { !value.to_s.empty? }
135
135
  end
136
136
 
137
137
  # A project directory, whose `bluebook/` holds the chapter that declares the route table.
138
138
  value_object "DomainPath" do
139
- attribute :value, String, pattern: '[^\t\n\r]'
139
+ attribute :value, String, matches: :not_empty
140
140
 
141
141
  invariant("a project is named by its path") { !value.to_s.empty? }
142
142
  end
@@ -144,7 +144,7 @@ Hecks.bluebook "Site" do
144
144
  # A directory or file anywhere on disk, relative to where the command runs: where routes.ts is
145
145
  # written when not in the project's generated/ directory, or the template to rewrite in place.
146
146
  value_object "Location" do
147
- attribute :value, String, pattern: '[^\t\n\r]'
147
+ attribute :value, String, matches: :not_empty
148
148
  end
149
149
 
150
150
  # The file extension of the generated module: `ts` (routes.ts), or `mts` (routes.mts), which
@@ -164,12 +164,12 @@ Hecks.bluebook "Site" do
164
164
 
165
165
  # Path patterns, comma separated: the behaviours a change is about to add to the live distribution.
166
166
  value_object "PathList" do
167
- attribute :value, String, pattern: '[^\t\n\r]'
167
+ attribute :value, String, matches: :not_empty
168
168
  end
169
169
 
170
170
  # Policy references and the ids they stand for live, as `!Ref Name=id`, comma separated.
171
171
  value_object "PolicyRefs" do
172
- attribute :value, String, pattern: '[^\t\n\r]'
172
+ attribute :value, String, matches: :not_empty
173
173
  end
174
174
 
175
175
  # A running site's address, `https://example.org`: what `check_site` sends its requests to.
@@ -30,37 +30,37 @@ Hecks.bluebook "SME" do
30
30
  attribute :accepted_actions, Tally
31
31
 
32
32
  value_object "Reference" do
33
- attribute :value, String, pattern: '[^ \t\n\r]'
33
+ attribute :value, String, matches: :present
34
34
  end
35
35
 
36
36
  # The domain being discovered, spelled as its bluebook will spell it. Many interviews, with
37
37
  # different experts on different days, name the same subject; the domain is not modelled here.
38
38
  value_object "Subject" do
39
- attribute :value, String, pattern: '[^ \t\n\r]'
39
+ attribute :value, String, matches: :present
40
40
  end
41
41
 
42
42
  # Who is being interviewed.
43
43
  value_object "Expert" do
44
- attribute :value, String, pattern: '[^\t\n\r]'
44
+ attribute :value, String, matches: :not_empty
45
45
  end
46
46
 
47
47
  value_object "Question" do
48
- attribute :value, String, pattern: '[^\t\n\r]'
48
+ attribute :value, String, matches: :not_empty
49
49
  end
50
50
 
51
51
  # The expert's answer in their own words.
52
52
  value_object "Answer" do
53
- attribute :value, String, pattern: '[^\t\n\r]'
53
+ attribute :value, String, matches: :not_empty
54
54
  end
55
55
 
56
56
  # A label for grouping exchanges ("lending rules"); optional on every exchange.
57
57
  value_object "Topic" do
58
- attribute :value, String, pattern: '[^\t\n\r]'
58
+ attribute :value, String, matches: :not_empty
59
59
  end
60
60
 
61
61
  value_object "Exchange" do
62
- attribute :question, String, pattern: '[^\t\n\r]'
63
- attribute :answer, String, pattern: '[^\t\n\r]'
62
+ attribute :question, String, matches: :not_empty
63
+ attribute :answer, String, matches: :not_empty
64
64
  attribute :topic, String, optional: true
65
65
  end
66
66
 
@@ -76,7 +76,7 @@ Hecks.bluebook "SME" do
76
76
  end
77
77
 
78
78
  value_object "Name" do
79
- attribute :value, String, pattern: '[^ \t\n\r]'
79
+ attribute :value, String, matches: :present
80
80
  end
81
81
 
82
82
  # How many findings of a kind were accepted.
@@ -86,7 +86,7 @@ Hecks.bluebook "SME" do
86
86
  end
87
87
 
88
88
  value_object "Statement" do
89
- attribute :value, String, pattern: '[^\t\n\r]'
89
+ attribute :value, String, matches: :not_empty
90
90
  end
91
91
 
92
92
  # Whether an action brings its thing into being, as opposed to happening to one that exists.
@@ -97,12 +97,12 @@ Hecks.bluebook "SME" do
97
97
  # A list the expert gave in a breath, comma separated: the values a field may take, or the
98
98
  # fields an action needs to be told. Absent when the expert gave none.
99
99
  value_object "Listing" do
100
- attribute :value, String, pattern: '[^\t\n\r]'
100
+ attribute :value, String, matches: :not_empty
101
101
  end
102
102
 
103
103
  # Who may do an action, in the expert's words ("a maintainer", "QA engineer").
104
104
  value_object "Actor" do
105
- attribute :value, String, pattern: '[^\t\n\r]'
105
+ attribute :value, String, matches: :not_empty
106
106
  end
107
107
 
108
108
  # A thing the domain keeps track of, and the field that identifies one: an aggregate to be.
@@ -32,7 +32,7 @@ Hecks.bluebook "Tickets" do
32
32
  identified_by :finding
33
33
 
34
34
  value_object "FindingKey" do
35
- attribute :value, String, pattern: '[^ \t\n\r]'
35
+ attribute :value, String, matches: :present
36
36
 
37
37
  invariant("a finding is named") { !value.to_s.empty? }
38
38
  end
@@ -65,7 +65,7 @@ Hecks.bluebook "Tickets" do
65
65
  # The same finding refiled by the QA loop carries the same fingerprint, so a report of it while an
66
66
  # open finding holds it changes nothing.
67
67
  value_object "Fingerprint" do
68
- attribute :value, String, pattern: '[^ \t\n\r]'
68
+ attribute :value, String, matches: :present
69
69
  end
70
70
 
71
71
  value_object "Number" do
@@ -239,7 +239,7 @@ Hecks.bluebook "Tickets" do
239
239
  end
240
240
 
241
241
  value_object "FindingKey" do
242
- attribute :value, String, pattern: '[^ \t\n\r]'
242
+ attribute :value, String, matches: :present
243
243
  end
244
244
 
245
245
  lifecycle :status, default: "draft" do
data/lib/hecks/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Hecks
2
2
  # Read directly by the gemspec, so this file must never require the
3
3
  # rest of the gem (its dependencies aren't resolved yet at that point).
4
- VERSION = "3.13.0".freeze
4
+ VERSION = "3.14.0".freeze # rust/host/HECKS_RELEASE names the same release
5
5
  end