diff --git a/platform/inneros_core_runtime/local_execution_plane.py b/platform/inneros_core_runtime/local_execution_plane.py index 72a49f91..d46a0a14 100644 --- a/platform/inneros_core_runtime/local_execution_plane.py +++ b/platform/inneros_core_runtime/local_execution_plane.py @@ -382,7 +382,23 @@ "requirements.txt", "docker-compose.yml", ], - }, + }, + "Rafa-Innerchispa/inneros-ambient-guardian-amazon-2026": { + "profile": "python-tests", + "source_path": "/home/rlopez/inneros/inneros_core/workspaces/inneros-ambient-guardian-amazon-2026", + "package_roots": ["."], + "allowed_paths": [ + "docs", + "scripts", + "src", + "tests", + "README.md", + "devpost-submission.md", + "pyproject.toml", + "requirements.txt", + "Dockerfile", + ], + } } diff --git a/platform/inneros_core_runtime/project_runtime_registry.py b/platform/inneros_core_runtime/project_runtime_registry.py index 1207b8f3..27743b5e 100644 --- a/platform/inneros_core_runtime/project_runtime_registry.py +++ b/platform/inneros_core_runtime/project_runtime_registry.py @@ -377,6 +377,28 @@ def migrate_existing(actor: str = "codex") -> dict[str, Any]: ("ralphiia-founderos-openai", "Rafa-Innerchispa/ralphiia-founderos-openai", None, None), ("innerspark-workforce-ai", "Rafa-Innerchispa/innerspark-workforce-ai", None, None), ("innerops-agentic-platform", "Rafa-Innerchispa/innerops-agentic-platform", None, None), + ( + "ambient-guardian-amazon-2026", + "Rafa-Innerchispa/inneros-ambient-guardian-amazon-2026", + None, + { + "policy_class": "product-app", + "allowed_commands_profile": "python-tests", + "allowed_paths": [ + "docs", + "scripts", + "src", + "tests", + "README.md", + "devpost-submission.md", + "pyproject.toml", + "requirements.txt", + "Dockerfile", + ], + "package_roots": ["."], + "write_scope": "worktree", + }, + ), ("gitlab-contributorops-agent", "Rafa-Innerchispa/gitlab-contributorops-agent", None, None), ( "infralens-ocr-amd", diff --git a/platform/tests/test_local_execution_plane.py b/platform/tests/test_local_execution_plane.py index c6123a55..a020ffc3 100644 --- a/platform/tests/test_local_execution_plane.py +++ b/platform/tests/test_local_execution_plane.py @@ -425,3 +425,17 @@ def test_python_profile_allows_bounded_gitlab_contributorops_wrapper() -> None: ] assert lep._command_allowed(command, "python-tests") is True assert lep._command_allowed(["python3", "platform/scripts/other_gitlab_script.py"], "python-tests") is False + + +def test_ambient_guardian_has_bounded_default_repo_profile() -> None: + repo = "Rafa-Innerchispa/inneros-ambient-guardian-amazon-2026" + profiles = lep._load_repo_profiles() + assert repo in profiles + conf = profiles[repo] + assert conf["profile"] == "python-tests" + assert conf["package_roots"] == ["."] + assert "src" in conf["allowed_paths"] + assert "tests" in conf["allowed_paths"] + assert "devpost-submission.md" in conf["allowed_paths"] + assert ".env" not in conf["allowed_paths"] + assert conf["source_path"].endswith("/workspaces/inneros-ambient-guardian-amazon-2026") diff --git a/platform/tests/test_project_runtime_registry.py b/platform/tests/test_project_runtime_registry.py new file mode 100644 index 00000000..bf645ab1 --- /dev/null +++ b/platform/tests/test_project_runtime_registry.py @@ -0,0 +1,27 @@ +from __future__ import annotations + +from inneros_core_runtime import project_runtime_registry as prr + + +def test_migrate_existing_registers_ambient_guardian(monkeypatch, tmp_path) -> None: + monkeypatch.setenv("INNEROS_CORE_ROOT", str(tmp_path)) + + result = prr.migrate_existing(actor="pytest") + + assert result["ok"] is True + resolved = prr.resolve_project( + project_id="ambient-guardian-amazon-2026", + repo="Rafa-Innerchispa/inneros-ambient-guardian-amazon-2026", + node="primary", + ) + assert resolved["ok"] is True + project = resolved["project"] + assert project["project_id"] == "ambient-guardian-amazon-2026" + assert project["repo"] == "Rafa-Innerchispa/inneros-ambient-guardian-amazon-2026" + assert project["policy_class"] == "product-app" + assert project["write_scope"] == "worktree" + assert project["allowed_commands_profile"] == "python-tests" + assert project["package_roots"] == ["."] + assert "src" in project["allowed_paths"] + assert "tests" in project["allowed_paths"] + assert ".env" not in project["allowed_paths"]