Skip to content

test(autodiff): cover repeat expansion and record the regression sweep - #137

Open
AlekseiChirkovVention wants to merge 2 commits into
docs/mean-expansion-public-surfacefrom
chore/mean-expansion-regression-coverage
Open

test(autodiff): cover repeat expansion and record the regression sweep#137
AlekseiChirkovVention wants to merge 2 commits into
docs/mean-expansion-public-surfacefrom
chore/mean-expansion-regression-coverage

Conversation

@AlekseiChirkovVention

Copy link
Copy Markdown
Collaborator

Close the one coverage gap the earlier branches left, and record the regression sweep for the
whole series.

What this branch does not do

It was scoped to build the full failure matrix. Most of that matrix already existed, so it was
not rebuilt. An audit against the specification found every clause of the supported-reduction
predicate and every error category already covered by the focused modules — 21 parametrized
cases, each asserting the exact category, the offending node id, and the clause number, plus
every near-miss on the gradient path including all four wrong-divisor forms.

Duplicating that would have added maintenance cost and no coverage. The audit is reproduced in
the review thread rather than asserted, so the claim can be checked rather than trusted.

The gap that was real

No existing test fed an expansion pass its own output back into it. The collision tests
seeded a squatting node carrying a reserved identifier — adjacent, but not the same thing, and
not what a consumer composing passes would actually hit.

Six tests now cover literal repeat application for both passes:

  • reapplied to its own output, each pass is a clean no-op;
  • reapplied to an artifact that has since gained a fresh candidate, each fails with the
    structural error category naming the colliding identifier, and the input artifact is
    asserted unchanged afterwards — a corrupted artifact is never returned.

These pass on the first run. The identifier minter's collision check and the pass-through of
unmatched nodes were built generically, so the behaviour was already correct; nothing had
exercised this shape of input. Review confirmed the tests are falsifiable by reading the
minter: removing the collision check flips them to failing rather than leaving them green.

Regression sweep

  • Consumer-specific-import check: passes over the enlarged package. It globs the module tree,
    so it already covered the new module without change.
  • Focused autodiff suite: 895 passed, 2 skipped, no pre-existing assertion modified.
  • Broad non-integration suite, per the repository runbook with its six documented exclusions:
    1146 passed, 9 failed, 1 skipped.

The 9 failures are environment-dependent and pre-existing, reported separately from this
work as the specification requires: seven require the unbuilt local backend, and two are style
guards on a file none of these branches touch. The count and composition are identical to the
baseline recorded at the first branch in this series, across roughly 1,150 tests — so nothing
in the eight branches regressed anything.

Known, deliberate exclusion

The cross-specification composition test is not here. It is conditional on a separate
feature that has no task directory yet, and it lands with that feature — normative in both
documents once both exist. Recorded at discovery, not overlooked.

Stack position

Stack position 8 of 8 — based on docs/mean-expansion-public-surface.

This is the tip of the series: it contains every branch below it, and task-level validation
runs here. Cannot merge into main before the seven branches below it.

The failure matrix and near-miss coverage already exist across the focused
modules, and the collision tests seed a squatting node with a reserved
identifier. None of them feeds a pass's own output back into it, which is the
scenario an artifact expanded twice actually presents.

Cover both passes: reapplied to their own output they are a clean no-op, and
reapplied to an artifact that gained a fresh candidate they fail with the
structural category naming the colliding identifier, leaving the input
untouched. A corrupted artifact is never returned.

These pass on the first run. The minter's collision check and the pass-through
of unmatched nodes were built generically, so the behaviour was already
correct; the tests exist because nothing had yet exercised this shape of
input.
@AlekseiChirkovVention
AlekseiChirkovVention marked this pull request as ready for review August 28, 2026 06:19
@AlekseiChirkovVention AlekseiChirkovVention self-assigned this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants