diff --git a/.agents/skills/verify-agent-server/references/feature-map/F36-projects.md b/.agents/skills/verify-agent-server/references/feature-map/F36-projects.md index bfc49e31e1a..cdc65859966 100644 --- a/.agents/skills/verify-agent-server/references/feature-map/F36-projects.md +++ b/.agents/skills/verify-agent-server/references/feature-map/F36-projects.md @@ -67,6 +67,7 @@ workers on `POST .../children` (F04), and the server-owned tags on a start - `F36.patch`: `PATCH` renames and changes the description, keeps `created_at` and moves `updated_at`; omitted fields stay. - `F36.coordinator`: creating a project with `coordinator` starts a new, idle coordinator conversation tagged `project=` with the client's other tags, the coordinator prompt (naming its own id) and the coordinator tools; the conversations endpoint reports it as `coordinator`, apart from the other conversations. A project never adopts an existing conversation. - `F36.coordinator-missing`: a coordinator with an unknown `agent_profile_id` is 404 and creates no project. +- `F36.coordinator-active-llm`: when the active agent profile names an LLM profile that is not saved (the seeded `default` profile keeps `llm_profile_ref: "default"` until a real LLM is set up), creating a project with a coordinator answers 201 and builds `project-coordinator` on the active LLM profile (known bug #7061: 422 `LLM profile 'default' not found`, and `project-coordinator` keeps the dangling reference). - `F36.start-member`: only the coordinator starts conversations in its project: its `POST .../children` starts a member tagged `project=`, and a member's own `POST .../children` is 409. - `F36.client-tags`: a client cannot start or fork a conversation whose `project` tag names an existing project: 422, and nothing is created. The other project keys (`turn`, `ask`, `resolved`, `resolvenote`, `prs`), or a `project` tag naming no project, are ordinary client tags. - `F36.attention`: conversations are grouped `needs_you` (waiting for confirmation), then `working`, `idle` (finished or never run), newest-updated first within a group; non-members are left out. @@ -286,6 +287,33 @@ Preconditions: control-agent-server api GET /api/projects --check . not-contains qa-f36-ghost ``` Nothing is created. +- **A coordinator on the active LLM profile (`F36.coordinator-active-llm`), known bug #7061.** + A second server whose `default` agent profile is seeded before any LLM + profile exists, so it names the unsaved `default` LLM profile; then a stub + LLM profile becomes active and a project starts a coordinator. No model + runs: the launch fails before any LLM call. + ```sh + SEEDED=$(control-agent-server launch --new --name f36-seeded --print-run) + trap 'control-agent-server stop --run "$SEEDED" >/dev/null' EXIT + control-agent-server api GET /api/agent-profiles --run "$SEEDED" --check profiles.0.name eq default \ + --check profiles.0.llm_profile_ref eq default + control-agent-server llm set --run "$SEEDED" --profile qa-f36-stub --model deepseek/deepseek-v4-flash --no-api-key --no-validate + control-agent-server api PATCH /api/settings/experimental/projects --run "$SEEDED" --json '{"enabled": true}' --expect 200 + mkdir -p "$SEEDED/fixtures/qa-f36-seeded" + control-agent-server api POST /api/projects --run "$SEEDED" \ + --json "{\"name\": \"qa-f36-seeded\", \"coordinator\": {\"working_dir\": \"$SEEDED/fixtures/qa-f36-seeded\"}}" \ + --expect 201 --save F36.coordinator-active-llm/post # bug: status eq 422 && response.body.detail contains "LLM profile 'default' not found" + control-agent-server api GET /api/agent-profiles/project-coordinator --run "$SEEDED" --check profile.llm_profile_ref eq qa-f36-stub + control-agent-server stop --run "$SEEDED" + ``` + Expected: the project is created and its coordinator runs on the active + LLM profile, as a chat started from `default` does. Known failure + (reproduced 2026-11-22 on main@74f198d, + [#7061](https://github.com/OpenHands/software-agent-sdk/issues/7061), fix + in [#7056](https://github.com/OpenHands/software-agent-sdk/pull/7056)): 422 + `Cannot start the coordinator from agent profile : LLM profile + 'default' not found`, and `project-coordinator` is saved with + `llm_profile_ref: "default"`, so it stays broken until the user edits it. - **The coordinator starts a member (`F36.start-member`).** Requires: `F36.coordinator` Needs: `llm` diff --git a/.agents/skills/verify-agent-server/references/feature-map/README.md b/.agents/skills/verify-agent-server/references/feature-map/README.md index 38bc81ba72a..c70020d2d6b 100644 --- a/.agents/skills/verify-agent-server/references/feature-map/README.md +++ b/.agents/skills/verify-agent-server/references/feature-map/README.md @@ -8,9 +8,9 @@ consumers). Read this index before driving the server, then use the matching family file as the recipe. -Maintenance baseline: main@3a893a1b26de7ec02cc0dd2427906eea6aea3fc7 (2026-11-21). The next maintenance pass starts from this commit, a pass proposes the next baseline in its PR, and merging that PR accepts it. +Maintenance baseline: main@74f198df3650da6399c6a0a2dff6272a667bbace (2026-11-22). The next maintenance pass starts from this commit, a pass proposes the next baseline in its PR, and merging that PR accepts it. -The map has **1107 sub-features**. +The map has **1108 sub-features**. ## Baseline preconditions @@ -99,7 +99,7 @@ them honest: [../maintenance.md](../maintenance.md). | F32 | [Event webhooks and product telemetry](F32-webhooks-and-telemetry.md) | event webhooks (event batches, conversation updates, headers, buffering, flush, limits, retries) and product telemetry (off by default, exporter lifecycle, sanitized payloads, consent) | behavior only: `webhooks` / `OH_WEBHOOKS_*`, `OH_TELEMETRY_*` | llm; launch `--webhook-sink` | 30 | | F33 | [Python SDK remote client (RemoteConversation, RemoteWorkspace)](F33-sdk-remote-client.md) | the Python SDK in this checkout against the server: RemoteWorkspace commands, files, git and settings readers; RemoteConversation create, run, callbacks, streaming, reattach, fork, confirmation, pause, interrupt, stop hooks, client tools, completion logs | behavior only: `Workspace(host=...)`, `RemoteWorkspace`, `RemoteConversation` | llm, tmux, git | 43 | | F34 | [TypeScript client (@openhands/typescript-client)](F34-typescript-client.md) | the TypeScript client against this checkout: server and version gate, workspace, bash, conversation, state, events and socket clients, hooks and MCP clients, typed batch-events, loadPlugin, git commits, archive and deferred-init clients, endpoint audit and drift | behavior only: `@openhands/typescript-client` (`clients/typescript`) | llm, node, uvx, git, tmux, network | 38 | -| F36 | [Projects and coordinator tools](F36-projects.md) | project records, membership through the `project` conversation tag (only the coordinator starts members), conversations grouped by attention, confirmation-safe messages, coordinator `list_workers` and `message_worker` tools, asks, a failed resolution judge, pull requests a member opened (`prs`), artifacts, project memory, restart, the `projects` switch (stored and runtime env), corrupted file | `GET`/`POST /api/projects`, `GET`/`PATCH`/`DELETE /api/projects/{id}`, `GET /api/projects/{id}/conversations`, `DELETE /api/projects/{id}/conversations/{conversation_id}`, `.../resolve`, `.../reopen`, `/api/projects/{id}/artifacts[/from-conversation|/{name}]`, `/api/projects/{id}/memory[/{name}]`, `POST /api/conversations/{id}/children` (coordinator only), `GET .../conversations/{conversation_id}/messages`, `POST /api/conversations/{id}/events` (sender, confirmation guard) | llm; recipes: tmux | 37 | +| F36 | [Projects and coordinator tools](F36-projects.md) | project records, membership through the `project` conversation tag (only the coordinator starts members), conversations grouped by attention, confirmation-safe messages, coordinator `list_workers` and `message_worker` tools, asks, a failed resolution judge, pull requests a member opened (`prs`), artifacts, project memory, restart, the `projects` switch (stored and runtime env), corrupted file | `GET`/`POST /api/projects`, `GET`/`PATCH`/`DELETE /api/projects/{id}`, `GET /api/projects/{id}/conversations`, `DELETE /api/projects/{id}/conversations/{conversation_id}`, `.../resolve`, `.../reopen`, `/api/projects/{id}/artifacts[/from-conversation|/{name}]`, `/api/projects/{id}/memory[/{name}]`, `POST /api/conversations/{id}/children` (coordinator only), `GET .../conversations/{conversation_id}/messages`, `POST /api/conversations/{id}/events` (sender, confirmation guard) | llm; recipes: tmux | 38 | | F37 | [Emoji reactions and feature flags](F37-reactions.md) | the `conversation_reactions` feature flag (stored and runtime env), the user's reactions over REST and the TypeScript client, validation, active-branch targets, the agent's `react`/`unreact` tools, what the model sees | `POST /api/conversations/{id}/reactions` (the flag's routes are F18's) | llm | 12 | | F38 | [Conversation mentions](F38-conversation-mentions.md) | the `conversation_mentions` feature flag, the agent's read-only `find_conversations` and `read_conversation` tools, mention links `[Title](conversation:)` in its answers | behavior only: agent tools (the flag's routes are F18's) | llm | 5 | | F39 | [Message edits](F39-message-edits.md) | the `message_edits` feature flag, the agent's `edit_message` tool (`str_replace` on its own earlier messages), the `MessageEditEvent` clients show in place, what the model sees, reactions on an edited message | behavior only: `edit_message` tool, `MessageEditEvent` (the flag's routes are F18's) | llm | 5 | diff --git a/.agents/skills/verify-sdk/programs/S14/search.py b/.agents/skills/verify-sdk/programs/S14/search.py index 747263fa55b..74330860cdd 100644 --- a/.agents/skills/verify-sdk/programs/S14/search.py +++ b/.agents/skills/verify-sdk/programs/S14/search.py @@ -41,6 +41,13 @@ ("grep_many", "grep", {"pattern": "needle", "path": "{ws}/many"}), ("grep_secret", "grep", {"pattern": SECRET}), ] +# Patterns with a directory part, kept out of the rg-vs-Python comparison +# below. The program runs in the workspace, so the second one searches a path +# that is not the process's cwd, which ripgrep resolves against (#7052). +dir_steps = [ + ("glob_dir", "glob", {"pattern": "src/**/*.py"}), + ("glob_dir_in_path", "glob", {"pattern": "pkg/*.py", "path": "{ws}/src"}), +] patch = f"*** Begin Patch\n*** Add File: added.txt\n+token {SECRET}\n*** End Patch" tools = [ Tool(name=GlobTool.name), @@ -50,7 +57,8 @@ def run(with_patch: bool) -> dict: - script = [{"tool": tool, "args": args} for _, tool, args in search_steps] + steps = search_steps + dir_steps + script = [{"tool": tool, "args": args} for _, tool, args in steps] if with_patch: script.append({"tool": "apply_patch", "args": {"patch": patch}}) script.append({"finish": "done"}) @@ -62,7 +70,7 @@ def run(with_patch: bool) -> dict: ] conversation.close() out = {} - names = [n for n, _, _ in search_steps] + (["patch"] if with_patch else []) + names = [n for n, _, _ in steps] + (["patch"] if with_patch else []) for name, obs in zip(names, observations): found = getattr(obs, "files", None) or getattr(obs, "matches", None) or [] out[name] = { @@ -102,6 +110,7 @@ def run(with_patch: bool) -> dict: with_rg[n]["truncated"] == without_rg[n]["truncated"] for n, _, _ in search_steps ), + "cwd_is_workspace": os.path.realpath(os.getcwd()) == os.path.realpath(ws), "newest_first": with_rg["glob_py"]["files"][:1] == ["src/pkg/new.py"], "added_file": (ws / "added.txt").read_text(), "secret_in_observations": secret_seen, diff --git a/.agents/skills/verify-sdk/references/feature-map/README.md b/.agents/skills/verify-sdk/references/feature-map/README.md index 525b89c1183..71d515dd51c 100644 --- a/.agents/skills/verify-sdk/references/feature-map/README.md +++ b/.agents/skills/verify-sdk/references/feature-map/README.md @@ -10,7 +10,7 @@ agent-server map and follows its layout. Family IDs here are `Snn`, so they never collide with that map's `Fnn`. -Maintenance baseline: main@3a893a1b26de7ec02cc0dd2427906eea6aea3fc7 (2026-11-21). The next maintenance pass starts from this commit, a pass proposes the next baseline in its PR, and merging that PR accepts it. +Maintenance baseline: main@74f198df3650da6399c6a0a2dff6272a667bbace (2026-11-22). The next maintenance pass starts from this commit, a pass proposes the next baseline in its PR, and merging that PR accepts it. The map has **504 sub-features**, **35 of them untested** (no unit or cross test exercises the behavior; most of those have an example script). diff --git a/.agents/skills/verify-sdk/references/feature-map/S14-core-tools.md b/.agents/skills/verify-sdk/references/feature-map/S14-core-tools.md index e65fd1bf073..c8e2be2bd9b 100644 --- a/.agents/skills/verify-sdk/references/feature-map/S14-core-tools.md +++ b/.agents/skills/verify-sdk/references/feature-map/S14-core-tools.md @@ -19,7 +19,7 @@ Examples: `examples/04_llm_specific_tools/01_gpt5_apply_patch_preset.py`, `examp - `S14.terminal-env`: exported variables persist in the session, the parent environment is inherited, `TerminalTool.create(..., env={...})` adds client-controlled variables, and a very large environment does not break startup. Unit: `tests/tools/terminal/test_terminal_session.py::test_environment_variable_persistence`, `::test_environment_variable_inheritance_from_parent`, `tests/tools/terminal/test_large_environment.py`. Example: none. Real-LLM: none. - `S14.terminal-output-truncation`: long output is truncated for the LLM with metadata kept, and the full output is written under the conversation's observation persistence directory (`full_output_save_dir`). Unit: `tests/tools/terminal/test_observation_truncation.py`, `tests/tools/terminal/test_terminal_session.py::test_session_truncates_large_command_output`, `::test_truncation_preserves_metadata_in_llm_content`. Example: none. Real-LLM: none. - `S14.terminal-metadata`: the PS1 marker carries cwd, exit code, username and Python interpreter into `CmdOutputMetadata`, and survives corrupted or interleaved prompts. Unit: `tests/tools/terminal/test_terminal_ps1_metadata.py`, `tests/tools/terminal/test_ps1_corruption.py`, `tests/tools/terminal/test_terminal_parsing.py`. Example: none. Real-LLM: none. -- `S14.terminal-input-encoding`: heredocs are sent in chunks and complete correctly, terminal query sequences (such as the DSR cursor-position request and OSC queries) are filtered from output, other escape sequences pass through, and literal arguments that would be mangled by the shell are guarded. Unit: `tests/tools/terminal/test_heredoc_chunked_send.py`, `tests/tools/terminal/test_escape_filter.py`, `tests/tools/terminal/test_literal_arg_guard.py`. Example: none. Real-LLM: none. +- `S14.terminal-input-encoding`: heredocs are sent in chunks and complete correctly, and on tmux the completion-boundary echo and `__OH_COMMAND_FINISHED____` marker of a previous command never show in the next observation, even when they reach the pane after its screen was cleared; terminal query sequences (such as the DSR cursor-position request and OSC queries) are filtered from output, other escape sequences pass through, and literal arguments that would be mangled by the shell are guarded. Unit: `tests/tools/terminal/test_heredoc_chunked_send.py`, `tests/tools/terminal/test_terminal_parsing.py`, `tests/tools/terminal/test_escape_filter.py`, `tests/tools/terminal/test_literal_arg_guard.py`. Example: none. Real-LLM: none. - `S14.terminal-secret-masking`: secret values registered on the conversation are masked in terminal output and in tmux debug logs. Unit: `tests/tools/terminal/test_secrets_masking.py`, `tests/tools/terminal/test_tmux_log_redaction.py`. Example: `examples/01_standalone_sdk/12_custom_secrets.py`. Real-LLM: none. - `S14.terminal-cleanup`: closing the conversation closes the terminal session (and tmux panes), and executor shutdown tolerates interpreter teardown. Unit: `tests/tools/terminal/test_conversation_cleanup.py`, `tests/tools/terminal/test_shutdown_handling.py`. Example: none. Real-LLM: none. - `S14.terminal-windows`: the PowerShell backend runs commands, sends keys and handles Ctrl+C on Windows. Unit: `tests/tools/terminal/test_windows_terminal.py`, `tests/tools/terminal/test_windows_ctrl_c.py` (both skip off Windows), `tests/tools/terminal/test_windows_terminal_send_keys.py` (runs anywhere). Example: none. Real-LLM: none. @@ -30,7 +30,7 @@ Examples: `examples/04_llm_specific_tools/01_gpt5_apply_patch_preset.py`, `examp - `S14.file-editor-validation`: relative paths, missing files, binary files, oversized files and invalid parameters return error observations; paths resolve against the workspace root; non-UTF-8 files keep their encoding; memory use stays bounded on large files. Unit: `tests/tools/file_editor/test_file_validation.py`, `tests/tools/file_editor/test_error_handling.py`, `tests/tools/file_editor/test_exceptions.py`, `tests/tools/file_editor/test_workspace_root.py`, `tests/tools/file_editor/utils/test_encoding.py`, `tests/tools/file_editor/utils/test_file_cache.py`, `tests/tools/file_editor/test_memory_usage.py`. Example: none. Real-LLM: none. - `S14.apply-patch`: `ApplyPatchAction(patch="*** Begin Patch ... *** End Patch")` adds, updates (context-matched hunks) and deletes files relative to the workspace and reports a `DiffError` for a bad patch. Unit: `tests/tools/apply_patch/test_apply_patch_executor.py`. Example: `examples/04_llm_specific_tools/01_gpt5_apply_patch_preset.py`. Real-LLM: `tests/integration/run_infer.py --tool-preset gpt5` (t01 to t08). - `S14.gemini-file-tools`: `read_file` (offset and limit), `write_file`, `edit` (replace with expected occurrence count) and `list_directory` work on workspace paths, and concurrent calls on the same file are serialized by a shared file lock. Unit: `tests/tools/gemini/read_file/test_read_file.py`, `tests/tools/gemini/write_file/test_write_file.py`, `tests/tools/gemini/edit/test_edit.py`, `tests/tools/gemini/list_directory/test_list_directory.py`, `tests/tools/gemini/test_cross_tool_locking.py`. Example: `examples/04_llm_specific_tools/02_gemini_file_tools.py`. Real-LLM: `tests/integration/run_infer.py --tool-preset gemini`. -- `S14.glob`: `glob` matches a pattern under an optional path, returns paths sorted by modification time (capped), uses `rg --files` and falls back to Python `glob` with the same results. Unit: `tests/tools/glob/test_glob_tool.py`, `tests/tools/glob/test_glob_executor.py`, `tests/tools/glob/test_consistency.py`. Example: `examples/01_standalone_sdk/24_planning_agent_workflow.py` (planning preset). Real-LLM: none. +- `S14.glob`: `glob` matches a pattern (with or without a directory part, such as `src/**/*.ts`) under an optional path, returns paths sorted by modification time (capped), uses `rg --files` and falls back to Python `glob` with the same results (known failure #7052: with ripgrep, a pattern with a directory part finds nothing unless the process runs in the search path). Unit: `tests/tools/glob/test_glob_tool.py`, `tests/tools/glob/test_glob_executor.py`, `tests/tools/glob/test_consistency.py`. Example: `examples/01_standalone_sdk/24_planning_agent_workflow.py` (planning preset). Real-LLM: none. - `S14.grep`: `grep` searches file contents by regex with an `include` filter, returns matching files (capped), uses ripgrep and falls back to Python with the same results. Unit: `tests/tools/grep/test_grep_tool.py`, `tests/tools/grep/test_grep_executor.py`, `tests/tools/grep/test_consistency.py`. Example: `examples/01_standalone_sdk/24_planning_agent_workflow.py`. Real-LLM: none. - `S14.tool-output-masking`: file editor views, the grep pattern, glob paths and apply_patch commit content are masked through one chokepoint when the conversation has secrets; without a conversation nothing is masked. Unit: `tests/tools/test_tool_output_secret_masking.py`. Example: none. Real-LLM: none. - `S14.shared-working-dir`: terminal, file editor and other tools take their working directory from the conversation workspace and need no `params` for it. Unit: `tests/tools/test_working_dir_standardization.py`, `tests/cross/test_registry_directories.py`. Example: none. Real-LLM: none. @@ -101,7 +101,7 @@ Preconditions: --check tmux_servers_after_close eq 0 ``` A nonzero exit is reported through `exit_code` with `is_error` false; `is_error` marks calls the tool refused. The three calls in one response run one after another (the single session declares the `terminal:session` resource). -- **The terminal on the default backend, the tmux pane pool (`S14.terminal-backend-select`, `S14.terminal-pane-pool`, `S14.terminal-exec`, `S14.terminal-timeout`, `S14.terminal-reset`, `S14.terminal-env`, `S14.terminal-output-truncation`, `S14.terminal-metadata`, `S14.terminal-secret-masking`, `S14.terminal-cleanup`).** The same program without `terminal_type`; with tmux installed the executor runs the pane pool, the three calls in one response overlap, and no cap applies to `timeout` without `OH_RUNTIME_IDLE_TIMEOUT_SECONDS`. +- **The terminal on the default backend, the tmux pane pool (`S14.terminal-backend-select`, `S14.terminal-pane-pool`, `S14.terminal-input-encoding`, `S14.terminal-exec`, `S14.terminal-timeout`, `S14.terminal-reset`, `S14.terminal-env`, `S14.terminal-output-truncation`, `S14.terminal-metadata`, `S14.terminal-secret-masking`, `S14.terminal-cleanup`).** The same program without `terminal_type`; with tmux installed the executor runs the pane pool, the three calls in one response overlap, no cap applies to `timeout` without `OH_RUNTIME_IDLE_TIMEOUT_SECONDS`, and the calls after the 400-line heredoc show no completion-boundary marker. ```sh export SDK_VERIFY_RUN=$(control-sdk new --field run) control-sdk program S14/terminal --arg auto \ @@ -112,6 +112,7 @@ Preconditions: --check steps.idle.exit_code eq -1 --check steps.hard.text contains "timed out after 1.0 seconds" \ --check steps.capped.is_error eq false --check steps.capped.text contains capped-ran \ --check big_saved_files len-eq 1 --check big_notice_names_saved_file eq true \ + --check steps.count.text not-contains __OH_COMMAND_FINISHED_ --check steps.server_up.text not-contains __OH_COMMAND_FINISHED_ \ --check steps.fake_ps1.exit_code eq 3 --check steps.literal.is_error eq true \ --check steps.secret.text contains "token=" --check secret_leaked eq false \ --check after_reset_in_workspace eq true --check steps.after_reset.text not-contains FOO=bar \ @@ -235,6 +236,15 @@ Preconditions: --check rg.glob_in_path.truncated eq false ``` Expected: both backends report 100 files and `truncated` false. +- **Glob patterns with a directory part (`S14.glob`).** The same program also globs `src/**/*.py` from the workspace (the program's working directory) and `pkg/*.py` under `path` `{ws}/src` (not its working directory), on both backends. + ```sh + export SDK_VERIFY_RUN=$(control-sdk new --field run) + control-sdk program S14/search --arg 100 \ + --check cwd_is_workspace eq true \ + --check python.glob_dir.count eq 2 --check python.glob_dir_in_path.files.0 eq src/pkg/new.py \ + --check rg.glob_dir.count eq 2 --check rg.glob_dir_in_path.files.0 eq src/pkg/new.py + ``` + Expected: both backends find `src/old.py` and `src/pkg/new.py` for `src/**/*.py`, and `src/pkg/new.py` for `pkg/*.py` under `src`, whatever the process working directory is. Known failure (reproduced 2026-11-22 on main@74f198d, [#7052](https://github.com/OpenHands/software-agent-sdk/issues/7052), fix in [#7053](https://github.com/OpenHands/software-agent-sdk/pull/7053)): the Python fallback finds both, but with ripgrep `pkg/*.py` under `src` reports "No files found" (not an error), because `rg --files -g ` runs without `cwd` and resolves a glob that contains `/` against the process's own working directory; `src/**/*.py` works only because the program runs in the workspace (from any other directory it finds nothing too). - **Tool presets build working agents (`S14.preset-default`, `S14.preset-gpt5-gemini`, `S14.gemini-file-tools`, `S14.apply-patch`).** Each preset's agent does a scripted task with its own file tools; the default preset also reports the tool lists of all three and the SDK's `default_tool_specs()`, and builds a structured finish tool. ```sh export SDK_VERIFY_RUN=$(control-sdk new --field run)