Skip to content

ltm: PartialEquationError link-score skips don't drop dependent loop scores via unscoreable_edges #780

Closed

Description

@bpowers

Summary

When generate_link_score_equation_for_link returns a PartialEquationError, the shaped compilation path emits the loud emit_ltm_partial_equation_warning and skips the link-score variable -- but the edge is not recorded in unscoreable_edges. Loop scores traversing the edge therefore reference the never-emitted link-score name, fail fragment compile, and degrade to warned constant-0 stubs.

Observed repro: 1 good edge warning + 21 cascading loop-score warnings, with every loop series constant 0.

Mechanism

This conflicts with the standing invariant established by #758: ONE loud warning naming the edge, no link-score variable, and dependent loop scores dropped -- not warned-garbage zeros.

Reachability

PartialEquationError is reachable via:

The gap is pre-existing for every emit_ltm_partial_equation_warning call site (including the direct one at link_scores.rs:766); T7 only extends its reach. Note this is loud, not silent, and is a strict improvement over the pre-T7 behavior on the same model (which emitted warned-garbage ~885.0 scores into the loops), so severity is moderate (low-medium), not critical.

Why it matters

Components affected

Suggested fix

Route PartialEquationError skips in the per-shape emission loop into unscoreable_edges exactly like the #758 gate: when the shaped path returns None for a partial-equation failure, insert (from, to) so dependent loop scores are dropped alongside the single edge warning. The shaped salsa query currently collapses "error" into None; the loop either needs the error signal surfaced (e.g. return an enum / check a side-channel) or to treat a None from this path as unscoreable.

Discovery context

Found by the adversarial review of T7 commits 3779f381/fa8fa774 (Phase 1 of the shape-expressiveness design, docs/design-plans/2026-06-11-ltm-shape-expressiveness.md). Part of LTM tracking epic #488. Related: #758 (the drop pattern), #311 (made the skip loud), #768 (the pathway/composite leg of the same drop gap).

Activity

  1. added
    ltm
    on Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ltm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions