Skip to content
Merged
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
1 change: 0 additions & 1 deletion agentrace/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def check_unverified_claim(run: AgentRun) -> list[Finding]:
for p in hedges:
for m in re.finditer(p, run.result, re.I):
hits.append(_context(run.result, m.start()))
break
if hits:
return [
Finding(
Expand Down
7 changes: 7 additions & 0 deletions tests/test_agentrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ def test_hedged_claim_is_caught_but_only_low():
assert findings and findings[0].severity == "low"


def test_repeated_hedged_claims_are_counted():
r = _run(result="Probably hiring. Probably expanding. Probably remote-friendly. " + "x" * 200)
findings = [f for f in analyse(r) if f.check == "hedged_claim"]
assert findings
assert findings[0].message.startswith("3 hedged claim(s).")


def test_many_urls_without_verification_is_flagged():
urls = " ".join(f"https://example{i}.com/careers" for i in range(8))
assert "unverified_urls" in _codes(_run(result=urls + " " + "x" * 200))
Expand Down