Skip to content

refactor: split internal/pipeline/pipeline.go into topical files (pure declaration moves) - #743

Merged
dmmdea merged 3 commits into
mainfrom
refactor/split-pipeline-file
Oct 30, 2026
Merged

dmmdea merged 3 commits into
mainfrom
refactor/split-pipeline-file

Conversation

@dmmdea

@dmmdea dmmdea commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Intent

Desloppify backlog ("god files"): internal/pipeline/pipeline.go was 5999 lines. It is split into topical files of the same package by pure declaration moves; identical behaviour.

Scope

internal/pipeline only: pipeline.go plus 11 new pipeline_*.go files, two source-scanning tests re-keyed to the new layout, the fragment. No declaration renamed or edited; no other package touched.

What changed

pipeline_vision.go 466, pipeline_audio.go 580, pipeline_image.go 805, pipeline_imagebatch.go 400, pipeline_rungraph.go 383, pipeline_video.go 573, pipeline_gpu.go 480, pipeline_media.go 270, pipeline_attempt.go 453, pipeline_chain.go 343, pipeline_confidence.go 377 lines; pipeline.go 5999 -> 1077 (keeps the Pipeline type, Run and the request plumbing). Second commit: TestEveryMediaDoorThreadsTheRequestsResumability and TestTheThreeSdcppLanesAskForTheirOwnBytes scanned only pipeline.go and turned red after the move; they now glob pipeline*.go with the same assertions (the ten-door minimum is the total across the group).

 15 files changed, 5222 insertions(+), 4983 deletions(-)

The real run and its output

Declaration census (go/ast hash of every top-level declaration, comments stripped) before and after: 873 declarations, diff empty, run by the builder and again by an independent verifier in a throwaway worktree of origin/main. go build ./... ok; go vet ./internal/pipeline ok; gofmt clean on every new file; named pipeline tests ok; the two re-keyed tests PASS by name; the ledger and pairworkloads source walkers and the root lint set (bare-http allowlist, clock, tempdir, upstream fence, leak gate) ok. CI runs the whole package.

Blast radius

None at runtime; file layout of one package.

Risk

Low. Tier: no_review (ordinary change (consequential 0.05, blast 1.01))

Follow-ups (not in this PR)

  • docs/systems/gpu-lease.md, media-generation.md and offload-pipeline.md cite pipeline.go line numbers that now point into pipeline_*.go files.
  • Comments in four pipeline test files still say "pipeline.go".

🤖 Generated with Claude Code

dmmdea and others added 3 commits October 29, 2026 20:08
…ckage

Pure declaration moves, no body or signature changed. New files: pipeline_vision.go,
pipeline_audio.go, pipeline_image.go, pipeline_imagebatch.go, pipeline_rungraph.go,
pipeline_video.go, pipeline_gpu.go, pipeline_media.go, pipeline_attempt.go,
pipeline_chain.go, pipeline_confidence.go. pipeline.go keeps Pipeline, New, Run and
the ledger writers (1077 lines). Census before/after: byte-identical, 873 declarations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…iles

TestEveryMediaDoorThreadsTheRequestsResumability: the waiter_token scan now
covers pipeline.go and every pipeline_*.go (glob pipeline*.go minus tests); the
per-line resumableBy assertion is unchanged and the minimum of 10 doors is the
sum across the group. igpumedia.go keeps its own minimum of 1.

TestTheThreeSdcppLanesAskForTheirOwnBytes: the sdcppImageNeed check now reads
pipeline.go plus every pipeline_*.go concatenated; the igpumedia.go checks are
unchanged.

The ledger writerFiles lint and the root allowlist lints (bare http client,
clock, tempdir, upstream fence, leak gate) were run and are green as split.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The node test read the voice branch and appendVoiceRecipe from pipeline.go; both moved to pipeline_audio.go in the split, so the anchor assertion fired. The test now reads that file; the anchors and the flag check are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dmmdea
dmmdea merged commit 680f0d1 into main Oct 30, 2026
6 checks passed
@dmmdea
dmmdea deleted the refactor/split-pipeline-file branch October 30, 2026 02:23
@dmmdea dmmdea mentioned this pull request Oct 30, 2026
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