Repository navigation
fix(contributor-check): report an account GitHub search refuses as UNKNOWN, and name the path on API errors - #57
Conversation
…KNOWN The search API answers 422 "The listed users cannot be searched" for some accounts, which crashed the check. Report those as UNKNOWN with a search_unavailable signal, and name the request path on every API failure line. Closes #56. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
|
That explains the trace cleanly. I had narrowed it to the token identity rather than the query shape and then had nowhere further to go, because the refusal names no path and the local run was authenticated as the account being searched. Reading #57, the discrimination is the part I would have got wrong: a generic 422 still raises, so the refusal is handled without the catch widening to every validation failure. One thing worth knowing rather than changing. The refusal is a property of the account, not a transient fault, so an account that search refuses lands UNKNOWN every time rather than once. If that property is something the account holder can set or trigger, the check has a self-service exemption, and the person most motivated to find it is the one the check exists for. If it is a GitHub-side state the account does not control, it is just a small unscoreable population and the signal is doing its job. I do not know which, and the answer changes whether |
|
@Mayur021 it is not an exemption either way. The action orders |
|
The ordering settles it, thanks. I had not read that far down the action. One thing I noticed while checking, and I would not hold the PR for it. The Because |
…ntial and cluster probes Both probes turned every 422 into None, so an account GitHub search refuses read as having no merge or issue history and scored NONE. The overall label was still UNKNOWN through the profile check, but the credential row reported a clean result it never established. A 422 whose body says the user cannot be searched now raises SearchUnavailable in each probe's _api, and the probe reports UNKNOWN. Any other 422 is read as before. Both files leave the unmodified set, so their checksums move out of vendor-integrity and into the README's provenance note. Raised by @Mayur021 on #57. Signed-off-by: Imran Siddique <imran.siddique@opaque.co> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Mayur021 confirmed, and it is in this PR now (f70a941). You were right that the credential row was reporting a clean history it had never read. |
|
Checked it. The refusal test lands before the 404-and-422 catch-all in both probes, so the swallow can no longer reach a refused search, and the cluster report carries the flag into risk_level rather than inferring it from an edge count that was never established. The part I would not have thought to ask for is keeping both upstream digests in the README as prose instead of dropping the rows. The fork boundary stays auditable that way: someone can still establish what the bytes were before the change, which a deleted row would have cost permanently. Nothing further from me on this one. |
Qiang-Xu
left a comment
There was a problem hiding this comment.
Looks good to me in general. Do we know the root cause of the 422 error?
Closes #56.
The 422 is the search API declining an
author:query for the PR's author: "The listed users cannot be searched either because the users do not exist or you do not have permission to view the users." It does this for the authors of both failing runs (#49, #53) under a maintainer token as well, while a control account searches normally. Under the account's own token it returns 200, which is why the local trace in #56 did not reproduce it._search_issuesraisesSearchUnavailableon that 422. Any other 422 is still raised as itself.check_contributorthen reportsUNKNOWNwith asearch_unavailablesignal, after the two checks that need no search. Spray, credibility, credential and overlap all read search, so scoring only the remainder would read as a clean result._apifailure line names the request path, as [Bug] _api raises without naming the request path, so the 422 in Contributor Reputation Check cannot be located #56 proposed, including the unretried-status branch that printed nothing.Five new tests, all five failing against main. Run end to end against the live API, the author of #49 now returns
UNKNOWNinstead of exiting 1, and a control account still returnsLOW.🤖 Generated with Claude Code