Skip to content

cli-version-checker: route npm to the public registry and fix the OCI digest examples - #78306

Closed
pelikhan wants to merge 4 commits into
mainfrom
copilot/fix-failing-github-actions-job
Closed

pelikhan wants to merge 4 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

CLI Version Checker failed at the conclusion job's "Handle agent failure" step. The agent job succeeded but emitted report_incomplete because it could not get npm publish metadata or GHCR digests.

Root cause

  • The repo .npmrc sets registry=https://packagefeedproxy.microsoft.io/npm/. This workflow's firewall allows defaults, node, go, api.github.com, containers, which does not include that host, so all 17 requests were denied. npm then hit DEPTH_ZERO_SELF_SIGNED_CERT and timeouts. With no publish timestamps, the cooldown policy requires report_incomplete.
  • The prompt's GHCR/Docker Hub digest examples sent no OCI Accept types, so multi-arch images (OCI indexes) returned empty digests. The bearer header in the examples was a literal ****** left over from an earlier redaction, so the agent's retries went unauthenticated and got 401.

Changes (.github/workflows/cli-version-checker.md and the recompiled lock file)

  • npm registry: workflow-level env override. Environment config takes precedence over the project .npmrc. The agent step inherits it, and AWF passes it into the container with --env-all. registry.npmjs.org is already covered by the node ecosystem.
    env:
      NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
  • Prompt guidance: use registry.npmjs.org, pass --registry=https://registry.npmjs.org/ explicitly if npm still contacts the proxy, and never edit .npmrc or disable TLS.
  • Digest examples: the Docker Hub and GHCR examples now send the OCI index/manifest Accept headers alongside the Docker types, and use a real `Authorization: ****** header. The text also notes that GHCR returns 401 without the anonymous token.

Not addressed here: other npm-using workflows on the same firewall allowlist (e.g. daily-model-inventory, slide-deck-maintainer, visual-regression-checker) are likely exposed to the same .npmrc issue and may need the same override or an allowlist entry for packagefeedproxy.microsoft.io.

@pelikhan pelikhan changed the title [WIP] Fix failing GitHub Actions job cli-version-checker: route npm to the public registry and fix the OCI digest examples Nov 16, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 16, 2026 08:28
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 08:28
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.3K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~10 AIC · ⌖ ~2 AIC · ⊞ 6.7K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #78306 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

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.

Generated by PR Specification Reviewer for #78306 · copilot · gpt56 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OCI media-type additions are useful, but both documented bearer-token fallbacks remain unauthenticated: the fetched $TOKEN is not interpolated into either Authorization header. This leaves Docker Hub and GHCR digest resolution vulnerable to the same 401 failure this PR intends to fix. Please send Bearer $TOKEN in both examples.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

# Fetch the manifest digest (amd64 manifest list or single-arch)
curl -sI \
-H "Authorization: ******" \
-H "Authorization: Bearer $TOKEN" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Docker Hub example still sends the literal Authorization: ****** header instead of the token fetched immediately above, so this documented fallback remains unauthenticated and can still fail with 401.

💡 Use the fetched bearer token

Change the header to -H "Authorization: Bearer $TOKEN" (or equivalent shell expansion) so the token from auth.docker.io is actually sent; otherwise adding OCI Accept types cannot make the request reliable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 919d218: the Docker Hub request expands the fetched bearer token.

TOKEN=$(curl -s "https://ghcr.io/token?scope=repository:zizmorcore/zizmor:pull&service=ghcr.io" | jq -r .token)
curl -sI \
-H "Authorization: ******" \
-H "Authorization: Bearer $TOKEN" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GHCR fallback also leaves the literal Authorization: ****** header in place, so the anonymous token fetched above is never used and this path still receives HTTP 401.

💡 Pass the GHCR bearer token

Use -H "Authorization: Bearer $TOKEN" (or equivalent shell expansion) in this curl example. The new OCI media types only address manifest negotiation; they do not authenticate the request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 919d218: the GHCR request expands the fetched bearer token.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the workflow’s npm registry configuration and container digest updates.

No open issues 🎉

What changed in this PR

This PR updates the CLI Version Checker workflow to retrieve npm release metadata and container digests reliably within its existing firewall rules.

Changes:

  • Sets the public npm registry through workflow environment configuration and adds explicit fallback guidance without changing .npmrc or disabling TLS verification.
  • Fixes Docker Hub and GHCR examples to use bearer tokens and accept OCI indexes and manifests.
  • Regenerates the compiled workflow with the registry override and updated metadata hashes.
File Description
.github/​workflows/​cli-version-checker.md Adds npm registry configuration and corrects container digest request examples.
.github/​workflows/​cli-version-checker.lock.yml Incorporates the registry configuration and refreshes workflow hashes.

Review effort: Balanced (dynamic)

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-053edc74-837f-4c59-8c01-dad316121eda","parents":[],"payload":{"id":"ldg-f22e97be-b9a9-469b-b95b-b07c4e424289","operation":"append","value":{"finding_count":2,"head_sha":"c3fd756f87c193c53d6d740437712412f9c4a020","outcome":"findings"}},"sha":"sha256:047cc007cb1d8450d32f40018da05affe5c9f0001b6a249d28540d97a52b58d0","timestamp":"2026-11-16T08:36:59.297Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Reviewed PR head c3fd756f87c193c53d6d740437712412f9c4a020 against the workflow source and generated lock. The public npm registry override is present in the source and compiled workflow, and the OCI Accept headers preserve multi-arch digest handling.

Findings

  • 🟡 Medium — .github/workflows/cli-version-checker.md:271 (also GHCR line 291): the examples fetch TOKEN but send the literal Authorization: ******, so registry requests remain unauthenticated and the digest-retrieval failure can persist. Use Authorization: Bearer $TOKEN in both examples.

Contract and validation

The review considered Frontmatter Hash Specification v1.0.0 (stale-lock/hash integrity) and Security Architecture SI-06 (environment propagation). The lock metadata and workflow hash wiring are consistent, and no specification-document synchronization is warranted. This was a static review; no tests, compilation, or conformance scripts were run per review protocol.

Generated by PR Specification Reviewer for #78306 · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again

# Fetch the manifest digest (amd64 manifest list or single-arch)
curl -sI \
-H "Authorization: ******" \
-H "Authorization: Bearer $TOKEN" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium — the fetched token is still unused. The preceding command stores the bearer token in TOKEN, but this header remains the literal ****** (and the GHCR example has the same issue at line 291). Both registry requests will therefore remain unauthenticated and can still fail with 401, so the claimed digest-retrieval fix is incomplete. Use a shell expansion such as -H "Authorization: Bearer $TOKEN" in both examples; this keeps the token dynamic without embedding a secret.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 919d218: both examples expand the fetched bearer token.

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-713477d7-4439-42ee-913a-386abe9ba7c4","parents":[],"payload":{"id":"ldg-473bf891-c683-4570-814a-966d8bc648c8","operation":"append","value":{"finding_count":1,"head_sha":"c3fd756f87c193c53d6d740437712412f9c4a020","outcome":"regression"}},"sha":"sha256:5a43ecd2da4d3770c7a1b8114ea4eb31fa642b530095f0fe364e71f860318fb3","timestamp":"2026-11-16T08:38:22.884Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd. The fix is correct; the remaining items are coverage and clarity.

📋 Key Themes & Highlights

Key Themes

  • Test coverage gap: the contract test does not assert the new NPM_CONFIG_REGISTRY override or the OCI Accept headers.
  • Duplicated guidance: the npm registry rule appears in frontmatter and in the prompt body.

Positive Highlights

  • ✅ Root cause addressed: NPM_CONFIG_REGISTRY beats the repository .npmrc, which points at a host the firewall blocks. Verified with npm 11.
  • ✅ The Authorization line was previously a literal ******; it is now Bearer $TOKEN on both Docker Hub and GHCR examples.
  • ✅ registry.npmjs.org is already on GH_AW_ALLOWED_DOMAINS.
  • ✅ The committed .lock.yml matches a fresh compile of head c3fd756.

Notes

  • Live Docker Hub and GHCR digest selection with the added OCI Accept headers is untested here. Worth one manual run.
  • The PR body suggests other npm-using workflows on the same allowlist may hit the same .npmrc problem. That is out of scope for this PR.

@copilot please address the inline comments.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~10 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again

env:
# The repository .npmrc targets packagefeedproxy.microsoft.io, which this
# workflow's firewall does not allow; query the public npm registry instead.
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/tdd] The contract test in pkg/cli/cli_version_checker_workflow_contract_test.go reads this .md but does not assert the new NPM_CONFIG_REGISTRY override or the OCI Accept headers, so a future edit could silently drop the fix.

💡 Suggested test

Add require.Contains checks next to the existing contract assertions:

require.Contains(t, workflow, "NPM_CONFIG_REGISTRY: (registry.npmjs.org/redacted)")
require.Contains(t, workflow, "Accept: application/vnd.oci.image.index.v1+json")

@copilot please address this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added registry and OCI index header contract assertions in 919d218; the targeted test passes.

- Update the version with the `v` prefix used by GitHub release tags
**Optimization**: Fetch all versions in parallel using multiple npm view or WebFetch calls in a single turn.

**npm registry**: Use the public registry `https://registry.npmjs.org/` for every npm command. `NPM_CONFIG_REGISTRY` is preset; if npm still contacts `packagefeedproxy.microsoft.io` (from the repository `.npmrc`, which the firewall blocks), pass `--registry=https://registry.npmjs.org/` explicitly. Never edit `.npmrc` or disable TLS verification.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[/codebase-design] The npm registry is now set in frontmatter (line 18), but this paragraph repeats the setting and adds a --registry fallback. Two sources of truth can drift apart.

💡 Suggestion

Keep the frontmatter env: as the single source. Drop the explicit --registry fallback sentence unless a run shows npm still reading the repository .npmrc. The "never edit .npmrc or disable TLS verification" guard is worth keeping.

@copilot please address this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the redundant fallback while retaining the security guard in 919d218.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @pelikhan 👋 — thanks for fixing the CLI Version Checker workflow! The changes to route npm to the public registry and update the OCI digest examples are well-focused and address a real firewall issue. Here's one thing that would strengthen this:

  • Add tests for the workflow fix — The changes to .github/workflows/cli-version-checker.md update the npm registry override and Docker/GHCR authentication examples. Automated tests or validation steps that confirm the agent can now successfully fetch npm metadata and OCI digests from the correct registries would give reviewers confidence the fix works end-to-end.

If you'd like help adding validation, you can assign this prompt to your coding agent:

Add a test or validation step for the cli-version-checker workflow fix that confirms:
1. The NPM_CONFIG_REGISTRY environment variable correctly overrides the repository .npmrc to use registry.npmjs.org
2. The Docker Hub and GHCR API calls with OCI Accept headers can retrieve digests without 401 errors
3. The agent can resolve npm publish metadata and container digests when the workflow runs

Consider a small integration test in the test suite or a shell script that simulates the agent's registry queries.

Generated by ✅ Contribution Check · copilot · routed: haiku55 xhigh · ~25 AIC · ⌖ ~2 AIC · ⊞ 5.4K · ◷

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/cli-version-checker.md:271): address unresolved feedback - Review comment
  3. Review (.github/workflows/cli-version-checker.md:291): address unresolved feedback - Review comment
  4. Review (.github/workflows/cli-version-checker.md:271): address unresolved feedback - Review comment
  5. Review (.github/workflows/cli-version-checker.md:18): address unresolved feedback - Review comment
  6. Review (.github/workflows/cli-version-checker.md:126): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "c3fd756f87c193c53d6d740437712412f9c4a020",
  "kind": "requested",
  "schema_version": "1",
  "state": "091bf28e3c439c8bc146cef66ae046c555372019e9c58a86858acc8a6b66faec",
  "work": [
    "009c33987c3fd2ded7a4485c03c6fc3e24b31d2ee4e06877c2458dea6d46a67b",
    "517c761132d7a7ee5ef6db5238b0eade0976572b13f85b4e3934c9d92952c605",
    "5ba969362b4269dbddb973cc9951ad202c401b658c879a76d6360aec86b9fcac",
    "896ffdc61a6b0c1c9098455ab93fafd8a98f88cff49910eee4c6351403a66d1c",
    "9293c34bca09af4ef3debc6170f322dad196641c7179ee1ecf8fe63c365e9986"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 16, 2026 09:59
…ithub-actions-job

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Category: bug
Risk: medium
Total score: 60/100
Score breakdown: impact 33 + urgency 18 + quality 9 = 60
Recommended action: fast_track
Batch: none

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~6 AIC · ⌖ ~2 AIC · ⊞ 15.3K · ◷

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (.github/workflows/cli-version-checker.md:271): address unresolved feedback - Review comment
  3. Review (.github/workflows/cli-version-checker.md:291): address unresolved feedback - Review comment
  4. Review (.github/workflows/cli-version-checker.md:271): address unresolved feedback - Review comment
  5. Review (.github/workflows/cli-version-checker.md:18): address unresolved feedback - Review comment
  6. Review (.github/workflows/cli-version-checker.md:126): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "919d218c4fdce7e144cd1d52b3e762916412b2d9",
  "kind": "requested",
  "schema_version": "1",
  "state": "01b4ee261b4c806af8cc4395a465fcddc3d007ad0d635433c44801be183032ef",
  "work": [
    "009c33987c3fd2ded7a4485c03c6fc3e24b31d2ee4e06877c2458dea6d46a67b",
    "517c761132d7a7ee5ef6db5238b0eade0976572b13f85b4e3934c9d92952c605",
    "5ba969362b4269dbddb973cc9951ad202c401b658c879a76d6360aec86b9fcac",
    "896ffdc61a6b0c1c9098455ab93fafd8a98f88cff49910eee4c6351403a66d1c",
    "9293c34bca09af4ef3debc6170f322dad196641c7179ee1ecf8fe63c365e9986"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot add packagefeedproxy.microsoft.io to npm domain set

@pelikhan pelikhan closed this Nov 16, 2026
Copilot stopped work on behalf of pelikhan due to an error November 16, 2026 15:13
@github-actions
github-actions Bot deleted the copilot/fix-failing-github-actions-job branch November 24, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants