Skip to content

Commit 42a5744

Browse files
committed
fix(validation): resolve F-05/F-06 audit gate
1 parent 3d5e32b commit 42a5744

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Dockerfile text eol=lf
1010
*.md text eol=lf
1111
*.toml text eol=lf
1212
*.ps1 text eol=crlf
13-
tests/contracts/cas-contracts/v0.1.0/*.json -text
13+
tests/contracts/cas-contracts/v0.1.0/*.json -text -diff

src/cas_reference_product/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from functools import lru_cache
21
import re
2+
from functools import lru_cache
33
from typing import Literal
44

55
from pydantic import Field

src/cas_reference_product/workflow.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ class FoundryWorkflowAgentService:
3636
"""Invoke a Foundry Next Gen agent reference through the project Responses client."""
3737

3838
def __init__(self, settings: Settings) -> None:
39-
if not settings.foundry_ready:
39+
endpoint = settings.foundry_project_endpoint
40+
agent_name = settings.foundry_agent_name
41+
if not settings.foundry_ready or endpoint is None or agent_name is None:
4042
raise ValueError("Foundry backend requires a valid project endpoint and agent name")
41-
assert settings.foundry_project_endpoint is not None
42-
assert settings.foundry_agent_name is not None
43-
self._agent_name = settings.foundry_agent_name
43+
self._agent_name = agent_name
4444
self._client = AIProjectClient(
45-
endpoint=settings.foundry_project_endpoint,
45+
endpoint=endpoint,
4646
credential=build_credential(settings.environment),
4747
).get_openai_client()
4848

0 commit comments

Comments
 (0)