Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Agent: claude
create_issue.py read startLine at the top level, but extract_findings.py nests it under location, so every verified row lost its line number. The regression test now runs create_issue.py end to end on extractor output, and CI runs it. Agent: claude
|
@tlq5l is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Looks good to me. The verify prompt only returns findingId/verdict/confidence/reasoning, so joining back to all-findings.jsonl by findingId is the right place to fix this, and reading location.startLine matches what extract_findings.py actually writes. I ran the new tests locally: they pass on this branch, and the main test fails against the old create_issue.py, so the regression is covered end to end through the real extractor.
Fine with leaving generate_report.py out of this one. organize.py's security index reads skill/severity/file/title straight off verified.jsonl too, so it's probably worth a follow-up alongside that.
There was a problem hiding this comment.
Looks good to me. Joining on findingId against all-findings.jsonl fixes #227 where the problem starts. The verify prompt only returns verdict fields, so the script can't rely on verified.jsonl for display data. Reading location.startLine also lines up with how extract_findings.py normalizes records.
The end-to-end test runs the real extractor output through create_issue.py, so it catches this break. I ran it locally: it fails against main and passes on this branch.
|
The |
verified.jsonl only holds verdict data, so the tracking issue's findings table rendered empty severity, skill, file and title cells. Join each verified entry to its finding in all-findings.jsonl by findingId before rendering. Adds an end-to-end test that runs create_issue.py on a sweep directory with a fake gh and checks the rendered row. Agent: claude
The verified-findings join pulls title, file and skill from all-findings.jsonl into the issue table. Those values are scanned from code, so: - escape pipes and flatten newlines in table cells, so a title or skill cannot add cells or forge a row - treat a non-object location as missing instead of crashing - ignore non-string findingIds instead of crashing on unhashable values - fail before posting when one findingId maps to two different findings, rather than letting file order pick the row - null or empty display fields in verified.jsonl no longer override the finding's values Each case has an end-to-end regression test that failed before this fix. Agent: claude
… values build_issue_body read startLine from a location that may be a string or list, and keyed findings by findingId without checking the type, so one malformed finding crashed the tracking issue. Treat a non-object location as missing and skip non-string findingIds, as join_finding_details does. Move the end-to-end tests to create_issue_breaks_test.py so the sweep test command (*_test.py) runs them. Agent: claude
Fixes #227
build_issue_body()inskills/warden-sweep/scripts/create_issue.pyread severity, skill, file, line and title fromverified.jsonl. Phase 2 appends only verdict data there (findingId,verdict,confidence; seereferences/verify-prompt.md), so every row of the tracking issue rendered as| info | | `` | |.The function now looks up each verified entry by
findingIdinall_findingsand renders{**full_record, **verified_entry}: keys in the verified row override the matching all-findings entry. A verified entry with a match now shows its severity, skill, file, line and title. The line comes from the nestedlocation.startLinethatextract_findings.pywrites (skills/warden-sweep/scripts/extract_findings.py:93-96); a top-levelstartLineis used first when present. A verified entry with no match still gets a row, with blank details. This implements issue #227's option 1.generate_report.pyalso reads severity fromverified.jsonl(lines 60, 127 and 206); I left it alone to keep this diff to the issue.Added
create_issue_test.py: end-to-end tests that run the realextract_findings.pyon a warden log, thencreate_issue.pywith a stubgh. CI runs them throughpnpm test:sweep-scripts.Added
create_issue_breaks_test.py: end-to-end cases for malformed rows (non-object location, unhashable finding id and others);build_issue_body()now treats a non-object location as missing and skips non-string finding ids instead of crashing.Callers checked: skills/warden-sweep/scripts/create_issue.py, skills/warden-sweep/scripts/create_issue_test.py, skills/warden-sweep/scripts/create_issue_breaks_test.py
Real run (agent-run) at d78271f, clean setup (empty HOME, no git config):
pnpm test:sweep-scripts, exit 0. Last output line:OK. Record:.git/live-run-d78271f.txt(local clone).AI disclosure: Agent-written and agent-checked; the maintainer's CI will run the suite; the author takes responsibility.