Skip to content

ws resolve: connections array silently required, no warning, no CLI to set it #18

@alexander-mitelman

Description

@alexander-mitelman

After roam ws init, the resulting .roam-workspace.json has "connections": [] by default. Running roam ws resolve with this config — even when repos have correct role: "frontend" / role: "backend" tags — exits in <0.1s with Cross-repo edges: 0 and no warning.

Cause: roam/commands/cmd_ws.py:310-321 — the resolver loops over config["connections"] and only scans pairs declared there. Empty array → zero iterations → silent zero-edge output.

There's no CLI command to set connections, no warning when the array is empty, and the requirement isn't mentioned in roam ws init's next-steps output ("Run roam ws resolve to detect cross-repo API connections.") or in roam ws --help / roam ws resolve --help.

Repro

roam ws init /path/to/frontend /path/to/backend --name x
# Edit .roam-workspace.json to set roles, leave "connections": []
roam ws resolve   # → "Cross-repo edges: 0", exits in 0.04s

Suggested fixes (any of)

  • Auto-detect connection pairs from role: "frontend"role: "backend" when connections is empty.
  • Print a hint when connections: [] and at least one frontend + one backend are tagged.
  • Add roam ws connect <frontend> <backend> CLI command to manage the array without manual JSON editing.
  • Document the array requirement in ws init's next-steps output and ws resolve --help.

Spent roughly an hour source-reading to find this; the next person hitting it would likely give up before finding the cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions