Repository navigation
feat(api): the App's tokens, and the repositories its installations reach (part of #213) - #467
Merged
Merged
Conversation
…oviders Signed-off-by: samuel mbabhazi <[email protected]>
…rt of #213) Signed-off-by: samuel mbabhazi <[email protected]>
…say session only Signed-off-by: samuel mbabhazi <[email protected]>
… (part of #213) Signed-off-by: samuel mbabhazi <[email protected]>
… whole Signed-off-by: samuel mbabhazi <[email protected]>
Signed-off-by: samuel mbabhazi <[email protected]>
…ly when newer Signed-off-by: samuel mbabhazi <[email protected]>
…each (part of #213) Signed-off-by: samuel mbabhazi <[email protected]>
|
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 18 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. |
Signed-off-by: samuel mbabhazi <[email protected]>
Signed-off-by: samuel mbabhazi <[email protected]>
…nd are reused a minute Signed-off-by: samuel mbabhazi <[email protected]>
Collaborator
Author
|
An independent review of this PR (high effort) raised six points. All six held up, and 8fa4077 fixes them:
|
Signed-off-by: samuel mbabhazi <[email protected]>
Signed-off-by: samuel mbabhazi <[email protected]> # Conflicts: # apps/api/openapi.json # apps/api/prisma/schema.prisma # apps/api/src/modules/git/application/ports.ts # apps/api/src/modules/git/git.module.ts # apps/api/src/platform/prisma/tenant-database-role.ts # deploy/postgres/runtime-role.sql # docs/PLAN.md # docs/SPEC.md
samuelmbabhazi
changed the base branch from
feat/213-github-webhooks
to
main
November 25, 2026 11:50
Signed-off-by: samuel mbabhazi <[email protected]> # Conflicts: # apps/api/src/modules/git/application/ports.ts # apps/api/src/modules/git/git.module.ts # docs/SPEC.md
This was referenced Nov 25, 2026
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 25, 2026
…k held still (#469) `exec-sessions.spec.ts` fails on CI now and then. It just failed #467's TypeScript job: `queues the agent action for the running replica…` expected an exact `attachBy`. ## Why c4c4842 (#456) made `ExecSessions.open` measure the time its database work takes, on the monotonic clock (`performance.now()`), so that freshness and deadlines are decided when they are. The test still expected `attachBy` to be exactly the request time plus 60 s. On a fast machine the work takes under a millisecond, which a `Date` drops, so the test passed. On a slower runner it takes a millisecond or more, and the deadline moves by that much. ## Fix The `opening an exec session` tests hold `performance` still (`vi.useFakeTimers({ toFake: ['performance'] })`), so deadlines are exact on any machine. The test that checks a slow database already moves the clock itself, and is unchanged. No production code changes. ## How it was tested - I reproduced CI's failure locally: 5 ms of work inside the fake database, without this change, fail the test with CI's error (`expected { …(11) } to match object { …(8) }`). With this change, it passes. - The file passes five runs in a row, and `nx typecheck lint` passes for the API. Signed-off-by: samuel mbabhazi <[email protected]>
Collaborator
Author
|
@coderabbitai review |
Action not completed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #213 (M3.1), as ADR 0031 decides: the organization's App calls GitHub as itself, and lists the repositories it can reach. This is what choosing an application's repository needs, and what a push will use to check the branch head. Stacked on #466; retarget to
mainonce #466 is merged.What changed
GithubApiClient(modules/git/infrastructure):POST /app/installations/{id}/access_tokens).GET /installation/repositories, page by page, up to a limit.GET /repos/{owner}/{repo}/branches/{branch}, with the branch URL-encoded; an unknown branch isundefined.DELETE /installation/token, best effort.api.github.com, no redirect, a 10 s timeout and answers bounded to 2 MiB. Any failure is a 503 that does not repeat GitHub's text.domain/github-api.ts). Repository names allowowner/nameonly, branches refuse..,//and a leading or trailing/, and commits must be 40 hex characters. A page with one bad entry is refused whole.GET …/github-app/repositories(organization.read, API tokens allowed):metadata: readonly, revoked once read;truncatedbeyond that;GET …/github-appanswers{app: null}.github_app_unreadable("connect it again"). The store also lists the active installations.github-http.ts).How it was tested
..or//, and an entry missing a field;Security considerations
Secrets.