Skip to content

fix(gateway): correct GitHub App install-URL slug to fro-bot-agent#712

Merged
marcusrbrown merged 1 commit into
mainfrom
fix/github-app-slug
May 31, 2026
Merged

fix(gateway): correct GitHub App install-URL slug to fro-bot-agent#712
marcusrbrown merged 1 commit into
mainfrom
fix/github-app-slug

Conversation

@marcusrbrown
Copy link
Copy Markdown
Collaborator

Summary

The gateway's GitHub App install-URL default pointed at https://github.com/apps/fro-bot/installations/new, but the published app slug is fro-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.tsgatewayGitHubAppInstallUrl default
  • packages/gateway/src/github/app-client.tsinstallUrl default
  • test literals across config.test.ts, app-client.test.ts, program.test.ts, and the add-project/index command tests

Verification

  • 545 gateway tests pass; lint and type-check clean.
  • The GATEWAY_GITHUB_APP_INSTALL_URL env override remains the way operators point at a different slug.

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.
@marcusrbrown marcusrbrown requested a review from fro-bot as a code owner May 31, 2026 08:55
@fro-bot fro-bot added the agent: working Agent is currently working on this label May 31, 2026
Copy link
Copy Markdown
Owner

@fro-bot fro-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts and app-client.ts cannot 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 old apps/fro-bot slug, 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

Copy link
Copy Markdown
Owner

@fro-bot fro-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts still honors GATEWAY_GITHUB_APP_INSTALL_URL via readOptionalSecret(...) ?? <default>.
  • app-client.ts keeps installUrl as an optional option, defaulting only when unset.
  • program.ts:127,136 continues to thread config.gatewayGitHubAppInstallUrl into 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:331 and app-client.ts:130). That duplication is precisely what allowed the slug to be wrong in one spot historically. Since program.ts always passes config.gatewayGitHubAppInstallUrl into createAppClient, the app-client.ts default 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:949 asserts the corrected default, and config.test.ts:938 independently covers the GATEWAY_GITHUB_APP_INSTALL_URL env-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, and add-project.test.ts (including the AppNotInstalledError "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

@fro-bot fro-bot removed the agent: working Agent is currently working on this label May 31, 2026
@marcusrbrown marcusrbrown merged commit 2aa82e4 into main May 31, 2026
11 checks passed
@marcusrbrown marcusrbrown deleted the fix/github-app-slug branch May 31, 2026 09:09
@fro-bot fro-bot mentioned this pull request May 31, 2026
47 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants