Skip to content

fix: batch 2026-11-09 — hook timeout seam, Elixir atom operators and excludes, Python continuation docstrings, Java/Groovy record headers - #1862

Merged
dekobon merged 10 commits into
mainfrom
fix/batch-2026-11-09
Nov 10, 2026
Merged

dekobon merged 10 commits into
mainfrom
fix/batch-2026-11-09

Conversation

@dekobon

@dekobon dekobon commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Batch fix of five issues (/batch-fix --sequential 1857 1859 1858 1830 1842), followed by simplify-rust, rust-optimize and audit-tests passes and a six-review remediation round. History is rebased to ten linear commits: one per issue with its review follow-ups folded in, three cross-cutting commits, the CHANGELOG reconciliation and the lessons.

Closes #1857, closes #1859, closes #1858, closes #1830, closes #1842.

Commits

Commit Scope
a4486473 test(hooks) #1857 — run() takes its budget as an argument; only the analyzer check passes runTimeout(env) (BCA_HOOK_TIMEOUT_MS, decimal digits 1..=2_147_483_647, default 3 s); git, --version probes and taskkill keep 3 s. Fixtures 15 s / hang tests 1 s; inherited-pipes test driven by supersession; failed plugin tests dump captured console output; a preload-recorded setTimeout spy pins which budget each spawn armed.
c68b11aa chore(roles) #1859 — Elixir StringLit row records bare atom/keyword (and hidden _atom/_keyword) as excludes; four coverage-baseline debt lines retired.
02823738 fix(halstead) #1858 — E::COLON under a QuotedAtom parent is not an operator, so :"q", "q" and :q bill alike; n1/N1 −1 per quoted atom.
ccd32112 fix(loc/python) #1830 — line_continuation is a named extra; one not_extra predicate at the four AST selectors, the LOC copy replaced by the exported helper; the bare-run finder steps over the string's own ( and inner (…) and reads on to code/comment/row end. ( \/\/# c/"""doc""" ) → (4,0,4,0); () gone from ops; __init__( \ credits DLOC. New width probe.
23143238 fix(nargs) #1842 — Java formal_parameters / Groovy record_components under a record open a Function space named after the record unless the body writes a canonical (name + arity + pairwise type as non-comment tokens) or compact constructor; alternatives never suppress it. text_gated_by; byte-less forwards answer false for the header by design; is_func_with_code overridden; opener_gated macro arms; holds_doc_comment_in_body excludes the header explicitly; interface-member records are public in npm. Groovy grammar limits (compact ctor, public record, untyped components, varargs) documented and pinned.
03290319 refactor(getter,npm) func_space_name_from_owner shared by C#/Java/Groovy; has_public_modifier in impl_npm_java_like!.
e26125ad refactor(tests,getter) rust-optimize pass: check_gated test helper, probe-test helper, small tidies (−44 net lines).
abf7841a test audit-tests fixes after a 19-mutant sweep, plus the two reachable Codecov misses (int a[] dimensions spelling; parameterless __init__( \).
867c0f3c docs(changelog) #1828 and #1830 entries reconciled with the final branch.
cdd5e5b4 docs(lessons) Lessons 119–121 and two testing.md subsections; the Claude probe-budget test redesigned to read armed budgets instead of a reason string.

Verification

Reviews

Checkpoint astra-review after waves 1–3 and after #1830; then six whole-branch reviews (review, code-review --effort max, algorithmic performance with synthetic worst cases, under-reviewed areas, astra-review, architecture). Every actionable finding is fixed and folded into the commit it concerns; astra-review re-reviewed the remediation and the lessons and confirmed each of its findings resolved. Deferred to #1863: Checker's default forward direction (with-code → byte-less, the root cause of the gate bug this branch fixed in #1842), the three byte-less is_func contracts, a byte-axis backstop test, a record_header() projection helper, a per-record gate memo and record width probe, a Python depth×width paren probe, small test tidies.

Not verified here

Windows and macOS legs of the hook tests run only in CI (Linux host); the redesigned probe-budget test is first exercised there on this push.

@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.53184% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.40%. Comparing base (051bc03) to head (cdd5e5b).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
big-code-analysis-ast/src/roles/java.rs 96.93% 2 Missing and 1 partial ⚠️
big-code-analysis-ast/src/roles/groovy.rs 95.55% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1862      +/-   ##
==========================================
+ Coverage   98.38%   98.40%   +0.01%     
==========================================
  Files         400      400              
  Lines      122484   123418     +934     
  Branches   122049   122983     +934     
==========================================
+ Hits       120504   121445     +941     
+ Misses       1250     1245       -5     
+ Partials      730      728       -2     
Flag Coverage Δ
python 100.00% <ø> (ø)
rust 98.39% <99.53%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
big-code-analysis-ast/src/checker.rs 96.79% <100.00%> (+<0.01%) ⬆️
big-code-analysis-ast/src/checker/groovy.rs 100.00% <100.00%> (ø)
big-code-analysis-ast/src/checker/java.rs 100.00% <100.00%> (ø)
big-code-analysis-ast/src/getter.rs 95.81% <100.00%> (+0.10%) ⬆️
big-code-analysis-ast/src/getter/csharp.rs 100.00% <100.00%> (ø)
big-code-analysis-ast/src/getter/elixir.rs 95.89% <100.00%> (+0.11%) ⬆️
big-code-analysis-ast/src/getter/groovy.rs 97.87% <100.00%> (+0.09%) ⬆️
big-code-analysis-ast/src/getter/java.rs 100.00% <100.00%> (ø)
...-code-analysis-ast/src/lang_helpers/doc_comment.rs 99.27% <100.00%> (+0.03%) ⬆️
big-code-analysis-ast/src/lang_helpers/python.rs 97.29% <100.00%> (+0.32%) ⬆️
... and 14 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dekobon added a commit that referenced this pull request Nov 10, 2026
Codecov on PR #1862 read 98.89% patch coverage with nine lines
missing, all in the #1842 gate and the #1830 selector. Two of the
nine are reachable from valid source and had no test:

- `java_parameter_type`'s `dimensions` arm: `int a[]` is `int` plus
  `[]`, the type `int[] a` spells, so a constructor written that way
  is canonical (JLS 8.4.1) — row `D` — and `int a[][]` one dimension
  more is an alternative — row `Z`.
- `first_parameter_name`'s `?` on an empty parameter list: a
  `def __init__( \` + `):` with no receiver names nothing, so the
  `self.x` below it is no instance attribute and DLOC stays 0.

Both rows fail with their expectation flipped. The seven remaining
lines are the gates' `return` defaults for a tree with a missing
`parameters`, `body` or `components` field or a parentless list —
grammar recovery no valid or recovered input reaches — and stay
untested rather than tested through a hand-built tree.
dekobon added a commit that referenced this pull request Nov 10, 2026
…ads its budget

Lessons 119 to 121, each drafted from PR #1862 and the incident
before it and checked against the code and the GitHub record:

- 119: a grammar whose `extras` holds a named non-comment node
  (tree-sitter-python's `line_continuation`) passes every
  `is_named() && kind != Comment` selector; five such sites, one
  predicate (#1830).
- 120: a role-row gate that reads bytes but is declared `gated_by`
  leaves `TEXT_GATED` false, so the byte-less forwards' compile-time
  asserts trust the declaration and hand it `&[]`; the chain axis has
  a behavioural backstop, the byte axis none (#1842, #1863).
- 121: a commit whose parent is the current tip can carry the old
  contents of files the tip changed as its own edit; ancestry says
  nothing, the PR's own diff does (PR #1844 over PR #1843, #1828).

`docs/development/testing.md` gains two subsections under "Fixture
shapes that cannot fail": a fixture that intercepts output prints it
when the test fails, and two correct outcomes separated by a clock are
one flake. The second describes the Claude hook's probe-budget test,
which this commit redesigns to match: the fixture's preload wraps
`setTimeout` and records the budget `run()` arms after each spawn, so
the test asserts a `--version` probe arms 3000 and the analyzer run
the override, instead of reading a reason string that a slow digest
start flips and a leaked override could hide behind. A leaked
override, a leaked override under a 1.2 s digest delay, and a check
that stops arming the override each fail it; it passes unmutated in
about 80 ms with no stalled probe.

Reviewed twice by astra-review; the first draft's claim that a squash
merge wrote a stale tree did not survive the record and is retracted
in the entry.
`test (windows-latest)` failed once in the plugin tests with
`advice(e)` undefined on a test that does not touch timeouts. Every
fixture run spawns the stub analyzer as a fresh Node process through
`run()`, which stops a child after 3 s and reports TIMEOUT; the plugin
counts that as unavailable and attaches no advisory, and the fixture's
console mocks kept the reason off the CI log. A cold start crossing
3 s on a loaded Windows runner fits the 5.3 s test duration. Not
reproduced on Linux.

`run()` takes its budget as an argument. The one caller that runs the
analyzer check passes `runTimeout(env)`, which reads
`BCA_HOOK_TIMEOUT_MS` from the environment it is given when that is a
string of decimal digits in `1..=2_147_483_647` (Node clamps a larger
delay to 1 ms) and `TIMEOUT` otherwise; `checkout()`'s git call, the
`--version` probes and the Windows `taskkill` budget keep `TIMEOUT`,
so a shell that exports the variable moves one term of a real hook's
time, not three, and the 15 s Claude Code allows still holds. Both
test suites set 15 s for ordinary runs and 1 s for the hang tests
only; the overflow and inherited-pipes tests stay on the fixture
budget, the latter driven by supersession rather than a timer so a
slow wrapper start cannot fail it. Environment restoration is
registered before the first mutation. A failed plugin test prints the
console output its fixture captured, so the next flake names its exit
reason.

New tests: a `setTimeout` spy pins the budget `run()` arms for a
1 s stub under a 250 ms override and under the fixture's; a
preload-recorded spy in the Claude suite pins that a `--version` probe
arms 3000 and the analyzer run the override, read off the armed timer
rather than the hook's reported reason, which a slow digest start
flips; `runTimeout()` is 3000 for unset, empty, non-numeric,
fractional, zero, negative, oversized and padded values. With the
override neutralised the spy tests fail.

Fixes #1857
#1856 claimed `quoted_atom` and `quoted_keyword` on the Elixir
`StringLit` row and rejected the bare `atom` / `keyword` tokens, but
the rejection lived only in the row comment; the four kinds — `atom`
(14), `keyword` (34), `_atom` (131), `_keyword` (160) — stayed as
unexplained debt in `.role-coverage-baseline.txt`.

The row now records the decision where the coverage gate reads it:
`excludes [Atom, Keyword, Atom2, Keyword2]`, each with its reason (a
single token with no quoted body that the getter bills as an operand on
its own; the two hidden `_atom` / `_keyword` choices reach no node).
The row comment keeps only the Ruby `simple_symbol` contrast the
strings do not say. `check-role-coverage.py --update` retires exactly
the four lines; the census and bypass baselines do not move, and no
emitted predicate changes.

Also a note beside `BOUNDARY` in `utils/check-role-bypass.py` naming
`src/metrics/loc/` and `src/metrics/nargs.rs` as outside it by design,
pointing at the fuller statement in `roles/mod.rs`.

Fixes #1859
tree-sitter-elixir's `quoted_atom` is `seq(":", …)` with a standalone
`:` leaf, where the bare `atom` is one `token(seq(":", …))` whose `:`
reaches no arm and Ruby's `:"a b"` symbol opens with a single `:"`
leaf its getter bills nothing for. So `a = :"q"` billed `:` and `=`
while `a = :q`, `a = "q"` and Ruby's `a = :"q"` billed only `=` — the
same value scored by spelling and by language, the shape #1256
removed for sigil delimiters. Guard `E::COLON` on a `QuotedAtom`
parent, the compound-leaf guard of grammar-dispatch §5. The grammar
spells a standalone `:` leaf nowhere else, so the fall-through to the
operator arm is reachable only through error recovery, and the comment
says so.

N1 falls by one per quoted atom, η1 by one where quoted atoms were a
file's only `:` operators, MI with the Halstead volume. A
`quoted_keyword`'s trailing `:` is the grammar's own
`quoted_keyword_token1` kind, not `COLON`, and was never billed. No
integration corpus holds a quoted atom; no snapshot moves. Sibling
sweep: of the supported languages only Ruby has a quoted symbol, and
its opener is one leaf (dump-verified). bench-scaling: all probes
within bound.

The new arm's guard comment is one more rustfmt bail in
`getter/elixir.rs` (baseline 3 → 4), and `get_op_type`'s
`halstead.effort` record is refreshed with
`make self-scan-write-baseline-headroom`.

Fixes #1858
tree-sitter-python keeps a `\` + newline as a *named* `line_continuation`
extra, and every selector of "the first real child" skipped only the
other extra, the comment. The value of `( \` / `\` / `# c` /
`"""doc""" )` was read as the first `\`, so the parentheses were not the
docstring's (#1610): their rows and the bare `\` row were PLOC and
Halstead billed `()`. The same filter in `__init__`'s parameters made
`def __init__( \` resolve no receiver (no DLOC for its attribute
docstrings), and in the statement-sibling scans a bare `\` row joining a
comment between two statements ended a docstring run.

One `not_extra` predicate in `lang_helpers/python.rs` now serves
`unparenthesized_once`, `first_parameter_name`, `documentation_run` and
`python_documentation_string_run`; `python_is_bare_string_statement` is
exported from the AST crate and the LOC copy of the selector deleted. In
the LOC walk the `\` finder takes the string's own `(` as a holder, and
a run before the string steps over an inner parenthesis of the string's
as it steps over a `)`, reading on to the code, comment or row end that
follows — so `(` / `\` / `("doc")); x=1` reads its joined row as code,
`(3, 2, 2, 0)`, like its after-string twin. The run's own next token
tells the two sides apart, so the per-parenthesis memo stays
position-independent and no byte position needs caching.

PLOC/CLOC move for files with this shape, DLOC for the `__init__( \` and
continued-comment shapes, and `()` leaves the operator list; no corpus
snapshot moved. New width probe `loc/python-bare-runs-before-string`
prices the memoised descent across the prefix: 1.02 with the memo, 2.08
without.

Fixes #1830
A record whose canonical constructor is implicit declared its
components and reported `nargs` 0 with no function space, so
`bca check --threshold nargs=5` passed a six-component record. #1160
had kept such a record at 0 as "generated code" and counted the
components only on a compact constructor; #1828 then scored C# and
Kotlin primary constructors, whose component list is the same
declared construct. The component list is declared code, and the
user-approved decision on #1842 is to count it.

The `FuncOpener` row of `roles/java.rs` gains
`FormalParameters(callable opens Function text_gated_by
opens_record_header)` and `roles/groovy.rs` the same on
`RecordComponents`: the list is the record's header — its
`parameters` / `components` field, a sibling of the body — and opens a
space named after the record exactly when the body writes no canonical
constructor. One owner in every combination: implicit → the header;
compact → the compact constructor (#1160's `params_owner` redirect,
which now also returns the record for a gated header so Java keeps the
default `NArgs::compute`); normal canonical → that constructor; an
alternative constructor is a callable of its own and never closes the
header. The normal form is recognised per JLS 8.10.4.1 by name, arity
and pairwise declared type, the type compared as its non-comment
tokens with whitespace removed (names and annotations do not take
part; a comment inside a generic argument, inside `dimensions`, or
between a variable-arity parameter's modifiers and its type is no
token; `int a[]` spells `int[]`). A respelled type such as `List<T>`
for `java.util.List<T>`, or a type-use annotation, reads as an
alternative, a documented limit.

The gate reads the body's bytes and the chain, so it is
`text_gated_by`, not `under`, and the row's `TEXT_GATED` holds the
byte-less forwards to that: `is_func_with_code` is overridden in both
checkers to read the row with bytes, the byte-less `is_func`,
`is_func_space` and `get_space_kind` forward a known-empty chain so
the header answers `false` there by design (pinned by
`*_byte_less_spellings_omit_the_record_header` and named in
`KNOWN_DISAGREEMENTS`), the `opener_gated` arms of
`impl_byte_less_func_space!` / `impl_byte_less_space_kind!` assert
the opener is gated, and `holds_doc_comment_in_body` excludes the
header kind explicitly rather than through the forward's dropped
context. The shared pieces live once: `ParameterType`,
`node_bytes_sans_whitespace`, `Iterator::eq` for the comparison.

Moves for such a record: `nargs` on a new `R::R` function row, one
more callable in `nom`, `wmc` and `npm` (public exactly when the Java
record is, by its own `public` or as an interface member; never in
Groovy, whose grammar carries no modifier on a record), and the space
tree in `bca ops` / `bca metrics` / `functions` / `to_sarif`. `npa`
and ABC do not move. Groovy's pinned grammar does not parse a compact
constructor (the record then has no body in the tree and its members
read at file level), parses `public record` as a method, recovers an
untyped component list as one component, and misreads a variable-arity
component; each is named in the book and pinned by a test.

Baselines: `.role-coverage-baseline.txt` drops the two kinds now
claimed; `.bca-baseline.toml` moves with `nargs.rs`, `checker.rs` and
`roles/mod.rs`. No corpus snapshot holds a record, so the output
submodule is unchanged.

Fixes #1842
Three getters (C#'s primary constructor, #1828; Java's and Groovy's
record header, #1842) each spelled "a type's own parameter list takes
the type's name" inline; `func_space_name_from_owner` in `getter.rs`
now carries the rule once, each language passing the `(list, owner)`
kind pair it recognises. `impl_npm_java_like!` asked "does this
declaration spell `public` in its `modifiers`" two ways, once for the
record header and once for a body member; one `has_public_modifier`
inside the macro body answers both. Two trailing comments in
`loc/python.rs` name why a `)` and an inner `(…)` are stepped over and
why the string's `(` can hold a run's `\` (#1830). Findings of the
simplify-rust pass over the batch.
The approved items of the rust-optimize review of the #1842 / #1830
batch. Behaviour is unchanged; every test asserts what it did.

1. `space_tree_tests.rs`: `groovy_space_tree_rows` re-implemented
   `check` to read `is_func_with_code` and to collect the
   `record_components` rows for a by-value assertion. The shared body
   is now `check_gated`, which reads the `_with_code` callable
   spelling, returns the nodes of the `gated` kind with their text,
   and compares the byte-less `(is_func, is_func_space,
   get_space_kind)` triple on every other node — for the ten
   languages on `check`, `is_func_with_code` is the default forward
   to `is_func`, so the widened assertion holds by construction and
   was confirmed by running them. `check` is the wrapper with no
   gated kind. `groovy` is back on the `OpensSpace` and helper
   cfg lists; `make check-test-lang-gates-compare
   COMPARE_REF=origin/main` reports no test lost a build.

2. `big-code-analysis-bench/src/shapes.rs`: the two parenthesised
   bare-run probe tests of #1819 / #1830 were verbatim copies
   differing in probe name and reading formula; both now call
   `python_parenthesised_runs_probe_reads(name, reading)` and keep
   their names and doc comments.

4. `src/metrics/npm.rs`: the record-constructor rows read
   `name.as_deref().unwrap_or_default()` so the expected rows are
   `&str` literals; the Java closure is a nested `fn` because a
   closure cannot tie its return borrow to its argument.

5. `src/metrics/halstead.rs`: the quoted-atom operator test collects
   its unique operators into a `BTreeSet<&str>` (the file's own
   precedent) instead of `HashSet` → `Vec` → `sort_unstable`.

7. `big-code-analysis-ast/src/roles/java.rs`: the classifier test's
   all-false `none` row is bound once above the walk and read by the
   table's `map_or` and the two literal uses.

8. `big-code-analysis-ast/src/getter.rs`:
   `func_space_name_from_owner` picks the owner or the node first
   (`Node: Copy`) and calls `default_func_space_name` once. `bca
   metrics --metrics nargs,nom` on the C# primary-constructor and
   Java record-header probes is byte-identical before and after
   (`R::R`, `C::C`; `R::R nargs 6`).

Skipped from the review: item 3 (the `ParameterType` struct was
introduced by the simplify pass to name the `bool`) and item 6 (the
`ops.rs` loop has no in-file precedent).

Refs #1842, #1830.
Three auditors ran the branch's new tests against mutants of the code
they pin. Fixed where a test passed for the wrong reason:

- nargs (#1842): the canonical-constructor test never exercised the
  variadic axis (a `variadic: true → false` mutant survived); a `U`
  row with `int... xs` against `int x` catches it. The Groovy
  one-owner test's `start_line == 2` pin could not tell the header
  from a constructor on the same line; the constructor now sits on
  its own line.
- halstead (#1830, #1858): fixture 6 was an #1825 shape (the scanner
  eats a `\` before a string start, so no `line_continuation` exists
  and the #1830 path is never reached); replaced with one that holds
  two, the old shape kept as a labelled control. The Elixir
  cross-check compared the distinct vocabulary to N1, which only held
  because no fixture repeats an operator; it compares n1 now.
- loc (#1830): a CRLF row whose row end lies on the new tail-walk
  (`(\r\n` / `\\\r\n` / `("""doc""")\r\n` / `)\r\n`), the one shape
  that fails when `at_row_end` stops reading `\r`; the earlier CRLF
  and no-EOF rows were parity copies of their LF twin. Control rows
  relabelled with the values the pre-fix code measured.
- doc_tests (#1830): `one_scan_per_run` gains a `\` + `# c` between
  two run members, the only observer of the
  `python_documentation_string_run` look-ahead, which a comment-only
  skip there left uncaught workspace-wide.
- hooks (#1857): the inherited-pipes test required the wrapper's Node
  cold start to beat the 1 s short budget — the runner class the
  issue describes fails it; readiness is now bounded by the fixture
  budget and the kill is triggered by supersession. The hang test
  gets a 60 s bound so an ineffective kill fails instead of hanging.
- bench probe doc and `rationale`: the bare rows read as comments
  before #1830 too; the two parenthesis rows are what moved
  (`2 × width + 1` → `2 × width + 3`).

Codecov then read 98.89% patch coverage with nine lines missing; two
were reachable from valid source and are covered here: the `dimensions`
arm of `java_parameter_type` (`int a[]` is `int[]`, row `D`; `int
a[][]` one more, row `Z`) and `first_parameter_name`'s empty parameter
list (`def __init__( \` + `):` names no receiver, DLOC 0). The seven
remaining lines are the gates' `return` defaults for a tree with a
missing field or a parentless list, grammar recovery no valid or
recovered input reaches, and stay untested rather than tested through
a hand-built tree.
The #1828 entry still said a Java or Groovy record with no compact
constructor reads 0 and that the book's `nargs` zero list names it;
#1842, above it in the same section, counts the record's components
on its header and the zero-list bullet is gone, so the entry now reads
"until #1842, above", as the #1816 entry was amended for #1858. The
#1830 entry names the inner-parenthesis case its fix covers: an inner
`( … )` before the string is stepped over like a `)` and the forward
read continues to code, so `( \` / `\` / `("doc")); x=1` reads its
joined last row as code, `(3, 2, 2, 0)`.

Refs #1828, #1830
…ads its budget

Lessons 119 to 121, each drafted from PR #1862 and the incident
before it and checked against the code and the GitHub record:

- 119: a grammar whose `extras` holds a named non-comment node
  (tree-sitter-python's `line_continuation`) passes every
  `is_named() && kind != Comment` selector; five such sites, one
  predicate (#1830).
- 120: a role-row gate that reads bytes but is declared `gated_by`
  leaves `TEXT_GATED` false, so the byte-less forwards' compile-time
  asserts trust the declaration and hand it `&[]`; the chain axis has
  a behavioural backstop, the byte axis none (#1842, #1863).
- 121: a commit whose parent is the current tip can carry the old
  contents of files the tip changed as its own edit; ancestry says
  nothing, the PR's own diff does (PR #1844 over PR #1843, #1828).

`docs/development/testing.md` gains two subsections under "Fixture
shapes that cannot fail": a fixture that intercepts output prints it
when the test fails, and two correct outcomes separated by a clock are
one flake. The second describes the Claude hook's probe-budget test,
which this commit redesigns to match: the fixture's preload wraps
`setTimeout` and records the budget `run()` arms after each spawn, so
the test asserts a `--version` probe arms 3000 and the analyzer run
the override, instead of reading a reason string that a slow digest
start flips and a leaked override could hide behind. A leaked
override, a leaked override under a 1.2 s digest delay, and a check
that stops arming the override each fail it; it passes unmutated in
about 80 ms with no stalled probe.

Reviewed twice by astra-review; the first draft's claim that a squash
merge wrote a stale tree did not survive the record and is retracted
in the entry.
@dekobon
dekobon force-pushed the fix/batch-2026-11-09 branch from 102a9c9 to cdd5e5b Compare November 10, 2026 05:25
@dekobon
dekobon merged commit cdd5e5b into main Nov 10, 2026
64 checks passed
@dekobon
dekobon deleted the fix/batch-2026-11-09 branch November 10, 2026 05:44
dekobon added a commit that referenced this pull request Nov 12, 2026
…te-less is_func

`Checker::is_func_with_code`, `Checker::is_func_space_with_code` and
`Getter::get_space_kind_with_code` defaulted to their byte-less
spellings, the reverse of what `roles/mod.rs` and
`grammar_dispatch.md` §7 document. A language that wrote only the
byte-less one handed a text-gated row no bytes without a word, which
is how the Java record-header gate read every same-arity constructor
as canonical on #1862.

The three are now required. `is_func_space` and `get_space_kind`
default to the with-code form asked with no bytes and a known-empty
chain, so the forward runs one way only.

Byte-less `is_func` is removed. It had three contracts: 20 languages
passed the caller's chain with no bytes, Java and Groovy discarded the
chain, Elixir answered `false`. Its production readers move to
`is_func_with_code`:

- the Go, Kotlin, Lua, Tcl, iRules and Perl `NArgs::compute` impls;
- `holds_doc_comment_in_body`, which gains a `code` parameter, as do
  `held_in_body` and `outside_function_bodies`. The JS family and C#
  need the real chain there, so a derived kind-table `is_func` would
  have moved `dloc`.

No metric value moves: 7287 workspace tests pass unchanged, corpus
snapshots included.

The baseline loses `Checker` `nom` and `Getter` `wmc`, which fell under
their limits, and records `checker.rs` and `roles/mod.rs` `sloc`. It
also picks up `node/ancestors.rs` `sloc` 1292 -> 1294, which was
already stale on main at a62077d.

Refs #1863
dekobon added a commit that referenced this pull request Nov 12, 2026
The example's last sentence described the #1862 state as current: both
checkers overriding `is_func_with_code` and a byte-less `is_func`
forwarding a known-empty chain. #1863 removed that method. The sentence
now reads as history and names what replaced it. Found by the
checkpoint review of steps 1 and 2.

Refs #1863
dekobon added a commit that referenced this pull request Nov 12, 2026
…view

- `ops_and_metrics_agree_on_the_space_tree` asserts the Java and Groovy
  record's header space is in the rendered tree. Dropped by both walks
  it left the two trees equal, and the fixture's other members kept the
  non-empty check true.
- `check_gated` takes `Option<&str>` for the gated kind instead of `""`
  as the no-kind sentinel.
- `has_public_modifier` reads `modifiers` as `child(0)` again rather
  than searching for it with a cursor per declaration. `bca dump`
  confirms it is the first child of a documented, annotated record and
  method; comments and annotations sit beside or inside it.
- `python_is_extra` states tree-sitter-python's two extras once.
  `not_extra` and `python_code_among` read it.

The Groovy `nargs` header arm keeps its kind filter. The issue proposed
`count_args::<Self>` as giving the same answer; it does on a clean
parse only. `count_args` takes every child that is no parenthesis,
comma or comment, so the `ERROR` recovery leaves in the list reads as
an argument: `record R(int a,) { }` would move from 1 to 2. A test pins
both readings and the comment says why the arm is not shared.

The Java row test in `roles/java.rs` keeps its own gated-kind loop: it
gates two kinds and asserts three more rows, so `check_gated` is no
drop-in.

No metric value moves.

Refs #1863

This branch was previously deployed

1 inactive deployment
github-pages — cdd5e5b4 Deployed Nov 10, 2026 by dekobon via deploy to GitHub Pages #1044
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment