Compare deployed vs local commit
provetrade_deploy_statusCompare the live gateway's build SHA with your local git HEAD to see if production matches your code. Use it to identify deployment mismatches before debugging unexpected behavior.
Instructions
Answer "is what is live the code I have?" — compares the gateway's reported build sha with local git HEAD, and reports how many commits ahead local is.
Call it before debugging a production behaviour against local source: a mismatch explains a surprising difference immediately and saves the whole investigation.
Reads git via execFile with an argument array — no shell. Read-only, no cost, changes nothing in the repository.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | No | Path to the local ProveTrade clone. Defaults to the working directory. Relative paths resolve against the allowed root; anything outside it is refused with PATH_DENIED. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why commits_behind could not be determined. | |
| in_sync | Yes | True only when the deployed sha identifies local HEAD. | |
| deployed_sha | Yes | The version string from the gateway /health. Null when it is absent or not a sha (e.g. "dev"). | |
| commits_behind | Yes | Commits from the deployed sha to local HEAD. NULL, never 0, whenever the count is not meaningful — a 0 would read as "in sync", and that is the one wrong answer that gets acted on. Read `reason` when this is null. | |
| dirty_worktree | Yes | True when git status --porcelain reports anything. | |
| local_head_sha | Yes | Full 40-character sha of local HEAD. |