Skip to content

feat: toggle optimize topology-cleanup steps - #948

Merged
ivan-aksamentov merged 3 commits into
rustfrom
feat/optimize-topology-toggles
Sep 3, 2026
Merged

feat: toggle optimize topology-cleanup steps#948
ivan-aksamentov merged 3 commits into
rustfrom
feat/optimize-topology-toggles

Conversation

@ivan-aksamentov

@ivan-aksamentov ivan-aksamentov commented Sep 3, 2026

Copy link
Copy Markdown
Member

Update:

The three topology-cleanup steps (collapse, merge, hoist) ran unconditionally. This adds --no-collapse-short-branches, --no-merge-siblings, and --no-flip-parent-child to disable each step independently. All default on.

Work items

  • Add TopologyOps carrying the three switches, all defaulting on [src]
  • Expose the three negation flags on the CLI and config file, mapped to the positive form on the resolved arguments [src]
  • Gate the zero-length edge collapse in the optimize loop [src]
  • Gate the sibling merge and reversion hoist in the per-polytomy routine, leaving helper retirement unconditional [src]
  • Warn when a sparse-only step is disabled under a dense build [src]
  • Cover each toggle with unit tests and a collapse-disabled loop test [src]

Gate the per-iteration topology cleanup with --no-collapse-short-branches, --no-merge-siblings, and --no-flip-parent-child. Each defaults on, so an optimize run with no topology flags is unchanged. The switches are carried through OptimizeParams as a TopologyOps struct. Merge and flip-parent-child require the sparse representation, so they warn when disabled under --dense where they cannot run.
Regenerated from the current CLI. The generator emits the whole reference document, so this also refreshes command entries that were left stale on the base branch.
@ivan-aksamentov ivan-aksamentov changed the title feat/optimize topology toggles feat: toggle optimize topology-cleanup steps Sep 3, 2026
Base automatically changed from feat/optimize-polytomy-reversion-resolution to rust September 3, 2026 06:28
@ivan-aksamentov
ivan-aksamentov merged commit 683507f into rust Sep 3, 2026
9 checks passed
@ivan-aksamentov
ivan-aksamentov deleted the feat/optimize-topology-toggles branch September 3, 2026 06:28
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