Skip to content

Refactor assembly pipeline into plan-based architecture#316

Draft
folbricht wants to merge 4 commits intomasterfrom
issue-312
Draft

Refactor assembly pipeline into plan-based architecture#316
folbricht wants to merge 4 commits intomasterfrom
issue-312

Conversation

@folbricht
Copy link
Owner

@folbricht folbricht commented Mar 14, 2026

Summary

  • Introduces AssemblePlan that separates planning from execution in file assembly, pre-computing all chunk placements (self-seed, file seeds, store fetches, skip-in-place) into a DAG of steps with explicit dependencies
  • Replaces the interleaved sequencer approach with composable assembly sources split into dedicated files (assemble-fileseed.go, assemble-selfseed.go, assemble-store.go, assemble-skip.go, assemble-step.go)
  • Adds plan validation to detect stale file seeds before execution, and comprehensive tests for plan generation and in-place chunk detection

Lays the groundwork for #312 (destination-as-seed) by making the planning phase extensible with new source types.

Introduce AssemblePlan that separates planning from execution in file
assembly. The plan pre-computes all chunk placements (self-seed, file
seeds, store fetches, skip-in-place) into a DAG of steps with explicit
dependencies, replacing the interleaved sequencer approach.

This lays the groundwork for #312 (destination-as-seed) by making
assembly sources composable and the planning phase extensible.

Key changes:
- New AssemblePlan with functional options and step-based execution
- Split assembly sources into separate files (fileseed, selfseed, store,
  skip)
- Self-seed matching now uses longestMatchFrom for longer sequences
- Plan validation detects stale file seeds before execution
- Comprehensive tests for plan generation and in-place detection
- Remove sequencer.go, selfseed.go in favor of new plan types

Closes #312
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