refactor(cmd): thin list.go; move logic to internal/listing (#1502 partial)#1522
Merged
Conversation
- New internal/listing package owns runs/workspaces/pipelines/personas /adapters/contracts/skills/compositions listing domain logic, filter, sort, and JSON output schemas. - cmd/wave/commands/list.go reduced from 1630 LOC to 324 LOC; the new list_render.go owns table rendering. CLI behaviour, flag names, command names, and JSON output schemas are unchanged. - skills.go now imports internal/listing for CollectSkillPipelineUsage. Partial of #1502 (list.go portion). init.go/run.go/compose.go thin deferred to follow-up PRs.
7ca3534 to
ebb0e32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/listingpackage owns runs/workspaces/pipelines/personas/adapters/contracts/skills/compositions listing domain logic, filter/sort, JSON output schemascmd/wave/commands/list.goreduced 1630 → 324 LOC (cobra wiring + flag plumbing + JSON envelope + dispatch)cmd/wave/commands/list_render.go(319 LOC; depends only oninternal/display, kept in cmd)wave list --helpbyte-identicalPublic API of
internal/listingTypes:
PipelineInfo,PersonaInfo,AdapterInfo,RunInfo,ContractInfo,ContractUsage,SkillInfo,CompositionInfo,Output,RunsOptions,Manifest,ManifestPersona,ManifestAdapter,PipelineSkillConfigFunctions:
LoadManifest,FormatDuration,ListPipelines,ExtractPipelineName,ListPersonas,ListAdapters,ListRuns,ListContracts,CollectSkillsFromPipelines,CollectSkillPipelineUsage,ListSkills,ListCompositionsCmd-package types kept as type aliases → existing
cmd/wave/commands/list_test.gocompiles unchanged.Validation
go build ./...+go vet ./...cleango test -race ./internal/listing/...21 sub-tests pass (2.0s)go test -race ./cmd/wave/commands/...passgo test -race ./...all greenwave list --helpdiff vs main: byte-identicalOut of scope (deferred)
Test plan
wave list runs --jsonschema unchangedwave list pipelines/personas/adapters/contracts/skills/compositionsall unchangedPartial of #1502 (list.go portion). Parent: #1494.