nodejs/node · error · Exception
results_regexp at the wrong level. Regexp should not contain
Error message
results_regexp at the wrong level. Regexp should not contain '%%s': results_regexp='%s' name=%s
What it means
LeafTraceConfig represents a leaf of the suite tree; its results_regexp must be fully resolved (no `%s` placeholder). A `%s` here means a parent-level templated regexp leaked into a leaf un-substituted — i.e. the regexp is at the wrong tree level.
Source
Thrown at deps/v8/tools/run_perf.py:459
def __init__(self, suite, parent, arch):
super(VariantConfig, self).__init__(suite, parent, arch)
assert "variants" in suite
for variant in suite.get('variants'):
assert "variants" not in variant, \
"Cannot directly nest variants:" + str(variant)[:100]
assert "name" in variant, \
"Variant must have 'name' property: " + str(variant)[:100]
assert len(variant) >= 2, \
"Variant must define other properties than 'name': " + str(variant)
class LeafTraceConfig(GraphConfig):
"""Represents a leaf in the suite tree structure."""
def __init__(self, suite, parent, arch):
super(LeafTraceConfig, self).__init__(suite, parent, arch)
assert self.results_regexp
if '%s' in self.results_regexp:
raise Exception(
"results_regexp at the wrong level. "
"Regexp should not contain '%%s': results_regexp='%s' name=%s" %
(self.results_regexp, self.name))
def AppendChild(self, node):
raise Exception("%s cannot have child configs." % type(self).__name__)
def ConsumeOutput(self, output, result_tracker):
"""Extracts trace results from the output.
Args:
output: Output object from the test run.
result_tracker: Result tracker to be updated.
Returns:
The raw extracted result value or None if an error occurred.
"""
View on GitHub (pinned to 1b2de5e052)
Solutions
- Replace `%s` in the leaf's results_regexp with the literal name (or a concrete regex).
- Move the templated regexp up to the parent so the leaf inherits an already-substituted regexp.
Example fix
// before (leaf) "results_regexp": "%s\\.Runtime: ([0-9]+)" // after "results_regexp": "MySuite\\.Runtime: ([0-9]+)"
Defensive patterns
Strategy: validation
Validate before calling
# When defining a leaf suite, ensure the regexp is fully resolved.
assert '%s' not in leaf_regexp, (
f'leaf results_regexp must not contain a %s placeholder: {leaf_regexp!r}') Type guard
def is_resolved_leaf_regexp(r):
return isinstance(r, str) and '%s' not in r Prevention
- Don't copy parent-level templated regexps onto leaves.
- Add a suite-config presubmit that flags %s in leaf results_regexp.
When it happens
Trigger: A leaf suite whose resolved results_regexp literally contains the substring `%s`.
Common situations: Copy-pasting a parent-level templated regexp onto a leaf; missing an intermediate VariantConfig/GraphConfig layer that would have substituted the placeholder.
Related errors
- Got error while preparing results_regexp: parent.results_reg
- %s cannot have child configs.
- `${baseKey}` is not a valid npm option
- The `${baseKey}` option is deprecated, and cannot be set in
- The ${key} option is protected, and cannot be retrieved in t
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/ac5c6a1d768fefbc.
Report an issue: GitHub.