Repository navigation
Keep what a PR ignore leaves on each alert - #138
Atakan Solak (mapleleafu) wants to merge 1 commit into
Conversation
The API now sends actionAfterPullRequestIgnore on alerts for orgs on the new Policies: the action an alert keeps when a pull request comment ignores its package, or no key when the ignore removes it. SocketAlert drops keys it doesn't declare, and the stream dedupe merges sightings, so the Python CLI never saw it. SocketAlert gains the field (None when absent). When Dedupe merges sightings of one alert, it keeps the strictest value. Refs WEB-2599 Assisted-by: Claude Code:claude-opus-5-5
PR SummaryLow Risk Overview
Unit tests cover diff parsing, stream dedupe merge behavior, and HTTP stream fixtures. Reviewed by Cursor Bugbot for commit 15d5192. Configure here. |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 15d5192. Configure here.
LLM Description written by Claude Code:claude-opus-5-5
Explainer video, covering all three PRs: watch. Walkthrough: https://claude.ai/artifact/77ujJq9pxYd8DMjthjB3Y6
SocketAlertgainsactionAfterPullRequestIgnore: the action an alert keeps when a pull request comment ignores its package (error,warnormonitor), orNonewhen the ignore removes it. WhenDedupemerges sightings of one alert on the full-scan stream, it keeps the strictest value.Why?
For orgs on the new Policies, the API now sends this key on
GET diff-scans/{id},GET full-scans/diffandGET full-scans/{id}(SocketDev/depscan#32287). The Python CLI needs it to stop an@SocketSecurity ignorefrom passing a Block the org's policy keeps. TodaySocketAlert.from_dictdrops undeclared keys, so the CLI never sees it.For orgs not on the new Policies the API sends no key, and the field is
None.Public Changelog
N/A
Refs WEB-2599
Details
to_dictoverride: parents serialize withasdict, so the key appears asNonewhen absent (noted in the changelog).Dedupecopies the key from the first sighting that has it. On a merge it keeps the higherDedupe.action_rank; an absent or unknown value ranks lowest.test_socket_alert_action_after_pull_request_ignore.py(raw JSON throughDiffArtifacts.from_dict),test_dedupe.py(merge order) andtest_full_scan_cached_polling_http.py(stream fixture). 211 unit tests pass.