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