fj pr list fails on any repo with a Forgejo system user as requested reviewer: negative user ids do not fit u64 #246
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fj pr listfails outright on any repo where a PR has a Forgejo system user as a requested reviewer. It has been failing onrasterstate/fjitself, on two machines, with an error that names no field, no PR and no repo:Root cause
The request succeeds. The deserializer is what fails:
The
-2is a user id:forgejo-actionsis a Forgejo system account (noreply@forgejo.org, created1970-01-01). Forgejo uses negative ids for its system and ghost users, and fj types the user id asu64, so any payload containing one is undecodable. Nothing is wrong with the data.Why this is worse than a broken subcommand
The failure is total and it is silent about its cause.
fleet-statusreportsrasterstate/fj MISSINGin the PR queue, which reads identically to "no PRs" or "repo unreachable", so the supervising agent has been blind to every open PR in this repo without knowing it. A gate that fails closed is fine; a gate that fails quiet cannot distinguish "nothing happened" from "nothing was observed".Two PRs currently trip it, so the blindness is not hypothetical.
Expected
-1) and system (-2) users parse like any other. This is a data-model fix, not a special case: negative ids are valid Forgejo, not corruption.decoding JSON list responsesent me to--debugto learn anything at all.Related, not the same
invalid type: null, expected a sequenceonfj pr checks) is closed, and #245 fixes the null-check-status list. Same class of defect: fj's model is stricter than what Forgejo actually returns. Worth a sweep of the response types for other fields that are narrower than the API contract, because these keep surfacing one command at a time.Reproduction
Reproduced on fj 0.4.1 on usw-dev-01 and on the operator's laptop.