Repository navigation
fix(projector): make reconcile work against the real GitHub API (#1199) - #1504
Conversation
Three defects, one symptom (reconcile written=0 on every stream, so the projector stayed empty and aggregator detail pages fell back to fixtures): - listResource prefixed the Link header's absolute next-page URL with https://api.github.com/ again -> page 2 of every stream 404'd and the whole stream's rows were discarded. - appJwt imported the App private key as PKCS#8 only; GitHub issues App keys as PKCS#1, so every real key failed with 'Invalid keyData'. PKCS#1 DER is now wrapped in the PKCS#8 envelope on import failure. - apiTokenFor knew one static installation id; an app installed on an org and a user account has one installation per account. It now discovers the installation per repo (GET /repos/{repo}/installation), with the explicit map and GITHUB_APP_INSTALL_ID as fallbacks. Also raises Bun.serve idleTimeout (10s default closed /reconcile mid-poll; the caller saw an empty reply). Refs #1199
|
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 50 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. Comment |
Codex Review SummaryThis 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. |
Fixes the three defects that kept projector reconciliation at
written=0on every stream — the reason the projector (code#1199) could never be deployed usefully and aggregator detail pages fall back to fixtures for refs outside the Project #4 pool.listResourceprefixed the Link header's absolute next-page URL withhttps://api.github.com/a second time → page 2 of every stream 404'd, and since rows are written only after the full list returns, every multi-page stream discarded everything.appJwtimported the App private key as PKCS#8 only. GitHub issues App keys as PKCS#1 ("BEGIN RSA PRIVATE KEY") → every real key failedimportKeywith "Invalid keyData". PKCS#1 DER is now wrapped in the PKCS#8 envelope on import failure (wrapPkcs1InPkcs8).apiTokenForknew one static installation id. The app is installed per account (org 174792676, dezren39 175747567); it now discovers the installation per repo viaGET /repos/{repo}/installation, with the explicit map andGITHUB_APP_INSTALL_IDkept as fallbacks.Plus:
Bun.serveidleTimeout: 255— the 10s default closed/reconcilemid-poll (caller saw an empty reply while the poll was still running).Tests: new
test/github.test.ts(PKCS#8 control + PKCS#1 signing, absolute-Link pagination, per-repo discovery) — 18/18 projector tests pass locally on the laptop. Verified live against the real API from the laptop: App JWT resolves both installations; the org installation token reads all three org repos.Refs #1199 (deployment + outcome are being posted there).
Need help on this PR? Tag
@codesmith-botwith what you need.