refactor: remove wrapper commands, dead code, and output inconsistencies#63
Merged
Conversation
Remove connect and logs commands (pure openshell wrappers with zero value-add). Remove dead code from Gateway interface (InferenceModel, SandboxConnect, SandboxLogs), agent (BuildEnvSh), gateway config (HasProviders, AllProviders), k8s (RunKubectlPassthrough), and status (ShowEquivalentCmd, Detailf). Gateway interface shrinks from 28 to 24 methods. Add status.Warnf and standardize all output through the status package. Unify provider messages to "%s: registered" across commands. Extract ensureProviders helper to deduplicate validate-register-revalidate pattern. Relocate shared helpers to cmd/resolve.go. Fix docs: add missing --local/--no-tty flags to README, remove stale TOML references from TODO, add gateway field to SPEC, sync all docs to current CLI state. Delete stale docs/proto-migration.md. Net: -654 lines, +47 lines.
Gateway configs now support inline helm values and addon manifests, making each config a single self-contained YAML file. Moved from gateways/<name>/gateway.yaml (directory per target with separate helm values and addon files) to profiles/gateways/<name>.yaml (one flat file per target). Provider profiles moved from agents/providers/profiles/ to profiles/providers/ for consistency. Gateway configs are embedded in the binary and resolved with fallback: profiles/gateways/ on disk → legacy gateways/ dir → embedded default. Added LoadConfigFromBytes, LoadProfile, and resolveGatewayConfig. HelmSection and AddonsSection now accept both file paths and inline YAML via custom UnmarshalYAML.
…nt-profile Replace --local and --remote boolean flags on `harness up` with --gateway NAME (resolves from profiles/gateways/) and --gateway-profile PATH (loads an explicit file). Rename --file/-f to --agent-profile/-f on both up and create for consistency. Update test-flow.sh to use the new flag names.
When TEST_LOG_FILE is set, test-flow.sh enables --verbose on the harness binary and tees all output (including openshell commands) to the log file. Individual test steps no longer suppress output when logging is active. Integration CI jobs now set TEST_LOG_FILE and upload the combined test-flow + gateway logs as artifacts for debugging.
The previous approach appended --verbose to the HARNESS string variable, which broke when the shell tried to execute a file literally named "harness --verbose". Use a harness() shell function that expands the flags array properly.
Always pass --verbose to harness. Remove step_output (was identical to step after simplification). Remove output suppression from step and step_fail. When TEST_LOG_FILE is set, tee captures everything to the log file automatically.
Update README and SPEC command references to use --gateway/--agent-profile instead of removed --local/--remote/-f flags. Remove deleted docs/proto-migration.md from Documentation Map. Fix stale profiles/default.toml references in release-plan.md. Fix resolveGatewayConfigFromFile to set cfg.Dir for file-path-based helm values resolution. Fix resolveGatewayConfig to surface parse errors instead of silently falling through. Add --gateway kind to kind test flow. Add yaml:"-" tags to custom-unmarshaled structs.
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
connectandlogscommands (pure openshell wrappers with zero value-add)InferenceModel,BuildEnvSh,HasProviders,AllProviders,RunKubectlPassthrough,ShowEquivalentCmd,Detailf— all confirmed zero production callersstatus.Warnfand standardize all output through the status packageensureProvidershelper to deduplicate validate-register-revalidate pattern increate.goandup.goresolveSandboxName,resolveAgentPath,resolveAgentConfig,versionedImage) tocmd/resolve.go--local/--no-ttyflags, remove stale TOML refs, addgatewayagent config field to SPECdocs/proto-migration.md(14+ references to non-existent paths)Test plan
make test(vet + go test ./...) — all passingmake test-local(Podman gateway integration)make test-kind(kind cluster lifecycle)make test-remote(OCP integration)