Skip to content

Fix operator precedence in getContainerAsync token resolution#9069

Merged
hl662 merged 4 commits into
masterfrom
hl662/fix-getContainerAsync-token-precedence
Mar 9, 2026
Merged

Fix operator precedence in getContainerAsync token resolution#9069
hl662 merged 4 commits into
masterfrom
hl662/fix-getContainerAsync-token-precedence

Conversation

@hl662

@hl662 hl662 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

The ?? operator binds tighter than ?:, causing the ternary to evaluate against the resolved ?? result rather than serving as the fallback. This silently replaced explicitly-provided access tokens with "".

Fixes #9068

@hl662 hl662 self-assigned this Mar 9, 2026
@hl662 hl662 requested a review from a team as a code owner March 9, 2026 15:45
Comment thread core/backend/src/test/standalone/Workspace.test.ts
@hl662 hl662 force-pushed the hl662/fix-getContainerAsync-token-precedence branch from 9a68445 to 39b62e7 Compare March 9, 2026 16:10
The `??` operator binds tighter than `?:`, causing the ternary to evaluate
against the resolved `??` result rather than serving as the fallback.
This silently replaced explicitly-provided access tokens with "".

Fixes #9068

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hl662 hl662 force-pushed the hl662/fix-getContainerAsync-token-precedence branch from 39b62e7 to 874e278 Compare March 9, 2026 16:14
Comment thread core/backend/src/internal/workspace/WorkspaceImpl.ts Outdated
Break up complex one-liner token resolution into early-return style
per PR review feedback. Each condition now lives on its own line.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@hl662 hl662 enabled auto-merge (squash) March 9, 2026 19:17
@hl662 hl662 merged commit ece9317 into master Mar 9, 2026
15 checks passed
@hl662 hl662 deleted the hl662/fix-getContainerAsync-token-precedence branch March 9, 2026 19:58
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.

Bug: Operator precedence error in getContainerAsync silently discards access tokens

3 participants