Fail closed on invalid Glas profiles
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
parent
561538c95e
commit
b933cf52c8
12 changed files with 455 additions and 9 deletions
|
|
@ -54,6 +54,38 @@ def test_action_field_path_interpolation_resolves_context_value() -> None:
|
|||
]
|
||||
|
||||
|
||||
def test_action_carries_declared_profile_and_renders_attribution_refs() -> None:
|
||||
rules = [
|
||||
{
|
||||
"id": "profiled-task",
|
||||
"condition": "",
|
||||
"action": {
|
||||
"task_template": "Run controlled task",
|
||||
"target_repo": "activity-core",
|
||||
"harness_profile_ref": "harness.agent-dev@1.0.0",
|
||||
"approach_hint": "legacy-coding",
|
||||
"execution_refs": {
|
||||
"correlation_id": "context.request.correlation_id",
|
||||
"goal_refs": ["context.request.goal_ref"],
|
||||
},
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
specs = expand_rule_actions(
|
||||
rules,
|
||||
_Event(),
|
||||
{"request": {"correlation_id": "corr-7", "goal_ref": "goal:7@1"}},
|
||||
)
|
||||
|
||||
assert specs[0]["harness_profile_ref"] == "harness.agent-dev@1.0.0"
|
||||
assert specs[0]["approach_hint"] == "legacy-coding"
|
||||
assert specs[0]["execution_refs"] == {
|
||||
"correlation_id": "corr-7",
|
||||
"goal_refs": ["goal:7@1"],
|
||||
}
|
||||
|
||||
|
||||
def test_for_each_binds_each_list_item_before_condition_and_action_rendering() -> None:
|
||||
rules = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue