Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class AutowebcompatDiagnosisResult(BaseModel):
root_cause: str | None
evidence: str | None
testcase_url: str | None
existing_bugs: list[int]


class Task(BaseTask[ResultT]):
Expand Down Expand Up @@ -391,7 +392,17 @@ def system_prompt(self) -> str:
matching this schema:
{json.dumps(DiagnosisText.model_json_schema(), indent=2)}

6. Submit your diagnosis via `submit_result` (see "Reporting your result").
6. If the difference is a browser engine implementation difference, query
bugzilla.mozilla.org for existing core bugs that describe the same problem.
Do not query bugzilla more than 3 times in total to obtain a candidate set.
Consider only unresolved bugs. Once you have a candidate set, select at most
one bug per identified issue. Prefer to select no bugs rather than ones with
low confidence of being the root cause. When querying do not select
large fields such as descriptions, comments or attachments. Once you have
high confidence candidates you may additionally select descriptions and comments
to verify your pick.

7. Submit your diagnosis via `submit_result` (see "Reporting your result").
"""
)
)
Expand Down Expand Up @@ -437,6 +448,7 @@ def into_result(self) -> AutowebcompatDiagnosisResult:
root_cause=diagnosis.root_cause if diagnosis is not None else None,
evidence=diagnosis.evidence if diagnosis is not None else None,
testcase_url=self.testcase_url,
existing_bugs=self.diagnosis_result.existing_bugs if self.diagnosis_result else [],
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,17 @@ class DiagnosisResult(BaseModel):
),
]

existing_bugs: Annotated[
list[int],
Field(
description=(
"List of bug ids from bugzilla.mozilla.org that may correspond to the root "
"cause identified by diagnosis. Empty if no candidate bugs were found."
),
),
]


@field_validator("diagnosis_path", "testcase_path", mode="after")
@classmethod
def validate_paths(cls, path: Path | None) -> Path | None:
Expand Down