nukadoko 0.5.0 → 0.7.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 (203) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +553 -3
  3. data/README.ja.md +22 -6
  4. data/README.md +13 -7
  5. data/docs/ci.ja.md +542 -0
  6. data/docs/ci.md +635 -0
  7. data/docs/commands.ja.md +1524 -0
  8. data/docs/commands.md +1281 -0
  9. data/docs/engines.json +19 -0
  10. data/docs/execution-events.ja.md +336 -0
  11. data/docs/execution-events.md +423 -0
  12. data/docs/glossary.json +1348 -0
  13. data/docs/guide.ja.md +733 -0
  14. data/docs/guide.md +815 -0
  15. data/docs/intent.ja.md +133 -0
  16. data/docs/intent.md +156 -0
  17. data/docs/layout.ja.md +442 -0
  18. data/docs/layout.md +399 -0
  19. data/docs/releasing.ja.md +186 -0
  20. data/docs/releasing.md +237 -0
  21. data/docs/ruby/reference.ja.md +302 -0
  22. data/docs/ruby/reference.md +368 -0
  23. data/docs/spec.ja.md +8916 -0
  24. data/docs/spec.md +11250 -0
  25. data/docs/tutorial.ja.md +451 -0
  26. data/docs/tutorial.md +458 -0
  27. data/docs/typescript/adopting.ja.md +231 -0
  28. data/docs/typescript/adopting.md +251 -0
  29. data/docs/typescript/doors.ja.md +301 -0
  30. data/docs/typescript/doors.md +329 -0
  31. data/docs/typescript/migration-playwright-test.ja.md +189 -0
  32. data/docs/typescript/migration-playwright-test.md +212 -0
  33. data/docs/typescript/migration.ja.md +391 -0
  34. data/docs/typescript/migration.md +505 -0
  35. data/docs/typescript/reference.ja.md +176 -0
  36. data/docs/typescript/reference.md +197 -0
  37. data/docs/typescript/upgrading.ja.md +1774 -0
  38. data/docs/typescript/upgrading.md +2224 -0
  39. data/docs/web-app.ja.md +627 -0
  40. data/docs/web-app.md +659 -0
  41. data/docs/writing-scenarios.ja.md +544 -0
  42. data/docs/writing-scenarios.md +563 -0
  43. data/lib/nukadoko/base.rb +12 -5
  44. data/lib/nukadoko/changed_files.rb +95 -0
  45. data/lib/nukadoko/check.rb +459 -51
  46. data/lib/nukadoko/claim_drops.rb +271 -0
  47. data/lib/nukadoko/claim_line.rb +24 -4
  48. data/lib/nukadoko/claim_rules.rb +143 -1
  49. data/lib/nukadoko/claim_sides.rb +157 -9
  50. data/lib/nukadoko/cli.rb +403 -50
  51. data/lib/nukadoko/codes.json +246 -21
  52. data/lib/nukadoko/codes.rb +21 -4
  53. data/lib/nukadoko/command.rb +120 -13
  54. data/lib/nukadoko/command_help.rb +128 -0
  55. data/lib/nukadoko/compat.rb +469 -0
  56. data/lib/nukadoko/criteria.rb +1 -1
  57. data/lib/nukadoko/definition.rb +157 -7
  58. data/lib/nukadoko/error_frames.rb +6 -3
  59. data/lib/nukadoko/events/count.rb +146 -0
  60. data/lib/nukadoko/events/counted.rb +114 -0
  61. data/lib/nukadoko/events/format.rb +257 -0
  62. data/lib/nukadoko/events/lists.rb +154 -0
  63. data/lib/nukadoko/events/path.rb +285 -0
  64. data/lib/nukadoko/events/read.rb +284 -0
  65. data/lib/nukadoko/events/reader.rb +490 -0
  66. data/lib/nukadoko/events/selection.rb +252 -0
  67. data/lib/nukadoko/events/tally.rb +438 -0
  68. data/lib/nukadoko/features.rb +2 -2
  69. data/lib/nukadoko/fixtures.rb +160 -35
  70. data/lib/nukadoko/http_recording.rb +6 -2
  71. data/lib/nukadoko/intent.rb +364 -0
  72. data/lib/nukadoko/intent_file.rb +81 -0
  73. data/lib/nukadoko/intent_view.rb +190 -0
  74. data/lib/nukadoko/js_json.rb +2 -1
  75. data/lib/nukadoko/judge.rb +2 -2
  76. data/lib/nukadoko/judgment_file.rb +22 -1
  77. data/lib/nukadoko/judgments.rb +33 -3
  78. data/lib/nukadoko/measure_mcp.rb +202 -0
  79. data/lib/nukadoko/parts.rb +8 -2
  80. data/lib/nukadoko/path_view.rb +252 -0
  81. data/lib/nukadoko/place_rows.rb +161 -0
  82. data/lib/nukadoko/program.rb +1265 -51
  83. data/lib/nukadoko/program_log.rb +122 -0
  84. data/lib/nukadoko/program_shape.rb +385 -0
  85. data/lib/nukadoko/project_fixtures.rb +43 -10
  86. data/lib/nukadoko/project_program.rb +5 -4
  87. data/lib/nukadoko/repeated_prefix.rb +310 -0
  88. data/lib/nukadoko/report_run.rb +3 -3
  89. data/lib/nukadoko/run.rb +1156 -159
  90. data/lib/nukadoko/run_record.rb +70 -46
  91. data/lib/nukadoko/scaffold.rb +24 -6
  92. data/lib/nukadoko/schema.rb +15 -2
  93. data/lib/nukadoko/secrets.rb +55 -5
  94. data/lib/nukadoko/states.rb +478 -0
  95. data/lib/nukadoko/step.rb +71 -2
  96. data/lib/nukadoko/step_fixtures.rb +52 -3
  97. data/lib/nukadoko/summary.rb +803 -30
  98. data/lib/nukadoko/table.rb +4 -2
  99. data/lib/nukadoko/text_fit.rb +20 -7
  100. data/lib/nukadoko/trace.rb +152 -45
  101. data/lib/nukadoko/tree_passes.rb +95 -33
  102. data/lib/nukadoko/underneath.rb +311 -0
  103. data/lib/nukadoko/verdict.rb +18 -1
  104. data/lib/nukadoko/version.rb +1 -1
  105. data/lib/nukadoko/vocabulary.rb +166 -23
  106. data/lib/nukadoko/walk.rb +2 -2
  107. data/lib/nukadoko/walk_step.rb +1 -1
  108. data/lib/nukadoko.rb +23 -0
  109. data/llms.txt +42 -35
  110. data/sig/generated/nukadoko/base.rbs +4 -4
  111. data/sig/generated/nukadoko/changed_files.rbs +42 -0
  112. data/sig/generated/nukadoko/check.rbs +147 -10
  113. data/sig/generated/nukadoko/claim_drops.rbs +135 -0
  114. data/sig/generated/nukadoko/claim_line.rbs +11 -0
  115. data/sig/generated/nukadoko/claim_rules.rbs +49 -4
  116. data/sig/generated/nukadoko/claim_sides.rbs +63 -12
  117. data/sig/generated/nukadoko/cli.rbs +80 -7
  118. data/sig/generated/nukadoko/codes.rbs +19 -4
  119. data/sig/generated/nukadoko/command.rbs +68 -1
  120. data/sig/generated/nukadoko/command_help.rbs +18 -0
  121. data/sig/generated/nukadoko/compat.rbs +392 -0
  122. data/sig/generated/nukadoko/criteria.rbs +1 -1
  123. data/sig/generated/nukadoko/definition.rbs +50 -0
  124. data/sig/generated/nukadoko/error_frames.rbs +1 -1
  125. data/sig/generated/nukadoko/events/count.rbs +69 -0
  126. data/sig/generated/nukadoko/events/counted.rbs +70 -0
  127. data/sig/generated/nukadoko/events/format.rbs +163 -0
  128. data/sig/generated/nukadoko/events/lists.rbs +47 -0
  129. data/sig/generated/nukadoko/events/path.rbs +161 -0
  130. data/sig/generated/nukadoko/events/read.rbs +109 -0
  131. data/sig/generated/nukadoko/events/reader.rbs +226 -0
  132. data/sig/generated/nukadoko/events/selection.rbs +100 -0
  133. data/sig/generated/nukadoko/events/tally.rbs +227 -0
  134. data/sig/generated/nukadoko/features.rbs +6 -4
  135. data/sig/generated/nukadoko/fixtures.rbs +67 -11
  136. data/sig/generated/nukadoko/http_recording.rbs +1 -1
  137. data/sig/generated/nukadoko/intent.rbs +132 -0
  138. data/sig/generated/nukadoko/intent_file.rbs +46 -0
  139. data/sig/generated/nukadoko/intent_view.rbs +69 -0
  140. data/sig/generated/nukadoko/judgment_file.rbs +7 -1
  141. data/sig/generated/nukadoko/judgments.rbs +10 -0
  142. data/sig/generated/nukadoko/measure_mcp.rbs +104 -0
  143. data/sig/generated/nukadoko/parts.rbs +2 -2
  144. data/sig/generated/nukadoko/path_view.rbs +105 -0
  145. data/sig/generated/nukadoko/place_rows.rbs +43 -0
  146. data/sig/generated/nukadoko/program.rbs +627 -23
  147. data/sig/generated/nukadoko/program_log.rbs +67 -0
  148. data/sig/generated/nukadoko/program_shape.rbs +147 -0
  149. data/sig/generated/nukadoko/project_fixtures.rbs +16 -3
  150. data/sig/generated/nukadoko/project_program.rbs +2 -1
  151. data/sig/generated/nukadoko/repeated_prefix.rbs +172 -0
  152. data/sig/generated/nukadoko/report_run.rbs +1 -1
  153. data/sig/generated/nukadoko/run.rbs +286 -41
  154. data/sig/generated/nukadoko/run_record.rbs +20 -12
  155. data/sig/generated/nukadoko/scaffold.rbs +3 -0
  156. data/sig/generated/nukadoko/schema.rbs +5 -0
  157. data/sig/generated/nukadoko/secrets.rbs +26 -3
  158. data/sig/generated/nukadoko/states.rbs +214 -0
  159. data/sig/generated/nukadoko/step.rbs +58 -1
  160. data/sig/generated/nukadoko/step_fixtures.rbs +39 -0
  161. data/sig/generated/nukadoko/summary.rbs +256 -2
  162. data/sig/generated/nukadoko/table.rbs +3 -2
  163. data/sig/generated/nukadoko/trace.rbs +108 -33
  164. data/sig/generated/nukadoko/tree_passes.rbs +36 -8
  165. data/sig/generated/nukadoko/underneath.rbs +141 -0
  166. data/sig/generated/nukadoko/verdict.rbs +8 -0
  167. data/sig/generated/nukadoko/vocabulary.rbs +45 -6
  168. data/skills/nukadoko/SKILL.md +18 -18
  169. data/skills/nukadoko/references/checking-steps.md +16 -83
  170. data/skills/nukadoko/references/diagnosing.md +6 -6
  171. data/skills/nukadoko/references/done.md +22 -0
  172. data/skills/nukadoko/references/evidence.md +19 -6
  173. data/skills/nukadoko/references/exploring.md +22 -7
  174. data/skills/nukadoko/references/fixtures.md +12 -32
  175. data/skills/nukadoko/references/judgments.md +18 -0
  176. data/skills/nukadoko/references/maintenance.md +1 -1
  177. data/skills/nukadoko/references/merge-risk.md +1 -1
  178. data/skills/nukadoko/references/parts.md +46 -23
  179. data/skills/nukadoko/references/{perturbed-worlds.md → perturbed-systems.md} +30 -12
  180. data/skills/nukadoko/references/program.md +168 -169
  181. data/skills/nukadoko/references/reviewing.md +20 -20
  182. data/skills/nukadoko/references/ruby/checking-steps.md +106 -0
  183. data/skills/nukadoko/references/ruby/examples/cli.md +212 -0
  184. data/skills/nukadoko/references/ruby/fixtures.md +34 -0
  185. data/skills/nukadoko/references/ruby/program.md +112 -0
  186. data/skills/nukadoko/references/ruby/step-files.md +115 -0
  187. data/skills/nukadoko/references/running.md +34 -34
  188. data/skills/nukadoko/references/scenario-rules.md +7 -6
  189. data/skills/nukadoko/references/states.md +7 -1
  190. data/skills/nukadoko/references/step-files.md +41 -120
  191. data/skills/nukadoko/references/typescript/checking-steps.md +129 -0
  192. data/skills/nukadoko/references/{examples → typescript/examples}/cli.md +1 -1
  193. data/skills/nukadoko/references/{examples → typescript/examples}/http-api.md +6 -6
  194. data/skills/nukadoko/references/{examples → typescript/examples}/workflow.md +1 -1
  195. data/skills/nukadoko/references/typescript/fixtures.md +56 -0
  196. data/skills/nukadoko/references/typescript/program.md +111 -0
  197. data/skills/nukadoko/references/typescript/step-files.md +104 -0
  198. data/skills/nukadoko/references/verdicts.md +10 -10
  199. data/skills/nukadoko/references/writing-steps.md +67 -67
  200. data/skills/nukadoko/references/writing-the-feature.md +1 -1
  201. data/skills/nukadoko-verification/SKILL.md +13 -8
  202. metadata +103 -7
  203. data/skills/nukadoko/references/ruby.md +0 -80
@@ -1,21 +1,21 @@
1
1
  # Generated from lib/nukadoko/run.rb with RBS::Inline
2
2
 
3
- # One run: for each environment, start its world, play every scenario's steps
3
+ # One run: for each environment, start its system, play every scenario's steps
4
4
  # in order, and write a record per step. A scenario stops at its first step
5
5
  # that does not pass and skips the rest. A control that fails at a Then runs
6
6
  # again for proof. The table and the summary come last.
7
7
  module Nukadoko
8
8
  module Engine
9
9
  class Run
10
- # `world` is head for a run, or base or old for a tree's pass, which
10
+ # `system` is head for a run, or base or old for a tree's pass, which
11
11
  # writes into the head run's directory `dir`, and reads its env files
12
12
  # from `head`'s root, with head's secrets as well as its own. `base` is the
13
13
  # comparison a `--base` run judges its rows by. `scenarios` are in the
14
14
  # run's order, which every round of every pass keeps; `records`, when
15
15
  # given, gets each scenario's run.json entry as one line as it ends,
16
16
  # and `rerun` is what a shuffled run's rerun lines name.
17
- # : (String, Array[singleton(Step)], Array[Scenario], Hash[Symbol, untyped], ?environments: Array[Environment]?, ?left_out: Integer, ?out: untyped, ?world: String, ?dir: String?, ?base: Base?, ?env_flags: Array[String], ?repeat: Integer, ?concurrency: Integer, ?order: Hash[Symbol, untyped], ?records: IO?, ?rerun: untyped, ?walk: WalkFiles::Handle?, ?head: Hash[Symbol, untyped]?) -> void
18
- def initialize: (String, Array[singleton(Step)], Array[Scenario], Hash[Symbol, untyped], ?environments: Array[Environment]?, ?left_out: Integer, ?out: untyped, ?world: String, ?dir: String?, ?base: Base?, ?env_flags: Array[String], ?repeat: Integer, ?concurrency: Integer, ?order: Hash[Symbol, untyped], ?records: IO?, ?rerun: untyped, ?walk: WalkFiles::Handle?, ?head: Hash[Symbol, untyped]?) -> void
17
+ # : (String, Array[singleton(Step)], Array[Scenario], Hash[Symbol, untyped], ?environments: Array[Environment]?, ?left_out: Integer, ?out: untyped, ?system: String, ?dir: String?, ?base: Base?, ?env_flags: Array[String], ?repeat: Integer, ?concurrency: Integer, ?order: Hash[Symbol, untyped], ?records: IO?, ?rerun: untyped, ?walk: WalkFiles::Handle?, ?head: Hash[Symbol, untyped]?) -> void
18
+ def initialize: (String, Array[singleton(Step)], Array[Scenario], Hash[Symbol, untyped], ?environments: Array[Environment]?, ?left_out: Integer, ?out: untyped, ?system: String, ?dir: String?, ?base: Base?, ?env_flags: Array[String], ?repeat: Integer, ?concurrency: Integer, ?order: Hash[Symbol, untyped], ?records: IO?, ?rerun: untyped, ?walk: WalkFiles::Handle?, ?head: Hash[Symbol, untyped]?) -> void
19
19
 
20
20
  # : () -> Hash[Symbol, untyped]
21
21
  def call: () -> Hash[Symbol, untyped]
@@ -25,42 +25,149 @@ module Nukadoko
25
25
  # : () -> Array[Hash[Symbol, untyped]]
26
26
  def tree_pass: () -> Array[Hash[Symbol, untyped]]
27
27
 
28
- # Each world this run started, as run.json's worlds holds it.
29
- attr_reader world_entries: Array[Hash[Symbol, untyped]]
28
+ # Each system this run started, as run.json's systems holds it.
29
+ attr_reader system_entries: Array[Hash[Symbol, untyped]]
30
+
31
+ # The builds this run's program ran or was handed, for the next tree
32
+ # pass (Program#builds).
33
+ # : () -> Hash[String, [String, String?]]
34
+ def builds: () -> Hash[String, [ String, String? ]]
35
+
36
+ # The key of the URL each service of each of this pass's systems
37
+ # reached (Program.url_key), by environment and then by service: a
38
+ # base service of the tree whose url function answers with head's URL
39
+ # is unavailable (Program#start).
40
+ # : () -> Hash[String, Hash[String, String]]
41
+ def service_url_keys: () -> Hash[String, Hash[String, String]]
30
42
 
31
43
  # : (Scenario, Environment) -> String
32
44
  def role_of: (Scenario, Environment) -> String
33
45
 
34
46
  private
35
47
 
48
+ # The intent the change declares (docs/intent.md), read before any
49
+ # system starts, since a step's path counts a writer's own kinds by
50
+ # the fields it names, and the base's system and head's must count
51
+ # them alike.
52
+ # : () -> void
53
+ def read_intent: () -> void
54
+
55
+ # The key of the URL each service of head's system of `environment`
56
+ # reached, which head's run sent with this tree's plan, by service.
57
+ # Empty in head's own pass, which is what the keys are read from.
58
+ # : (Environment) -> Hash[String, String]
59
+ def head_url_keys: (Environment) -> Hash[String, String]
60
+
61
+ # The fields a path counts each writer's own kind by: the intent's,
62
+ # or, in a tree's pass, the ones head's run sent with it.
63
+ # : () -> Hash[String, Array[String]]
64
+ def own_fields: () -> Hash[String, Array[String]]
65
+
66
+ # run.json's `paths` and `intent`, and the findings an intent adds:
67
+ # each row judged against the base pairs of the paths.
68
+ # : (Array[Hash[Symbol, untyped]], Hash[Symbol, untyped], Array[Hash[Symbol, untyped]]) -> [Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]]]
69
+ def paths_and_intent: (Array[Hash[Symbol, untyped]], Hash[Symbol, untyped], Array[Hash[Symbol, untyped]]) -> [ Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]] ]
70
+
36
71
  # : () -> [Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]]]
37
72
  def pass: () -> [ Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]] ]
38
73
 
39
- # A stopped world as run.json names it. The lines of the program's log
40
- # that came after their step's record was read go beside that record,
41
- # and its run.json entry names them.
42
- # : (Environment, World, String, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]
43
- def world_entry: (Environment, World, String, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]
74
+ # Runs each BeforeAll or AfterAll hook once, with no World, as the
75
+ # run's own: a failure is a finding of the run, naming the
76
+ # environment, and stops the BeforeAll hooks after it. False when one
77
+ # failed.
78
+ # : (Symbol, Environment) -> bool
79
+ def run_hooks: (Symbol, Environment) -> bool
80
+
81
+ # A list a started system did not read, as a warning: head's routes and
82
+ # flags, and the tables list of a system of any tree. A system of more
83
+ # than one service names the service.
84
+ # : (Environment, System, String) -> void
85
+ def warn_lists_unread: (Environment, System, String) -> void
86
+
87
+ # Under `nuka do`, a tables list the system did not read leaves the
88
+ # step's counts unjudged, and the warning says why, as a run's does.
89
+ # : (System) -> void
90
+ def warn_do_lists_unread: (System) -> void
91
+
92
+ # A stopped system as run.json names it. The lines of each service's
93
+ # log that came after their step's record was read go beside that
94
+ # record, and its run.json entry names them by service: a request one
95
+ # service passed on to another carries the step's one trace.
96
+ # : (Environment, System, String, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]
97
+ def system_entry: (Environment, System, String, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]
98
+
99
+ # The reader of every service's events file of a system, or nil when
100
+ # no service of it writes one: a step's trace runs across the
101
+ # services, so one reader reads them all. A service with a URL whose
102
+ # events nukadoko does not read is named, so the steps that sent it a
103
+ # request say so (`service-unrecorded`).
104
+ # : (System) -> Events::Reader?
105
+ def events_reader: (System) -> Events::Reader?
106
+
107
+ # The browser of a system's pass: its pages resolve against the
108
+ # primary, and a page's request to any stamped service carries the
109
+ # step's traceparent.
110
+ # : (System) -> Browser
111
+ def browser_of: (System) -> Browser
112
+
113
+ # One service of a system as run.json names it, before its stop reads
114
+ # its log: a service at a URL has a log and events nukadoko does not
115
+ # read, so both are null.
116
+ # : (Service, String) -> Hash[Symbol, untyped]
117
+ def service_entry: (Service, String) -> Hash[Symbol, untyped]
118
+
119
+ # The stopped system's events as run.json names them, by service:
120
+ # each service's redacted copy beside its program.log, and each step's
121
+ # lines that came after its record beside that record, which each
122
+ # service's run.json entry names. Every service's file is read in one
123
+ # pass: a step's trace runs across them.
124
+ # : (System, String, Array[Hash[Symbol, untyped]]) -> Hash[String, Hash[Symbol, untyped]]
125
+ def system_events: (System, String, Array[Hash[Symbol, untyped]]) -> Hash[String, Hash[Symbol, untyped]]
126
+
127
+ # The claims of `executions` measured on a reading whose producer is
128
+ # a step of the same pass, each with the recount its system's stop
129
+ # makes. A reading of a finished record (`nuka do --use`) has its
130
+ # producer in another system, and a reading of nothing has none.
131
+ # : (Array[Hash[Symbol, untyped]]) -> [Array[[Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[Symbol, untyped]]], Array[Hash[Symbol, untyped]]]
132
+ def readings_to_recount: (Array[Hash[Symbol, untyped]]) -> [ Array[[ Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[Symbol, untyped] ]], Array[Hash[Symbol, untyped]] ]
133
+
134
+ # A claim on a count, judged again over every line of the producer's
135
+ # trace once its system stopped: `after_system_stop` on the claim when
136
+ # a line arrived after it was judged. A claim the whole count would
137
+ # have judged otherwise was judged on lines still on their way.
138
+ # : (Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void
139
+ def after_system_stop: (Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[Symbol, untyped]) -> void
140
+
141
+ # An execution with a claim the system's stop judged otherwise was
142
+ # judged on lines still on their way: its cell is broke, and a
143
+ # claim-judged-early finding names the first such claim.
144
+ # : (Hash[Symbol, untyped]) -> void
145
+ def judged_too_early: (Hash[Symbol, untyped]) -> void
44
146
 
45
147
  # Under --concurrency the files go to worker processes in the run's
46
148
  # order, round-robin, and each worker plays its own files --repeat
47
149
  # times. A file whose Feature line is @nukadoko:serial runs after
48
150
  # them, alone, and each round of proof runs is one worker of its own.
49
- # The parent keeps the world each worker reaches, and takes each
151
+ # The parent keeps the system each worker reaches, and takes each
50
152
  # execution as it arrives.
51
- # : (Environment, Hash[Scenario, String], World, ^() -> Array[Scenario], ^(Scenario, Hash[Symbol, untyped]) -> void, Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> void
52
- def play_in_workers: (Environment, Hash[Scenario, String], World, ^() -> Array[Scenario], ^(Scenario, Hash[Symbol, untyped]) -> void, Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> void
153
+ # : (Environment, Hash[Scenario, String], System, ^() -> Array[Scenario], ^(Scenario, Hash[Symbol, untyped]) -> void, Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> void
154
+ def play_in_workers: (Environment, Hash[Scenario, String], System, ^() -> Array[Scenario], ^(Scenario, Hash[Symbol, untyped]) -> void, Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> void
155
+
156
+ # A process fixture's teardown errors, from this process or a worker:
157
+ # printed as warnings, and kept for the envelope's findings.
158
+ # : (Array[{ fixture: String, message: String }]) -> void
159
+ def process_teardown_failed: (Array[{ fixture: String, message: String }]) -> void
53
160
 
54
161
  # Each list is one worker's scenarios in the order it plays them. A
55
162
  # worker sends each line it prints and each execution down a pipe of
56
163
  # its own, one Marshal frame at a time, so no line or record is ever
57
164
  # spliced from two workers. Returns the files a worker that failed
58
165
  # left without any execution.
59
- # : (Array[Array[Scenario]], Environment, Hash[Scenario, String], World, ^(Scenario, Hash[Symbol, untyped]) -> void, ^(Scenario) -> String) -> Array[String]
60
- def workers: (Array[Array[Scenario]], Environment, Hash[Scenario, String], World, ^(Scenario, Hash[Symbol, untyped]) -> void, ^(Scenario) -> String) -> Array[String]
166
+ # : (Array[Array[Scenario]], Environment, Hash[Scenario, String], System, ^(Scenario, Hash[Symbol, untyped]) -> void, ^(Scenario) -> String) -> Array[String]
167
+ def workers: (Array[Array[Scenario]], Environment, Hash[Scenario, String], System, ^(Scenario, Hash[Symbol, untyped]) -> void, ^(Scenario) -> String) -> Array[String]
61
168
 
62
- # : (Integer, Array[Scenario], Environment, Hash[Scenario, String], World, IO) -> Integer
63
- def play_as_worker: (Integer, Array[Scenario], Environment, Hash[Scenario, String], World, IO) -> Integer
169
+ # : (Integer, Array[Scenario], Environment, Hash[Scenario, String], System, IO) -> Integer
170
+ def play_as_worker: (Integer, Array[Scenario], Environment, Hash[Scenario, String], System, IO) -> Integer
64
171
 
65
172
  # A worker's progress: the line that a scenario starts goes to the
66
173
  # parent at once, and the scenario's other lines go with its
@@ -88,13 +195,40 @@ module Nukadoko
88
195
  # : (Array[Hash[Symbol, untyped]], Environment, String, Scenario) -> Hash[Symbol, untyped]
89
196
  def cell: (Array[Hash[Symbol, untyped]], Environment, String, Scenario) -> Hash[Symbol, untyped]
90
197
 
91
- # run.json is the --json envelope as a file: the commit and worlds the
198
+ # run.json is the --json envelope as a file: the commit and systems the
92
199
  # run judged, the counts, each execution, and the verdict table.
93
200
  # `tree_cells` holds each row's base and old cells, by its scenario,
94
201
  # under `--base`; each row is judged with what changed since the base.
95
202
  # : (Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]], ?Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> Hash[Symbol, untyped]
96
203
  def finish: (Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]], ?Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> Hash[Symbol, untyped]
97
204
 
205
+ # The cells a failure underneath made broke, and each tag that
206
+ # accepts a failure that no longer happens.
207
+ # : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
208
+ def underneath_findings: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
209
+
210
+ # A step that declares mutates: false and whose trace holds a write
211
+ # the program committed to a table that holds state: one note per
212
+ # step line of each scenario and environment, the first execution's
213
+ # writes named, since the runs of --repeat would say it again. Only
214
+ # head's executions: another tree's declarations are not the change.
215
+ # : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
216
+ def undeclared_writes: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
217
+
218
+ # A system that declares stepsReach: "url" refused a command: one
219
+ # finding per scenario and environment, naming every refused place of
220
+ # it, since a suite that reaches for the command line in several steps
221
+ # reads one line per scenario rather than one per call. It reads the
222
+ # step records, not the error a step raised, so a step that rescued
223
+ # the refusal and went on is reported too. Head's executions only: a
224
+ # row of another tree carries a finding of its own.
225
+ # : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
226
+ def refused_commands: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
227
+
228
+ # A scenario's name, and its environment in a run over several.
229
+ # : (String, String) -> String
230
+ def label: (String, String) -> String
231
+
98
232
  # What `--base` knows of one row: its change, whether it carries
99
233
  # @held, whether the mapping changed, whether its tags or its name or
100
234
  # file changed, and whether its passing executions judged no claim in
@@ -128,6 +262,13 @@ module Nukadoko
128
262
  # : (Environment) -> Hash[Symbol, untyped]
129
263
  def environment_entry: (Environment) -> Hash[Symbol, untyped]
130
264
 
265
+ # The environment's version function, under ten seconds: its answer
266
+ # goes into run.json and every record of the environment as
267
+ # target_version, and a probe that fails is a warning, never a reason
268
+ # the run fails.
269
+ # : (Environment) -> void
270
+ def probe_version: (Environment) -> void
271
+
131
272
  # The line before a scenario's execution, numbered across the run, in
132
273
  # the TypeScript engine's words so a log reads the same from either.
133
274
  # : (String, Integer, String, String) -> String
@@ -152,8 +293,29 @@ module Nukadoko
152
293
  # : (Scenario, Environment) -> String
153
294
  def again: (Scenario, Environment) -> String
154
295
 
155
- # : (Scenario, Environment, String, World) -> Hash[Symbol, untyped]
156
- def play: (Scenario, Environment, String, World) -> Hash[Symbol, untyped]
296
+ # : (Scenario, Environment, String, System) -> Hash[Symbol, untyped]
297
+ def play: (Scenario, Environment, String, System) -> Hash[Symbol, untyped]
298
+
299
+ # A system that declares stepsReach: "url" refused a command the
300
+ # execution tried to run. Whatever the execution came to, nothing it
301
+ # did reached the program the way the system says it must, and a step
302
+ # that rescued the refusal would otherwise pass, so its cell is broke.
303
+ # : (Hash[Symbol, untyped]) -> Array[untyped]?
304
+ def refused_command: (Hash[Symbol, untyped]) -> Array[untyped]?
305
+
306
+ # What a pass comes to once a failure underneath it that no tag of its
307
+ # scenario accepts is known: broke, at that failure's step. Claims
308
+ # that held over a program that failed underneath them prove nothing
309
+ # about the criterion.
310
+ # : (Array[untyped], Hash[Symbol, untyped]) -> Array[untyped]
311
+ def demoted: (Array[untyped], Hash[Symbol, untyped]) -> Array[untyped]
312
+
313
+ # Runs a compat hook kind on the scenario's World, each that its tags
314
+ # select, and adds an entry for each to `hooks`. Before stops at the
315
+ # first that fails, since nothing is left to prepare into; After runs
316
+ # in reverse order, as teardown unwinds setup. False when one failed.
317
+ # : (Symbol, Array[Hash[Symbol, untyped]], Array[untyped], ?step_index: Integer?) -> bool
318
+ def compat_hooks: (Symbol, Array[Hash[Symbol, untyped]], Array[untyped], ?step_index: Integer?) -> bool
157
319
 
158
320
  # The pause after the step that ran `number`th, under --step. Before
159
321
  # the walk waits, the open page's traffic moves to the pause's own
@@ -171,17 +333,56 @@ module Nukadoko
171
333
  # : (PickleStep) -> Hash[Symbol, untyped]
172
334
  def skipped: (PickleStep) -> Hash[Symbol, untyped]
173
335
 
174
- # : (PickleStep, Array[untyped], World) -> Hash[Symbol, untyped]
175
- def play_step: (PickleStep, Array[untyped], World) -> Hash[Symbol, untyped]
336
+ # : (PickleStep, Array[untyped], System) -> Hash[Symbol, untyped]
337
+ def play_step: (PickleStep, Array[untyped], System) -> Hash[Symbol, untyped]
338
+
339
+ # The step a files key reads the changed paths of: the one of its
340
+ # `of` steps that passed on an earlier line, as nuka check reports a
341
+ # line where none or two did (files-producer-missing,
342
+ # files-producer-ambiguous); under --no-check the claim is unjudged.
343
+ # : (Hash[untyped, Hash[Symbol, untyped]], String, Hash[untyped, untyped]) -> Hash[Symbol, untyped]
344
+ def scenario_files_source: (Hash[untyped, Hash[Symbol, untyped]], String, Hash[untyped, untyped]) -> Hash[Symbol, untyped]
345
+
346
+ # Each files key of a claim step: the list read from its producer's
347
+ # record, or why there is none.
348
+ # : (untyped) -> Hash[String, Hash[Symbol, untyped]]
349
+ def files_sides: (untyped) -> Hash[String, Hash[Symbol, untyped]]
350
+
351
+ # The step an events key counts the execution events of, chosen as a
352
+ # files key's producer is (events-producer-missing,
353
+ # events-producer-ambiguous); under --no-check the claim is unjudged.
354
+ # : (Hash[untyped, Hash[Symbol, untyped]], String, Hash[untyped, untyped]) -> Hash[Symbol, untyped]
355
+ def scenario_events_source: (Hash[untyped, Hash[Symbol, untyped]], String, Hash[untyped, untyped]) -> Hash[Symbol, untyped]
356
+
357
+ # One producer per trace, so the keys that read it share one reading.
358
+ # : (Hash[Symbol, untyped], String) -> Hash[Symbol, untyped]
359
+ def events_producer: (Hash[Symbol, untyped], String) -> Hash[Symbol, untyped]
360
+
361
+ # How long a claim step waits for the events it reads to be whole
362
+ # when it names no timeout.
363
+ EVENTS_WAIT_MS: ::Integer
364
+
365
+ # Each events key of a claim step: the reading of its producer's
366
+ # events, or why there is none. The step waits for the readings
367
+ # before it observes, so the steps between the producer and the
368
+ # claim run where they ran. `record[:events_read]` gets each reading.
369
+ # : (untyped, Hash[untyped, untyped], Hash[Symbol, untyped], String) -> Hash[String, Hash[Symbol, untyped]]
370
+ def events_sides: (untyped, Hash[untyped, untyped], Hash[Symbol, untyped], String) -> Hash[String, Hash[Symbol, untyped]]
371
+
372
+ # A step that declares it mutates does not run in a read-only
373
+ # environment: the declaration is trusted, not checked against what
374
+ # the step does.
375
+ # : (untyped) -> String?
376
+ def read_only_refusal: (untyped) -> String?
176
377
 
177
378
  public
178
379
 
179
380
  # One step alone, as `nuka do` runs it: its args given on the command
180
- # line or by earlier records (`origins` says which), in a world
381
+ # line or by earlier records (`origins` says which), in a system
181
382
  # started for this one execution, its evidence in this run's
182
383
  # directory, which is the record's own.
183
- # : (singleton(Step), Hash[String, untyped], Hash[String, String], Hash[String, String], Environment) -> Hash[Symbol, untyped]
184
- def do_step: (singleton(Step), Hash[String, untyped], Hash[String, String], Hash[String, String], Environment) -> Hash[Symbol, untyped]
384
+ # : (singleton(Step), Hash[String, untyped], Hash[String, String], Hash[String, String], Environment, ?(^(String, untyped) -> Hash[Symbol, untyped])?, ?(^(String, untyped) -> Hash[Symbol, untyped])?, ?Hash[String, Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]
385
+ def do_step: (singleton(Step), Hash[String, untyped], Hash[String, String], Hash[String, String], Environment, ?(^(String, untyped) -> Hash[Symbol, untyped])?, ?(^(String, untyped) -> Hash[Symbol, untyped])?, ?Hash[String, Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]
185
386
 
186
387
  # What `nuka do` writes its stdout and its record through.
187
388
  # : (untyped) -> untyped
@@ -195,10 +396,25 @@ module Nukadoko
195
396
  # : (untyped) -> untyped
196
397
  def stored: (untyped) -> untyped
197
398
 
399
+ # stepTimeout's default: long enough for any step that is working, short
400
+ # enough that one that never returns does not hold the run all day.
401
+ DEFAULT_STEP_TIMEOUT_MS: ::Integer
402
+
403
+ # A step past its deadline fails as timed out, naming the knob that set it.
404
+ class StepTimeout < StandardError
405
+ end
406
+
407
+ # Runs the step's body under its own timeout, or the config's
408
+ # stepTimeout. Ruby's Timeout stops the body where it is, which the
409
+ # TypeScript engine cannot do; either way the step is failed and the
410
+ # scenario moves on.
411
+ # : (singleton(Step), Hash[Symbol, untyped]) { (Numeric) -> untyped } -> untyped
412
+ def within_deadline: (singleton(Step), Hash[Symbol, untyped]) { (Numeric) -> untyped } -> untyped
413
+
198
414
  # Runs one step whose args the block binds, and writes its record and
199
415
  # HTTP log into `dir`.
200
- # : (singleton(Step), Hash[Symbol, untyped], String, World, then_line: bool, at_line: Integer?, results: Array[untyped], origins: Hash[String, String]) { () -> [Hash[String, untyped], Hash[String, String]] } -> Hash[Symbol, untyped]
201
- def execute: (singleton(Step), Hash[Symbol, untyped], String, World, then_line: bool, at_line: Integer?, results: Array[untyped], origins: Hash[String, String]) { () -> [ Hash[String, untyped], Hash[String, String] ] } -> Hash[Symbol, untyped]
416
+ # : (singleton(Step), Hash[Symbol, untyped], String, System, then_line: bool, at_line: Integer?, results: Array[untyped], origins: Hash[String, String], ?drops: Hash[String, Hash[Symbol, untyped]]) { () -> [Hash[String, untyped], Hash[String, String]] } -> Hash[Symbol, untyped]
417
+ def execute: (singleton(Step), Hash[Symbol, untyped], String, System, then_line: bool, at_line: Integer?, results: Array[untyped], origins: Hash[String, String], ?drops: Hash[String, Hash[Symbol, untyped]]) { () -> [ Hash[String, untyped], Hash[String, String] ] } -> Hash[Symbol, untyped]
202
418
 
203
419
  # The args keys the line fills through a parameter type with a
204
420
  # transformer, each with why a claim does not compare with it: code
@@ -210,8 +426,8 @@ module Nukadoko
210
426
  # A Then step's claims are judged on what it observed, or on its args
211
427
  # when it reads nothing itself; any other step runs and returns.
212
428
  # `step` is a step class whose observe or run its own file defines.
213
- # : (untyped, Hash[Symbol, untyped], untyped, [bool, Integer?], Hash[Symbol, untyped], Array[untyped], Hash[String, String], Hash[String, String?]) -> void
214
- def body: (untyped, Hash[Symbol, untyped], untyped, [ bool, Integer? ], Hash[Symbol, untyped], Array[untyped], Hash[String, String], Hash[String, String?]) -> void
429
+ # : (untyped, Hash[Symbol, untyped], untyped, [bool, Integer?], Hash[Symbol, untyped], Array[untyped], Hash[String, String], Hash[String, Hash[Symbol, untyped]], Hash[String, String?], String) -> void
430
+ def body: (untyped, Hash[Symbol, untyped], untyped, [ bool, Integer? ], Hash[Symbol, untyped], Array[untyped], Hash[String, String], Hash[String, Hash[Symbol, untyped]], Hash[String, String?], String) -> void
215
431
 
216
432
  # Captures first, then each `from` key from the nearest earlier step that
217
433
  # gave it, then a table or docstring for the one required key still open.
@@ -223,8 +439,8 @@ module Nukadoko
223
439
  # : (singleton(Step), Hash[Symbol, untyped], String) -> void
224
440
  def measure: (singleton(Step), Hash[Symbol, untyped], String) -> void
225
441
 
226
- # : (singleton(Step), Hash[String, untyped], PickleStep, Array[untyped], Hash[String, String], Hash[Symbol, untyped]) -> Hash[String, untyped]
227
- def bind_args: (singleton(Step), Hash[String, untyped], PickleStep, Array[untyped], Hash[String, String], Hash[Symbol, untyped]) -> Hash[String, untyped]
442
+ # : (singleton(Step), Hash[String, untyped], PickleStep, Array[untyped], Hash[String, String], Hash[Symbol, untyped], Hash[String, Hash[Symbol, untyped]]) -> Hash[String, untyped]
443
+ def bind_args: (singleton(Step), Hash[String, untyped], PickleStep, Array[untyped], Hash[String, String], Hash[Symbol, untyped], Hash[String, Hash[Symbol, untyped]]) -> Hash[String, untyped]
228
444
 
229
445
  # The docstring or table a line attaches is the sentence's own text
230
446
  # for the one key it fills.
@@ -236,8 +452,8 @@ module Nukadoko
236
452
 
237
453
  # A project fixture is built the first time a step of its scope names
238
454
  # it, directly or through another fixture, and kept until the scope ends.
239
- # : (Symbol, World, Array[Symbol], ?(^(Symbol) -> untyped)?) -> untyped
240
- def project_fixture: (Symbol, World, Array[Symbol], ?(^(Symbol) -> untyped)?) -> untyped
455
+ # : (Symbol, System, Array[Symbol], ?(^(Symbol) -> untyped)?) -> untyped
456
+ def project_fixture: (Symbol, System, Array[Symbol], ?(^(Symbol) -> untyped)?) -> untyped
241
457
 
242
458
  # Each project fixture a step's bag touched, once, as the step record
243
459
  # lists it: built here with its setup time, or reused from its scope.
@@ -249,9 +465,38 @@ module Nukadoko
249
465
  # : () -> Secrets
250
466
  def secrets: () -> Secrets
251
467
 
252
- # What the env fixture holds: the env files, then the world's own env.
253
- # : (World) -> Hash[String, String]
254
- def step_env: (World) -> Hash[String, String]
468
+ # What the env fixture holds: the env files, then the system's own env,
469
+ # minus a variable that names the events file, which only the program
470
+ # may write. The system's `setup` reads the same thing.
471
+ # : (System) -> Hash[String, String]
472
+ def step_env: (System) -> Hash[String, String]
473
+
474
+ # The `setup_result` fixture of `system`: what the system's setup gave
475
+ # back, read from the system the pass was handed, so a worker reads the
476
+ # same value the parent made. Its keys are strings, as every value the
477
+ # project hands the engine is, because the value crosses to a worker
478
+ # as JSON. Nothing made a value for it is a mistake in the step or the
479
+ # program, not an empty value: a step that reads it needs a tenant.
480
+ # : (System) -> untyped
481
+ def setup_result_of: (System) -> untyped
482
+
483
+ # Names which of the two mistakes it is: a run with no program at all
484
+ # cannot have a setup, and one with a program may have no setup or a
485
+ # setup that returned nothing.
486
+ # : () -> String
487
+ def setup_result_missing_message: () -> String
488
+
489
+ # The `services` fixture of `system`: none without a program file, as
490
+ # in the TypeScript engine, and each service's env leaves out a
491
+ # variable that names its events file, which only the program may
492
+ # write.
493
+ # : (System) -> Services
494
+ def services_of: (System) -> Services
495
+
496
+ # Head's project root: a tree's pass reads a service's root and names
497
+ # a checkout from there, as head's pass does.
498
+ # : () -> String
499
+ def head_root: () -> String
255
500
 
256
501
  # Reads an environment's env files into the env fixture and the secret
257
502
  # set, from the same read, so the two agree on what was loaded.
@@ -264,15 +509,15 @@ module Nukadoko
264
509
  # so a body passes RuboCop's naming cops. Both reach the same fixture.
265
510
  ALIASES: untyped
266
511
 
267
- # : (singleton(Step), String, Array[Hash[Symbol, untyped]], World, Hash[Symbol, untyped], Array[untyped]) -> [Hash[Symbol, untyped], (^() -> void)?]
268
- def build_fixtures: (singleton(Step), String, Array[Hash[Symbol, untyped]], World, Hash[Symbol, untyped], Array[untyped]) -> [ Hash[Symbol, untyped], (^() -> void)? ]
512
+ # : (singleton(Step), String, Array[Hash[Symbol, untyped]], System, Hash[Symbol, untyped], Array[untyped]) -> [Hash[Symbol, untyped], (^() -> void)?]
513
+ def build_fixtures: (singleton(Step), String, Array[Hash[Symbol, untyped]], System, Hash[Symbol, untyped], Array[untyped]) -> [ Hash[Symbol, untyped], (^() -> void)? ]
269
514
 
270
515
  # requireEnv: the env fixture's value for a key, or a raise that names
271
516
  # only the key. An empty value counts as missing, since a step that
272
517
  # requires it is broken either way. Every name asked for is kept, in
273
518
  # the order asked, whether the read found a value or not.
274
- # : (World, Hash[Symbol, untyped]) -> ^(String | Symbol) -> String
275
- def require_env: (World, Hash[Symbol, untyped]) -> ^(String | Symbol) -> String
519
+ # : (System, Hash[Symbol, untyped]) -> ^(String | Symbol) -> String
520
+ def require_env: (System, Hash[Symbol, untyped]) -> ^(String | Symbol) -> String
276
521
 
277
522
  # resultOf: the result an earlier step of the scenario last gave when
278
523
  # it passed, or nil when it has not. A claim step takes an earlier
@@ -12,11 +12,11 @@ module Nukadoko
12
12
 
13
13
  # A step's record.json as `nuka run` writes it, in the TypeScript engine's
14
14
  # shape, from what the run kept of the step. The keywords name where it ran:
15
- # the environment, the world, the run, the scenario, and the step's own
15
+ # the environment, the system, the run, the scenario, and the step's own
16
16
  # directory. A record that passed names each step it used; a failed one
17
17
  # names what each gave too, since that is what it failed on.
18
- # : (Hash[Symbol, untyped], environment: String, world_name: String?, run_id: String?, scenario_record_id: String?, evidence_dir: String) -> Hash[Symbol, untyped]
19
- def self?.step_file: (Hash[Symbol, untyped], environment: String, world_name: String?, run_id: String?, scenario_record_id: String?, evidence_dir: String) -> Hash[Symbol, untyped]
18
+ # : (Hash[Symbol, untyped], environment: String, system_name: String?, run_id: String?, scenario_record_id: String?, evidence_dir: String, ?target_version: String?) -> Hash[Symbol, untyped]
19
+ def self?.step_file: (Hash[Symbol, untyped], environment: String, system_name: String?, run_id: String?, scenario_record_id: String?, evidence_dir: String, ?target_version: String?) -> Hash[Symbol, untyped]
20
20
 
21
21
  # One comparison, as run.json's steps[].claims[] holds it. `origins`
22
22
  # maps an args key to the label of where its value came from, and
@@ -26,6 +26,11 @@ module Nukadoko
26
26
 
27
27
  READING_MAX_BYTES: ::Integer
28
28
 
29
+ # What the page received and showed, with each events key's reading
30
+ # before the judged view, in the TypeScript engine's order.
31
+ # : (Hash[Symbol, untyped], ?String?) -> Hash[Symbol, untyped]
32
+ def self?.read_fields: (Hash[Symbol, untyped], ?String?) -> Hash[Symbol, untyped]
33
+
29
34
  # What a claim step's page had received by its judged reading, and
30
35
  # what the page showed right after it. A file is named from the step
31
36
  # record's directory, or from the run's when `under` names the step's.
@@ -66,8 +71,8 @@ module Nukadoko
66
71
  def self?.item_declaration: (Hash[Symbol, untyped], untyped, Hash[String, String], Hash[String, String?], Array[String], untyped) -> Hash[Symbol, untyped]
67
72
 
68
73
  # One where or item claim on one item, judged on the side the item gives.
69
- # : (Hash[Symbol, untyped], Engine::ClaimSides::Side, Engine::ClaimSides::Inputs, Hash[String, String], Hash[String, String?], Array[String]) -> Hash[Symbol, untyped]
70
- def self?.item_comparison: (Hash[Symbol, untyped], Engine::ClaimSides::Side, Engine::ClaimSides::Inputs, Hash[String, String], Hash[String, String?], Array[String]) -> Hash[Symbol, untyped]
74
+ # : (Hash[Symbol, untyped], Engine::ClaimSides::Side, Engine::ClaimSides::Inputs, Hash[String, String], Hash[String, String?], Array[String], ?value_path: Array[String]?, ?where: bool) -> Hash[Symbol, untyped]
75
+ def self?.item_comparison: (Hash[Symbol, untyped], Engine::ClaimSides::Side, Engine::ClaimSides::Inputs, Hash[String, String], Hash[String, String?], Array[String], ?value_path: Array[String]?, ?where: bool) -> Hash[Symbol, untyped]
71
76
 
72
77
  # The claims of a scenario's step records, counted by outcome, in the
73
78
  # fields run.json gives them.
@@ -132,17 +137,17 @@ module Nukadoko
132
137
 
133
138
  # The environments a row needs a base cell and an old cell in, from its
134
139
  # head cells: none unless every required head cell passed; an
135
- # unchanged row runs in the old world when something under it
140
+ # unchanged row runs in the old system when something under it
136
141
  # changed; a new or changed row runs at the base unless a head
137
142
  # control already proves it, or it carries @held.
138
143
  # : (Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Array[String]]
139
- def self?.planned_world_cells: (Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Array[String]]
144
+ def self?.planned_system_cells: (Array[Hash[Symbol, untyped]], Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Array[String]]
140
145
 
141
146
  # : (Hash[Symbol, untyped]) -> String
142
- def self?.world_cell_clause: (Hash[Symbol, untyped]) -> String
147
+ def self?.system_cell_clause: (Hash[Symbol, untyped]) -> String
143
148
 
144
149
  # : (Array[Hash[Symbol, untyped]]) -> String
145
- def self?.world_cells_clause: (Array[Hash[Symbol, untyped]]) -> String
150
+ def self?.system_cells_clause: (Array[Hash[Symbol, untyped]]) -> String
146
151
 
147
152
  # : (String, Hash[Symbol, untyped]) -> String
148
153
  def self?.control_proof_reason: (String, Hash[Symbol, untyped]) -> String
@@ -151,12 +156,15 @@ module Nukadoko
151
156
  # did not pass, or for a row with no required cell; proven when a
152
157
  # control fails at a Then the same way in each proof run. Under
153
158
  # `--base` (`context`), red too for a new or changed row nothing proves
154
- # (unproven) and an unchanged row the old world does not pass (moved).
159
+ # (unproven) and an unchanged row the old system does not pass (moved).
155
160
  # : (Array[Hash[Symbol, untyped]], ?Hash[Symbol, untyped]?) -> [String, String]
156
161
  def self?.judge_row: (Array[Hash[Symbol, untyped]], ?Hash[Symbol, untyped]?) -> [ String, String ]
157
162
 
158
- # : (Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
159
- def self?.counts: (Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
163
+ # The head scenarios by status, and the head cells of the table that
164
+ # did not run, a required one and a control apart: a system whose
165
+ # program did not start runs none of its cells.
166
+ # : (Array[Hash[Symbol, untyped]], ?Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
167
+ def self?.counts: (Array[Hash[Symbol, untyped]], ?Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
160
168
 
161
169
  # The commit HEAD named when the run started, whether the tree had an
162
170
  # uncommitted change, and the working tree as one git tree id, written
@@ -313,6 +313,9 @@ module Nukadoko
313
313
  # : (PickleStep) -> String?
314
314
  def attachment_of: (PickleStep) -> String?
315
315
 
316
+ # : (PickleStep) -> bool
317
+ def outcome?: (PickleStep) -> bool
318
+
316
319
  # What every feature line the pattern matches carries, or nil when no
317
320
  # line matches or the lines disagree.
318
321
  # : (String) -> String?
@@ -189,6 +189,11 @@ module Nukadoko
189
189
  # : (untyped, ?bool, ?Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
190
190
  def self.json_type: (untyped, ?bool, ?Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
191
191
 
192
+ # zod 4.6 folds a nullable whose inner schema is one bare type into a
193
+ # type list, and keeps anyOf when the inner schema says more than its type.
194
+ # : (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
195
+ def self.nullable_json_type: (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
196
+
192
197
  # : (Hash[Symbol, untyped], Integer?, Integer?) -> Hash[Symbol, untyped]
193
198
  def self.number_bounds: (Hash[Symbol, untyped], Integer?, Integer?) -> Hash[Symbol, untyped]
194
199
 
@@ -87,8 +87,24 @@ module Nukadoko
87
87
  # : Array[[String, String]]
88
88
  attr_reader pairs: untyped
89
89
 
90
- # : (?Hash[String, String] | Array[[String, String]]) -> void
91
- def initialize: (?Hash[String, String] | Array[[ String, String ]]) -> void
90
+ # The trace id prefixes of the systems whose ids redaction leaves as
91
+ # they are. nukadoko made those ids at random, so they hold no secret,
92
+ # and a short secret that happens to occur in one would otherwise
93
+ # change the id a line of program.log carries, and the step it
94
+ # belongs to.
95
+ # : Array[String]
96
+ attr_reader keep: untyped
97
+
98
+ # `keep` is positional, so a Hash written without braces is still
99
+ # the values.
100
+ # : (?Hash[String, String] | Array[[String, String]], ?Array[String]) -> void
101
+ def initialize: (?Hash[String, String] | Array[[ String, String ]], ?Array[String]) -> void
102
+
103
+ # A system's trace ids, a prefix and then hexadecimal characters to 32
104
+ # in all, and the traceparent values that hold them, in either case,
105
+ # as a line's trace id is read.
106
+ # : (Array[String]) -> Regexp?
107
+ def self.trace_ids: (Array[String]) -> Regexp?
92
108
 
93
109
  # : () -> bool
94
110
  def empty?: () -> bool
@@ -111,12 +127,19 @@ module Nukadoko
111
127
 
112
128
  # One pass over every spelling and every token, longest first, so a
113
129
  # token already in the text matches as itself and a second redaction
114
- # changes nothing.
130
+ # changes nothing. A spelling that overlaps a kept trace id is still
131
+ # written as its token outside the id.
115
132
  # : (String) -> String
116
133
  def redact_string: (String) -> String
117
134
 
118
135
  private
119
136
 
137
+ # `found`, at `offset` in its text, with each run of its characters
138
+ # outside every kept span written as `token`, and each character
139
+ # inside one left as it is.
140
+ # : (String, Integer, Array[[Integer, Integer]], String) -> String
141
+ def keeping: (String, Integer, Array[[ Integer, Integer ]], String) -> String
142
+
120
143
  # Each spelling a record can hold a value in: the value, its
121
144
  # percent-encoded forms (as encodeURIComponent writes it, and with `'`
122
145
  # as `%27`, as a URL's href does), its form-urlencoded form, and the