Skip to content

feat(overflow_graph): support extra lines to cut without overload styling#76

Merged
marota merged 2 commits into
masterfrom
claude/extra-lines-to-cut
May 7, 2026
Merged

feat(overflow_graph): support extra lines to cut without overload styling#76
marota merged 2 commits into
masterfrom
claude/extra-lines-to-cut

Conversation

@marota

@marota marota commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add extra_lines_to_cut argument to OverFlowGraph for operator-selected lines that should be cut alongside contingencies (e.g. ExpertAgent's additionalLinesToCut) but shouldn't be classified as overloads.
  • Stamp is_extra_cut=True on those edges; keep their natural flow colour (coral/blue) instead of the black/yellow overload styling; skip them in is_overload / is_monitored flagging.
  • Surface a new "Extra lines to prevent flow increase" layer in the interactive HTML viewer (semantic:is_extra_cut, dashed-blue swatch).
  • The before% → after% annotation still fires on extras so the operator sees how their choice materialises.

Test plan

  • pytest alphaDeesp/tests/test_overflow_graph.py alphaDeesp/tests/test_null_flow.py (78 passed)
  • Smoke-tested OverFlowGraph(..., extra_lines_to_cut=[i]): extra edges retain coral/blue colour, are stamped is_extra_cut=True and constrained=True, skip is_overload/is_monitored after highlight_significant_line_loading, and still get the loading-rate annotation.

🤖 Generated with Claude Code

marota and others added 2 commits May 7, 2026 11:57
…ling

OverFlowGraph accepts an extra_lines_to_cut argument naming a subset of
lines_to_cut that the operator chose to disconnect to prevent flow
increase elsewhere. Those edges keep their natural flow colour
(coral/blue), are stamped is_extra_cut=True, and are excluded from
is_overload / is_monitored. The interactive HTML viewer exposes a
dedicated "Extra lines to prevent flow increase" layer with a
dashed-blue swatch, and the before% → after% annotation still fires so
operators see how their cut materialises.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TestExtraLinesToCut: 6 cases covering default empty extras, set
  storage, natural coral/blue colour for extras, ``is_extra_cut`` +
  ``constrained`` flagging, exclusion from ``is_overload`` /
  ``is_monitored`` while keeping the loading-rate annotation, and the
  legacy "no extras" path.
- test_layer_index_emits_extra_cut_layer_with_endpoints: the new
  semantic layer carries the edge endpoints, the ``extra-cut`` swatch,
  the operator-facing label, and lands in the "Individual entities
  properties" section.
- test_layer_index_skips_semantic_layer_when_no_match: extend the
  no-noise contract to ``semantic:is_extra_cut``.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@marota marota merged commit bfb369f into master May 7, 2026
2 checks passed
marota added a commit that referenced this pull request May 7, 2026
Post-release tag for the operator-supplied "extra lines to cut" feature
landed via PR #76. PEP 440 ``.post2`` suffix follows the convention used
by 0.3.2.post1 — a packaging refresh on top of the 0.3.2 line that
extends the public API (``OverFlowGraph(extra_lines_to_cut=...)``) and
ships a new interactive viewer layer without breaking existing callers.

Updates ``setup.py`` (version + download_url), ``docs/conf.py``
(release), and prepends a CHANGELOG entry summarising the change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant