Repository navigation
Make Copilot SDK installs reproducible - #79887
Conversation
Co-authored-by: Copilot App <[email protected]>
|
@copilot recompile |
|
@copilot the cli version scripts must ensure the versions and sha stay in sync |
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Comment MemoryPeek at saved memory (spec-review-history)History |
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
I found one blocking path-safety issue: the generated installer can follow a pre-existing symlink in the target directory path before its inner-file checks, redirecting package writes and npm ci outside RUNNER_TEMP. Please harden directory creation before merging. The specialist pass was unavailable because its diff-read command was permission-blocked; this review is based on the pre-fetched diff and targeted source reads.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
|
Warning The 🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (1,480 new lines across 14 files under 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify that the implementation matches the decision. 🔎 Notes for the reviewer
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd. Requesting changes on two reproducibility gaps. The targeted pkg/workflow tests pass, and the lockfiles check out (sha512 integrity, registry.npmjs.org URLs, koffi as the only install script).
📋 Key Themes & Highlights
Key Themes
- Dead
.npmrcfiles: bothcopilot-sdk/{node,typescript}/.npmrcare never embedded (go:embedmatches onlypackage*.json) and never copied into the install directory, sonpm ciignores them. - Stale cooldown anchors: the
engine.cooldownguard relies on hard-codednewesttimestamps that nothing ties to the lockfile contents.
Positive Highlights
- ✅ Lockfiles are embedded and compacted, with integrity hashes and a frozen
npm ciinstall. - ✅ Manifests are validated for symlinks and shrinkwrap files before the install runs.
- ✅ The Dependabot extractor change does not regress; the old extractor also returned only the SDK package.
- ✅ The
packagefeedproxyregistry pattern matches existing.npmrcfiles in the repo.
Open Questions
koffiis the only package with an install script, and--ignore-scriptsskips it. This matches the old behavior, but SDK runtime use without it is unverified.- Skill selection was manual. The
pr-triagestep was not invoked, so this review used the fallback heuristic.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
Pinned Undici and Zod versions have known high-severity vulnerabilities, npm safety checks fail under Dash, and dependency inventories omit packages and can diverge from installed lockfiles.
4 open issues
2 files not reviewed
pkg/workflow/data/copilot-sdk/node/package-lock.json: Generated filepkg/workflow/data/copilot-sdk/typescript/package-lock.json: Generated file
What changed in this PR
Makes Copilot SDK installation reproducible in gh-aw-generated workflows by freezing Node.js and TypeScript dependency graphs instead of resolving transitive versions on each run.
Changes:
- Embeds pinned npm projects and generates
npm ci --ignore-scriptsinstalls with integrity and cooldown checks in runner temporary storage. - Reuses SDK runtime selection for Dependabot dependency extraction.
- Updates tests, reference documentation, and included generated workflow locks.
| File | Description |
|---|---|
pkg/workflow/dependabot_engines.go |
Extracts SDK packages from the selected install specification. |
pkg/workflow/data/copilot-sdk/typescript/package.json |
Pins SDK and TypeScript runtime dependencies. |
pkg/workflow/data/copilot-sdk/typescript/.npmrc |
Configures the feed for TypeScript lock maintenance. |
pkg/workflow/data/copilot-sdk/node/package.json |
Pins Node.js SDK dependencies. |
pkg/workflow/data/copilot-sdk/node/.npmrc |
Configures the feed for Node.js lock maintenance. |
pkg/workflow/copilot_sdk_npm_lock.go |
Embeds npm projects and renders frozen installation steps. |
pkg/workflow/copilot_sdk_npm_lock_test.go |
Checks compiled pins, platform entries, and integrity fields. |
pkg/workflow/copilot_sdk_bootstrap_test.go |
Exercises offline installs, script suppression, and cooldown rejection. |
pkg/workflow/copilot_inline_driver_test.go |
Updates inline-driver installation expectations. |
pkg/workflow/copilot_engine_sdk_test.go |
Checks cooldown configuration for locked installs. |
pkg/workflow/copilot_engine_installation.go |
Selects and renders runtime-specific locked npm projects. |
pkg/workflow/copilot_engine_basic_test.go |
Updates SDK installation assertions for npm ci. |
docs/src/content/docs/reference/engines/copilot.md |
Documents isolated, integrity-checked SDK installation. |
.github/workflows/tidy.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/spec-extractor.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/security-compliance.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/refiner.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/q.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/plan.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/org-health-report.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/mergefest.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/jsweep.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/firewall.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/dev-hawk.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/delight.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/craft.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
.github/workflows/copilot-opt.lock.yml |
Uses the frozen Node.js SDK bootstrap. |
Review effort: Max (adaptive)
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
The review findings are addressed in their inline threads: the unused |
|
The path-safety finding is addressed in its inline thread. The installer checks directory components before creating them. |
|
This run reported no separate test finding. The focused SDK and Dependabot regression tests passed for the final batch. |
|
This is the gate's completion notice, not an ADR request or finding. No change was made based on the notice alone. |
|
This ledger records a prior specification review. No code change or ledger edit was needed for the historical record. |
|
This memory records the symlink finding, which is addressed in its inline thread. The stored review history was left unchanged. |
|
This ledger records an earlier review revision, not a new request. The finding it refers to was handled in its inline thread. |
|
That earlier run could not publish its bundle under the existing allowlist. The validated changes were pushed to the PR branch without changing the allowlist. |
|
That earlier regeneration is superseded by |
|
The reviewed-pin guard and mismatch tests were retained. Both SDK variants also passed a separate install check against 1ES. |
|
The reviewed-pin guard and paired updater are still in place. All 370 workflows were recompiled again for |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "ceda6df13208162e5d52e18bea58c07ef8bfb9eb",
"kind": "requested",
"schema_version": "1",
"state": "abea00eb02abe7b9b32b47f2fa702cc74a2ec22350dc0ebc1a1780402472dfa8",
"work": [
"53cb6571d728b3e85500bd27ca121032cdd12bb063eb2a858859cf8576b49596",
"75b94ab656bcd51efa13b9ab60fca826fd8de7fd5e14fd9449c70b2d2d3d6485",
"8cfb897a748aca2f5840fca9710bd74ee742dab92f64baf5e82ee07733fa1661",
"9c67a4e4c1edc9b76a0674e89b529a5da5ecd4d5cb87b3387f91309f1da19a79",
"cf9b525e7812f7f1ca0a06f1063a5ddd19e8c962a6d3bcaa5d1f4f9d5ec03ab8",
"dbb7e8c0f3534078a1885e1cbcb6a5d58cdc1e61e950846668e3650b32652edb",
"f68a4d8e5dbaa218931ee139d3b40003293618f8298c1eab23cdb2bc1cd52750",
"fbc836d9b0498901ebfcb7848acd716d2037f86d7f3c2489aa14ba1df829ea59"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: Copilot App <[email protected]>
…-copilot-sdk-installs Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…le-copilot-sdk-installs' into pelikhan/reproducible-copilot-sdk-installs Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged |
Co-authored-by: Copilot App <[email protected]>


Generated Copilot SDK workflows pin direct dependencies, but
npm installcan still resolve a different transitive graph on each run. This is the compiler-side fix for the cluster of 105 code scanning alerts (#1135-#1141 and #1143-#1240).The compiler embeds complete Node.js and TypeScript npm lockfiles, including optional platform packages and SHA-512 integrity hashes. Generated steps use
npm ci --ignore-scriptsin the existing runner-temp directory without editing application package files. Registry overrides still work. Becausenpm cidoes not apply npm's release-age filter to a complete lockfile, the step checksengine.cooldownagainst the newest publication timestamp in the locked graph.This draft intentionally excludes generated workflow lock updates. Regenerate them in the coordinated integration pass before merging; 106 current generated workflows contain the old SDK install command.
Validation
make agent-report-progress-no-testpassed formatting and Go compile/vet checks.go test ./pkg/workflow -run 'Test(CopilotSDK|CopilotEngine|Dependabot|EngineCooldown)' -count=1passed, including representative workflow compilation, offline SDK bootstrap, and cooldown rejection.npm ci --ignore-scriptsinstalls passed through the configured registry. The TypeScript install also passed against 1ES, and all 51 pinned tarballs were verified available on 1ES.