Skip to content

refactor: remove wrapper commands, dead code, and output inconsistencies#63

Merged
robbycochran merged 8 commits into
mainfrom
rc-further-simplify
Jun 12, 2026
Merged

refactor: remove wrapper commands, dead code, and output inconsistencies#63
robbycochran merged 8 commits into
mainfrom
rc-further-simplify

Conversation

@robbycochran

Copy link
Copy Markdown
Collaborator

Summary

  • Remove connect and logs commands (pure openshell wrappers with zero value-add)
  • Remove dead code: InferenceModel, BuildEnvSh, HasProviders, AllProviders, RunKubectlPassthrough, ShowEquivalentCmd, Detailf — all confirmed zero production callers
  • Gateway interface shrinks from 28 to 24 methods
  • Add status.Warnf and standardize all output through the status package
  • Extract ensureProviders helper to deduplicate validate-register-revalidate pattern in create.go and up.go
  • Relocate shared helpers (resolveSandboxName, resolveAgentPath, resolveAgentConfig, versionedImage) to cmd/resolve.go
  • Fix docs: add missing --local/--no-tty flags, remove stale TOML refs, add gateway agent config field to SPEC
  • Delete stale docs/proto-migration.md (14+ references to non-existent paths)
  • Net: -654 lines, +47 lines

Test plan

  • make test (vet + go test ./...) — all passing
  • make test-local (Podman gateway integration)
  • make test-kind (kind cluster lifecycle)
  • make test-remote (OCP integration)
  • CI workflows pass

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.
@robbycochran robbycochran merged commit d2eedc6 into main Jun 12, 2026
5 checks passed
@robbycochran robbycochran deleted the rc-further-simplify branch June 13, 2026 14:02
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