Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/contributing/runtime-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,60 @@ On this page:
existing ones are pinned and prove the pin at build time
([Pinned runtime binaries](#pinned-runtime-binaries-in-the-sandbox-image)).

### Consumer-completeness touchpoints

After the core implementation above, walk through every file below. Each
one contains a hardcoded list of valid runtimes or runtime-specific
content that must be updated whenever a runtime is added or renamed.

**Registration and config:**

- [ ] `internal/runtime/registry.go` — add a `case` to `Resolve()` that
returns the new backend (mirrors step 1 above — listed here so the
walkthrough is self-contained).
- [ ] `internal/config/config.go` — add the runtime name to the slice
returned by `ValidRuntimes()`.

**Tests:**

- [ ] `internal/runtime/registry_test.go` — add a `Resolve("<name>")`
assertion block to `TestResolve` (and to `TestResolveFromConfig` /
`TestResolveFromPerRepoConfig` if the runtime is user-selectable).
- [ ] `internal/config/config_test.go` — update any assertion on
`ValidRuntimes()` to include the new name.

**CLI:**

- [ ] `internal/cli/runtime_prompt.go` — if the runtime is test-only
(e.g. `dummy`, `dummy-playback`), filter it from
`userRuntimeChoices()` so it does not appear in the interactive
prompt.
- [ ] `internal/cli/run.go` — update the `--runtime` flag description

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[medium] consumer completeness

The CLI touchpoints section lists internal/cli/run.go and internal/cli/admin.go but omits internal/cli/github.go, which also defines a --runtime flag with a hardcoded valid-values string in newGitHubSetupCmd(). A developer following this checklist would update admin.go and run.go but miss github.go — exactly the failure mode the checklist exists to prevent. The github.go flag description is already stale today (it omits dummy-playback).

Suggested fix: Add a checklist item under the CLI section: - [ ] internal/cli/github.go — update the --runtime flag description in newGitHubSetupCmd() to include the new runtime name.

to list the new runtime name.
- [ ] `internal/cli/admin.go` — update the `--runtime` flag description
in `newInstallCmd()` to include the new runtime name.
- [ ] `internal/cli/github.go` — update the `--runtime` flag description
in `newGitHubSetupCmd()` to include the new runtime name.

**Documentation:**

- [ ] `docs/runtimes.md` — add a row to the
[harness config-keys table](../runtimes.md#harness-config-keys-per-runtime)
(item 4 above) and add the runtime to any prose lists of valid values.
- [ ] `docs/architecture.md` — update the runtime selection diagram
(the Mermaid `CFG` node lists valid runtime names) and any prose
references.
- [ ] `docs/cli/run.md` — update any `--runtime` flag description or
valid-values list if the page documents runtime flags.
- [ ] `docs/cli/github.md` — same as `run.md` if this page documents
runtime flags.
- [ ] `docs/guides/infrastructure/layered-config-reference.md` — update
the `runtime` field's valid values in the config-key table.

Use this list as a mechanical walkthrough — check every box, even if the
answer is "no change needed", so omissions are deliberate rather than
accidental.

## Security feature matrix

The sandbox is the containment boundary; everything a runtime does with hooks and tool restrictions is steering inside it ([ADR 0027](../ADRs/0027-allowed-and-disallowed-tools-for-agents.md)). Read the matrix with that picture in mind:
Expand Down
Loading