Skip to content

fix(calm-hub): stream nitrite seed payloads via stdin to avoid Windows arg limit - #3123

Open
aamanrebello wants to merge 1 commit into
finos:mainfrom
aamanrebello:fix/nitrite-seed-windows-arg-length
Open

aamanrebello wants to merge 1 commit into
finos:mainfrom
aamanrebello:fix/nitrite-seed-windows-arg-length

Conversation

@aamanrebello

@aamanrebello aamanrebello commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Human comment: I needed these fixes to get the Calm Hub Quarkus server working properly on my Windows local (with Git bash to run the init nitrite script lol). From what I understand, it's pretty harmless and does not affect the working of the script on other operating systems. The authoritative opinion would be from the reviewers though :) what do you think?

Coding assistant comment: init-nitrite.sh passed each document's JSON payload to curl as a command-line argument (-d "$payload"). Windows caps total process command-line length far below Linux/macOS ARG_MAX, so seeding large documents (e.g. a full architecture with many nodes and relationships) fails with "Argument list too long" before curl even runs.

Switch the four affected curl calls to stream the payload over stdin instead (--data-binary @- <<< "$payload"). The HTTP request sent is unchanged; only the OS-level mechanism for handing curl the body differs, so behaviour on Linux/macOS/CI is unaffected.

Description

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Schema (calm/)
  • CALM AI (calm-ai/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • CALM Server (calm-server/)
  • CALM Widgets (calm-widgets/)
  • Documentation (docs/)
  • Shared (shared/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

…s arg limit

init-nitrite.sh passed each document's JSON payload to curl as a
command-line argument (-d "$payload"). Windows caps total process
command-line length far below Linux/macOS ARG_MAX, so seeding large
documents (e.g. a full architecture with many nodes and relationships)
fails with "Argument list too long" before curl even runs.

Switch the four affected curl calls to stream the payload over stdin
instead (--data-binary @- <<< "$payload"). The HTTP request sent is
unchanged; only the OS-level mechanism for handing curl the body
differs, so behaviour on Linux/macOS/CI is unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

calm-hub Affects `calm-hub`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant