-
Notifications
You must be signed in to change notification settings - Fork 2
docs: fix inaccurate/stale facts across docs, specs, and comments #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,9 @@ The harness deploys and manages AI agent sandboxes on three targets: | |
| - **helm** -- Kubernetes pods via a k8s cluster (NodePort access) | ||
| - **openshift** -- Kubernetes pods via an OpenShift-hosted OpenShell gateway (Route access) | ||
|
|
||
| Each sandbox is an isolated container running an agent entrypoint (Claude Code or OpenCode), with credential providers, network policies, and a rendered payload (run.sh, task.md). | ||
| Each sandbox is an isolated container running an agent entrypoint (e.g. Claude Code, OpenCode, or Codex; `bash` or any binary on PATH also works), with credential providers, network policies, and a rendered payload (`task.md` and a `bin/` directory). | ||
|
|
||
| Requires OpenShell v0.0.59+. | ||
| Requires OpenShell v0.0.110+. | ||
|
|
||
| ## Agent Config | ||
|
|
||
|
|
@@ -38,8 +38,8 @@ env: | |
| Fields: | ||
| - `name` (required) -- sandbox name, used for `openshell sandbox connect` | ||
| - `base_agent` -- name of a base agent config to inherit from (e.g., `default` resolves `agent-default.yaml`). Providers, env, and payloads are merged additively; scalar fields (entrypoint, gateway, repo, task, image, policy) from the overlay win when non-empty. | ||
| - `image` -- container image for the sandbox (default: version-matched from ghcr.io, override with `HARNESS_OS_IMAGE` env) | ||
| - `entrypoint` -- command to run (default: `claude`). Supports `claude`, `opencode`, `bash`, or any binary on PATH. | ||
| - `image` -- container image for the sandbox (default: version-matched from `quay.io/rcochran/openshell`, override with `HARNESS_OS_IMAGE` env) | ||
| - `entrypoint` -- command to run (default: `claude`). Supports `claude`, `codex`, `opencode`, `bash`, or any binary on PATH. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 15 'opencode|--print|Entrypoint|func .*Command' internal/agent --glob '*.go'Repository: stackrox/harness-openshell Length of output: 50382 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- SPEC.md ---'
cat -n SPEC.md | sed -n '34,105p'
printf '%s\n' '--- repository conventions and learnings ---'
for f in /tmp/coderabbit-repo-knowledge/stackrox-harness-openshell-26b5f74d/*/*.md; do
case "$f" in
*learnings*/*|*SPEC*/*) printf '\n--- %s ---\n' "$f"; head -80 "$f";;
esac
done
printf '%s\n' '--- direct invocation path ---'
rg -n -C 8 'AdapterFor|\.Command\(|taskPath|NoTTY' internal --glob '*.go' | head -240Repository: stackrox/harness-openshell Length of output: 20018 Document the custom entrypoint contract
🤖 Prompt for AI AgentsSource: Path instructions |
||
| - `tty` -- enable TTY (default: true) | ||
| - `repo` -- git URL to clone outside the sandbox and upload to `/sandbox/<repo-name>`. Shallow clone (`--depth 1`) with submodules. Git credentials never enter the sandbox unless needed. | ||
| - `repo_ref` -- branch, tag, or ref to clone (default: HEAD). Passed as `--branch` to git clone. | ||
|
|
@@ -86,15 +86,15 @@ Primary command. Resolves an agent config, deploys the gateway and providers, cr | |
|
|
||
| 1. **Parse agent config** -- resolve `agent-<name>.yaml` from harness directory (default: `default`). `-f` overrides with a direct file path. Falls back to embedded `agent-basic.yaml` when `agent-default.yaml` is not found on disk. | ||
| 2. **Check output mode** -- if `-o yaml` or `-o json`, render the fully resolved config and exit. No gateway interaction needed. | ||
| 3. **Check version** -- warn if openshell CLI is below v0.0.59. | ||
| 3. **Check version** -- warn if openshell CLI is below v0.0.110. | ||
| 4. **Resolve gateway** -- `--gateway` selects a profile by name; `--gateway-profile` loads from a file path. Default: `local-container`. `OPENSHELL_GATEWAY` env var is used as fallback. | ||
| 5. **Dry-run check** -- if `--dry-run`, validate each step (gateway reachable, providers resolvable, env vars resolved, image available) and exit with pass/fail report. | ||
| 6. **Ensure gateway** -- deploy if needed (local: Podman, remote: Helm to K8s/OCP). | ||
| 7. **Ensure providers** -- auto-register missing providers. Three registration flows: | ||
| - **Standard** (`--from-existing`): GitHub, Atlassian -- OpenShell discovers credentials from local env. | ||
| - **ADC** (`--from-gcloud-adc`): Vertex AI -- reads ADC file, configures inference routing. | ||
| - **Custom**: GWS -- multi-step OAuth refresh flow. | ||
| 8. **Render payload** -- `run.sh` (entrypoint wrapper with PATH setup, entrypoint validation, `-p` task), `task.md` (if set). | ||
| 8. **Render payload** -- `task.md` (if set) and a `bin/` directory. The in-sandbox command is built by the agent adapter (`internal/agent/adapter.go`) as a `bash -lc` invocation (PATH setup, entrypoint validation via `command -v`), not a `run.sh` file. Task dispatch depends on mode and entrypoint: headless (default) uses `opencode run "$(cat task.md)"` for OpenCode and `--print "$(cat task.md)"` for claude/codex/custom entrypoints; interactive (`--attach`) uses `-p "$(cat task.md)"`. | ||
| 9. **Create sandbox** -- `openshell sandbox create` with `--env` (env vars), `--upload` (payload), and startup command. Retry up to 5 times. | ||
|
|
||
| Default is non-interactive (headless). Use `--attach` for TTY mode. | ||
|
|
@@ -121,10 +121,26 @@ Show detailed status for a specific sandbox: phase, active gateway, and register | |
|
|
||
| Delete sandboxes by name, or use flags for bulk operations. `--all` deletes sandboxes, providers, and k8s resources. Reuses the same teardown functions as the old `teardown` command. | ||
|
|
||
| ### `harness init [-o FILE] [--force] [--non-interactive]` | ||
|
|
||
| Generate a `harness.yaml` config file. Interactive by default (prompts for entrypoint, providers, and gateway target); `--non-interactive` writes the embedded default. Writes to `harness.yaml` unless `-o` overrides the path. | ||
|
|
||
| ### `harness doctor [-f FILE] [--agent NAME] [--gateway NAME] [-o table|json|yaml]` | ||
|
|
||
| Validate the environment for a configured sandbox. Phase 1 (offline) checks the openshell binary, target dependencies, and provider credentials without a running gateway; Phase 2 (online) checks provider registration when the gateway is reachable. | ||
|
Comment on lines
+128
to
+130
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 12 'func registerTargetFlags|registerTargetFlags\(|workspace|ResolveTarget' --glob '*.go' .Repository: stackrox/harness-openshell Length of output: 50383 🏁 Script executed: set -euo pipefail
printf '%s\n' '--- SPEC relevant sections ---'
sed -n '110,155p' SPEC.md
printf '%s\n' '--- workspace/environment references ---'
rg -n -C 3 'workspace|OPENSHELL_(GATEWAY|WORKSPACE)|harness doctor|harness plan' SPEC.md
printf '%s\n' '--- scoped repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/stackrox-harness-openshell-26b5f74d -maxdepth 2 -type f -name '*.md' -printRepository: stackrox/harness-openshell Length of output: 6176 Document the workspace target override.
🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
| ### `harness deploy <gateway>` | ||
|
|
||
| Deploy or verify the gateway for a target. Reads `profiles/gateways/<target>.yaml`. | ||
|
|
||
| ### `harness plan -f FILE [--gateway NAME] [-o table|json|yaml]` | ||
|
|
||
| Read-only reconciliation plan. Shows the actions `harness apply` would take without mutating anything. Distinct from `apply --dry-run`, which is a separate legacy path. | ||
|
|
||
| ### `harness migrate -f FILE [-o FILE]` | ||
|
|
||
| Convert a legacy v1 harness config to the v1alpha1 format. The input YAML is normalized and written as v1alpha1 to stdout (or `-o FILE`). Fields with no v1alpha1 home (`task`, `include`, inline policy documents, unresolved `base_agent`) are reported as warnings on stderr. | ||
|
|
||
| ### Deprecated Aliases | ||
|
|
||
| These commands still work but will be removed in a future release: | ||
|
|
@@ -189,9 +205,8 @@ The harness renders agent config into a self-contained payload uploaded to `/san | |
|
|
||
| ``` | ||
| openshell/ | ||
| run.sh -- validates entrypoint, execs it (with -p task if set) | ||
| task.md -- task file with envsubst applied (if task: is set) | ||
| bin/ -- wrapper scripts | ||
| bin/ -- payload binaries prepended to PATH | ||
| ``` | ||
|
|
||
| Environment variables are injected directly via `--env KEY=VALUE` flags on `openshell sandbox create` -- no file upload needed for env vars. `run.sh` is the entrypoint for interactive mode. | ||
| Environment variables are injected directly via `--env KEY=VALUE` flags on `openshell sandbox create` -- no file upload needed for env vars. The in-sandbox command (entrypoint validation and exec, with `-p`/`--print` task) is built by the agent adapter and wrapped in `bash -lc`; there is no `run.sh` file. | ||
Uh oh!
There was an error while loading. Please reload this page.