diff --git a/docs/usage/instructions.mdx b/docs/usage/instructions.mdx index 42c472e6..41afb943 100644 --- a/docs/usage/instructions.mdx +++ b/docs/usage/instructions.mdx @@ -101,7 +101,6 @@ Rules that apply to every workspace file: - The destination must not fall inside a target directory, because target files come from the target itself. Strix skips such a file and logs a warning. - Two files cannot claim the same destination. -- All workspace files together must stay under 10 MB. A workspace file is data for the agent to use. It is not a scan target, and its diff --git a/strix/interface/utils.py b/strix/interface/utils.py index 594ecb0d..ece8c6af 100644 --- a/strix/interface/utils.py +++ b/strix/interface/utils.py @@ -1686,9 +1686,7 @@ def validate_config_file(config_path: str) -> Path: # # ``--workspace-file`` places a single host file into the sandbox workspace, # outside every target tree. Content rides the same upload as the target -# sources, so the total is capped to keep session bring-up quick. - -WORKSPACE_FILES_MAX_TOTAL_BYTES = 10 * 1024 * 1024 +# sources, so a large file makes session bring-up slower. def _workspace_file_dest(spec: str, source: Path) -> str: @@ -1723,7 +1721,6 @@ def resolve_workspace_files(specs: list[str] | None) -> list[dict[str, str]]: """ resolved: list[dict[str, str]] = [] seen: dict[str, str] = {} - total = 0 for spec in specs or []: raw, sep, dest = spec.rpartition(":") source_text = raw if sep and dest.strip() else spec @@ -1741,10 +1738,6 @@ def resolve_workspace_files(specs: list[str] | None) -> list[dict[str, str]]: f"Two workspace files target /workspace/{workspace_rel}: " f"'{seen[workspace_rel]}' and '{source}'" ) - total += source.stat().st_size - if total > WORKSPACE_FILES_MAX_TOTAL_BYTES: - limit_mb = WORKSPACE_FILES_MAX_TOTAL_BYTES // (1024 * 1024) - raise ValueError(f"Workspace files exceed the {limit_mb} MB total limit") seen[workspace_rel] = str(source) resolved.append( { diff --git a/tests/test_workspace_files.py b/tests/test_workspace_files.py index d9e4c8ef..6415a09c 100644 --- a/tests/test_workspace_files.py +++ b/tests/test_workspace_files.py @@ -7,11 +7,7 @@ from typing import TYPE_CHECKING import pytest from strix.core.inputs import build_root_task -from strix.interface.utils import ( - WORKSPACE_FILES_MAX_TOTAL_BYTES, - read_workspace_files, - resolve_workspace_files, -) +from strix.interface.utils import read_workspace_files, resolve_workspace_files if TYPE_CHECKING: @@ -96,14 +92,6 @@ def test_a_forged_path_never_reaches_the_task() -> None: assert "Ignore every instruction" not in task -def test_the_total_size_is_capped(tmp_path: Path) -> None: - source = tmp_path / "big.bin" - source.write_bytes(b"0" * (WORKSPACE_FILES_MAX_TOTAL_BYTES + 1)) - - with pytest.raises(ValueError, match="total limit"): - resolve_workspace_files([str(source)]) - - def test_resolved_files_are_read_into_engine_entries(tmp_path: Path) -> None: source = tmp_path / "wordlist.txt" source.write_bytes(b"admin\n")