refactor(ai): strip Goose harness (Phase 1) — native/simple host-side only
CI / rust client (hh) (macos-latest) (push) Waiting to run
CI / rust client (hh) (ubuntu-latest) (push) Waiting to run
CI / rust coverage (push) Waiting to run
CI / python server (3.10) (push) Waiting to run
CI / python server (3.11) (push) Waiting to run
CI / python server (3.12) (push) Waiting to run
CI / headless e2e smoke (push) Waiting to run
CI / dependency audit (push) Waiting to run
CI / secret scanning (push) Waiting to run

Remove the Goose agentic harness across the codebase per
docs/spec-native-harness.md §3. Goose made N sequential model calls inside the
sandbox (slow on CPU-only hardware) and forced an in-container→host Ollama
gateway that tripped the rootless-Podman slirp4netns loopback bug.

- bridge.py: delete _run_goose/_goose_argv/_goose_present + GOOSE_* consts and
  the present-cache; __init__ now takes harness="simple"/max_turns=5; granted
  !task runs _run_simple until the native loop lands (Phase 2).
- __main__.py: --harness {native,simple} (was {goose,simple}); drop
  --goose-max-turns, add --max-turns; default harness simple.
- app.rs: /ai start accepts native|simple (plain aliases simple) instead of a
  bare plain flag; refresh harness comments.
- sbx.rs: remove the in-container Ollama gateway (Docker host-gateway / Podman
  slirp4netns host-loopback) and the dk_bootstrap OLLAMA_HOST env — kills the
  slirp4netns loopback bug; drop Goose comments.
- bootstrap.sh: drop goose from the prereq probe.
- bootstrap-ai.sh: remove the entire Goose install block, --no-goose flag,
  GOOSE_INSTALLER_URL, host config writer, and goose_bin helper.
- sandbox-bootstrap.sh: remove the in-sandbox Goose binary install + config.
- spec-goose-harness.md: banner — harness portion superseded; Podman stays.

cargo check + py_compile clean. No Goose refs remain (headroom/ untouched).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
leetcrypt
2026-06-08 13:03:41 -07:00
parent cf6b0b5b73
commit e49dbca451
8 changed files with 67 additions and 310 deletions
+9 -9
View File
@@ -30,7 +30,7 @@ from __future__ import annotations
import argparse
import sys
from .bridge import GOOSE_MAX_TURNS, AgentBridge
from .bridge import AgentBridge
from .profiles import load_profiles, provider_from_profile
from .providers import OllamaEmbedder, make_provider, preflight
@@ -123,12 +123,12 @@ def main() -> None:
help="Ollama CPU threads (default: Ollama's own ≈ physical cores; benchmark 4/6/8)")
ap.add_argument("--num-predict", type=int, default=None,
help="Ollama max reply tokens (default 512)")
ap.add_argument("--harness", choices=["goose", "simple"], default=None,
help="sandbox !task harness: goose (agentic loop run inside the "
"sandbox; default) or simple (legacy one-shot injector). "
"Goose auto-degrades to simple if its binary isn't in the sandbox.")
ap.add_argument("--goose-max-turns", type=int, default=GOOSE_MAX_TURNS,
help="max turns for a Goose agentic run (default %(default)s)")
ap.add_argument("--harness", choices=["native", "simple"], default=None,
help="sandbox !task harness: native (bounded host-side Ollama "
"tool-calling loop; default) or simple (one-shot injector). "
"native degrades to simple if the model has no tool support.")
ap.add_argument("--max-turns", type=int, default=5,
help="max turns for the native tool-calling loop (default %(default)s)")
ap.add_argument("--system", default=None, help="override the system prompt")
ap.add_argument("--context-window", type=int, default=12,
help="max prior messages fed to the model per reply")
@@ -201,8 +201,8 @@ def main() -> None:
password=args.password, insecure=args.insecure, no_tls=args.no_tls,
system_prompt=args.system, context_window=args.context_window,
token_budget=args.token_budget, embedder=embedder, rag_top_k=args.rag_top_k,
code_provider=code_provider, harness=args.harness or "goose",
goose_max_turns=args.goose_max_turns,
code_provider=code_provider, harness=args.harness or "simple",
max_turns=args.max_turns,
)
try:
bridge.run()