Skip to content

docs(website): correct routes, fields, events, tools, providers, resume story, and bind default - #1391

Merged
dennisonbertram merged 1 commit into
mainfrom
issue-1380-website-docs
Sep 5, 2026
Merged

docs(website): correct routes, fields, events, tools, providers, resume story, and bind default#1391
dennisonbertram merged 1 commit into
mainfrom
issue-1380-website-docs

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Closes #1380

Summary

Corrects verified-wrong and missing claims across 26 website/docs pages, plus a one-line help-text fix at cmd/harnesscli/service.go:410 (documented as the same wrong HARNESS_ADDR default surfaced to users). Every correction below was re-verified against the current tree with rg/sed -n — the attached audit (epic #1369 comment) was treated as a lead, not gospel, and two of its claims turned out to be wrong on inspection (noted below the table).

This PR also documents the post-merge state of three sibling PRs per the task brief:

This PR should merge after #1372, #1374, and #1376 so the documented behavior matches what ships.

Correction table

doc:line old claim new claim evidence
reference/exit-codes.md:29,77,89 run.cancelled / blocked runs "resumable via harnesscli continue" continue requires source status completed; cancelled runs are not resumable; blocked runs use harnesscli input internal/harness/runner.go:2217, internal/server/http_runs.go:817
reference/exit-codes.md:58,69 ask_user_question tool AskUserQuestion tool internal/harness/tools/ask_user_question.go:12
reference/exit-codes.md:67,146 stale line refs events.go:472, types.go:337 events.go:477, types.go:401-402 current tree
cli/harnesscli.md:55,104-106,176,253-402 exit 6 "resumable via continue"; -workspace "silently ignored"; no input/steer/viz/acp/plugin/mcp/hooks/service/auth kimi|codex sections continue precondition documented; -workspace honored post-#1372; 9 new subcommand sections added internal/harness/runner.go:2217; cmd/harnesscli/auth.go dispatch
reference/cli-flags.md:39,80,306-360,64-90 HARNESS_ADDR default :8080; -workspace "ignored"; missing -plan-mode/-resume/auth kimi|codex/go-code --resume/9 CRONSD_* vars 127.0.0.1:8080; honored; all added internal/config/config.go:254; cmd/harnesscli/main.go:155,157; cmd/cronsd/main.go:173-204
server/http-api-guide.md:10,65,371-380,436 bind default :8080; no continue precondition; ask_user_question 127.0.0.1:8080; precondition documented; AskUserQuestion as above
reference/http-routes.md:9,285-330,420 bind default :8080; RunRequest schema missing 7 fields; ~15 routes missing from inventory 127.0.0.1:8080; schema completed; routes added (/v1/tools, /v1/hooks, /v1/config/reload, /v1/model-settings*, /v1/tasks, /v1/jobs/{id}/kill|output, /v1/callbacks/{id}/cancel, /v1/cron/runs, /v1/cron/jobs/{id}/executions, conversation sub-routes, /v1/runs/{id}/replay, import-subscription, 6 relay routes, /viz) internal/server/http*.go mux registrations
reference/environment-variables.md:28 HARNESS_ADDR ":8080"; missing 10 env vars "127.0.0.1:8080"; HARNESS_RETRY_MAX_ATTEMPTS, HARNESS_RETRY_MAX_TOTAL_SEC, HARNESS_LISTEN_FD, HARNESS_EXIT_WITH_PARENT, HARNESS_MODEL_STORE_PATH, HARNESS_PROVIDER_CATALOG_DIR, HARNESS_COLOR_PROFILE, HARNESS_CRON_API_KEY, HARNESS_SOURCE_ROOT, HARNESS_BENCHMARK_CMD added; 6 CRONSD_* vars added rg -o 'getenv("HARNESS_...")' sweep across cmd, internal
reference/tools-catalog.md missing 8 tools added list_models, deploy, goals, cron_update, cron_history, message_subagent, notify_parent, agent_swarm Name: fields in internal/harness/tools_default.go wiring
reference/events-catalog.md:854-881 events catalog "77 total, all in AllEventTypes()" 86 real declared+emitted events; AllEventTypes() misses 7 (callback.dispatching|failed|retry_wait|started, plan.approval_required|granted|denied) which are genuinely emitted via a separate bridge; added todos.updated, job.completed internal/harness/events.go, internal/harness/tools/delayed_callback.go, internal/harness/plan_mode.go:75-107, internal/harness/job_bridge.go:16
reference/events-catalog.md:175 example payload "tool": "ask_user_question" "tool": "AskUserQuestion" internal/harness/ask_user_broker.go:60
reference/providers-and-models-reference.md, reference/environment-variables.md, concepts/providers-and-models.md, getting-started/what-is-go-code.md "10 providers"; OpenRouter-only live discovery 15 providers (added cerebras, codex-subscription, kimi-subscription, lmstudio, ollama); discovery is provider-agnostic (OpenRouter/OpenAI/Anthropic/DeepSeek, 5-min TTL) catalog/models.json; internal/provider/openai/discovery.go:24, internal/provider/anthropic/discovery.go:24
reference/troubleshooting.md:202 internal/harness/tools/mcp.go file doesn't exist; actual is internal/harness/tools/deferred/mcp.go:109 rg
server/harnessd.md:9,39,155,161,266, concepts/configuration.md:44,165,308-322 bind default :8080; max_steps "resets 0 to 8" 127.0.0.1:8080 everywhere + bind-refusal note; max_steps=0 is genuinely unlimited, no reset internal/config/config.go:254; cmd/harnessd/bind_guard.go:29-42
concepts/runs-and-conversations.md:52,58 input route never named; "defaults to 8 steps" names POST /v1/runs/{id}/input / harnesscli input; "no default step cap" as above
server/script-workflows-api.md:312 GET/POST /v1/script-workflow-runs/{id} only GET on the bare ID; POST is /resume only internal/server/http_script_workflows.go:194-223
server/expose-as-mcp-server.md (substantial rewrite) /mcp built on mcpserver.NewServer, 10 tools, GET /mcp SSE + subscribe_run, version="1.0"; harness-mcp proxy has a separate 5-tool set /mcp is harnessmcp.NewHTTPHandler, POST-only (405 on GET), no SSE/subscribe_run; /mcp and harness-mcp share the same 25-tool REST-backed dispatcher (internal/harnessmcp); version="1.0.0", name="harness-mcp" (not internal/mcpserver's unmounted "go-agent-harness"/"0.1.0") cmd/harnessd/runtime_container.go:348-352; internal/harnessmcp/httptransport.go:29-31; internal/harnessmcp/dispatcher.go:98-99; internal/harnessmcp/tools.go (25 Name: entries)
tutorials/claude-desktop-mcp.md:11,169,180-181 "five tools"; cost_usd always empty 25 tools (5 highlighted); cost_usd populated since #1314, messages still empty (server has no message-list field) internal/harnessmcp/harness_client.go:232-251
integrations/mcp-consume.md:201 list_mcp_resources/read_mcp_resource "not yet implemented" implemented via clientManagerRegistry cmd/harnessd/mcp_setup.go:68-90, internal/mcp/mcp.go:231,246
cli/go-code-wrapper.md:137-138,174 bind default :8080; "cancelled — resumable via go-code continue" 127.0.0.1:8080; cancelled is not resumable; blocked → harnesscli input/go-code --resume; added missing go-code --resume <id> row scripts/go-code.sh:10,255-260,384

Two audit claims rejected after verification (not applied):

  • compact_summary was listed as an undocumented core tool; it is actually an internal message-Name tag used by compact_history to mark its own injected summary (internal/harness/tools/core/compact_history.go:287,324,424), not a tools.Definition — not added to the tools catalog.
  • The audit's "six CRONSD_* vars" undercounted; the actual set is 9, all verified in cmd/cronsd/main.go:173-204 and now documented.

Scope and issue reconciliation

In scope per the task brief: website/docs/** plus the one-line help string. git diff --stat against origin/main shows exactly 26 website/docs/*.md files, cmd/harnesscli/service.go (1 line), and docs/logs/engineering-log.md (required engineering-log entry per the process brief). No other source, test, workflow, dependency, API, config, schema, persistence, security, deployment, or runtime-behavior files were touched — this stayed a documentation-only change plus the pre-approved help-text fix.

Impact analysis reconciliation

Zero runtime impact: no Go source file changed except the flag-help string, which is descriptive only (resolveServiceAddr already resolves the true value via internal/config; only the printed default in -h output changes). All other changes are Markdown/MDX content under website/docs/.

Architecture and duplication check

No new abstractions. Route/field/event/tool/env-var inventories were regenerated by reading the single sources of truth named in the task (mux registrations in internal/server, RunRequest in internal/harness/types.go, AllEventTypes() in internal/harness/events.go, Name: fields under tools/core and tools/deferred, catalog/models.json, and getenv("HARNESS_...") call sites) rather than a second parallel catalog.

Test-first evidence

Documentation-only PR (per the issue's own "Regression test first" section, which designates this as a documentation-only verification slice). Substituted verification: every corrected claim was re-checked against the current code with rg/sed -n before editing (shown in the correction table's evidence column), and the one code change (service.go:410) is a flag-help string with no test asserting the old value — confirmed by grepping cmd/harnesscli/service_test.go for the string before and after.

Verification evidence

go test ./cmd/harnesscli -run Service -race
ok  	go-agent-harness/cmd/harnesscli	(cached)
cd website && npm ci && npm run build
[INFO] [en] Creating an optimized production build...
[SUCCESS] Generated static files in "build".

Docusaurus build completed with zero broken internal links and zero MDX syntax errors across all edited pages.

Rollout and rollback

None — docs plus one help string. Revert the PR to roll back; no data migration, no deployment step, no runtime behavior to roll back.

Documentation

This PR is the documentation update. Engineering-log entry added at docs/logs/engineering-log.md (prepended, following the file's existing newest-first format). docs/runbooks/INDEX.md/docs/INDEX.md dead-link cleanup from the audit's historical-directory findings is out of scope (non-website docs, not part of this task's file allowlist) and is left for a separate docs-cleanup issue.

Uncertainties / follow-up needed

  • New finding, not fixed here: internal/workspace/bootstrap.go:36 (VM workspace cloud-init template) sets HARNESS_ADDR=:8080 — a non-loopback bind — with no HARNESS_AUTH_DISABLED and no auth configured. Given cmd/harnessd/bind_guard.go's [Bug]: harnessd listens on all interfaces unauthenticated, and /mcp bypasses auth entirely #1328 protection, this looks like it would now make harnessd refuse to start on a freshly provisioned VM workspace, and systemctl start harnessd || true swallows the failure silently. This is a code question outside the allowed file list for this task (website/docs/** + cmd/harnesscli/service.go help string only) — recommend filing a follow-up issue rather than folding a code fix into this docs PR.
  • docs/runbooks/mcp.md and docs/design/event-catalog.md (non-website docs) have the same/related staleness the audit found but are out of scope for this PR's file allowlist.

Contract checklist

  • Linked issue follows the current structured contract and this PR closes it
  • Issue acceptance criteria, impact map, and scope were updated when the design changed (see "Uncertainties" above — no scope change needed, one new out-of-scope finding reported instead)
  • All callers, consumers, sources of truth, and similar abstractions were searched (mux registrations, RunRequest, AllEventTypes(), tool Name: fields, catalog/models.json, env var call sites)
  • No unrelated cleanup, hidden scope growth, duplicated wiring, or parallel abstraction was introduced
  • Tests were written first and the expected red failure was observed, or this is a strictly docs-only minor PR — this is a docs-only PR with one pre-approved help-text fix, per the issue's own regression-test-first section
  • Targeted checks and the repository-required full regression are green (go test ./cmd/harnesscli -run Service -race; npm run build)
  • Security, compatibility, lifecycle, deployment, observability, documentation, and rollback were reconciled (none apply — docs only)
  • Real mouse/keyboard/API/operator behavior was exercised — not applicable; no UI/API behavior changed

🤖 Generated with Claude Code

https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…me story, and bind default

Closes #1380

Full audit of website/docs against the current tree at a0d1521, re-verified
claim-by-claim with rg rather than trusting the attached audit report. Key
corrections:

- Resume story: harnesscli continue / POST /v1/runs/{id}/continue requires
  the source run's status to be `completed` (409 run_not_completed
  otherwise); a cancelled run cannot be resumed. Blocked (waiting_for_user)
  runs are answered with harnesscli input <run-id> "<q>=<a>" (documented as
  the post-#1374 CLI addition; the server route already exists).
- HARNESS_ADDR default corrected from :8080 to 127.0.0.1:8080 everywhere,
  with the non-loopback bind-refusal behavior noted (issue #1328).
- max_steps: 0 = unlimited with no default step cap (post-#1376 state).
- workspace_path documented as honored (post-#1372 state).
- reference/http-routes.md route inventory rebuilt from the actual
  mux.Handle registrations; RunRequest schema gained missing fields.
- reference/events-catalog.md: AllEventTypes() is missing 7 real, emitted
  event constants (4 callback.*, 3 plan.approval_*); added todos.updated and
  job.completed; fixed a stale ask_user_question payload example.
- reference/tools-catalog.md: added 8 undocumented tools verified against
  tools_default.go; rejected the audit's compact_summary claim (it's an
  internal message-tag label, not a callable tool).
- Provider tables (3 files) corrected from 10 to 15 providers; live model
  discovery corrected from OpenRouter-only to provider-agnostic.
- server/expose-as-mcp-server.md rewritten beyond the audit's findings: /mcp
  and the harness-mcp proxy share one 25-tool REST-backed dispatcher, not two
  different tool sets; /mcp is POST-only (no SSE/subscribe_run).
- Added harnesscli subcommand docs: steer, viz, acp, plugin, mcp, hooks,
  service, auth kimi, auth codex, input.
- One-line fix: cmd/harnesscli/service.go:410 --addr help text said the
  default was :8080; corrected to 127.0.0.1:8080 to match
  internal/config/config.go:254. No test asserted the old string;
  go test ./cmd/harnesscli -run Service -race passes unchanged.

Verification: rg re-check of every corrected claim; npm run build in
website/ (Docusaurus) completes with no broken links or MDX errors.

Merges after #1372, #1374, #1376 (documents their post-merge behavior).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WJGxhoFhA8JjkwZFcLGdS5
@dennisonbertram
dennisonbertram merged commit 8df7385 into main Sep 5, 2026
2 checks passed
@dennisonbertram
dennisonbertram deleted the issue-1380-website-docs branch September 6, 2026 16:56
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.

docs(website): reference pages omit routes, fields, events, tools, providers and env vars; resume and bind-default claims wrong

1 participant