Skip to content

feat(engine): add disabled_stages parameter to FusionEngine#21

Open
paint7pupper wants to merge 1 commit intoopen-compress:mainfrom
paint7pupper:feat/disable-stages-option
Open

feat(engine): add disabled_stages parameter to FusionEngine#21
paint7pupper wants to merge 1 commit intoopen-compress:mainfrom
paint7pupper:feat/disable-stages-option

Conversation

@paint7pupper
Copy link
Copy Markdown

Summary

Adds a disabled_stages parameter to FusionEngine.__init__() so users can exclude specific pipeline stages entirely.

Motivation

When integrating claw-compactor into a coding agent, some stages add latency without helping — for example, log_crunch and search_crunch are irrelevant when only compressing source code. Being able to disable them at construction time is cleaner than modifying should_apply() logic.

Usage

# Skip dedup and abbreviation for code-only compression
engine = FusionEngine(disabled_stages={"semantic_dedup", "abbrev"})

# Minimal pipeline: only structural stages
engine = FusionEngine(disabled_stages={
    "photon", "semantic_dedup", "ionizer", "log_crunch",
    "search_crunch", "nexus", "abbrev"
})

Changes

  • _build_pipeline() accepts disabled_stages: set[str] and filters stages by name
  • FusionEngine.__init__() forwards the parameter
  • Docstring updated with all valid stage names
  • No behavior change when disabled_stages is not provided

… stages

Some content types don't benefit from all 14 stages, and running
unnecessary stages adds latency without improving compression.

This adds a disabled_stages parameter to FusionEngine that accepts
a set of stage names to exclude from the pipeline entirely:

    engine = FusionEngine(disabled_stages={'nexus', 'abbrev'})

Stages are identified by their .name attribute (e.g. 'semantic_dedup',
'ionizer'). Disabled stages are filtered out at pipeline construction
time, so there is zero runtime overhead for skipped stages.
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