CI / checks (push) Skipped
CI / checks (pull_request) Failing after 55s
execution.SSHHost.execute is now the only way the agent runs anything (L13). Commands travel as a script on SSH's stdin, so the secrets handed to a call are never on a command line, and every value handed out is redacted from the output. Timeouts kill the remote process group, and an unreachable host is reported as such, not as a failed command. Workspace and GitRepo run on the build VM. The clone uses the repository's SSH URL, so no credential is stored in it (#89); fetches and pushes get the push key over stdin, in a short-lived ssh-agent, and PRs are still opened from the agent's host with its API token. The bench runs on the build host too. Tests reach "the build VM" through a throwaway local sshd (nisse_dev .testing); CI installs openssh-server. The live push test now pushes with the sandbox's deploy key (NISSE_PUSH_KEY). Fixes #89. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""One live benchmark run: the simplest task, through the agent's own
|
|
client wiring, with the test config's executor."""
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from nisse_dev.agent import make_llm_clients
|
|
from nisse_dev.bench.runner import run_task
|
|
from nisse_dev.bench.tasks import load_tasks
|
|
from nisse_dev.catalog import ModelCatalog
|
|
from nisse_dev.config import AgentConfig
|
|
from nisse_dev.execution import SSHHost
|
|
|
|
pytestmark = pytest.mark.integration
|
|
|
|
|
|
def test_the_simplest_task_passes_live(
|
|
live_config: AgentConfig, tmp_path: Path, ssh_host: SSHHost
|
|
) -> None:
|
|
catalog = ModelCatalog.discover(live_config.llm_base_url, live_config.llm_token)
|
|
normalized, _ = make_llm_clients(live_config, catalog)
|
|
facts = catalog.facts(live_config.roles.executor)
|
|
[task] = load_tasks(["write-function"])
|
|
|
|
record = run_task(
|
|
task, facts, normalized, live_config.tuning, host=ssh_host, workdir=tmp_path
|
|
)
|
|
|
|
assert record.fallbacks == []
|
|
assert record.success, (
|
|
f"{record.outcome}: {record.outcome_note}\n{record.check_output}"
|
|
)
|
|
assert record.cost >= 0
|