Skip to content

docs(shared/resources): fix ResolveParamsResult.params precedence (profile wins) - #1491

Open
PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanave:docs/resource-params-precedence
Open

PratikDhanave (PratikDhanave) wants to merge 1 commit into
microsoft:mainfrom
PratikDhanave:docs/resource-params-precedence

Conversation

@PratikDhanave

Copy link
Copy Markdown

ResolveParamsResult.params (packages/shared/src/resources/resource-params.ts) is documented as defaults, overlaid by profile, overlaid by run — i.e. run wins. But the actual merge is profileParams[name] ?? runParams[name] ?? declaration.default — profile wins. The field doc contradicts the function's own JSDoc ("the profile wins"), the conflict logic, and the tests (resource-params.test.ts: "prefers the profile value over the declared default"; "keeps the profile value when a run tries to override"). Corrected the field doc. Doc-only.

…ofile wins)

The field doc said "defaults, overlaid by profile, overlaid by run" (run wins),
but resolveParams merges `profileParams[name] ?? runParams[name] ?? default`
— profile wins. This matches the function JSDoc, the conflict logic, and the
tests ("prefers the profile value"; "keeps the profile value when a run tries
to override"). Correct the field doc.
@cedricvidal Cedric Vidal (cedricvidal) added the community-contribution Pull requests submitted by external community contributors. label Oct 13, 2026

This branch has not been deployed

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

Labels

community-contribution Pull requests submitted by external community contributors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants