Skip to content

Conversation

ivan-aksamentov
Copy link
Member

Targets #158

Updated version of #163 (on top of new changes in #158)


This is an idea for improving code structure in reconsensus module:

  • split away blocks requiring realignment early
  • separate logic for mutation-only reconsensus and full reconsensus

Additionally:

  • make find_majority* functions into methods of Block - they look very much like fancy accessors

NOTE: This is simply an idea, with large portions of code generated by AI. Needs some verification.

This is an idea for improving code structure in reconsensus module:
 - split away blocks requiring realignment early
 - separate logic for mutation-only reconsensus and full reconsensus

Additionally:
 - make `find_majority*` functions into methods of `Block` - they look very much like fancy accessors
args: &PangraphBuildArgs,
) -> Result<(), Report> {
// First apply mutations
apply_mutation_reconsensus(block, &majority_edits.subs)?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be redundant, edits are already applied later...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where? Cannot figure it out

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit hidden, but if I'm not mistaken here all mutations get applied to the consensus, including substitutions, and then everything gets realigned to it anyways, so we won't need to deal with mutation separately.

@mmolari mmolari mentioned this pull request Aug 2, 2025
Base automatically changed from debug/reconsensus to master August 4, 2025 11:27
@ivan-aksamentov ivan-aksamentov marked this pull request as ready for review August 4, 2025 11:27
@ivan-aksamentov ivan-aksamentov merged commit f815576 into master Aug 5, 2025
18 checks passed
@ivan-aksamentov ivan-aksamentov deleted the refactor/reconsensus-updated branch August 5, 2025 13:42
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.

2 participants