Skip to content

Fixed Koenig npm publish failing provenance repository verification - #29199

Merged
kevinansfield merged 1 commit into
mainfrom
fix-koenig-package-repository-fields
Jul 9, 2026
Merged

Fixed Koenig npm publish failing provenance repository verification#29199
kevinansfield merged 1 commit into
mainfrom
fix-koenig-package-repository-fields

Conversation

@kevinansfield

Copy link
Copy Markdown
Member

ref https://github.com/TryGhost/Ghost/actions/runs/29023545026/job/86139566830

The publish_koenig_packages release job failed on the last release: npm rejected the very first package with a 422 because sigstore provenance verification compares each package's repository.url against the repository the workflow actually ran in. All the koenig/* packages still declared https://github.com/TryGhost/Koenig/... from before the monorepo merge, but the provenance bundle attests they were built from TryGhost/Ghost, so every publish attempt is doomed until the fields match. No packages were published by the failed run.

  • Updated every koenig/* package to the standard monorepo form: repository.url pointing at TryGhost/Ghost with the package path in repository.directory
  • Fixed kg-simplemde's stale homepage and bugs URLs that also still pointed at the old repo

Verified with hosted-git-info (the library npm uses for this check) that the new URLs normalise to TryGhost/Ghost while the old ones normalise to TryGhost/Koenig — exactly the reported mismatch. The registry-side check can't be exercised by a dry run (npm skips provenance generation entirely with --dry-run), but the fix can be proven end-to-end by dispatching the publish-koenig-package.yml escape-hatch workflow for a single small package.

ref https://github.com/TryGhost/Ghost/actions/runs/29023545026/job/86139566830

- the Koenig packages' package.json repository fields still pointed at
  the old TryGhost/Koenig repo, but since the monorepo merge they are
  published from TryGhost/Ghost with npm provenance enabled
- npm verifies the sigstore provenance bundle against repository.url and
  rejected the publish with a 422 on the repo mismatch, breaking the
  publish_koenig_packages release job
- updated every koenig/* package to point at TryGhost/Ghost with the
  package path in repository.directory, and fixed kg-simplemde's stale
  homepage/bugs URLs while there
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2216e51a-4398-475d-9543-91555a394b7c

📥 Commits

Reviewing files that changed from the base of the PR and between d956a89 and 423a2e1.

📒 Files selected for processing (13)
  • koenig/kg-card-factory/package.json
  • koenig/kg-clean-basic-html/package.json
  • koenig/kg-converters/package.json
  • koenig/kg-default-cards/package.json
  • koenig/kg-default-nodes/package.json
  • koenig/kg-default-transforms/package.json
  • koenig/kg-html-to-lexical/package.json
  • koenig/kg-lexical-html-renderer/package.json
  • koenig/kg-markdown-html-renderer/package.json
  • koenig/kg-simplemde/package.json
  • koenig/kg-unsplash-selector/package.json
  • koenig/kg-utils/package.json
  • koenig/koenig-lexical/package.json

Walkthrough

This pull request updates package.json metadata across fourteen koenig packages, changing the repository field from a plain string URL to a structured object specifying type, url, and directory pointing to the TryGhost/Ghost monorepo. Additionally, koenig/kg-simplemde/package.json updates its homepage and bugs.url fields from legacy TryGhost/Koenig links to corresponding TryGhost/Ghost links. No exported or public entity declarations are affected.

Suggested reviewers: acburdine, EvanHahn

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main fix: Koenig npm publish provenance verification now succeeds.
Description check ✅ Passed The description is directly related to the metadata updates and explains the provenance verification issue being fixed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-koenig-package-repository-fields

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 423a2e1

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 11m 27s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 6s View ↗
nx run-many -t test:unit -p @tryghost/kg-card-f... ✅ Succeeded 6m 45s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 57s View ↗
nx run @tryghost/koenig-lexical:test:acceptance ✅ Succeeded 2m 38s View ↗
nx run @tryghost/admin:build ✅ Succeeded 3m 13s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 18s View ↗
Additional runs (8) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-09 14:43:40 UTC

@kevinansfield
kevinansfield enabled auto-merge (rebase) July 9, 2026 14:32
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.04%. Comparing base (c5b25a3) to head (423a2e1).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29199   +/-   ##
=======================================
  Coverage   74.04%   74.04%           
=======================================
  Files        1570     1570           
  Lines      136621   136629    +8     
  Branches    16521    16521           
=======================================
+ Hits       101162   101168    +6     
- Misses      34425    34458   +33     
+ Partials     1034     1003   -31     
Flag Coverage Δ
admin-tests 55.22% <ø> (+0.06%) ⬆️
e2e-tests 76.15% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kevinansfield
kevinansfield merged commit a8a9d1b into main Jul 9, 2026
50 checks passed
@kevinansfield
kevinansfield deleted the fix-koenig-package-repository-fields branch July 9, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants