Skip to content

Conversation

@snipsnipsnip
Copy link
Member

I've noticed that we could produce a source zip file that can reproduce the XPI binary. Let's release it along with the XPI file.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated build automation workflow for improved efficiency
    • Added automatic source archive generation to release pipeline
    • Optimized release process build dependencies and configuration

Walkthrough

The changes migrate archive functionality from a Makefile target to an npm script. The GitHub Actions release workflow is updated to invoke the new npm archive script and include generated ZIP files in the changelog assets. The Makefile's archive target and related dependencies are removed.

Changes

Cohort / File(s) Summary
CI/CD Workflow Updates
.github/workflows/release.yml
Modified build step to use yarn run build. Added "Create a source zip" step executing yarn run archive. Updated changelog generation to include dist/*.zip in assets.
Build System Refactoring
Makefile
Removed archive target and its archiving rule. Updated .PHONY declaration to include build and remove archive. Simplified all target dependency list from test xpi doc archive to test xpi.
Archive Script Addition
package.json
Added new archive npm script that generates a NAME from XPI dist files and creates a git archive ZIP at dist/${NAME}.zip with specified prefix, including dist/ext/manifest.json.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Straightforward migration pattern (Makefile target → npm script) applied consistently across files
  • No complex logic or control-flow changes; primarily configuration and script definitions
  • Archive script logic is linear with no branching or error-handling complexity

Poem

🐰 A ZIP here, a script there,
Archives bundled with such care!
From Make to npm, the files now leap,
In dist folders, zippered tight to keep,
Workflows humming, sources compressed,
Our archive quest—now manifest! 📦✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The provided pull request description is significantly incomplete when compared to the repository's template. The author provided only a brief two-sentence explanation of the intent, but the template requires multiple structured sections including a license agreement checkbox, an invocation of @coderabbitai, "What is the current behavior?" (referencing an issue), "What is the new behavior?", steps to manually test the new behavior, and an "Anything else?" section. While the short description does convey the general purpose of the change, it lacks the necessary detail and structure that the template expects. The author should update the pull request description to follow the repository's template structure. This includes adding the license agreement checkbox, invoking @coderabbitai, and completing all required sections: the current behavior (with reference to an issue if applicable), the new behavior description, manual testing steps, and any additional relevant information. This will ensure proper documentation and compliance with the repository's contribution standards.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add a build-ready source zip to releases" directly and accurately describes the main objective of the changeset. The changes across the three modified files—the workflow configuration, Makefile, and package.json—all work together to implement this feature: a new npm script creates the source archive, the Makefile is updated to remove the old archive target, and the release workflow is modified to include the zip in the release assets. The title is concise, specific, and clear enough that a developer scanning the git history would immediately understand the primary change.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01367a0 and 5e63c11.

📒 Files selected for processing (3)
  • .github/workflows/release.yml (1 hunks)
  • Makefile (1 hunks)
  • package.json (1 hunks)
🔇 Additional comments (3)
Makefile (1)

4-4: Makefile changes align with archive migration to npm script.

Removing archive from .PHONY and the all target's dependencies is consistent with the change to script-driven archive generation. Confirm this is intentional—archive is no longer part of the default make build targets and is now CI-only.

Also applies to: 10-10

.github/workflows/release.yml (1)

43-43: Workflow updates are consistent and properly sequenced.

The Build step now explicitly uses corepack, the new "Create a source zip" step runs at the right time (after build, before changelog generation), and the changelogithub call includes both XPI and ZIP assets. Verify that the archive script in package.json handles edge cases (e.g., missing XPI files) gracefully, so the workflow doesn't proceed with partial results.

Also applies to: 48-49, 51-51

package.json (1)

24-24: Verify the git archive command structure; double --prefix flags may not work as intended.

The archive script specifies --prefix twice: first as ${NAME}/ext/, then as ${NAME}/. In git archive, --prefix is a global setting that applies to all archived content, so the second flag overrides the first. This likely means both the HEAD files and manifest.json will be archived under ${NAME}/ instead of the intended structure (HEAD files under ${NAME}/ext/, manifest.json under ${NAME}/).

Additionally, the script assumes exactly one .xpi file in dist/. If there are zero or multiple XPI files, the glob expansion will either produce an error or unexpected behavior.

To verify the intended ZIP structure and test the script:

Once you verify the structure, adjust the git archive command to ensure files are placed in the correct directories. One approach is to use separate git archive calls or to reorder the --prefix flags correctly.


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.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.22%. Comparing base (01367a0) to head (5e63c11).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
Components Coverage Δ
app 64.20% <ø> (ø)
ghosttext 93.91% <ø> (ø)
infra 47.21% <ø> (ø)

@snipsnipsnip snipsnipsnip force-pushed the release-makeable-source-zip branch from 5238121 to 5e63c11 Compare October 27, 2025 10:05
@snipsnipsnip snipsnipsnip added this pull request to the merge queue Oct 27, 2025
Merged via the queue into exteditor:main with commit 39b2f92 Oct 27, 2025
8 checks passed
@snipsnipsnip snipsnipsnip deleted the release-makeable-source-zip branch October 27, 2025 10:21
@github-project-automation github-project-automation bot moved this from 📥️Inbox to 🪺Experimental in Ghostbird Issues Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant