Skip to content

Add actionable algebraic-loop diagnostics - #168

Merged
jamestjsp merged 1 commit into
mainfrom
codex/algebraic-loop-diagnostics
Aug 2, 2026
Merged

Add actionable algebraic-loop diagnostics#168
jamestjsp merged 1 commit into
mainfrom
codex/algebraic-loop-diagnostics

Conversation

@jamestjsp

@jamestjsp jamestjsp commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Closes #167.

What changed

  • add AlgebraicLoopError with implicated named channels and the actual feedthrough-equation condition number
  • preserve errors.Is(err, ErrAlgebraicLoop) and support errors.As through Connect, ConnectByName, LFT, Feedback, and zero-delay approximation failures
  • identify named input/output channels from the singular or nearly singular SVD mode only after a named interconnection has failed
  • keep valid dynamic feedback through zero-feedthrough models accepted
  • preserve the wrapped algebraic-loop error in the consolidated Feedback delay path from PR Fold SafeFeedback into Feedback delay options #166

Semantics

Condition is the condition number, not a reciprocal estimate. Exact singularity reports +Inf; numerically rejected but nonsingular equations report a large finite value. The previously suggested scalar gain 0.999 is not near-singular under this relative condition metric, so the regression uses a genuinely ill-conditioned MIMO feedthrough equation.

Operations without signal metadata return the typed condition diagnostic with an empty Signals slice. The structural DiscretizeWithOpts rejection remains the sentinel fallback because it does not factor a feedthrough equation and therefore has no honest condition estimate.

Validation

  • go fix ./...
  • go vet ./...
  • go test -v -count=1
  • go test -race -count=1 ./...
  • before/after benchmarks for Feedback, approximated-delay feedback, ZeroDelayApprox, and Connect; allocations are unchanged

Rebase

Rebased onto the current main after PR #166. The renamed conflict site retains this PRs %w wrapping and algebraic-loop diagnostic behavior.

@jamestjsp
jamestjsp force-pushed the codex/algebraic-loop-diagnostics branch from 774a460 to a7e05e8 Compare July 31, 2026 19:51
@jamestjsp
jamestjsp marked this pull request as ready for review July 31, 2026 19:54
@jamestjsp
jamestjsp merged commit f50f89c into main Aug 2, 2026
4 checks passed
@jamestjsp
jamestjsp deleted the codex/algebraic-loop-diagnostics branch August 2, 2026 00:01
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.

Deepen algebraic-loop diagnostics with implicated signals and conditioning

1 participant