Repository navigation
test(worker): cover Entra token acquisition after the msal-node v7 bump - #157
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
semics-tech
marked this pull request as ready for review
October 29, 2026 07:06
semics-tech
added a commit
that referenced
this pull request
Oct 31, 2026
…rotobuf (#155) Supersedes [#152](#152). Same 14 dependency updates, plus one commit regenerating `packages/protocol/src/gen` for ts-proto 2.18.3, which fixes the failing "Check generated protobuf is current" step. Update 30 Oct: merged main (incl. [#157](#157)) into the branch, no rebase. Conflicts were in the root `package.json`, `packages/dashboard/package.json` and `pnpm-lock.yaml`. I kept the higher version of each (vitest ^4.1.11, vite ^8.3.5, typescript-eslint ^8.72.0), bumped `@vitest/coverage-v8` to ^4.1.11 to match, and regenerated the lockfile with `pnpm install --lockfile-only`. ts-proto stays at 2.18.3, so the generated protobuf is unchanged. Local: typecheck passes and lint has 0 errors (1 existing warning). `proto:check` couldn't run in my sandbox because tsx can't open its IPC socket (EPERM), so CI is the judge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Agent Harness <agent@SEMICSs-Mac-mini.local> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#151 forced
@azure/msal-nodeto^7.1.0through a pnpm override (@azure/identity>@azure/msal-node). The Entra path had no tests.Finding: no source change needed
acquireEntraTokeninpackages/worker/src/credentials.ts, which calls@azure/identity'sDefaultAzureCredential().getToken(scope).@azure/identity@4.14.0declares@azure/msal-node: ^6.0.0, so the override takes it outside its declared range. This is the real risk, and it is not ours to fix in our own code.ManagedIdentityApplication,ConfidentialClientApplication,PublicClientApplication,AuthError,LogLevel,INativeBrokerPlugin,ICachePlugin) exists in v7. Identity'sindex.jsloads under v7 andManagedIdentityApplicationconstructs.What changed
Only
packages/worker/test/entra-credentials.test.ts(15 tests,@azure/identitymocked). No source changes./.defaultto a bare audience and leaves an existing one alone; no options for system-assigned identity;clientIdgoes through asmanagedIdentityClientIdCredentialError;null/empty token becomes aCredentialErrornaming the scope;getTokenrejection propagates unchangedbuildCallMetadataauthorization: Bearer …; forwardsclientId; missing audience fails before identity is touched; failed acquisition surfacesObservation, not changed
A new
DefaultAzureCredentialis built on every call, so msal's in-memory cache never survives. Correct but inefficient; caching the credential would be a small follow-up.CI note
The earlier "Control plane image builds" failure was infra, not the repo. The image built fine and the job failed at the end exporting the GitHub Actions cache (
error writing layer blob: not_found). The same check passes on #155. Main was merged into this branch (rebase would need a force-push) so CI reruns on a fresh commit.🤖 Generated with Claude Code
Draft opened by Oli's repos agent.