Repository navigation
fix(docker): decouple pnpm bootstrap from the package registry - #1603
Merged
Cedric Vidal (cedricvidal) merged 12 commits intoNov 5, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the pinned yq image and BusyBox wget for bounded, non-root agent registration without runtime package installation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6 tasks done
Test Results (Node.js 22)test: Run #445
🎉 All tests passed! |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ack-issue' into cedricvidal-harden-agent-registration
…-decouple-pnpm-bootstrap Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #453
🎉 All tests passed! |
Cedric Vidal (cedricvidal)
requested a review
from Wassim Chegham (manekinekko)
November 4, 2026 01:57
6 tasks done
Test Results (Node.js 22)test: Run #459
🎉 All tests passed! |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ack-issue' into cedricvidal-harden-agent-registration
…-decouple-pnpm-bootstrap Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> # Conflicts: # scripts/docker-compose.test.ts
Test Results (Node.js 22)test: Run #478
🎉 All tests passed! |
Cedric Vidal (cedricvidal)
marked this pull request as ready for review
November 5, 2026 00:37
Base automatically changed from
cedricvidal-harden-agent-registration
to
main
November 5, 2026 00:38
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> # Conflicts: # scripts/docker-compose.test.ts
Cedric Vidal (cedricvidal)
added a commit
that referenced
this pull request
Nov 5, 2026
* fix(dev): verify published stack endpoints Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(docker): make optional native dependency fallback explicit Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(dev): defer readiness checks until containers exist Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * revert(dev): remove endpoint readiness layer Revert 5d78953 and 48487f8 so this branch contains only the optional native dependency layer above PR #1603. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(docker): guard optional native allowlist entries independently Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Test Results (Node.js 22)test: Run #495
🎉 All tests passed! |
Cedric Vidal (cedricvidal)
added a commit
that referenced
this pull request
Nov 5, 2026
* fix(compose): remove the gateway development CPU quota Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(compose): harden agent registration Use the pinned yq image and BusyBox wget for bounded, non-root agent registration without runtime package installation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(docker): decouple pnpm bootstrap from the package registry Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(dev): verify published stack endpoints Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(docker): make optional native dependency fallback explicit Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(portal): avoid runtime Git metadata lookup Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: document container storage prerequisites Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(dev): defer readiness checks until containers exist Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(website): add missing license headers Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * revert(dev): remove endpoint readiness layer Revert 5d78953 and 48487f8 so this branch contains only the optional native dependency layer above PR #1603. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(portal): disable Git lookup in Compose development Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(portal): validate build time format Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(compose): skip render check without Docker Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(docker): preserve worker runtime package registry Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: clarify runtime storage capacity checks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(docker): guard optional native allowlist entries independently Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(portal): avoid runtime Git metadata lookup Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(portal): disable Git lookup in Compose development Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(portal): validate build time format Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Summary
Ordinary npm package proxies were being assigned to both
NPM_CONFIG_REGISTRYandCOREPACK_NPM_REGISTRY. That treated packument/package endpoints as though they also implemented Corepack's metadata protocol, producing malformed or unsupported per-version URLs. When Corepack failed, the pinned npm fallback reused the same endpoint, coupling both bootstrap paths to one failure domain.This layer:
scripts/bootstrap-pnpm.shand uses it consistently across every Node Docker image;NPM_CONFIG_REGISTRYfor ordinary npm/pnpm package resolution, whileCOREPACK_NPM_REGISTRYis unset by default and used only when explicitly configured with a Corepack-compatible endpoint;COREPACK_NPM_REGISTRYfor the pinned npm fallback, so an incompatible Corepack metadata endpoint cannot trap the fallback;pnpm installinvocation unwrapped, preserving pnpm's built-in package-fetch retries and actionable exhausted-retry diagnostics.Stack context: this is layer 3 of the native-stack series. The draft PR targets
cedricvidal-harden-agent-registration(#1602), currently atbe95df38c8325b05124f386695952d46a7aeedf8. This PR's head is9406483ab1acc86d0a5386ab2d424348d6291bd9.Demos
N/A — Docker build configuration only.
Before
N/A
After
N/A
Testing
pnpm exec vitest run scripts/bootstrap-pnpm.test.ts scripts/docker-compose.test.ts --reporter=default(2 files, 8 tests). Covers public defaults, an ordinary package proxy that is not a Corepack registry, trailing-slash normalization, explicit Corepack override, npm fallback independence, secret-safe rejection/diagnostics, all Node Dockerfiles using the shared contract, and no pnpm retry-policy overrides.sh -n scripts/bootstrap-pnpm.sh scripts/dev-compose.sh.NPM_CONFIG_REGISTRY=https://packages.example.test/npm/ COREPACK_NPM_REGISTRY=https://corepack.example.test/ docker compose --profile copilot config --format json, with assertions that bothapiandcoder-acp-copilotreceive the distinct build arguments.docker build --target deps -f apps/portal/Dockerfile --build-arg NPM_CONFIG_REGISTRY=https://packagefeedproxy.microsoft.io/npm/ .. In the restricted development network, Corepack's default public fetch failed, then the pinned npm fallback installed pnpm through the ordinary Microsoft package proxy and the normalpnpm installcompleted successfully. This directly exercises the separated failure domains.NPM_CONFIG_REGISTRY=https://registry.npmjs.org/could not establish a TLS connection to the public registry from this environment; both Corepack and npm reported network failures. The proxy-backed build above provides the representative networked image validation.pnpm headers:checkafter synchronizing the updated lower layer (966/966 in-scope files).git diff --check origin/cedricvidal-harden-agent-registration...HEAD.Documentation and compatibility
Updated
.env.exampleandENV_VARIABLES.mdwith the supported one-command package-registry override, explicit Corepack-compatible override semantics, credential-safe URL requirements, fallback isolation, and preserved pnpm retry behavior.No dependency manifests, runtime APIs, Portal/CLI behavior, database schemas, or production deployment contracts changed. Existing private package proxy selection remains supported through
NPM_CONFIG_REGISTRY;COREPACK_NPM_REGISTRYis now an explicit opt-in for compatible metadata endpoints. No migration or upgrade step is required unless an environment intentionally needs a custom Corepack registry, in which case it must exportCOREPACK_NPM_REGISTRYseparately.Checklist