Skip to content

fix(FR-3015): gate app-launch session-not-found message to managers below 26.4.4#7663

Draft
nowgnuesLee wants to merge 1 commit into
mainfrom
fix/FR-3015-session-app-by-user-uuid
Draft

fix(FR-3015): gate app-launch session-not-found message to managers below 26.4.4#7663
nowgnuesLee wants to merge 1 commit into
mainfrom
fix/FR-3015-session-app-by-user-uuid

Conversation

@nowgnuesLee

@nowgnuesLee nowgnuesLee commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Resolves #7662 (FR-3015)

Summary

Follow-up to #7409 (FR-2586). That PR added a friendly "session not accessible" message when an app launch fails with a 404 / "session not found" — the common cause being an access-key (AK) mismatch, where the session was created under a different keypair than the one currently in use.

From manager 26.4.4 on, streaming session lookups are scoped by the owner's user id instead of the access key. A user's sessions are therefore reachable across all of their keypairs, so the AK-mismatch case the FR-2586 workaround targets no longer occurs on those managers. This PR version-gates the workaround so it only applies to managers below 26.4.4.

Implementation

  • packages/backend.ai-client/src/client.ts: register a new capability flag session-app-by-user-uuid, enabled for managers >= 26.4.4 in _updateSupportList().

  • react/src/hooks/useBackendAIAppLauncher.tsx: gate the FR-2586 friendly AppLaunchError behind both conditions — the error is a session-not-found error and the manager lacks session-app-by-user-uuid:

    if (
      isSessionNotFoundError(err) &&
      !baiClient.supports('session-app-by-user-uuid')
    ) {
      // friendly "SessionNotAccessible" message (pre-26.4.4 only)
    }

    On 26.4.4+ the workaround is disabled and the original manager error surfaces unchanged.

Behavior matrix

Manager Error Before this PR After this PR
< 26.4.4 404 session-not-found (AK mismatch) friendly message friendly message
< 26.4.4 non-404 (proxy down, timeout) raw error raw error
26.4.4+ 404 session-not-found (genuinely gone) friendly message raw error
26.4.4+ non-404 raw error raw error

Test Plan

  • Pre-26.4.4 manager: launch an app on a session created under a different AK → friendly "SessionNotAccessible" message appears.
  • Pre-26.4.4 manager: trigger a non-404 launch failure (e.g. proxy down) → original error message, not the AK-mismatch message.
  • 26.4.4+ manager: a session is reachable across the user's keypairs; if a launch 404s for an unrelated reason, the raw manager error surfaces (no AK-mismatch message).
  • Normal session launch on any manager → no behavior change.

Verification

bash scripts/verify.sh — Relay / Lint / Format / TypeScript all PASS. (The "Vite warmup paths" check fails on a clean checkout too because it resolves production-build artifacts that are absent without pnpm build; unrelated to this change.)

Related

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.63% 1799 / 27095
🔵 Statements 5.41% 1994 / 36805
🔵 Functions 5.38% 297 / 5514
🔵 Branches 3.78% 1300 / 34373
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/hooks/useBackendAIAppLauncher.tsx 0% 0% 0% 0% 13-1075
Generated in workflow #1261 for commit 3fab8ae by the Vitest Coverage Report Action

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add version branching for app launch access key mismatch error (fixed in 26.4.4)

1 participant