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,17 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/signature.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# The RBS of each step, written from the same declarations check reads, so a
|
|
4
|
+
# project that runs Steep gets the body checked against its own contract:
|
|
5
|
+
# args it does not declare, a return value of the wrong shape, and, in a
|
|
6
|
+
# Then step, an args key the claim keeps from observe.
|
|
7
|
+
module Nukadoko
|
|
8
|
+
module Signature
|
|
9
|
+
FIXTURE_TYPES: untyped
|
|
10
|
+
|
|
11
|
+
# : (Array[singleton(Nukadoko::Step)]) -> String
|
|
12
|
+
def self.of: (Array[singleton(Nukadoko::Step)]) -> String
|
|
13
|
+
|
|
14
|
+
# : (singleton(Nukadoko::Step)) -> String
|
|
15
|
+
def self.of_step: (singleton(Nukadoko::Step)) -> String
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/skill.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# `nuka skill path`: the directory that holds every agent skill this gem
|
|
4
|
+
# ships, one absolute path, as the TypeScript engine prints its own. It is
|
|
5
|
+
# a fact about the installed nukadoko, the one route sure to match the
|
|
6
|
+
# version installed; copying a skill into an agent's own layout is what
|
|
7
|
+
# `gh skill install` and the agent's plugin marketplace already do.
|
|
8
|
+
#
|
|
9
|
+
# The gem ships the skills beside lib/ (bin/stage-shared copies them in
|
|
10
|
+
# before `gem build`). A checkout that has not staged them reads the
|
|
11
|
+
# repository root's, which are the same files.
|
|
12
|
+
module Nukadoko
|
|
13
|
+
module Skill
|
|
14
|
+
# : () -> String
|
|
15
|
+
def self?.dir: () -> String
|
|
16
|
+
|
|
17
|
+
# : (IO, IO) -> Integer
|
|
18
|
+
def self?.print_path: (IO, IO) -> Integer
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/step.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# A step is a class under features/steps/, one per file, named by its file.
|
|
4
|
+
# Everything except the body is a class-level declaration, so check reads the
|
|
5
|
+
# contract without calling the body, and `Method#parameters` names the
|
|
6
|
+
# fixtures the body asks for.
|
|
7
|
+
module Nukadoko
|
|
8
|
+
class Step
|
|
9
|
+
# : () -> String
|
|
10
|
+
def self.file: () -> String
|
|
11
|
+
|
|
12
|
+
# : (singleton(Step)) -> void
|
|
13
|
+
def self.inherited: (singleton(Step)) -> void
|
|
14
|
+
|
|
15
|
+
# : () -> Array[singleton(Step)]
|
|
16
|
+
def self.registry: () -> Array[singleton(Step)]
|
|
17
|
+
|
|
18
|
+
# : (String) -> String
|
|
19
|
+
# : () -> String?
|
|
20
|
+
def self.pattern: (String) -> String
|
|
21
|
+
| () -> String?
|
|
22
|
+
|
|
23
|
+
# : (String) -> String
|
|
24
|
+
# : () -> String?
|
|
25
|
+
def self.description: (String) -> String
|
|
26
|
+
| () -> String?
|
|
27
|
+
|
|
28
|
+
# : (bool) -> bool
|
|
29
|
+
# : () -> bool?
|
|
30
|
+
def self.mutates: (bool) -> bool
|
|
31
|
+
| () -> bool?
|
|
32
|
+
|
|
33
|
+
# : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
|
|
34
|
+
# : () -> Array[Hash[Symbol, untyped]]?
|
|
35
|
+
def self.claims: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
|
|
36
|
+
| () -> Array[Hash[Symbol, untyped]]?
|
|
37
|
+
|
|
38
|
+
# : (untyped) -> untyped
|
|
39
|
+
# : () -> untyped
|
|
40
|
+
def self.poll: (untyped) -> untyped
|
|
41
|
+
| () -> untyped
|
|
42
|
+
|
|
43
|
+
# The steps this one may run through the `call` fixture. A part with no
|
|
44
|
+
# pattern exists only for calls.
|
|
45
|
+
# : (Array[singleton(Step)]) -> Array[singleton(Step)]
|
|
46
|
+
# : () -> Array[singleton(Step)]
|
|
47
|
+
def self.parts: (Array[singleton(Step)]) -> Array[singleton(Step)]
|
|
48
|
+
| () -> Array[singleton(Step)]
|
|
49
|
+
|
|
50
|
+
# : () { () [self: Schema] -> void } -> Schema
|
|
51
|
+
# : () -> Schema
|
|
52
|
+
def self.args: () { () [self: Schema] -> void } -> Schema
|
|
53
|
+
| () -> Schema
|
|
54
|
+
|
|
55
|
+
# : () { () [self: Schema] -> void } -> Schema
|
|
56
|
+
# : () -> Schema?
|
|
57
|
+
def self.returns: () { () [self: Schema] -> void } -> Schema
|
|
58
|
+
| () -> Schema?
|
|
59
|
+
|
|
60
|
+
# Args an earlier step of the scenario returned, by key: one source as
|
|
61
|
+
# `[Step, :field]`, or several as a list of them, where the nearest
|
|
62
|
+
# earlier one that ran gives the value.
|
|
63
|
+
# : (Hash[Symbol | String, untyped]) -> Hash[String, Array[untyped]]
|
|
64
|
+
# : () -> Hash[String, Array[untyped]]
|
|
65
|
+
def self.from: (Hash[Symbol | String, untyped]) -> Hash[String, Array[untyped]]
|
|
66
|
+
| () -> Hash[String, Array[untyped]]
|
|
67
|
+
|
|
68
|
+
# observe never sees the args a claim compares with, so it cannot pick
|
|
69
|
+
# what to read by the answer it will be judged against.
|
|
70
|
+
# : () -> Schema
|
|
71
|
+
def self.inputs: () -> Schema
|
|
72
|
+
|
|
73
|
+
# : () -> String
|
|
74
|
+
def self.step_name: () -> String
|
|
75
|
+
|
|
76
|
+
# A step that runs code may change the world unless it says it does
|
|
77
|
+
# not; a claim step has no action, so it never does.
|
|
78
|
+
# : () -> bool
|
|
79
|
+
def self.mutating?: () -> bool
|
|
80
|
+
|
|
81
|
+
# : () -> Symbol
|
|
82
|
+
def self.body: () -> Symbol
|
|
83
|
+
|
|
84
|
+
# : () -> Integer?
|
|
85
|
+
def self.line: () -> Integer?
|
|
86
|
+
|
|
87
|
+
# : () -> Array[Symbol]
|
|
88
|
+
def self.fixtures: () -> Array[Symbol]
|
|
89
|
+
|
|
90
|
+
# What `run` gave back, checked against `returns`, as problems to
|
|
91
|
+
# report. A Ruby method always gives back its last value, so a step
|
|
92
|
+
# with no returns that ends on a call (an Integer, a String, nil)
|
|
93
|
+
# returns nothing; a Hash with keys would lose them from the record,
|
|
94
|
+
# so that is refused, as the TypeScript engine refuses it.
|
|
95
|
+
# : (untyped) -> [untyped, Array[String]]
|
|
96
|
+
def self.returned: (untyped) -> [ untyped, Array[String] ]
|
|
97
|
+
|
|
98
|
+
# The keywords the body is called with: `args` only when it names
|
|
99
|
+
# them, as a TypeScript step that does not destructure `args` never
|
|
100
|
+
# sees them, so `def run(scratch:)` is a whole step.
|
|
101
|
+
# : (Hash[Symbol, untyped], untyped) -> Hash[Symbol, untyped]
|
|
102
|
+
def self.keywords: (Hash[Symbol, untyped], untyped) -> Hash[Symbol, untyped]
|
|
103
|
+
|
|
104
|
+
# The fixtures the engine builds before the body runs: the step's own,
|
|
105
|
+
# and those of every part it can reach, since the bag is closed before
|
|
106
|
+
# any call happens.
|
|
107
|
+
# : (?Array[singleton(Step)]) -> Array[Symbol]
|
|
108
|
+
def self.bag: (?Array[singleton(Step)]) -> Array[Symbol]
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Each step file is registered for autoload under its class name first, so a
|
|
112
|
+
# step can name another in `from` or `field` whatever order the files load in.
|
|
113
|
+
# : (String) -> Array[singleton(Step)]
|
|
114
|
+
def self.load_steps: (String) -> Array[singleton(Step)]
|
|
115
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/summary.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# summary.md: the run as a person reads it, rendered from run.json alone,
|
|
4
|
+
# in the TypeScript engine's words, so a summary never says something
|
|
5
|
+
# run.json does not and `nuka report` renders the same file again from a
|
|
6
|
+
# run.json copied off another machine. The sections this engine has no
|
|
7
|
+
# field for yet (removed criteria, paths, flags, routes, judgments) are
|
|
8
|
+
# left out, as the TypeScript engine leaves them out of a run without
|
|
9
|
+
# them.
|
|
10
|
+
module Nukadoko
|
|
11
|
+
module Engine
|
|
12
|
+
module Summary
|
|
13
|
+
MARKER: ::String
|
|
14
|
+
|
|
15
|
+
# A failed scenario is its cell, and a row with no required cell is
|
|
16
|
+
# its reason line, so the findings list leaves those out.
|
|
17
|
+
TABLE_CODES: untyped
|
|
18
|
+
|
|
19
|
+
RED: untyped
|
|
20
|
+
|
|
21
|
+
VALUE_TEXT_LIMIT: ::Integer
|
|
22
|
+
|
|
23
|
+
STDOUT_JSON_LIMIT: ::Integer
|
|
24
|
+
|
|
25
|
+
ANSI: ::Regexp
|
|
26
|
+
|
|
27
|
+
THROW_LOCATION: ::Regexp
|
|
28
|
+
|
|
29
|
+
CARETS: ::Regexp
|
|
30
|
+
|
|
31
|
+
CLAIMS_LEAD: ::String
|
|
32
|
+
|
|
33
|
+
CONTROL_NOTE: ::String
|
|
34
|
+
|
|
35
|
+
LIMIT_KINDS: untyped
|
|
36
|
+
|
|
37
|
+
LIMIT_HEADINGS: untyped
|
|
38
|
+
|
|
39
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
40
|
+
def self?.render: (Hash[Symbol, untyped]) -> String
|
|
41
|
+
|
|
42
|
+
# Text outside a code span: `\` doubled first, so the `\` before a
|
|
43
|
+
# `|` survives both the table parser and the inline one, and `<`
|
|
44
|
+
# never opens a tag.
|
|
45
|
+
# : (untyped) -> String
|
|
46
|
+
def self?.cell_text: (untyped) -> String
|
|
47
|
+
|
|
48
|
+
# A code span longer than any backtick run inside it.
|
|
49
|
+
# : (untyped) -> String
|
|
50
|
+
def self?.code_span: (untyped) -> String
|
|
51
|
+
|
|
52
|
+
# : (untyped) -> String
|
|
53
|
+
def self?.cell_code: (untyped) -> String
|
|
54
|
+
|
|
55
|
+
# : (Integer, String, String) -> String
|
|
56
|
+
def self?.count_of: (Integer, String, String) -> String
|
|
57
|
+
|
|
58
|
+
# : (Integer) -> String
|
|
59
|
+
def self?.duration: (Integer) -> String
|
|
60
|
+
|
|
61
|
+
# : (untyped) -> String
|
|
62
|
+
def self?.value_text: (untyped) -> String
|
|
63
|
+
|
|
64
|
+
# The first line with text in it; a Node throw location with its
|
|
65
|
+
# source line and carets is skipped, and a line that ends in a colon
|
|
66
|
+
# takes the next line after it.
|
|
67
|
+
# : (untyped, ?bool) -> String?
|
|
68
|
+
def self?.first_visible_line: (untyped, ?bool) -> String?
|
|
69
|
+
|
|
70
|
+
# : (untyped) -> String
|
|
71
|
+
def self?.first_error_line: (untyped) -> String
|
|
72
|
+
|
|
73
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
74
|
+
def self?.cell_word: (Hash[Symbol, untyped]) -> String
|
|
75
|
+
|
|
76
|
+
# : (Hash[Symbol, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
77
|
+
def self?.head_scenarios: (Hash[Symbol, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
78
|
+
|
|
79
|
+
# : (Hash[untyped, untyped]) -> String
|
|
80
|
+
def self?.conditions_text: (Hash[untyped, untyped]) -> String
|
|
81
|
+
|
|
82
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
83
|
+
def self?.title: (Hash[Symbol, untyped]) -> Array[String]
|
|
84
|
+
|
|
85
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
86
|
+
def self?.table_cell: (Hash[Symbol, untyped]) -> String
|
|
87
|
+
|
|
88
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
89
|
+
def self?.table: (Hash[Symbol, untyped]) -> Array[String]
|
|
90
|
+
|
|
91
|
+
# The line above the table under `--base`: what the run compared with,
|
|
92
|
+
# how many criteria changed, and whether the mapping changed and what
|
|
93
|
+
# in it, since an unchanged criterion over a changed mapping is what
|
|
94
|
+
# the old world was run for.
|
|
95
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
96
|
+
def self?.base_line: (Hash[Symbol, untyped]) -> Array[String]
|
|
97
|
+
|
|
98
|
+
# Each criterion the base holds and head does not, with its sentences
|
|
99
|
+
# at the base, so a reader approving the change sees what it drops.
|
|
100
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
101
|
+
def self?.removed: (Hash[Symbol, untyped]) -> Array[String]
|
|
102
|
+
|
|
103
|
+
# A capture taken at least this long after its reading says so beside
|
|
104
|
+
# its link: a page that changes on a timer of a few hundred
|
|
105
|
+
# milliseconds can show another state by then.
|
|
106
|
+
LATE_VIEW_MS: ::Integer
|
|
107
|
+
|
|
108
|
+
# Where a Then's judged moment can be seen: each open page's view
|
|
109
|
+
# right after the reading its claims were judged on, its screenshot
|
|
110
|
+
# before its ARIA snapshot, or, for a Then that read no page, the
|
|
111
|
+
# requests its own step sent. Each link is [label, href, after_ms].
|
|
112
|
+
# : (Hash[Symbol, untyped]) -> Array[Array[untyped]]
|
|
113
|
+
def self?.seen_links: (Hash[Symbol, untyped]) -> Array[Array[untyped]]
|
|
114
|
+
|
|
115
|
+
# : (String, String) -> String
|
|
116
|
+
def self?.markdown_link: (String, String) -> String
|
|
117
|
+
|
|
118
|
+
# : (Array[Array[untyped]]) -> String
|
|
119
|
+
def self?.seen_text: (Array[Array[untyped]]) -> String
|
|
120
|
+
|
|
121
|
+
# : (Hash[Symbol, untyped]) -> (^(Hash[Symbol, untyped]) -> String)?
|
|
122
|
+
def self?.seen_column: (Hash[Symbol, untyped]) -> (^(Hash[Symbol, untyped]) -> String)?
|
|
123
|
+
|
|
124
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
125
|
+
def self?.reasons: (Hash[Symbol, untyped]) -> Array[String]
|
|
126
|
+
|
|
127
|
+
# Where an execution stopped: the step, the error's first line, the
|
|
128
|
+
# producers that exited nonzero, the last command that did, the
|
|
129
|
+
# record, and where the Then can be seen.
|
|
130
|
+
# : (Hash[Symbol, untyped]) -> String?
|
|
131
|
+
def self?.describe_failure: (Hash[Symbol, untyped]) -> String?
|
|
132
|
+
|
|
133
|
+
# : (Array[Hash[Symbol, untyped]]?) -> Array[[untyped, Integer, String]]
|
|
134
|
+
def self?.exited_producers: (Array[Hash[Symbol, untyped]]?) -> Array[[ untyped, Integer, String ]]
|
|
135
|
+
|
|
136
|
+
# : (String) -> String?
|
|
137
|
+
def self?.stdout_line: (String) -> String?
|
|
138
|
+
|
|
139
|
+
# The gaps a green verdict does not cover, computed again from
|
|
140
|
+
# run.json's other fields, never read from a stored list.
|
|
141
|
+
# : (Hash[Symbol, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
142
|
+
def self?.limits: (Hash[Symbol, untyped]) -> Array[Hash[Symbol, untyped]]
|
|
143
|
+
|
|
144
|
+
# One entry per row a judgment holds green: nukadoko checked that the
|
|
145
|
+
# value is the one judged, and nothing of the judgment itself. A value
|
|
146
|
+
# judged as an ARIA snapshot names what that leaves out: a change only
|
|
147
|
+
# to how the page looks keeps the snapshot, and so the judgment.
|
|
148
|
+
# : (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
|
|
149
|
+
def self?.judgment_limits: (Array[Hash[Symbol, untyped]]) -> Array[Hash[Symbol, untyped]]
|
|
150
|
+
|
|
151
|
+
# : (Hash[Symbol, untyped], Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]?
|
|
152
|
+
def self?.control_limit: (Hash[Symbol, untyped], Array[Hash[Symbol, untyped]]) -> Hash[Symbol, untyped]?
|
|
153
|
+
|
|
154
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
155
|
+
def self?.closer_text: (Hash[Symbol, untyped]) -> String
|
|
156
|
+
|
|
157
|
+
# : (Hash[Symbol, untyped], bool) -> String
|
|
158
|
+
def self?.limit_place: (Hash[Symbol, untyped], bool) -> String
|
|
159
|
+
|
|
160
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
161
|
+
def self?.limits_section: (Hash[Symbol, untyped]) -> Array[String]
|
|
162
|
+
|
|
163
|
+
# : (Array[String]) -> String
|
|
164
|
+
def self?.tag_flags: (Array[String]) -> String
|
|
165
|
+
|
|
166
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
167
|
+
def self?.condition: (Hash[Symbol, untyped]) -> Array[String]
|
|
168
|
+
|
|
169
|
+
# The claim as ClaimLine writes it, then where its values were
|
|
170
|
+
# measured: a value no recorded channel holds is what a constant in
|
|
171
|
+
# step code looks like, so the line says `measured: none`.
|
|
172
|
+
# : (Hash[Symbol, untyped], String?) -> String
|
|
173
|
+
def self?.claim_line: (Hash[Symbol, untyped], String?) -> String
|
|
174
|
+
|
|
175
|
+
# : (Hash[Symbol, untyped], String?) -> String
|
|
176
|
+
def self?.measured_text: (Hash[Symbol, untyped], String?) -> String
|
|
177
|
+
|
|
178
|
+
# : (Hash[Symbol, untyped]?, String?) -> String
|
|
179
|
+
def self?.channel_text: (Hash[Symbol, untyped]?, String?) -> String
|
|
180
|
+
|
|
181
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
182
|
+
def self?.claims: (Hash[Symbol, untyped]) -> Array[String]
|
|
183
|
+
|
|
184
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
185
|
+
def self?.where_of: (Hash[Symbol, untyped]) -> String
|
|
186
|
+
|
|
187
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
188
|
+
def self?.findings: (Hash[Symbol, untyped]) -> Array[String]
|
|
189
|
+
|
|
190
|
+
# The heading names what the commands under it rerun: a stopped walk
|
|
191
|
+
# did not fail, so a heading that called it failed would state
|
|
192
|
+
# something false.
|
|
193
|
+
# : (Hash[Symbol, untyped]) -> Array[String]
|
|
194
|
+
def self?.rerun: (Hash[Symbol, untyped]) -> Array[String]
|
|
195
|
+
|
|
196
|
+
# A walk is a run that paused after each step for an answer: its
|
|
197
|
+
# verdicts were measured, but between steps the world and the browser
|
|
198
|
+
# were open to anything, which no record covers. The longest pause
|
|
199
|
+
# says how long that was.
|
|
200
|
+
# : (Hash[Symbol, untyped]) -> String
|
|
201
|
+
def self?.walk_sentence: (Hash[Symbol, untyped]) -> String
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/table.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# The run's verdict table: a row per criterion (a scenario, or an Examples
|
|
4
|
+
# row), a cell per environment. A cell is `required` where its environment
|
|
5
|
+
# meets the row's condition tags and a `control` elsewhere. Only a control
|
|
6
|
+
# that fails at a Then, the same way, in every proof run proves a row.
|
|
7
|
+
module Nukadoko
|
|
8
|
+
module Engine
|
|
9
|
+
module Table
|
|
10
|
+
PROOF_RUNS: ::Integer
|
|
11
|
+
|
|
12
|
+
# : (Integer) -> Integer
|
|
13
|
+
def self.proof_runs=: (Integer) -> Integer
|
|
14
|
+
|
|
15
|
+
# : () -> Integer
|
|
16
|
+
def self.proof_runs: () -> Integer
|
|
17
|
+
|
|
18
|
+
# : (Array[String], Hash[String, untyped]) -> String
|
|
19
|
+
def self.role: (Array[String], Hash[String, untyped]) -> String
|
|
20
|
+
|
|
21
|
+
# What a cell's executions came to. An execution is `[:pass]`,
|
|
22
|
+
# `[:fail, line, claim]`, `[:broke, line]`, or `[:stopped, line]`
|
|
23
|
+
# for a walk a person stopped after that line.
|
|
24
|
+
# : (Array[Array[untyped]]) -> Hash[Symbol, untyped]
|
|
25
|
+
def self.cell: (Array[Array[untyped]]) -> Hash[Symbol, untyped]
|
|
26
|
+
|
|
27
|
+
# : (Array[Hash[Symbol, untyped]]) -> String
|
|
28
|
+
def self.verdict: (Array[Hash[Symbol, untyped]]) -> String
|
|
29
|
+
|
|
30
|
+
# : (Array[String]) -> Array[String]
|
|
31
|
+
def self.condition_tags: (Array[String]) -> Array[String]
|
|
32
|
+
|
|
33
|
+
# The tags a row lists: its condition tags and @held, as written.
|
|
34
|
+
# : (Array[String]) -> Array[String]
|
|
35
|
+
def self.row_tags: (Array[String]) -> Array[String]
|
|
36
|
+
|
|
37
|
+
# For each condition the tags name, the value the environment declares
|
|
38
|
+
# for it, or nil: what a cell's role came from.
|
|
39
|
+
# : (Array[String], Hash[String, untyped]) -> Hash[String, untyped]
|
|
40
|
+
def self.conditions_of: (Array[String], Hash[String, untyped]) -> Hash[String, untyped]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/text_fit.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# `fits-text`, as the TypeScript engine judges it: an expected text fits an
|
|
4
|
+
# actual one line by line, where a line that is exactly `...` takes any run
|
|
5
|
+
# of actual lines, `[..]` any characters inside one line, and `[..:name]`
|
|
6
|
+
# does too, and then every stand-in of one name must have read one text and
|
|
7
|
+
# two names two texts. The judge and the claim line both read this module,
|
|
8
|
+
# so the two never disagree about where a text stopped fitting. It walks
|
|
9
|
+
# the expected lines once and keeps only the actual lines each one can end
|
|
10
|
+
# before, so a text costs time in its length rather than a power of its
|
|
11
|
+
# `...` lines.
|
|
12
|
+
module Nukadoko
|
|
13
|
+
module Engine
|
|
14
|
+
module TextFit
|
|
15
|
+
ANY_LINES: ::String
|
|
16
|
+
|
|
17
|
+
STAND_IN_NAME: ::Regexp
|
|
18
|
+
|
|
19
|
+
# An expected line split at its stand-ins: the fixed texts, and the
|
|
20
|
+
# place of each named stand-in among them.
|
|
21
|
+
class Fixed < Data
|
|
22
|
+
attr_reader parts(): untyped
|
|
23
|
+
|
|
24
|
+
attr_reader names(): untyped
|
|
25
|
+
|
|
26
|
+
def self.new: (untyped parts, untyped names) -> instance
|
|
27
|
+
| (parts: untyped, names: untyped) -> instance
|
|
28
|
+
|
|
29
|
+
def self.members: () -> [ :parts, :names ]
|
|
30
|
+
|
|
31
|
+
def members: () -> [ :parts, :names ]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# A `[..` that `]`, or `:`, a name, and `]`, do not follow is text.
|
|
35
|
+
# : (String) -> Fixed
|
|
36
|
+
def self?.fixed_line: (String) -> Fixed
|
|
37
|
+
|
|
38
|
+
# A text's lines, at "\n" or "\r\n", with one final empty line dropped.
|
|
39
|
+
# : (String) -> Array[String]
|
|
40
|
+
def self?.lines: (String) -> Array[String]
|
|
41
|
+
|
|
42
|
+
# Each part between the first and the last is found leftmost after
|
|
43
|
+
# the one before it, which is enough when a stand-in takes anything.
|
|
44
|
+
# : (Array[String], String, ?Array[String?]?) -> bool
|
|
45
|
+
def self?.parts_fit: (Array[String], String, ?Array[String?]?) -> bool
|
|
46
|
+
|
|
47
|
+
# : (String, String) -> bool
|
|
48
|
+
def self?.line_fits: (String, String) -> bool
|
|
49
|
+
|
|
50
|
+
# { fits: true }, or where the text stopped fitting: `fitted` expected
|
|
51
|
+
# lines fit, `expected` fit nothing from actual line `at` on, which is
|
|
52
|
+
# `actual`; or `readings`, the two named stand-ins that disagree.
|
|
53
|
+
# : (String, String) -> Hash[Symbol, untyped]
|
|
54
|
+
def self?.fit: (String, String) -> Hash[Symbol, untyped]
|
|
55
|
+
|
|
56
|
+
# The actual line each expected line takes in the first way the text
|
|
57
|
+
# fits, each `...` taking as few lines as it can from the top: a walk
|
|
58
|
+
# from the end learns which lines the rest can start at.
|
|
59
|
+
# : (Array[String], Array[Fixed?]) -> Array[Integer?]
|
|
60
|
+
def self?.first_fit: (Array[String], Array[Fixed?]) -> Array[Integer?]
|
|
61
|
+
|
|
62
|
+
# : (Array[String], Array[Fixed?], Array[Integer?]) -> Hash[Symbol, untyped]
|
|
63
|
+
def self?.names_fit: (Array[String], Array[Fixed?], Array[Integer?]) -> Hash[Symbol, untyped]
|
|
64
|
+
|
|
65
|
+
# Whether an expected text states nothing beyond its stand-ins.
|
|
66
|
+
# : (String) -> bool
|
|
67
|
+
def self?.only_stand_ins?: (String) -> bool
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/trace.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# The W3C trace context the engine puts on what a step sends to the world,
|
|
4
|
+
# and the program's log read back by it, as the TypeScript engine does it.
|
|
5
|
+
# Each step gets one trace id; each request to the world's origin, and
|
|
6
|
+
# each process run_command starts, gets a span id of its own under it. A
|
|
7
|
+
# line of program.log belongs to the step whose trace id it carries,
|
|
8
|
+
# wherever it appears: every trace id of one world starts with the same
|
|
9
|
+
# eight characters, so the id a line carries is the first place where
|
|
10
|
+
# those begin 32 hexadecimal ones, and no list of ids is needed to read it.
|
|
11
|
+
module Nukadoko
|
|
12
|
+
module Engine
|
|
13
|
+
module Trace
|
|
14
|
+
PREFIX_LENGTH: ::Integer
|
|
15
|
+
|
|
16
|
+
ID_LENGTH: ::Integer
|
|
17
|
+
|
|
18
|
+
MAX_SPANS: ::Integer
|
|
19
|
+
|
|
20
|
+
# : () -> String
|
|
21
|
+
def self.new_prefix: () -> String
|
|
22
|
+
|
|
23
|
+
# W3C reserves an id of all zeros as invalid, so one is drawn again.
|
|
24
|
+
# : (String) -> String
|
|
25
|
+
def self.new_id: (String) -> String
|
|
26
|
+
|
|
27
|
+
# : () -> String
|
|
28
|
+
def self.new_span: () -> String
|
|
29
|
+
|
|
30
|
+
# : (String, String) -> String
|
|
31
|
+
def self.traceparent: (String, String) -> String
|
|
32
|
+
|
|
33
|
+
# The trace id of the world `prefix` names that `line` carries, or nil.
|
|
34
|
+
# : (String, String) -> String?
|
|
35
|
+
def self.id_in: (String, String) -> String?
|
|
36
|
+
|
|
37
|
+
# : (URI::Generic) -> String
|
|
38
|
+
def self.origin: (URI::Generic) -> String
|
|
39
|
+
|
|
40
|
+
# Only the world's origin gets the header: a third party's server may
|
|
41
|
+
# answer a header it did not expect differently. A world at localhost
|
|
42
|
+
# also answers at each name below localhost on the same port.
|
|
43
|
+
# : (untyped, untyped) -> bool
|
|
44
|
+
def self.stamps?: (untyped, untyped) -> bool
|
|
45
|
+
|
|
46
|
+
# The step that runs now, kept per thread as the processes are.
|
|
47
|
+
# : () -> Boundary?
|
|
48
|
+
def self.current: () -> Boundary?
|
|
49
|
+
|
|
50
|
+
# : [T] (Boundary) { () -> T } -> T
|
|
51
|
+
def self.within: [T] (Boundary) { () -> T } -> T
|
|
52
|
+
|
|
53
|
+
# One step's trace: what it stamped, and when it last did.
|
|
54
|
+
class Boundary
|
|
55
|
+
attr_reader trace_id: String
|
|
56
|
+
|
|
57
|
+
attr_reader origin: String
|
|
58
|
+
|
|
59
|
+
attr_reader stamped: Integer
|
|
60
|
+
|
|
61
|
+
attr_reader spans: Array[String]
|
|
62
|
+
|
|
63
|
+
attr_reader process_spans: Array[String]
|
|
64
|
+
|
|
65
|
+
attr_reader last_stamp_at: Float?
|
|
66
|
+
|
|
67
|
+
# : (String, String) -> void
|
|
68
|
+
def initialize: (String, String) -> void
|
|
69
|
+
|
|
70
|
+
# The traceparent a request to `url` goes out with, or nil when it
|
|
71
|
+
# is not the world's.
|
|
72
|
+
# : (untyped) -> String?
|
|
73
|
+
def stamp: (untyped) -> String?
|
|
74
|
+
|
|
75
|
+
# A process's TRACEPARENT is not a stamped request: nothing waits
|
|
76
|
+
# for the request it may send, but the log is read a little longer.
|
|
77
|
+
# : () -> String
|
|
78
|
+
def process_traceparent: () -> String
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# program.log read forward as the steps run: each step takes the
|
|
82
|
+
# complete lines written since the last step read, keeps those that
|
|
83
|
+
# carry its trace id, and, when it stamped anything, waits until the
|
|
84
|
+
# log has been quiet for 30 ms (at most 300 ms) for lines still on
|
|
85
|
+
# their way.
|
|
86
|
+
class Log
|
|
87
|
+
SLICE_FILE: ::String
|
|
88
|
+
|
|
89
|
+
LATE_FILE: ::String
|
|
90
|
+
|
|
91
|
+
QUIET: ::Float
|
|
92
|
+
|
|
93
|
+
SETTLE: ::Float
|
|
94
|
+
|
|
95
|
+
POLL: ::Float
|
|
96
|
+
|
|
97
|
+
KEPT: untyped
|
|
98
|
+
|
|
99
|
+
attr_reader path: String
|
|
100
|
+
|
|
101
|
+
attr_reader prefix: String
|
|
102
|
+
|
|
103
|
+
# : (String, String) -> void
|
|
104
|
+
def initialize: (String, String) -> void
|
|
105
|
+
|
|
106
|
+
# : (String, Boundary) -> Hash[Symbol, untyped]
|
|
107
|
+
def slice: (String, Boundary) -> Hash[Symbol, untyped]
|
|
108
|
+
|
|
109
|
+
# Once the world stopped: how many lines carry a trace id of the
|
|
110
|
+
# world, and each step's lines that its slice did not read, written
|
|
111
|
+
# beside its record. `steps` maps a trace id to [lines read, dir].
|
|
112
|
+
# : (Hash[String, Array[untyped]]) -> Hash[Symbol, untyped]
|
|
113
|
+
def late: (Hash[String, Array[untyped]]) -> Hash[Symbol, untyped]
|
|
114
|
+
|
|
115
|
+
private
|
|
116
|
+
|
|
117
|
+
# : () -> Float
|
|
118
|
+
def now: () -> Float
|
|
119
|
+
|
|
120
|
+
# A line still being written, after the last newline, is left for
|
|
121
|
+
# the next read.
|
|
122
|
+
# : () { (String) -> void } -> void
|
|
123
|
+
def each_new_line: () { (String) -> void } -> void
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Generated from lib/nukadoko/trace_actions.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# A step's trace.zip read back into the step record's `actions`: every
|
|
4
|
+
# Playwright call the step made through its page, as the TypeScript engine
|
|
5
|
+
# lists them. Only `trace.trace` inside the zip is read, by walking the
|
|
6
|
+
# zip's central directory, so no zip library is needed. A trace that cannot
|
|
7
|
+
# be read gives no actions rather than failing the step: measuring never
|
|
8
|
+
# breaks the execution. A trace format version this build has not measured
|
|
9
|
+
# gives none either, since guessing at its shape would turn an unread
|
|
10
|
+
# format into a record.
|
|
11
|
+
module Nukadoko
|
|
12
|
+
module Engine
|
|
13
|
+
module TraceActions
|
|
14
|
+
# Version 8 as the TypeScript engine measured it, and version 10 as
|
|
15
|
+
# Playwright 1.65.1 writes it for the Ruby client: the same `before`
|
|
16
|
+
# and `after` fields, with a number for `callId`.
|
|
17
|
+
KNOWN_VERSIONS: untyped
|
|
18
|
+
|
|
19
|
+
MAX_ACTIONS: ::Integer
|
|
20
|
+
|
|
21
|
+
INTERNAL_WAIT: ::String
|
|
22
|
+
|
|
23
|
+
JUDGED_VIEW_GROUP: ::String
|
|
24
|
+
|
|
25
|
+
# { actions:, truncated: } for the trace at `path`, or nil when there
|
|
26
|
+
# is none.
|
|
27
|
+
# : (String) -> Hash[Symbol, untyped]?
|
|
28
|
+
def self?.read: (String) -> Hash[Symbol, untyped]?
|
|
29
|
+
|
|
30
|
+
# : (String) -> Hash[Symbol, untyped]
|
|
31
|
+
def self?.parse: (String) -> Hash[Symbol, untyped]
|
|
32
|
+
|
|
33
|
+
# : (Hash[String, untyped], Hash[String, untyped], Hash[String, untyped]) -> Hash[Symbol, untyped]
|
|
34
|
+
def self?.action: (Hash[String, untyped], Hash[String, untyped], Hash[String, untyped]) -> Hash[Symbol, untyped]
|
|
35
|
+
|
|
36
|
+
# : (String, String) -> String?
|
|
37
|
+
def self?.zip_entry: (String, String) -> String?
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|