nukadoko 0.1.0 → 0.3.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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +417 -0
  3. data/README.ja.md +62 -7
  4. data/README.md +19 -5
  5. data/exe/nuka +8 -0
  6. data/lib/nukadoko/aria_snapshot.rb +1008 -0
  7. data/lib/nukadoko/aria_tree.rb +150 -0
  8. data/lib/nukadoko/base.rb +294 -0
  9. data/lib/nukadoko/check.rb +669 -22
  10. data/lib/nukadoko/claim_check.rb +177 -0
  11. data/lib/nukadoko/claim_check_run.rb +293 -0
  12. data/lib/nukadoko/claim_line.rb +381 -0
  13. data/lib/nukadoko/claim_rules.rb +519 -0
  14. data/lib/nukadoko/claim_sides.rb +469 -0
  15. data/lib/nukadoko/claims.rb +576 -37
  16. data/lib/nukadoko/cli.rb +814 -22
  17. data/lib/nukadoko/codes.json +947 -0
  18. data/lib/nukadoko/codes.rb +19 -0
  19. data/lib/nukadoko/command.rb +214 -12
  20. data/lib/nukadoko/criteria.rb +172 -0
  21. data/lib/nukadoko/definition.rb +33 -41
  22. data/lib/nukadoko/env_check.rb +88 -0
  23. data/lib/nukadoko/features.rb +80 -10
  24. data/lib/nukadoko/fixtures.rb +329 -11
  25. data/lib/nukadoko/http_recording.rb +68 -0
  26. data/lib/nukadoko/init.rb +129 -0
  27. data/lib/nukadoko/js_json.rb +274 -0
  28. data/lib/nukadoko/js_pattern.rb +531 -0
  29. data/lib/nukadoko/judge.rb +221 -0
  30. data/lib/nukadoko/judgment_file.rb +78 -0
  31. data/lib/nukadoko/judgments.rb +256 -0
  32. data/lib/nukadoko/literal.rb +129 -0
  33. data/lib/nukadoko/measured.rb +105 -0
  34. data/lib/nukadoko/order.rb +84 -0
  35. data/lib/nukadoko/parts.rb +43 -22
  36. data/lib/nukadoko/pattern.rb +73 -3
  37. data/lib/nukadoko/poll.rb +21 -8
  38. data/lib/nukadoko/program.rb +105 -17
  39. data/lib/nukadoko/project_files.rb +17 -0
  40. data/lib/nukadoko/project_fixtures.rb +17 -2
  41. data/lib/nukadoko/project_program.rb +119 -0
  42. data/lib/nukadoko/report_allure.rb +751 -0
  43. data/lib/nukadoko/report_messages.rb +167 -0
  44. data/lib/nukadoko/report_run.rb +169 -0
  45. data/lib/nukadoko/run.rb +898 -91
  46. data/lib/nukadoko/run_record.rb +535 -0
  47. data/lib/nukadoko/scaffold.rb +1015 -0
  48. data/lib/nukadoko/schema.rb +120 -21
  49. data/lib/nukadoko/secrets.rb +375 -0
  50. data/lib/nukadoko/selection.rb +163 -0
  51. data/lib/nukadoko/signature.rb +4 -1
  52. data/lib/nukadoko/skill.rb +36 -0
  53. data/lib/nukadoko/spaces.rb +28 -0
  54. data/lib/nukadoko/step.rb +68 -21
  55. data/lib/nukadoko/summary.rb +662 -0
  56. data/lib/nukadoko/table.rb +34 -2
  57. data/lib/nukadoko/text_fit.rb +179 -0
  58. data/lib/nukadoko/trace.rb +244 -0
  59. data/lib/nukadoko/trace_actions.rb +116 -0
  60. data/lib/nukadoko/tree_passes.rb +122 -0
  61. data/lib/nukadoko/verdict.rb +128 -0
  62. data/lib/nukadoko/version.rb +2 -1
  63. data/lib/nukadoko/vocabulary.rb +6 -0
  64. data/lib/nukadoko/walk.rb +305 -0
  65. data/lib/nukadoko/walk_files.rb +473 -0
  66. data/lib/nukadoko/walk_step.rb +149 -0
  67. data/lib/nukadoko.rb +60 -2
  68. data/llms.txt +297 -0
  69. data/sig/generated/nukadoko/aria_snapshot.rbs +331 -0
  70. data/sig/generated/nukadoko/aria_tree.rbs +142 -0
  71. data/sig/generated/nukadoko/base.rbs +142 -0
  72. data/sig/generated/nukadoko/check.rbs +255 -0
  73. data/sig/generated/nukadoko/claim_check.rbs +118 -0
  74. data/sig/generated/nukadoko/claim_check_run.rbs +88 -0
  75. data/sig/generated/nukadoko/claim_line.rbs +158 -0
  76. data/sig/generated/nukadoko/claim_rules.rbs +172 -0
  77. data/sig/generated/nukadoko/claim_sides.rbs +207 -0
  78. data/sig/generated/nukadoko/claims.rbs +208 -0
  79. data/sig/generated/nukadoko/cli.rbs +182 -0
  80. data/sig/generated/nukadoko/codes.rbs +16 -0
  81. data/sig/generated/nukadoko/command.rbs +109 -0
  82. data/sig/generated/nukadoko/criteria.rbs +83 -0
  83. data/sig/generated/nukadoko/definition.rbs +30 -0
  84. data/sig/generated/nukadoko/env_check.rbs +34 -0
  85. data/sig/generated/nukadoko/features.rbs +101 -0
  86. data/sig/generated/nukadoko/fixtures.rbs +175 -0
  87. data/sig/generated/nukadoko/http_recording.rbs +29 -0
  88. data/sig/generated/nukadoko/init.rbs +64 -0
  89. data/sig/generated/nukadoko/js_json.rbs +109 -0
  90. data/sig/generated/nukadoko/js_pattern.rbs +194 -0
  91. data/sig/generated/nukadoko/judge.rbs +64 -0
  92. data/sig/generated/nukadoko/judgment_file.rbs +39 -0
  93. data/sig/generated/nukadoko/judgments.rbs +120 -0
  94. data/sig/generated/nukadoko/literal.rbs +71 -0
  95. data/sig/generated/nukadoko/measured.rbs +42 -0
  96. data/sig/generated/nukadoko/order.rbs +54 -0
  97. data/sig/generated/nukadoko/parts.rbs +35 -0
  98. data/sig/generated/nukadoko/pattern.rbs +62 -0
  99. data/sig/generated/nukadoko/poll.rbs +41 -0
  100. data/sig/generated/nukadoko/program.rbs +101 -0
  101. data/sig/generated/nukadoko/project_files.rbs +19 -0
  102. data/sig/generated/nukadoko/project_fixtures.rbs +57 -0
  103. data/sig/generated/nukadoko/project_program.rbs +55 -0
  104. data/sig/generated/nukadoko/report_allure.rbs +268 -0
  105. data/sig/generated/nukadoko/report_messages.rbs +68 -0
  106. data/sig/generated/nukadoko/report_run.rbs +102 -0
  107. data/sig/generated/nukadoko/run.rbs +264 -0
  108. data/sig/generated/nukadoko/run_record.rbs +175 -0
  109. data/sig/generated/nukadoko/scaffold.rbs +328 -0
  110. data/sig/generated/nukadoko/schema.rbs +155 -0
  111. data/sig/generated/nukadoko/secrets.rbs +172 -0
  112. data/sig/generated/nukadoko/selection.rbs +73 -0
  113. data/sig/generated/nukadoko/signature.rbs +17 -0
  114. data/sig/generated/nukadoko/skill.rbs +20 -0
  115. data/sig/generated/nukadoko/spaces.rbs +31 -0
  116. data/sig/generated/nukadoko/step.rbs +115 -0
  117. data/sig/generated/nukadoko/summary.rbs +204 -0
  118. data/sig/generated/nukadoko/table.rbs +43 -0
  119. data/sig/generated/nukadoko/text_fit.rbs +70 -0
  120. data/sig/generated/nukadoko/trace.rbs +127 -0
  121. data/sig/generated/nukadoko/trace_actions.rbs +40 -0
  122. data/sig/generated/nukadoko/tree_passes.rbs +48 -0
  123. data/sig/generated/nukadoko/verdict.rbs +56 -0
  124. data/sig/generated/nukadoko/version.rbs +5 -0
  125. data/sig/generated/nukadoko/vocabulary.rbs +25 -0
  126. data/sig/generated/nukadoko/walk.rbs +139 -0
  127. data/sig/generated/nukadoko/walk_files.rbs +189 -0
  128. data/sig/generated/nukadoko/walk_step.rbs +50 -0
  129. data/sig/generated/nukadoko.rbs +26 -0
  130. data/sig/nukadoko.rbs +5 -48
  131. data/skills/nukadoko/SKILL.md +120 -0
  132. data/skills/nukadoko/references/checking-steps.md +200 -0
  133. data/skills/nukadoko/references/diagnosing.md +200 -0
  134. data/skills/nukadoko/references/done.md +99 -0
  135. data/skills/nukadoko/references/evidence.md +124 -0
  136. data/skills/nukadoko/references/examples/cli.md +230 -0
  137. data/skills/nukadoko/references/examples/http-api.md +342 -0
  138. data/skills/nukadoko/references/examples/workflow.md +173 -0
  139. data/skills/nukadoko/references/exploring.md +184 -0
  140. data/skills/nukadoko/references/fixtures.md +198 -0
  141. data/skills/nukadoko/references/from-prose.md +51 -0
  142. data/skills/nukadoko/references/judgments.md +95 -0
  143. data/skills/nukadoko/references/maintenance.md +97 -0
  144. data/skills/nukadoko/references/merge-risk.md +74 -0
  145. data/skills/nukadoko/references/parts.md +152 -0
  146. data/skills/nukadoko/references/perturbed-worlds.md +109 -0
  147. data/skills/nukadoko/references/program.md +200 -0
  148. data/skills/nukadoko/references/reviewing.md +200 -0
  149. data/skills/nukadoko/references/running.md +200 -0
  150. data/skills/nukadoko/references/scenario-rules.md +188 -0
  151. data/skills/nukadoko/references/states.md +66 -0
  152. data/skills/nukadoko/references/step-files.md +200 -0
  153. data/skills/nukadoko/references/verdicts.md +200 -0
  154. data/skills/nukadoko/references/writing-steps.md +200 -0
  155. data/skills/nukadoko/references/writing-the-feature.md +165 -0
  156. data/skills/nukadoko/scripts/claude-code-verdict-hook.mjs +99 -0
  157. data/skills/nukadoko/scripts/merge-risk.jq +56 -0
  158. data/skills/nukadoko-verification/SKILL.md +263 -0
  159. metadata +133 -1
@@ -0,0 +1,264 @@
1
+ # Generated from lib/nukadoko/run.rb with RBS::Inline
2
+
3
+ # One run: for each environment, start its world, play every scenario's steps
4
+ # in order, and write a record per step. A scenario stops at its first step
5
+ # that does not pass and skips the rest. A control that fails at a Then runs
6
+ # again for proof. The table and the summary come last.
7
+ module Nukadoko
8
+ module Engine
9
+ class Run
10
+ # `world` is head for a run, or base or old for a tree's pass, which
11
+ # writes into the head run's directory `dir`, and reads its env files
12
+ # from `head`'s root, with head's secrets as well as its own. `base` is the
13
+ # comparison a `--base` run judges its rows by. `scenarios` are in the
14
+ # run's order, which every round of every pass keeps; `records`, when
15
+ # given, gets each scenario's run.json entry as one line as it ends,
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
19
+
20
+ # : () -> Hash[Symbol, untyped]
21
+ def call: () -> Hash[Symbol, untyped]
22
+
23
+ # One pass of a tree: each scenario in the one environment, as base or
24
+ # old, its executions and its cell.
25
+ # : () -> Array[Hash[Symbol, untyped]]
26
+ def tree_pass: () -> Array[Hash[Symbol, untyped]]
27
+
28
+ # Each world this run started, as run.json's worlds holds it.
29
+ attr_reader world_entries: Array[Hash[Symbol, untyped]]
30
+
31
+ # : (Scenario, Environment) -> String
32
+ def role_of: (Scenario, Environment) -> String
33
+
34
+ private
35
+
36
+ # : () -> [Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]]]
37
+ def pass: () -> [ Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]] ]
38
+
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]
44
+
45
+ # Under --concurrency the files go to worker processes in the run's
46
+ # order, round-robin, and each worker plays its own files --repeat
47
+ # times. A file whose Feature line is @nukadoko:serial runs after
48
+ # 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
50
+ # 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
53
+
54
+ # Each list is one worker's scenarios in the order it plays them. A
55
+ # worker sends each line it prints and each execution down a pipe of
56
+ # its own, one Marshal frame at a time, so no line or record is ever
57
+ # spliced from two workers. Returns the files a worker that failed
58
+ # 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]
61
+
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
64
+
65
+ # A worker's progress: the line that a scenario starts goes to the
66
+ # parent at once, and the scenario's other lines go with its
67
+ # execution, so one scenario's lines are never split by another's.
68
+ class WorkerOut
69
+ # : (IO) -> void
70
+ def initialize: (IO) -> void
71
+
72
+ # : (?untyped) -> void
73
+ def puts: (?untyped) -> void
74
+
75
+ # : () -> Array[String]
76
+ def take: () -> Array[String]
77
+ end
78
+
79
+ # A head control and a base cell stand where the behaviour is absent,
80
+ # so a Then failing there the same way in each proof run is proof.
81
+ # : (String, Array[Hash[Symbol, untyped]]) -> bool
82
+ def proving?: (String, Array[Hash[Symbol, untyped]]) -> bool
83
+
84
+ # A cell is what one scenario's executions in one environment came to;
85
+ # a cell whose first execution broke a claim names it and what it read.
86
+ # Its conditions are the ones the row's tags name, as the environment
87
+ # gives them.
88
+ # : (Array[Hash[Symbol, untyped]], Environment, String, Scenario) -> Hash[Symbol, untyped]
89
+ def cell: (Array[Hash[Symbol, untyped]], Environment, String, Scenario) -> Hash[Symbol, untyped]
90
+
91
+ # run.json is the --json envelope as a file: the commit and worlds the
92
+ # run judged, the counts, each execution, and the verdict table.
93
+ # `tree_cells` holds each row's base and old cells, by its scenario,
94
+ # under `--base`; each row is judged with what changed since the base.
95
+ # : (Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]], ?Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> Hash[Symbol, untyped]
96
+ def finish: (Array[Hash[Symbol, untyped]], Hash[Scenario, Array[Hash[Symbol, untyped]]], ?Hash[Scenario, Array[Hash[Symbol, untyped]]]) -> Hash[Symbol, untyped]
97
+
98
+ # What `--base` knows of one row: its change, whether it carries
99
+ # @held, whether the mapping changed, whether its tags or its name or
100
+ # file changed, and whether its passing executions judged no claim in
101
+ # Then position.
102
+ # : (Scenario, Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]?
103
+ def context_of: (Scenario, Hash[Symbol, untyped]?, Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]?
104
+
105
+ # sources.json: the feature text this run parsed its scenarios from,
106
+ # so `nuka report` renders the scenarios as they ran, long after the
107
+ # files moved on. The project name rides along: it is part of an
108
+ # Allure result's full name, and a copied run directory has no
109
+ # package.json beside it.
110
+ # : () -> void
111
+ def write_sources: () -> void
112
+
113
+ # Why head's passing required executions of a row judged no claim in
114
+ # Then position, from the first that says: `nothing`, or `judgment`
115
+ # when its only claims there are judged-as claims.
116
+ # : (Scenario, Array[Hash[Symbol, untyped]]) -> untyped
117
+ def self.then_judged_by: (Scenario, Array[Hash[Symbol, untyped]]) -> untyped
118
+
119
+ # : () -> Array[Hash[Symbol, untyped]]
120
+ def removed_rows: () -> Array[Hash[Symbol, untyped]]
121
+
122
+ # A finding for each unproven and moved row, which has no failed
123
+ # execution to carry one, with the command that judges it again
124
+ # against the commit the run compared with.
125
+ # : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
126
+ def judged_findings: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
127
+
128
+ # : (Environment) -> Hash[Symbol, untyped]
129
+ def environment_entry: (Environment) -> Hash[Symbol, untyped]
130
+
131
+ # The line before a scenario's execution, numbered across the run, in
132
+ # the TypeScript engine's words so a log reads the same from either.
133
+ # : (String, Integer, String, String) -> String
134
+ def boundary: (String, Integer, String, String) -> String
135
+
136
+ # The line before a control runs again for proof: which run of its cell
137
+ # this is, of how many --proof-runs asks.
138
+ # : (String, Integer, String, String, Integer) -> String
139
+ def proof_boundary: (String, Integer, String, String, Integer) -> String
140
+
141
+ # Why a step failed, one line each: its error's first line, each step
142
+ # it read from whose program exited nonzero, and where its record is.
143
+ # : (Hash[Symbol, untyped]) -> Array[String]
144
+ def step_failure: (Hash[Symbol, untyped]) -> Array[String]
145
+
146
+ # Where a scenario's run starts again: its line, and its environment
147
+ # unless that is the only one a run without --env would start.
148
+ # In a shuffled order what ran before a scenario is part of what it
149
+ # met, so the line names those scenarios, then it, with the order and
150
+ # the run's --env flags. Under --repeat no one part of the order ran
151
+ # before it, so the line is the run's own targets and flags.
152
+ # : (Scenario, Environment) -> String
153
+ def again: (Scenario, Environment) -> String
154
+
155
+ # : (Scenario, Environment, String, World) -> Hash[Symbol, untyped]
156
+ def play: (Scenario, Environment, String, World) -> Hash[Symbol, untyped]
157
+
158
+ # The pause after the step that ran `number`th, under --step. Before
159
+ # the walk waits, the open page's traffic moves to the pause's own
160
+ # directory: a page that polls while the person reads is not the
161
+ # step's work, and the step's record is already written. After a
162
+ # failure nothing runs on `next` either, so nothing remains and a
163
+ # `stop` there stops nothing.
164
+ # : (Hash[Symbol, untyped], PickleStep, Integer, Integer, Integer) -> String?
165
+ def pause: (Hash[Symbol, untyped], PickleStep, Integer, Integer, Integer) -> String?
166
+
167
+ # One step as run.json's scenarios[].steps[] holds it.
168
+ # : (PickleStep, Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
169
+ def step_entry: (PickleStep, Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
170
+
171
+ # : (PickleStep) -> Hash[Symbol, untyped]
172
+ def skipped: (PickleStep) -> Hash[Symbol, untyped]
173
+
174
+ # : (PickleStep, Array[untyped], World) -> Hash[Symbol, untyped]
175
+ def play_step: (PickleStep, Array[untyped], World) -> Hash[Symbol, untyped]
176
+
177
+ public
178
+
179
+ # 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
181
+ # started for this one execution, its evidence in this run's
182
+ # 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]
185
+
186
+ # What `nuka do` writes its stdout and its record through.
187
+ # : (untyped) -> untyped
188
+ def redact: (untyped) -> untyped
189
+
190
+ private
191
+
192
+ # A value as a record stores it: JSON has no NaN or Infinity, and
193
+ # JavaScript writes either as null, so an arg a {float} read as "-"
194
+ # reaches the record the TypeScript engine writes.
195
+ # : (untyped) -> untyped
196
+ def stored: (untyped) -> untyped
197
+
198
+ # Runs one step whose args the block binds, and writes its record and
199
+ # 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]
202
+
203
+ # A Then step's claims are judged on what it observed, or on its args
204
+ # when it reads nothing itself; any other step runs and returns.
205
+ # `step` is a step class whose observe or run its own file defines.
206
+ # : (untyped, Hash[Symbol, untyped], untyped, [bool, Integer?], Hash[Symbol, untyped], Array[untyped], Hash[String, String], Hash[String, String?]) -> void
207
+ def body: (untyped, Hash[Symbol, untyped], untyped, [ bool, Integer? ], Hash[Symbol, untyped], Array[untyped], Hash[String, String], Hash[String, String?]) -> void
208
+
209
+ # Captures first, then each `from` key from the nearest earlier step that
210
+ # gave it, then a table or docstring for the one required key still open.
211
+ # `origins` gets each from key's label, `from:<step>@<line>.<key>`, and
212
+ # `record[:used]` each earlier step a from key read, with its result.
213
+ # Each claim record's `measured`: the channel that holds the raw value
214
+ # it read, in the record of the step a `from` value came from, or in
215
+ # its own; and an expected value an earlier step gave, the same way.
216
+ # : (singleton(Step), Hash[Symbol, untyped], String) -> void
217
+ def measure: (singleton(Step), Hash[Symbol, untyped], String) -> void
218
+
219
+ # : (singleton(Step), Hash[String, untyped], PickleStep, Array[untyped], Hash[String, String], Hash[Symbol, untyped]) -> Hash[String, untyped]
220
+ def bind_args: (singleton(Step), Hash[String, untyped], PickleStep, Array[untyped], Hash[String, String], Hash[Symbol, untyped]) -> Hash[String, untyped]
221
+
222
+ # The docstring or table a line attaches is the sentence's own text
223
+ # for the one key it fills.
224
+ # : (singleton(Step), Hash[String, untyped], PickleStep) -> Hash[String, String]
225
+ def attachment_texts: (singleton(Step), Hash[String, untyped], PickleStep) -> Hash[String, String]
226
+
227
+ # : (PickleStep) -> Symbol
228
+ def line_kind: (PickleStep) -> Symbol
229
+
230
+ # A project fixture is built the first time a step of its scope names
231
+ # it, directly or through another fixture, and kept until the scope ends.
232
+ # : (Symbol, World, Array[Symbol]) -> untyped
233
+ def project_fixture: (Symbol, World, Array[Symbol]) -> untyped
234
+
235
+ # Each project fixture a step's bag touched, once, as the step record
236
+ # lists it: built here with its setup time, or reused from its scope.
237
+ # : (Symbol, Symbol, Integer?, String?) -> void
238
+ def note_fixture: (Symbol, Symbol, Integer?, String?) -> void
239
+
240
+ # The secrets of the environment running now, which every record
241
+ # surface is written through.
242
+ # : () -> Secrets
243
+ def secrets: () -> Secrets
244
+
245
+ # What the env fixture holds: the env files, then the world's own env.
246
+ # : (World) -> Hash[String, String]
247
+ def step_env: (World) -> Hash[String, String]
248
+
249
+ # Reads an environment's env files into the env fixture and the secret
250
+ # set, from the same read, so the two agree on what was loaded.
251
+ # : (Environment) -> void
252
+ def read_env: (Environment) -> void
253
+
254
+ # : (singleton(Step), String, Array[Hash[Symbol, untyped]], World, Hash[Symbol, untyped]) -> [Hash[Symbol, untyped], (^() -> void)?]
255
+ def build_fixtures: (singleton(Step), String, Array[Hash[Symbol, untyped]], World, Hash[Symbol, untyped]) -> [ Hash[Symbol, untyped], (^() -> void)? ]
256
+
257
+ # : (String) -> String
258
+ def new_id: (String) -> String
259
+
260
+ # : () -> String
261
+ def now: () -> String
262
+ end
263
+ end
264
+ end
@@ -0,0 +1,175 @@
1
+ # Generated from lib/nukadoko/run_record.rb with RBS::Inline
2
+
3
+ # The shapes a run writes, in the TypeScript engine's run.json format: a
4
+ # claim as the step judged it with where each side came from, a row's
5
+ # verdict and the sentence that says why, the counts, and the commit the
6
+ # run judged. One reader reads a run from either engine; a field this
7
+ # engine cannot fill is null rather than missing.
8
+ module Nukadoko
9
+ module Engine
10
+ module RunRecord
11
+ SCHEMA_VERSION: ::Integer
12
+
13
+ # A step's record.json as `nuka run` writes it, in the TypeScript engine's
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
16
+ # directory. A record that passed names each step it used; a failed one
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]
20
+
21
+ # One comparison, as run.json's steps[].claims[] holds it. `origins`
22
+ # maps an args key to the label of where its value came from, and
23
+ # `texts` to the text the sentence stated it as.
24
+ # : (Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[String, String], Hash[String, String?], observed: bool, ?patterns: Array[String]) -> Hash[Symbol, untyped]
25
+ def self?.claim: (Hash[Symbol, untyped], Hash[Symbol, untyped], Hash[String, String], Hash[String, String?], observed: bool, ?patterns: Array[String]) -> Hash[Symbol, untyped]
26
+
27
+ READING_MAX_BYTES: ::Integer
28
+
29
+ # What a claim step's page had received by its judged reading, and
30
+ # what the page showed right after it. A file is named from the step
31
+ # record's directory, or from the run's when `under` names the step's.
32
+ # : (Hash[Symbol, untyped], ?String?) -> Hash[Symbol, untyped]
33
+ def self?.page_fields: (Hash[Symbol, untyped], ?String?) -> Hash[Symbol, untyped]
34
+
35
+ # How many times a claim step read, and for a polled one each reading
36
+ # and the settled conditions, with the reading the poll stopped on
37
+ # when two settled.
38
+ # : (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
39
+ def self?.poll_fields: (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
40
+
41
+ # : (untyped) -> Hash[Symbol, untyped]
42
+ def self?.reading_value: (untyped) -> Hash[Symbol, untyped]
43
+
44
+ # Why a poll whose claim broke stopped, on the failure's first line,
45
+ # so a reading that settled is never mistaken for the timeout passing.
46
+ # : (singleton(Step), Hash[Symbol, untyped]) -> String
47
+ def self?.poll_end: (singleton(Step), Hash[Symbol, untyped]) -> String
48
+
49
+ # A declared claim or settled condition as one line, as `nuka
50
+ # describe` writes it: `status not-equal "running"`.
51
+ # : (Hash[Symbol, untyped]) -> String
52
+ def self?.describe_comparison: (Hash[Symbol, untyped]) -> String
53
+
54
+ EACH_RESULTS_CAP: ::Integer
55
+
56
+ IDENTITY_FIELDS: untyped
57
+
58
+ # A claim on each item of a list, as run.json holds it: each `where`
59
+ # and item claim as declared, how many items the list held and how
60
+ # many `where` selected, and the judged items, the broken first, at
61
+ # most 20, in index order.
62
+ # : (Hash[Symbol, untyped], Engine::ClaimSides::Inputs, Hash[String, String], Hash[String, String?], ?patterns: Array[String]) -> Hash[Symbol, untyped]
63
+ def self?.each_claim: (Hash[Symbol, untyped], Engine::ClaimSides::Inputs, Hash[String, String], Hash[String, String?], ?patterns: Array[String]) -> Hash[Symbol, untyped]
64
+
65
+ # : (Hash[Symbol, untyped], untyped, Hash[String, String], Hash[String, String?], Array[String], untyped) -> Hash[Symbol, untyped]
66
+ def self?.item_declaration: (Hash[Symbol, untyped], untyped, Hash[String, String], Hash[String, String?], Array[String], untyped) -> Hash[Symbol, untyped]
67
+
68
+ # 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]
71
+
72
+ # The claims of a scenario's step records, counted by outcome, in the
73
+ # fields run.json gives them.
74
+ # : (Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
75
+ def self?.claim_counts: (Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
76
+
77
+ # A claim's outcome and, when the two sides could not be compared or
78
+ # nothing judged them, why.
79
+ # : (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
80
+ def self?.outcome: (Hash[Symbol, untyped]) -> Hash[Symbol, untyped]
81
+
82
+ # : (untyped) -> String
83
+ def self?.json_type: (untyped) -> String
84
+
85
+ # : (String) -> String
86
+ def self?.article: (String) -> String
87
+
88
+ # A claim whose observe raised: where each side would come from, and no value.
89
+ # : (Hash[Symbol, untyped], Hash[String, String], Hash[String, String?], ?patterns: Array[String]) -> Hash[Symbol, untyped]
90
+ def self?.unobserved_claim: (Hash[Symbol, untyped], Hash[String, String], Hash[String, String?], ?patterns: Array[String]) -> Hash[Symbol, untyped]
91
+
92
+ # A count is the last step a claim takes, so its label names it first.
93
+ # : (String, untyped) -> String
94
+ def self?.counted: (String, untyped) -> String
95
+
96
+ # Where a side of a claim reads: its origin, read through its view,
97
+ # then walked to its path, as the TypeScript engine labels it.
98
+ # : (String, String?, untyped) -> String
99
+ def self?.place: (String, String?, untyped) -> String
100
+
101
+ # A literal is named by the pattern words that state it, so the label
102
+ # reads as the sentence did.
103
+ # : (Hash[Symbol, untyped], Hash[String, String], Hash[String, String?], Array[String]) -> [String, String?]
104
+ def self?.expected_origin: (Hash[Symbol, untyped], Hash[String, String], Hash[String, String?], Array[String]) -> [ String, String? ]
105
+
106
+ # The sentence a claim step's failure reads as, the same words the
107
+ # TypeScript engine prints.
108
+ # : (Array[Hash[Symbol, untyped]]) -> String
109
+ def self?.broken_message: (Array[Hash[Symbol, untyped]]) -> String
110
+
111
+ # : (Integer) -> String
112
+ def self?.runs_text: (Integer) -> String
113
+
114
+ # : (Hash[Symbol, untyped]) -> String
115
+ def self?.cell_text: (Hash[Symbol, untyped]) -> String
116
+
117
+ # A head control or a base cell stands where the criterion's behaviour
118
+ # is absent, so a Then failing there the same way in each proof run
119
+ # proves the criterion tells the behaviour apart.
120
+ # : (Hash[Symbol, untyped]) -> bool
121
+ def self?.proves?: (Hash[Symbol, untyped]) -> bool
122
+
123
+ # : (Hash[Symbol, untyped], String) -> String
124
+ def self?.failed_reason: (Hash[Symbol, untyped], String) -> String
125
+
126
+ # : (Array[String]) -> String
127
+ def self?.listed: (Array[String]) -> String
128
+
129
+ # What changed under an unchanged criterion, or nil when nothing did.
130
+ # : (Hash[Symbol, untyped]) -> String?
131
+ def self?.underneath_change: (Hash[Symbol, untyped]) -> String?
132
+
133
+ # The environments a row needs a base cell and an old cell in, from its
134
+ # head cells: none unless every required head cell passed; an
135
+ # unchanged row runs in the old world when something under it
136
+ # changed; a new or changed row runs at the base unless a head
137
+ # control already proves it, or it carries @held.
138
+ # : (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]]
140
+
141
+ # : (Hash[Symbol, untyped]) -> String
142
+ def self?.world_cell_clause: (Hash[Symbol, untyped]) -> String
143
+
144
+ # : (Array[Hash[Symbol, untyped]]) -> String
145
+ def self?.world_cells_clause: (Array[Hash[Symbol, untyped]]) -> String
146
+
147
+ # : (String, Hash[Symbol, untyped]) -> String
148
+ def self?.control_proof_reason: (String, Hash[Symbol, untyped]) -> String
149
+
150
+ # A row's verdict and why, from its cells: red for a required cell that
151
+ # did not pass, or for a row with no required cell; proven when a
152
+ # control fails at a Then the same way in each proof run. Under
153
+ # `--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).
155
+ # : (Array[Hash[Symbol, untyped]], ?Hash[Symbol, untyped]?) -> [String, String]
156
+ def self?.judge_row: (Array[Hash[Symbol, untyped]], ?Hash[Symbol, untyped]?) -> [ String, String ]
157
+
158
+ # : (Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
159
+ def self?.counts: (Array[Hash[Symbol, untyped]]) -> Hash[Symbol, Integer]
160
+
161
+ # The commit HEAD named when the run started, whether the tree had an
162
+ # uncommitted change, and the working tree as one git tree id, written
163
+ # through a copy of the index so the real one is never touched. Null
164
+ # outside a git repository or before the first commit.
165
+ # : (String) -> Hash[Symbol, untyped]?
166
+ def self?.commit: (String) -> Hash[Symbol, untyped]?
167
+
168
+ # : (String) -> String?
169
+ def self?.working_tree: (String) -> String?
170
+
171
+ # : (String, *String, ?env: Hash[String, String], ?input: String, ?strip: bool) -> [String, bool]
172
+ def self?.git: (String, *String, ?env: Hash[String, String], ?input: String, ?strip: bool) -> [ String, bool ]
173
+ end
174
+ end
175
+ end