Skip to content

fix: accept unset Loom import options from existing clients - #2335

Merged
richiemcilroy merged 2 commits into
mainfrom
fix/loom-cli-omit-optional-fields
Sep 22, 2026
Merged

richiemcilroy merged 2 commits into
mainfrom
fix/loom-cli-omit-optional-fields

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Sep 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Accept null for the optional owner and Space fields on the Loom import API, so installed CLI and MCP versions work after a web deployment.
  • Omit unset fields from new CLI requests while preserving explicit owner and Space values.
  • Cover omitted, null, supplied, and invalid option values in the API contract test.

Why

Existing CLI and MCP clients serialize absent options as JSON null. The API schema rejected that payload with HTTP 400 before the import handler ran. The handler already treats null values as unsupplied options.

Validation

  • Focused web contract suite: 22 tests passed.
  • Scoped Biome check and git diff --check passed.
  • Earlier cargo fmt --all and cargo check -p cap passed for the CLI change. Its focused Rust test could not complete because the isolated worktree ran out of disk space during compilation.
  • Local web typecheck in the isolated worktree was inconclusive because workspace package dist artifacts were absent; CI will run in its normal environment.

No production import was attempted. The server change requires web deployment; it does not require an installed CLI update.

RetriggerConfidence Score: 5/5

The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified.

Summary

The PR fixes Loom imports from the CLI by conditionally adding optional owner and Space fields only when supplied, preventing absent options from being serialized as JSON null.

  • Adds a dedicated payload-construction helper.
  • Preserves explicitly provided owner and Space values.
  • Adds regression coverage for payloads with both absent and supplied optional fields.

Reviews (1) · Last reviewed commit: "fix: omit unset Loom import fields in CL..."

@richiemcilroy richiemcilroy changed the title fix: omit unset Loom import fields in CLI fix: accept unset Loom import options from existing clients Sep 22, 2026
@richiemcilroy
richiemcilroy merged commit ce785e7 into main Sep 22, 2026
23 of 27 checks passed

This branch was successfully deployed

1 active deployment
Preview 5809c05d Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant