Skip to content

Fix desktop Connect enrollment with visible GitHub identity and explicit installation selection #2162

Closed

Description

@integry

Real isolated Linux acceptance at epic head 1d96a3d reached GitHub authentication then failed: "relay enrollment failed — You are not authorized for this installation. Confirm the shared GitHub App is installed and you have access to it."

Evidence: packages/cli/src/api/relay.ts documents /auth/me discovery as access-scoped, while POST /relay-tokens enrollment is owner-only. packages/local-setup/src/engine.ts selects first installation when multiple and no selectInstallation hook. apps/desktop/src/setup-controller.ts does not provide that hook and hard-codes confirmGithubAppInstalled=false. Do not claim actual user's ownership or missing installation without evidence.

Implement coherent desktop GitHub identity/installation flow:

  • Show authenticated GitHub username and discovered installation account names, user/org type and selection in the app, not just a terminal/log.
  • Explicit installation choice; never silently choose first among several. Reflect selected identity/installation in summary, progress, recovery and saved choices where safe. Support refresh after app installation and changing/re-authenticating the account.
  • Keep access vs enrollment eligibility distinct; use server-authoritative eligibility only if available. Do not infer ownership from access. Preserve server authorization. A 403 should leave user in actionable installation selection with clear permission explanation and refresh/install/reselect controls, not a blind retry loop.
  • Add a real host/controller/IPC contract for async choice and safe non-secret identity state. Keep secrets out of renderer/logs, validate chosen installation against current server-discovered set and recheck upon enrollment. Cancellation/shutdown/retry must settle pending choices without leaking or duplicating enrollment.
  • Test zero/one/multiple installations, access-but-not-owner 403, refresh after install, identity display, stale choices, retry/cancel.
  • Diagnose whether 403 can arise from discovery vs enrollment so messages are accurate. Do not modify remote routing service or deploy without separate scope.
    Own authentication/installation behavior and its UI. A parallel small task will remove Demo and constrain Connect intake; coordinate integration and preserve those changes. Real test account/runtime exists locally but implementation tasks must use fixtures, not borrow its tokens.

Integration: target branch 1950-epic-cross-platform-dsk (epic PR #1970), never main. Part of #1950; acceptance tracked in #1962. Keep Windows paused. Use ProPR for implementation, focused regression tests and Linux packaged evidence. Include Closes #ISSUE_NUMBER in the child PR body using this issue's actual number. Do not merge: request review and report evidence. Preserve unrelated CLI/web behavior; no production deployments or personal credentials.

Activity

  1. propr-dev commented on Sep 7, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2162/gpt-5.6-sol-fix-desktop-connect-enrol-20260907-0934-ge3
    • Base Branch: 1950-epic-cross-platform-dsk
    • Worktree: issue-2162-20260907-0934-gpt-5.6-sol-ge3

    🔍 Track Task Execution

  2. added a commit that references this issue on Sep 7, 2026
  3. integry commented on Sep 7, 2026

    @integry
    OwnerAuthor

    Completed by #2167, merged only into desktop epic 1950-epic-cross-platform-dsk at 00f8afd. Ultrafix 9/10 and independent review passed; final head 987c2d6 incorporates only the separately reviewed macOS test correction. Full suite, Validate Changes, all four Linux/macOS package and Connect checks, and checksum finalization passed. Real packaged Linux testing verified connected GitHub identity and explicit installation choices. The subsequently discovered incompatible provisioned runtime is tracked in #2168 / #2172, and overall real acceptance remains open in #1962. Explicitly closing because the integration target is a non-default epic branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions