Normalize Glas execution evidence
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
parent
b933cf52c8
commit
7e81545b24
13 changed files with 528 additions and 33 deletions
|
|
@ -7,6 +7,7 @@ from datetime import datetime, timedelta, timezone
|
|||
from unittest.mock import MagicMock
|
||||
|
||||
from activity_core.run_artifacts import (
|
||||
_ops_summary,
|
||||
artifacts_from_ops_result,
|
||||
build_forgejo_blob_url,
|
||||
match_ops_runs_to_activity_run,
|
||||
|
|
@ -88,3 +89,42 @@ def test_match_ops_runs_window_fallback() -> None:
|
|||
matched = match_ops_runs_to_activity_run(ar, [far, near])
|
||||
assert near in matched
|
||||
assert far not in matched
|
||||
|
||||
|
||||
def test_ops_summary_exposes_compact_execution_constellation() -> None:
|
||||
now = datetime(2026, 8, 22, 20, 0, tzinfo=timezone.utc)
|
||||
row = MagicMock()
|
||||
row.id = uuid.uuid4()
|
||||
row.state = "succeeded"
|
||||
row.title = "Profiled run"
|
||||
row.target_repo = "activity-core"
|
||||
row.claim_owner = "glas-worker@railiance01"
|
||||
row.attempt = 1
|
||||
row.triggering_event_id = "event-1"
|
||||
row.source_id = "profiled"
|
||||
row.approach_hint = "legacy-only"
|
||||
row.harness_profile_ref = "harness.agent-dev@1.0.0"
|
||||
row.execution_refs = {"goal_refs": ["goal:42@1"]}
|
||||
row.created_at = now
|
||||
row.updated_at = now
|
||||
row.result = {
|
||||
"ok": True,
|
||||
"execution_evidence": {
|
||||
"profile_ref": "harness.agent-dev@1.0.0",
|
||||
"rein_id": "rein-aharness",
|
||||
"rein_version": "0.1.0",
|
||||
"resolved_model": "claude-sonnet-4-6",
|
||||
"sandbox_profile": "profile.bwrap-local",
|
||||
"outcome": "succeeded",
|
||||
"duration_s": 5.2,
|
||||
},
|
||||
"raw_output": "must-drop-even-for-historic-rows",
|
||||
}
|
||||
|
||||
summary = _ops_summary(row)
|
||||
|
||||
assert summary["execution_evidence"]["rein_id"] == "rein-aharness"
|
||||
assert summary["result"]["execution_evidence"]["profile_ref"] == (
|
||||
"harness.agent-dev@1.0.0"
|
||||
)
|
||||
assert "raw_output" not in str(summary)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue