Skip to content

fix(artifact): include package and lock files in dist payload#43

Merged
gentlementlegen merged 1 commit into
mainfrom
fix/320-copy-package-lockfiles-to-artifact
Mar 9, 2026
Merged

fix(artifact): include package and lock files in dist payload#43
gentlementlegen merged 1 commit into
mainfrom
fix/320-copy-package-lockfiles-to-artifact

Conversation

@gentlementlegen
Copy link
Copy Markdown
Member

Summary

  • include root package.json in artifact branch payloads
  • include lockfiles in artifact branch payloads (bun.lock, bun.lockb, package-lock.json, pnpm-lock.yaml, yarn.lock, npm-shrinkwrap.json when present)
  • preserve existing artifact payload entries (manifest.json, dist/**, optional action.yml, optional .github/workflows/compute.yml)
  • add tests for package/lock inclusion and bun.lockb base64 encoding

Why

dist/* compute workflows that run bun install --frozen-lockfile require both package.json and a lockfile. Without them, runs fail before plugin execution.

Validation

  • bun run test passes in action-deploy-plugin

Closes ubiquity-os/ubiquity-os-kernel#320

@gentlementlegen gentlementlegen marked this pull request as ready for review March 9, 2026 16:48
@gentlementlegen gentlementlegen merged commit f8fe978 into main Mar 9, 2026
2 checks passed
@gentlementlegen gentlementlegen deleted the fix/320-copy-package-lockfiles-to-artifact branch March 9, 2026 16:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f2550237-8596-4b24-ba26-7ff7491ca4c8

📥 Commits

Reviewing files that changed from the base of the PR and between 21d41e4 and 987beaa.

📒 Files selected for processing (2)
  • .github/scripts/__tests__/push-changes.test.js
  • .github/scripts/push-changes.js

📝 Walkthrough

Walkthrough

The changes add support for collecting and including root artifact files (package.json, lockfiles) in the artifact tree alongside dist files. A new OPTIONAL_ROOT_ARTIFACT_FILES constant defines common lockfile types. Large dist files exceeding size limits are now split into base64-encoded chunks rather than failing. Four utility functions (collectTreeEntries, deriveArtifactRef, normalizeArtifactPrefix, normalizeBranchName) are exported for external use. Tests verify package.json and bun.lock inclusion, and bun.lockb base64 encoding.

Possibly related issues

  • #320: Direct implementation of artifact-branch publishing infrastructure. Exports collectTreeEntries, deriveArtifactRef, and normalizeBranchName for source-to-artifact ref mapping, and adds OPTIONAL_ROOT_ARTIFACT_FILES collection to support root-level manifest and lockfile inclusion in artifact branches.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive Description includes summary, rationale, and validation, but omits the required issue link template. It references issue #320 in closing but not in 'Resolves #' format. Use the template format 'Resolves #320' at the top of the description to follow repository conventions.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly summarizes the main change: including package and lock files in artifact payloads, which aligns with the primary objective from issue #320.
Linked Issues check ✅ Passed Changes fully align with issue #320 scope: package.json and lockfiles are added to artifact payloads, bun.lockb is base64-encoded, existing payload entries are preserved, and tests verify the new behavior.
Out of Scope Changes check ✅ Passed All changes are scoped to issue #320: supporting artifact branch payload collection. Four new function exports align with test/tooling needs for the artifact branch model.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/320-copy-package-lockfiles-to-artifact

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

RFC: Move plugin build artifacts to dist/<source-ref> branches

1 participant