Skip to content

Safety and limitations

CukeDedup analyzes repositories that may contain malformed or adversarial input. It does not execute project configuration, imported modules, package scripts, matchers, or test code. Explicit resource limits keep failures visible and bound the work performed.

  • The minimum supported Rust version is 1.100.
  • Node.js 24 LTS is recommended for the npm launcher. CI also tests Node.js 20 as the minimum compatible version; Node.js 20 has reached end of life upstream.
  • Source adapters cover JavaScript and TypeScript, including JSX and common module variants. Experimental Cucumber-Ruby discovers conventional suites by default, compares coexisting Ruby and Cucumber.js suites separately when ownership is clear, and supports explicit selection for other layouts. Its supported subset and completion gaps remain separate from JS/TS support.
  • Unsupported source languages are rejected rather than guessed.
  • Classic Gherkin and Gherkin Markdown are supported, including declared Gherkin dialects.
  • Before version 1.0, configuration and machine-report schemas may evolve between minor releases.
  • Dynamic framework configuration may require explicit features or definitions patterns.

  • Jest-Cucumber setup provenance is limited to statically resolved inline synchronous callbacks and immutable aliases. Unmodeled setup, including autoBindSteps, named/escaped callbacks, generators, async callbacks, and dynamic properties, remains incomplete. Its positional steps are excluded from global matcher and feature-usage rules. Vitest support covers the ESM vitest-cucumber-plugin package, not the separate @amiceli/vitest-cucumber API. See supported registrations.

  • Named handlers declared in the same file resolve to their bodies. Imported or unresolved handler references remain usable for matcher and usage rules but are not compared by name.

  • JS/TS parse failures retain error-recovered definitions and warn as incomplete by default. --fail-on-unparseable makes those failures fatal; --fail-on-incomplete rejects all incompleteness. Unsupported regex constructs warn; malformed matcher escapes are operational errors.

  • Extension routing never retries a file with another grammar. The pinned JavaScript 0.25 and TypeScript/TSX 0.23 grammars reject some valid syntax: typed tagged templates (styled.button<{…}>`…`), export type * as … from, function-type parameters named after predefined types ((string) => void), call type arguments containing typeof import(…), import(…).Type[], chained assertions such as as unknown as (typeof module)["key"], bare & or decimal character references longer than five digits in JSX, and JSX attributes named in in .js. Flow, pipeline proposals and removed assert { … } import assertions are unsupported by design. Unparseable modules never supply trusted registration exports. Recovery may retain other registrations, but the run remains incomplete.

  • Lowercase given/when/then are recognised through resolved imports, such as const { given } = createBdd(test) with an imported Playwright-BDD factory, or through proven Jest-Cucumber scenario callbacks, such as test('scenario', ({ given }) => { … }) inside defineFeature. They are never assumed to be ambient globals. A bare lowercase call with neither origin registers nothing. Name it in the registrations configuration (see configuration.md) to explicitly enable it as a global registration.

  • Analyze independent monorepo packages separately. See the supported mixed-suite exception in Corpus boundaries.

  • Regular expressions are matched against feature steps but are never reversed into invented overlap witnesses.

  • Bounded fuzzy indexes preserve a deterministic sample in highly repetitive vocabularies but do not promise every possible pair after a work limit is reached.

  • A handler produced by calling a generator function, such as Given('a step', (function* () { … })()), is not compared. Calling a generator returns a suspended object and never runs the body, so the registered handler is that object rather than a function and its assertions never execute. Treating the suspended body as the handler’s behaviour would invent meaning the code does not have, so each such registration warns that the handler cannot be compared statically and is excluded from handler rules.

  • Parentheses, as, satisfies, ! and <T> around a matcher or handler are removed before analysis, because they do not exist at runtime. The handler is the last argument, past an options object. A function, name, member, subscript or call there is a definition; one that does not resolve to a body is not compared, and an unresolved call also warns. Any other shape, a spread or conditional for example, and a registration with no handler, yield no definition and mark analysis incomplete. So does a function followed by another candidate, because frameworks disagree on which one runs: Cucumber runs the function and Playwright-BDD the last argument.

When analysis is incomplete, existing findings remain valid but the absence of a finding proves nothing. Machine reports expose the incomplete or truncated status. Pass --fail-on-incomplete when CI must reject degraded analysis.

Configuration and ignore files that CukeDedup finds on its own are read only when they resolve to a regular file inside the analysis root. A file that is a link, or sits under a linked directory, whose target is outside the root fails the run with exit 2 before any of its content is read. The check assumes no other process changes links under the root while the run reads them. Links that stay inside the root are followed. An explicit --config file may be outside the root. Ignore files in the root’s parent directories and the global git excludes file apply as git applies them.

Global git excludes remain exempt from containment regardless of their configured location; the ignore-file byte limit still applies.

Input Limit
Definition source, feature file, imported registration module, or baseline 8 MiB each
Package, CukeDedup, framework, or static project configuration 1 MiB each
Ignore file (.gitignore, .ignore, .cuke-dedupignore, git info/exclude, global git excludes) 1 MiB each
Project-resolution metadata files 1,024 files / 16 MiB total
Project-resolution mappings 16,384
Primary discovery walk entries, excluded entries included 1,000,000 per run
Selected feature and definition files 100,000 per run
Selected feature and definition source 512 MiB per run
Primary discovery glob evaluations 64,000,000 per run
Workspace discovery entries 100,000
Changed-file listings 100,000 path records / 16 MiB total
Static dependency candidate probes 1,000,000 per Ruby load walk or JS/TS resolver
Content-classification prefix per discovered source 64 KiB
Imported registration modules 1,024 modules / 64 MiB total
Ruby files reached only through require/require_relative 1,024 files / 64 MiB total
Ruby provider and assertion proofs (selected plus loaded Ruby files) 1,024 files / 64 MiB total
Ruby registration proof work 1,000,000 units per proof pass; load resolution 1,000,000 units across all passes
Ruby assertion proof work 1,000,000 units
Memoized module path/depth states 16,384
Memoized module resolutions 16 MiB
JS/TS handler fingerprint work 64 MiB of source-byte charges per extraction session

Primary discovery limits cover the current tree and a --baseline-from-ref tree together. An excluded directory costs one entry and is not entered; entries removed by ignore files or the hidden filter are not counted. Source bytes are each file’s size up to the 8 MiB read limit, taken from metadata before any file is read. Exceeding any primary discovery limit stops the run with exit code 2 and writes no report; exclude generated or vendored directories or narrow the features and definitions globs.

JS/TS handler fingerprinting charges each registration for its handler syntax, bound arguments and repeated enclosing declarations. Repeated local helper and compound call analysis use the same allowance. The allowance is shared across files in the extraction session. When the allowance runs out, later definitions retain their matchers and report incomplete handler comparisons.

Changed-file mode counts both Git listings together, including repeated names and the full retained paths. Exceeding either limit stops the command with exit code 2 before reporting.

Resolution confines imports and package targets to canonical analysis or package roots and shares cached work between importing files. A registration module, package manifest, importer’s nearest project configuration or workspace scan that fails is reported again to each later importer without being read or scanned again or charged against the byte, file and mapping limits. A module path/depth state is charged only when an import resolves to a module whose exports are not cached at that depth. A failed module’s exports are never cached, so each import of it charges a new state, and once the module limit is reached it reports that limit. A read error is not kept, and a failed base configuration reached through extends is loaded again from each configuration that extends it. Reaching the memoized module resolutions limit makes later imports resolve again. Those replays consume the same candidate allowance as new resolutions. Candidate probes count misses and include static project and package metadata lookups. A refused probe marks resolution incomplete while completed resolutions remain valid.

Selected Ruby definition files are not charged against the Ruby load limit. A load that would exceed it is not followed, and later new loads are refused too: analysis is marked incomplete at each refused load, the message names the limit, and Ruby unused-definition findings are withheld. A selected Ruby file that cannot be read loses only its own loads; extraction reports the file. Ruby counts native-library candidates and missing Ruby files before following a load. Exhaustion stops further probing, preserves known edges, and makes usage analysis incomplete. Configured assertion-provider aliases use a separate allowance and lose provenance if that allowance is exhausted.

Ruby provider and assertion proofs read every selected and loaded Ruby file. Above their limit the proofs are unavailable: registrations that depend on them are untrusted across the suite and the warning names the proof limit. Suites that use only direct step registrations are unaffected.

  • JavaScript and TypeScript extraction skips a registration and marks analysis incomplete if its regex pattern or flags exceed 1 MiB, or if resolving a handler argument requires following more than 64 bound calls.
  • A matcher pattern or compiled program is limited to 1 MiB. Matching compiles a matcher inside its matcher set, without capture groups; a matcher that fits in no set is compiled alone, with them. Ruby regex conversion also checks the program alone.
  • Each matcher receives a 2 MiB lazy-DFA cache.
  • Oversized matcher sets split recursively into bounded sets rather than falling back to a full definition-by-step loop.
  • Gherkin Markdown conversion collects at most 10,000 ambiguous candidates, performs at most 128 parser probes, and parses at most 64 MiB of synthesized input.
  • Default-English bullets use exact Gherkin keyword filtering and one whole-document probe.
  • Dialect-dependent candidates use a whole-document retry only within the cumulative byte budget; larger inputs use bounded 32-item restoration batches.
Work Limit
Direct feature matcher automaton scans 64,000,000
Emitted direct feature matches 64,000,000
Retained direct feature matching cache 64 MiB before complete-batch recomputation
Unique definition comparisons and static overlap pairs 2,000,000
Structural proposals per handler class 250,000
Raw overlap witness proposals Four times the remaining unique-pair budget
Overlap witness index scans Four times the configured unique-pair limit
Retained overlap findings 10,000
Retained unused-definition findings 10,000 records / 16 MiB of retained evidence
Retained pair / static-overlap evidence 16 MiB each
Trigram keys per definition / per run 4,096 / 250,000
Matcher-blocking posting proposals 2,000,000
Combined handler events 10,000,000
Pairwise or overlap suppression work 100,000,000 units each
Ambiguous-step and unused-definition suppression work 100,000,000 units shared per run
Unmatched-suppression advisory work 10,000,000 units
One matcher-edit or handler-LCS matrix 100,000,000 estimated units
Aggregate verification and evidence work 1,000,000,000 units

Project configuration and CLI flags may lower candidate and structural limits but cannot raise the hard ceilings. Matcher similarity is evaluated before reserving expensive handler-LCS work.

Direct feature matching charges each regex-set or fallback-regex scan separately from each emitted definition match. The cache-fitting path scans all distinct texts once. If retained authoritative match rows would exceed 64 MiB, CukeDedup recomputes complete text batches and releases each batch before continuing; discarded overflow attempts and their smaller retries each consume work from the same allowances. If either CPU allowance is exhausted, findings from completed batches remain available, the run is marked incomplete, unused-definition findings and static overlap are disabled, and no partial row becomes a finding or proof. A retained outline location with unresolved values reports its known expansion count as a lower bound with an identity distinct from a complete count.

Ruby indirect usage has independent limits of 64,000,000 automaton scans and 64,000,000 emitted matches per analysis. Exhaustion disables unused-definition reporting and marks the run incomplete. Complete direct findings remain available.

Ambiguous-step and unused-definition share one suppression work allowance. A refused lookup omits the affected finding and ends that rule’s sweep. An ambiguity lookup refusal also disables unused-definition reporting and skips static overlap. Complete admitted findings remain available and the run is marked incomplete.

Fuzzy matcher discovery uses collision-free, fixed-width, case-folded character trigrams with digit runs normalized. Unsaturated posting lists are fully considered. Lists above 256 definitions use deterministic lexical neighbors instead of quadratic expansion. Candidates must be capable of reaching the 50% handler-behavior gate and—unless structurally equivalent—share a canonical call action.

Reaching a candidate-generation or verification limit preserves evaluated findings, warns, and sets analysis.truncated: true with a nonzero skipped count. Exit status follows finding severity unless --fail-on-incomplete is enabled. Baselines are never updated from incomplete analysis.

When the unused-definition evidence limit is reached, the tool keeps the findings it has admitted and marks analysis.truncated: true. Use --fail-on-incomplete to make this an operational failure.

Reports bound source snippets and cluster memberships, escape HTML, and encode script-closing JSON characters. Human-readable fields show Unicode 17 default-ignorable characters as \u{hex} escapes within the existing text budgets. This makes otherwise invisible formatting visible and can change how emoji and scripts appear. Exact artifact URIs and machine identities retain their original text. JSONL content originates in the analyzed repository and must be treated as untrusted data.

Diagnostics on stderr and the Action’s own messages escape Unicode 17 default-ignorable characters, control characters and U+2028/U+2029. Line breaks and tabs use \n, \r and \t. Other escaped characters use \u{hex}, such as \u{1b} and \u{202e}. Each diagnostic stays on one line that starts with cuke-dedup or error:. Literal backslashes pass through.

Warnings, errors, and discovery explanations each keep up to 4,096 details and 1 MiB of escaped lines, plus one line to indicate omitted details. Long details are sampled before escaping. Omitted error details still cause an operational failure.

See Reports for presentation limits and Discovery and frameworks for corpus-completeness rules.