Skip to content

bug: capabilities.ts ignores SQUAD_HOME — machine-capabilities.json always read from ~/.squad/ #1280

Closed

Description

@dat-intellis

Summary

loadCapabilities() in packages/squad-sdk/src/ralph/capabilities.ts hardcodes ~/.squad/machine-capabilities.json as the user-level fallback path. It does not use resolveSquadHome() (added in #1038 / PR #1041), so the SQUAD_HOME env var is ignored.

Reproduction

mkdir -p /mnt/synced-drive/.squad
cat > /mnt/synced-drive/.squad/machine-capabilities.json << 'EOF'
{ "needs": ["node", "dotnet"] }
EOF

export SQUAD_HOME=/mnt/synced-drive/.squad
# Ralph triage — machine-capabilities.json is NOT loaded

Ralph behaves as if no machine-capabilities.json exists, routing all needs:* issues regardless of capability.

Expected behavior

loadCapabilities() should resolve the user-level fallback through resolveSquadHome() so that SQUAD_HOME overrides are respected.

Actual behavior

The path is always path.join(os.homedir(), '.squad', 'machine-capabilities.json').

Relevant source: packages/squad-sdk/src/ralph/capabilities.ts, loadCapabilities() line 105.

resolveSquadHome() is already exported from resolution.ts (added in #1038 / PR #1041) and is the correct replacement.

Environment

  • squad-sdk: v0.10.0
  • OS: any
  • Node: v22+

Related: Issue #1038 (SQUAD_HOME feature), PR #1041, #1279 (same root cause in comms-teams.ts).

Activity

  1. added a commit that references this issue on Jun 24, 2026
    9b372a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssue has been triagedwave:1-nextWave 1 — immediate next sprint

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions