GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fleet gh: passthrough with personal + App token rotation (#8887) by dezren39 · Pull Request #9014 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: a15e51a1dd
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if a == "-f" | ||
| || a == "-F" | ||
| || a == "--field" | ||
| || a == "--raw-field" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Recognize attached short field flags before classifying reads
An invocation such as fleet gh api repos/o/r/issues/1/comments -fbody=hello is classified as read-only because this check misses attached -f and -F values. The installed gh 2.96.0 accepts this syntax, and gh api --help states that “adding request parameters will automatically switch the request method to POST”; a local debug invocation also confirmed POST for -fbody=hello. If the mutation succeeds but its response is lost, may_retry consequently repeats it under another token, potentially creating duplicate comments or issues. Recognize attached short-field arguments before allowing retries on arbitrary failures.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| let out = Command::new(gh_bin) | ||
| .args(args) | ||
| .env("GH_TOKEN", token) | ||
| .stdin(Stdio::inherit()) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Replay piped input when retrying under another token
For fleet gh api ... --input -, the first subprocess consumes the caller's piped payload before receiving a rate-limit or permission rejection. Every subsequent attempt inherits that same, now-exhausted stream, so failover sends an empty or different body rather than repeating the original request. The inspected gh api --help explicitly documents “Use - to read from standard input” for --input. Capture and replay noninteractive input for each attempt, or decline retries when consumed input cannot be replayed.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if let Some(v) = value { | ||
| let owner = v.split('/').next().unwrap_or(""); | ||
| if !owner.is_empty() && owner != "." && owner != ".." { | ||
| return Some(owner.to_string()); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Extract the owner from host-qualified repository selectors
For a write targeting -R github.com/dezren39/private-repo, this extracts github.com as the owner instead of dezren39, so the correct installation is not moved to the front of the App rotation. The inspected gh issue create --help documents -R, --repo [HOST/]OWNER/REPO, confirming that this is supported syntax. If the personal token is rate-limited and the default first installation, app:developing-today, cannot access that private repository and receives HTTP 404, the wrapper returns immediately because 404 is classified as Other for a write; it never tries the correct app:dezren39 token. Strip the optional host component before selecting the owner.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
#8887) Passthrough fidelity fix from the reconcile acceptance run: callers that capture both streams (project-reconcile.sh item-add parses stdout JSON out of a 2>&1 capture) must see exactly what gh produced. Rotation/failover notes are trace-gated; the no-token terminal summary still prints (nothing ran to impersonate).
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 5990bd324e
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if lower.contains("rate limit") | ||
| || lower.contains("rate_limit") | ||
| || lower.contains("too many requests") | ||
| || lower.contains("http 429") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Distinguish refusal errors from verbose request content
For a write such as fleet gh api repos/o/r/issues/1/comments --verbose -f 'body=rate limit', the request payload itself can trigger this classification. The inspected gh api --help describes --verbose as “Include full HTTP request and response in the output.” Because run_with_provider searches both captured streams, an ambiguous transport failure or HTTP 500 becomes a supposedly safe rate-limit refusal whenever the logged payload contains these words. The wrapper can then repeat a mutation that already landed, creating duplicate comments. Require evidence of an actual refusal response rather than matching arbitrary request or response content.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| assert_eq!(base64url(b""), ""); | ||
| assert_eq!(base64url(b"f"), "Zg"); | ||
| assert_eq!(base64url(b"fo"), "Zm8"); | ||
| assert_eq!(base64url(b"foo"), "Zm9v"); | ||
| assert_eq!(base64url(b"\xfb\xff"), "-_8"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Add property coverage for the JWT base64url serializer
The new handwritten base64url serializer feeds App JWT signing, but its coverage consists only of five fixed vectors. The root AGENTS.md testing doctrine explicitly requires property tests for serializers and crypto formats, so example-only coverage does not satisfy the repository's verification contract. Add generated arbitrary-byte cases checked against an independent reference encoder or decoder, including the unpadded URL-safe output invariant.
AGENTS.md reference: AGENTS.md:L38-L38
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.