feat(runtime): consume governed Activity Core closes

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a06ba0-10aa-7ea0-b20a-4f3fac39efe9
This commit is contained in:
tegwick 2026-09-04 19:54:07 +02:00
parent 0e6d795aa4
commit d00ffcb402
22 changed files with 1218 additions and 148 deletions

View file

@ -7,7 +7,12 @@ from pathlib import Path
import pytest
from rein_aharness.glas_execution import GLAS_ACTOR, GlasExecutionError, execute_profiled_run
from rein_aharness.glas_execution import (
GLAS_ACTOR,
GlasExecutionError,
execute_profiled_run,
normalise_execution_evidence_for_close,
)
from rein_aharness.ops_run_client import OpsRun, OpsRunConfig
@ -93,6 +98,29 @@ def test_profiled_run_rejects_invalid_gateway_result(tmp_path: Path) -> None:
)
def test_close_evidence_normalizer_drops_direct_and_unknown_values() -> None:
result = normalise_execution_evidence_for_close(
{
"outcome": "succeeded",
"profile_ref": "harness.agent-dev-local@1.0.0",
"artifacts": ["docs/result.md", {"secret": "drop"}],
"refs": {
"assignment_ref": "assignment:1",
"goal_refs": ["goal:1", {"secret": "drop"}],
"api_key": "drop",
},
"provider_response": {"secret": "drop"},
}
)
assert result == {
"profile_ref": "harness.agent-dev-local@1.0.0",
"outcome": "succeeded",
"artifacts": ["docs/result.md"],
"refs": {"assignment_ref": "assignment:1", "goal_refs": ["goal:1"]},
}
def test_profiled_actor_validates_against_real_glas_and_sandboxer(tmp_path: Path) -> None:
contract = pytest.importorskip("glas_harness.contract")
sandbox_models = pytest.importorskip("sandboxer.models")