# `install.call_broken`

A change to the app's API breaks a call another app in the same repository makes through the package it made from that API.

Area 14, [Tools](/docs/tooling.md); not declinable; the next step is usually the agent's.

## Why Jadpo refuses it

Another Jadpo app calls yours through a package made from your API
(`jadpo package add ../depot`). When both apps live in one repository,
`jadpo check` in your app reads the other apps' `jadpo.lock` files,
compares the package each made from your folder with the one your API
makes now, and names every call the change breaks: a route gone, a field
callers must now send, a rule that now refuses what they send, or a
field they read gone or retyped.

An acceptance lets a breaking change through for clients nobody can
see. These callers can be seen, and moved in the same change, so an
acceptance doesn't clear this error: merged, the other app's call would
fail in production.

## What it looks like

The depot takes parcels through `POST /parcels`:




`domains/shipping/types/ship_request.jadpo`:

```jadpo
/// A parcel to ship.
type ShipRequest = Input {
    tracking_code: Text {
        max_length: 20
    }
}
```



A shop beside it in the same repository adds the depot's package and
calls it. On a branch, the depot then makes `weight_grams` a field
callers must send, with a person's acceptance:

```sh
export GIT_AUTHOR_NAME=Ada GIT_AUTHOR_EMAIL=ada@example.com GIT_COMMITTER_NAME=Ada GIT_COMMITTER_EMAIL=ada@example.com
export GIT_AUTHOR_DATE=2026-10-20T14:00:00Z GIT_COMMITTER_DATE=2026-10-20T14:00:00Z
mkdir -p ../shop/domains/orders/actions
cat > ../shop/app.jadpo <<'END'
application {
    connections: {
        depot: {
            package: Depot.v1
            domains: [orders]
            host: config.depot_url
        }
    }
}
END
cat > ../shop/config.jadpo <<'END'
config {
    /// Where the depot's API is.
    depot_url: Url
}
END
cat > ../shop/domains/orders/actions/send_parcel.jadpo <<'END'
use app { depot }
use packages/depot

/// Asks the depot to ship a parcel.
action send_parcel(request: Depot.ShipRequest) -> Unit {
    depot.parcels.create(request)
}
END
(cd ../shop && jadpo package add ../project --as Depot.v1 > /dev/null && jadpo check > /dev/null)
git -C .. init -q -b main
git -C .. add project shop
git -C .. commit -q -m "feat: the shop sends parcels to the depot"
git -C .. switch -q -c parcel-weights
cat > domains/shipping/types/ship_request.jadpo <<'END'
/// A parcel to ship.
type ShipRequest = Input {
    tracking_code: Text {
        max_length: 20
    }
    /// How heavy the parcel is, in grams.
    weight_grams: Int {
        min: 1
    }
}
END
mkdir -p acceptances
cat > acceptances/20261020T1500_require_parcel_weight.jadpo <<'END'
/// Sam Okafor (operations), in chat on 2026-10-20: "Every parcel needs its weight from now on."
acceptance {
    changes: {
        main.ShipRequest.weight_grams: ApiChange.input_field_required
    }
}
END
jadpo check
```

```text
Wrote api/main.jadpo_record

error: This change breaks `../shop`'s call to `parcels.create`
 --> ../shop/domains/orders/actions/send_parcel.jadpo:6:5
  |
6 |     depot.parcels.create(request)
  |     ^^^^^^^^^^^^^^^^^^^^ through Depot.v1 1.0.0
  reason: `../shop` calls it through the package it made from this app's API, and callers must now send `ShipRequest.weight_grams`.
  next: Keep the API as it was, or run `jadpo package update depot` in `../shop` and move this call to the new major version it adds, in this change (agent)
  rule: install.call_broken
  help: https://jadpo.dev/docs/errors/install.call_broken

check failed: 1 error, 7 files
```

`(agent)` at the end of the `next:` line means your coding agent can make
the fix itself.

## How to fix it

**If callers shouldn't have to change**, keep the API as it was: make
the new field optional, so a call that leaves it out still works.

```jadpo
/// A parcel to ship.
type ShipRequest = Input {
    tracking_code: Text {
        max_length: 20
    }
    /// How heavy the parcel is, in grams.
    weight_grams: Int {
        min: 1
        optional: true
    }
}
```

The shop's call still works, since it may leave `weight_grams` out, so
nothing of the shop's is broken and the depot's check passes.

**If the change should stand**, make the shop's package again in the same
change, and move its call to the new major version:

```sh
cd ../shop
jadpo package update depot
```

`update` adds `Depot.v2` beside `Depot.v1` and lists the call to move.
Point the shop's `depot` connection at `Depot.v2`, give the call the
weight it now needs, then remove the old version:

```sh
jadpo package remove Depot.v1
jadpo check
```

Back in the depot, `jadpo check` passes: the shop's package is the one
its API makes now, so nothing of the shop's is broken.

## Related

- [When the other app changes](/docs/packages-from-other-jadpo-apps.md#when-the-other-app-changes)
- [Breaking changes](/docs/the-public-api-record.md#breaking-changes)
- [Two versions side by side](/docs/two-versions-side-by-side-lazy-loading-and-the-package-cache.md)
- [`acceptance.missing`](/docs/errors/acceptance.missing.md)
