pr: cover negative system reviewer ids #247
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/246-negative-user-ids-pr-list"
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?
Why
fj#246 showed that
fj pr list --repo rasterstate/fjcan fail to decode a successful Forgejo response when a PR contains Forgejo'sforgejo-actionssystem account as a requested reviewer. Currentmainalready has the signedUser.id: i64model fix from #231, but there was no PR-list fixture covering the real shape that broke fleet visibility, and list decode errors still did not name the endpoint or field.What
requested_reviewers: [{ "id": -2, "login": "forgejo-actions" }].serde_path_to_error, so failures name the list endpoint and JSON field path.GET /api/v1/repos/o/r/pulls?...andfield [0].id.Sweep
User.idis already signed onmainand is the shared model for PR authors, requested reviewers, issue assignees, comments, collaborators, and repo owners. That covers the Forgejo ghost/system-account negative IDs.u64IDs insrc/apiare object identifiers: PRs, issues, labels, milestones, releases/assets, hooks, deploy keys, workflow runs/jobs/artifacts, orgs/teams, and notifications. I did not find another user-id field typed unsigned.Testing
RUSTC_WRAPPER= cargo test pull_list_RUSTC_WRAPPER= cargo test deserializes_negative_system_actor_idRUSTC_WRAPPER= cargo testRUSTC_WRAPPER= cargo clippy --all-targets -- -D warningsRUSTC_WRAPPER= cargo run --quiet -- pr list --repo rasterstate/fj --no-pagerForseti review
No blocking findings from the lead reviewer.
Findings
P2
src/client/mod.rs:685— This replacesserde_json::from_str, which validates that the entire string is consumed, with a rawserde_json::Deserializerpassed toserde_path_to_error::deserialize. That deserializes the firstVec<T>value but does not by itself callDeserializer::end(), so a malformed successful response like[{...}] trailingcan be accepted as a valid page. That weakens the API response contract and can hide server/proxy corruption that was previously reported as a decode error.PR:
rasterstate/fj#247Head SHA:
9ed3126bfae6Review job:
sha256:ad988286ca4da7c77867148af6775a9339c3c1722b5a355418d73efc4d7d461dProvider pair:
openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001Blocking findings:
0Inline findings:
1Model tokens:
44877 in / 3865 out(25138from cache) ≈$0.1529Token source:
GITHUB_TOKENRunner:
54957114493cRun: https://rasterhub.com/rasterstate/fj/actions/runs/449
Forseti review
No blocking findings from the lead reviewer.
Findings
P2
src/client/mod.rs:685— This replacesserde_json::from_str, which validates that the entire string is consumed, with a rawserde_json::Deserializerpassed toserde_path_to_error::deserialize. That deserializes the firstVec<T>value but does not by itself callDeserializer::end(), so a malformed successful response like[{...}] trailingcan be accepted as a valid page. That weakens the API response contract and can hide server/proxy corruption that was previously reported as a decode error.PR:
rasterstate/fj#247Head SHA:
9ed3126bfae6Review job:
sha256:ad988286ca4da7c77867148af6775a9339c3c1722b5a355418d73efc4d7d461dProvider pair:
openai:gpt-5.5+anthropic:claude-haiku-4-5-20251001Blocking findings:
0Inline findings:
1Model tokens:
44877 in / 3865 out(25138from cache) ≈$0.1529Token source:
GITHUB_TOKENRunner:
54957114493cRun: https://rasterhub.com/rasterstate/fj/actions/runs/449