Skip to content

Conversation

@patricebechard
Copy link
Collaborator

No description provided.

Comment on lines +14 to +35
class ServiceNowIncidentTask(AbstractServiceNowTask):

def __init__(self, seed: int, fixed_config: Dict[str, Any] = None, start_rel_url: str = "/now/nav/ui/home") -> None:
super().__init__(seed, start_rel_url=start_rel_url)
self.task_is_setup = False
self.config = fixed_config if fixed_config else self.random.choice(self.all_configs())
self.timeout = 60000
self.created_sysids = []

def setup_goal(self, page: playwright.sync_api.Page) -> Tuple[str, dict]:
"""Setup the task configuration and produce the goal."""

goal = self.config["goal"]
info = self.config

return goal, info

def cheat(self, page: playwright.sync_api.Page, chat_messages: List[str]) -> None:
pass

def all_configs(self):
raise NotImplementedError
Copy link
Collaborator

@marquezo marquezo Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for these create incidents we should just reuse what exists. I will do a PR for these incident tasks

Comment on lines +48 to +56
response = requests.get(
f"{self.instance.snow_url}/api/now/table/interaction",
auth=self.instance.snow_credentials,
headers={"Accept": "application/json"},
params={
"sysparm_query": f"short_descriptionLIKE{customer_problem}",
"sysparm_fields": "sys_id,short_description",
"sysparm_limit": 1,
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you just validate by getting the sys id of the created interaction and then checking whether the short description matches the expected value? This way, we can just reuse the other create tasks code

@patricebechard patricebechard marked this pull request as ready for review December 12, 2025 17:14
@patricebechard patricebechard merged commit 1071f6d into dynamic-guidance-tasks Dec 12, 2025
4 of 7 checks passed
@patricebechard patricebechard deleted the patrice/dynamic-guidance branch December 12, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants