feat(tui): replace Textual with a Go/Bubble Tea interface (#941)

This commit is contained in:
oyasumi
2026-08-03 19:23:07 -07:00
committed by GitHub
parent a51ca18666
commit 5bb9fe896b
128 changed files with 16229 additions and 6562 deletions
+34 -1
View File
@@ -8,7 +8,12 @@ from typing import Any
import litellm
import pytest
from strix.core.inputs import build_root_task, child_initial_input, make_model_settings
from strix.core.inputs import (
build_root_task,
build_scope_context,
child_initial_input,
make_model_settings,
)
def _child_kwargs(parent_history: list[Any]) -> dict[str, Any]:
@@ -202,6 +207,34 @@ def test_build_root_task_web_application_with_instructions() -> None:
assert "Special instructions: Focus on auth." in task
def test_build_root_task_workspace_mount_is_not_a_target() -> None:
"""A target-less run gets a working directory, not an assessment scope."""
config = {
"targets": [],
"user_instructions": "Find IDOR in the checkout flow.",
"workspace_mount": "/Users/me/code/api",
"workspace_subdir": "api",
}
task = build_root_task(config)
assert "Working Directory:" in task
assert "/workspace/api" in task
assert "No scan target was set" in task
assert "Special instructions: Find IDOR in the checkout flow." in task
# It must not be presented as an asset to test.
for label in ("Local Codebases:", "Repositories:", "URLs:", "IP Addresses:"):
assert label not in task
def test_build_scope_context_authorizes_nothing_without_targets() -> None:
"""A mounted workspace grants no authorized scope."""
scope = build_scope_context(
{"targets": [], "workspace_mount": "/Users/me/code/api", "workspace_subdir": "api"}
)
assert scope["authorized_targets"] == []
def test_build_root_task_diff_scope() -> None:
config = {
"targets": [],