Skip to content

Conversation

@itsmylife44
Copy link

@itsmylife44 itsmylife44 commented Jan 30, 2026

Summary

Fixes Docker build failure caused by missing @automaker/spec-parser package.json in the Dockerfile's BASE stage.

Problem

When building the Docker image, npm ci fails with:

Cannot find module 'fast-xml-parser'

This occurs because @automaker/spec-parser was added to the monorepo but its package.json was not included in the Dockerfile's BASE stage COPY instructions.

Solution

Add the missing COPY instruction for libs/spec-parser/package*.json alongside the other library package files.

Changes

  • Dockerfile: Add COPY libs/spec-parser/package*.json ./libs/spec-parser/ to BASE stage

Testing

  • Docker build completes successfully
  • Server starts and runs correctly in container

Summary by CodeRabbit

  • Chores
    • Updated build configuration to ensure consistent handling of dependency files across build stages.

✏️ Tip: You can customize this high-level summary in your review settings.

The spec-parser library was added to the monorepo but its package.json
was not included in the Dockerfile's BASE stage. This causes npm ci to
fail during Docker builds with:

  Cannot find module 'fast-xml-parser'

This module is a dependency of @automaker/spec-parser which is used by
the server for parsing specification files.

The fix adds the COPY instruction alongside the other libs, maintaining
the established pattern in the Dockerfile.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @itsmylife44, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a Docker build failure by ensuring that the package.json files for the @automaker/spec-parser library are correctly included in the Docker image's base stage. This crucial addition allows npm ci to successfully install all project dependencies, thereby enabling the Docker build to complete without errors and ensuring the application runs as expected within the container.

Highlights

  • Dockerfile Update: Added a COPY instruction for libs/spec-parser/package*.json to the Dockerfile's BASE stage to resolve a build failure.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

A single line was added to the Dockerfile to copy libs/spec-parser/package*.json into the base stage, matching the existing pattern used for other library package.json files.

Changes

Cohort / File(s) Summary
Dockerfile Configuration
Dockerfile
Added COPY step for libs/spec-parser/package*.json into ./libs/spec-parser/ in the base stage for consistency with other libs.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

Bug

Poem

🐰 A line so neat, a package file to meet,
In Docker's base, consistency is sweet,
The spec-parser now stands with siblings side by side,
One COPY more, and builds align with pride! 📦

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding a missing spec-parser package.json COPY step to the Docker base stage to fix a build failure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly fixes a Docker build failure by adding the missing COPY instruction for the @automaker/spec-parser package's package.json. The change is straightforward and addresses the problem described. I've added one suggestion on the Dockerfile to improve the long-term maintainability of this section and prevent similar issues in the future by using a more robust method for copying package files.

COPY libs/model-resolver/package*.json ./libs/model-resolver/
COPY libs/dependency-resolver/package*.json ./libs/dependency-resolver/
COPY libs/git-utils/package*.json ./libs/git-utils/
COPY libs/spec-parser/package*.json ./libs/spec-parser/
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This correctly fixes the build failure. However, this pattern of manually adding a COPY line for each new library is error-prone, as this PR itself demonstrates.

A more maintainable approach would be to use a single command to copy all library package.json files. If you are using Docker BuildKit, you can replace the entire block of COPY instructions (lines 24-31) with a single line. This would automatically handle new libraries in the future.

First, ensure BuildKit is enabled by adding # syntax=docker/dockerfile:1 to the top of your Dockerfile. Then, you can use:

COPY --parents libs/*/package*.json ./

If you can't use BuildKit, consider at least sorting the block of COPY commands alphabetically to make it easier to manage.

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.

1 participant