Skip to content

[FIX] Adding prompt files to the build for Agentic prompt Studio#1853

Merged
gaya3-zipstack merged 2 commits intomainfrom
fix/updating-md
Mar 12, 2026
Merged

[FIX] Adding prompt files to the build for Agentic prompt Studio#1853
gaya3-zipstack merged 2 commits intomainfrom
fix/updating-md

Conversation

@harini-venkataraman
Copy link
Contributor

What

Add .dockerignore rule to include *_system_prompt.md files in Docker builds while excluding all other markdown files.

Why

The agentic extraction plugin agents load system prompt templates from *_system_prompt.md files at runtime. These files are excluded when *.md is in .dockerignore, causing the agent pipeline to fail with missing prompt errors in containerized deployments.

How

Add !*_system_prompt.md exception to .dockerignore so these prompt template files are copied into the Docker image.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

No. This only adds previously-excluded files into the Docker image. No existing behavior changes — the prompt files were always needed, just missing from the build context.

Database Migrations

None.

Env Config

None.

Relevant Docs

N/A

Related Issues or PRs

N/A

Dependencies Versions

N/A

Notes on Testing

  • Build the Docker image and verify *_system_prompt.md files are present inside the container.
  • Run an agentic extraction operation end-to-end to confirm agents can load their prompt templates.

Screenshots

N/A

Checklist

I have read and understood the Contribution Guidelines.

harini-venkataraman and others added 2 commits March 12, 2026 20:22
Signed-off-by: harini-venkataraman <115449948+harini-venkataraman@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

Summary by CodeRabbit

  • Chores
    • Updated Docker build configuration to ensure system prompt files are properly included in container builds, allowing the application to access necessary prompt data during deployment.

Walkthrough

A dockerignore file is updated to add an inclusion exception for system prompt markdown files, preventing them from being ignored during Docker image builds. The change adds a whitelist pattern after existing Markdown exclusion rules.

Changes

Cohort / File(s) Summary
Dockerignore Configuration
docker/dockerfiles/prompt.Dockerfile.dockerignore
Adds inclusion rule !*_system_prompt.md to whitelist agent prompt files that would otherwise be ignored by the generic Markdown exclusion pattern.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding prompt files to the Docker build via a .dockerignore rule exception.
Description check ✅ Passed The description is comprehensive and follows the required template with all critical sections completed, including clear explanations of what, why, how, and testing notes.
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
  • Commit unit tests in branch fix/updating-md
📝 Coding Plan for PR comments
  • Generate coding plan

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.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 12, 2026

Greptile Summary

This PR adds a single .dockerignore exception rule (!*_system_prompt.md) to the prompt.Dockerfile.dockerignore so that agent system-prompt template files are not stripped from the Docker build context when the broad *.md exclusion rule is applied.

Key observations:

  • The exception is correctly placed after the *.md exclusion rule (line 47) and before !prompt-service (line 60). Docker evaluates .dockerignore rules in order with the last matching rule winning, so the ordering is valid.
  • No *_system_prompt.md files are currently tracked in the repository (git ls-files | grep _system_prompt.md returns nothing). The files appear to belong to a private agentic-extraction plugin that is installed or volume-mounted separately. This means the fix cannot be validated against tracked sources but should work once those files exist in the build context.
  • Because !prompt-service at line 60 already re-includes all files under prompt-service/ (overriding the earlier *.md exclusion for that subtree), the new rule only provides a concrete benefit for *_system_prompt.md files that live outside the prompt-service/, unstract/core/, unstract/flags/, or unstract/sdk1/ subtrees — i.e., in a location not yet covered by an existing ! rule. This is a minor redundancy concern, not a correctness issue.
  • The change is scoped to prompt.Dockerfile.dockerignore only. If other service images (e.g., runner, worker-unified) are also used to run agentic workloads, their respective .dockerignore files may need the same exception.

Confidence Score: 4/5

  • Safe to merge — the change only adds previously-excluded files to the Docker image and has no runtime side-effects.
  • The rule placement and ordering are correct, the fix is minimal and targeted, and it cannot regress existing functionality since it only re-includes files. The small deduction is because the *_system_prompt.md files are absent from the tracked repo (making the fix unverifiable in CI) and because the rule may be partially redundant with the existing !prompt-service directive.
  • No files require special attention, but consider auditing other service .dockerignore files if agentic workloads run in additional containers.

Important Files Changed

Filename Overview
docker/dockerfiles/prompt.Dockerfile.dockerignore Adds !*_system_prompt.md exception after the *.md exclusion rule to re-include agent system prompt template files in the Docker build context. Pattern placement and ordering are correct; however, no *_system_prompt.md files are currently tracked in the repository, suggesting they originate from an external/private agentic plugin.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Docker build context"] -->|"Rule: *.md (line 47)"| B["Exclude ALL .md files"]
    B -->|"Rule: !README.md (line 48)"| C["Re-include README.md"]
    C -->|"Rule: !*_system_prompt.md (line 50) ← NEW"| D["Re-include *_system_prompt.md files"]
    D -->|"Rule: !prompt-service (line 60)"| E["Re-include all of prompt-service/"]
    E --> F["Final image contains prompt files"]
    
    G["*_system_prompt.md in prompt-service/plugins/*/"] -->|"Matched by *.md → excluded"| H["Excluded by *.md"]
    H -->|"Matched by !*_system_prompt.md → included"| I["Re-included by new rule"]
    I -->|"Matched by !prompt-service → included"| F
Loading

Last reviewed commit: 2cac4d8

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docker/dockerfiles/prompt.Dockerfile.dockerignore`:
- Around line 47-50: The .dockerignore exception rule "!*_system_prompt.md" is
ineffective because no files match that pattern; either delete the exception
line entirely or replace it with the correct recursive pattern for the intended
filenames (for example use a double-star pattern like "!**/*_system_prompt.md"
or correct the basename to the actual filenames used), and ensure any updated
pattern matches the actual prompt file naming convention referenced elsewhere in
the repo (search for "_system_prompt.md" or the agent prompt filename to confirm
the exact name).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e312130-cd15-4129-978c-304e346eb0f9

📥 Commits

Reviewing files that changed from the base of the PR and between 8a7db7c and 2cac4d8.

📒 Files selected for processing (1)
  • docker/dockerfiles/prompt.Dockerfile.dockerignore

@sonarqubecloud
Copy link

@gaya3-zipstack gaya3-zipstack merged commit 5b98b84 into main Mar 12, 2026
7 checks passed
@gaya3-zipstack gaya3-zipstack deleted the fix/updating-md branch March 12, 2026 15:19
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.

4 participants