fix(gateway): correct GitHub App install-URL slug to fro-bot-agent#712
Conversation
The install-URL default pointed at apps/fro-bot, but the published app slug is fro-bot-agent. The /add-project "app not installed" message linked operators to the wrong page. Update both runtime defaults (config.ts, app-client.ts) and the matching test literals.
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
This is a narrowly-scoped, low-risk fix that corrects the default GitHub App install-URL slug from apps/fro-bot to apps/fro-bot-agent, aligning the runtime defaults in config.ts and github/app-client.ts with the published app slug, plus the matching test literals. The change is contained to string defaults and their assertions; behavior is otherwise unchanged, and the GATEWAY_GITHUB_APP_INSTALL_URL env override remains the supported customization path.
Blocking issues
None
Non-blocking concerns
- Consider centralizing the slug/default install URL in a single constant so
config.tsandapp-client.tscannot drift apart again. This class of bug (two defaults of the same value) is exactly what recurred here; a shared source of truth would prevent a future partial update. - Worth a quick confirmation that no other surfaces (docs, README, deployment manifests, or
.env.example) still reference the oldapps/fro-botslug, so operator-facing guidance stays consistent with the corrected default.
Missing tests
None for the changed behavior — the PR updates the corresponding assertions in config.test.ts, app-client.test.ts, program.test.ts, and the add-project/index command tests, which is the appropriate coverage for a default-value correction. The add-project test additions (+10/-4) suggest the "app not installed" reply path is exercised against the new URL, which is the right behavior to lock in.
Risk assessment (LOW/MED/HIGH): LOW
- Likelihood of regression: Low. The change is limited to two default string literals and their tests; no control flow, parsing, or auth logic is touched.
- Security exposure: Low. The fix points operators at the correct first-party install page; previously the wrong slug could have sent users to a non-existent or unintended
github.com/apps/...page, so this slightly reduces the chance of operators landing somewhere unexpected. - Blast radius: Low. Only affects the install-URL surfaced when a repo is not yet authorized; the env override is unchanged.
Note: This review is based on the PR description and metadata. My code-inspection tooling did not return file contents in this run, so I could not independently diff the literals line-by-line. The assessment above reflects the stated, self-consistent scope (+16/-10 across config/app-client and five test files). If line-level verification is required, please confirm CI (the cited 545 passing gateway tests + clean lint/type-check) is green before merge.
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | fro-bot/agent |
| Run ID | 26708243079 |
| Cache | hit |
| Session | ses_182c011cfffe1FKXhn22zRlCW8 |
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
A narrowly-scoped, correct fix. It updates the default GitHub App install URL slug from apps/fro-bot to the published apps/fro-bot-agent in the two runtime sources (config.ts:331, app-client.ts:130) and aligns every test literal. I verified the rename is complete and consistent: a repo-wide search for the old fro-bot/installations path returns zero remaining references anywhere (source, tests, docs, deploy manifests). No control flow, parsing, or auth logic changed.
Customization is preserved correctly:
config.tsstill honorsGATEWAY_GITHUB_APP_INSTALL_URLviareadOptionalSecret(...) ?? <default>.app-client.tskeepsinstallUrlas an optional option, defaulting only when unset.program.ts:127,136continues to threadconfig.gatewayGitHubAppInstallUrlinto the app client, so a configured override flows end-to-end.
Blocking issues
None
Non-blocking concerns
- Duplicated default literal. The same default URL is now hardcoded in two places (
config.ts:331andapp-client.ts:130). That duplication is precisely what allowed the slug to be wrong in one spot historically. Sinceprogram.tsalways passesconfig.gatewayGitHubAppInstallUrlintocreateAppClient, theapp-client.tsdefault is effectively dead in production and only used by direct-construction tests. Consider extracting a single exported constant (e.g.DEFAULT_GITHUB_APP_INSTALL_URL) and referencing it from both, so the two defaults can never drift again. Not blocking — purely a future-proofing improvement.
Missing tests
None. Coverage for the changed behavior is appropriate:
config.test.ts:949asserts the corrected default, andconfig.test.ts:938independently covers theGATEWAY_GITHUB_APP_INSTALL_URLenv-override path (my-custom-app), so the override is not silently broken by the default change.app-client.test.ts,program.test.ts,index.test.ts, andadd-project.test.ts(including theAppNotInstalledError"app not installed" reply path) assert the new URL is surfaced to operators.
Risk assessment (LOW/MED/HIGH): LOW
- Regression likelihood: Low — only two default string literals plus their assertions changed; no logic touched.
- Security exposure: Low, and net-positive — operators are now directed to the correct first-party install page instead of a wrong/nonexistent
github.com/apps/...slug, reducing the chance of a confused user landing somewhere unexpected. - Blast radius: Low — affects only the install URL shown when a repo is not yet authorized; the env override is unchanged and verified.
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | fro-bot/agent |
| Run ID | 26708243079 |
| Cache | hit |
| Session | ses_182c011cfffe1FKXhn22zRlCW8 |
Summary
The gateway's GitHub App install-URL default pointed at
https://github.com/apps/fro-bot/installations/new, but the published app slug isfro-bot-agent. When a repo isn't yet authorized, the/add-project"app not installed" reply linked operators to the wrong page.Changes
Updates both runtime defaults and the matching test literals to
apps/fro-bot-agent:packages/gateway/src/config.ts—gatewayGitHubAppInstallUrldefaultpackages/gateway/src/github/app-client.ts—installUrldefaultconfig.test.ts,app-client.test.ts,program.test.ts, and theadd-project/indexcommand testsVerification
GATEWAY_GITHUB_APP_INSTALL_URLenv override remains the way operators point at a different slug.