Use from CI
Find the workspace by walking, not by the index.
Find the workspace by walking, not by the index. The agent's %APPDATA% is empty. Run sqlmc
with the working directory inside the checked-out repository and the directory walk (§3) finds the
committed .smcworkspace. Set SQLMC_WORKSPACE if the layout makes that awkward. Do not rely on the
index.
Commit what the agent needs. The manifest, connections.json, distributionLists.json, and
environments.json. Never connections.local.json — it is one developer's machine-local overrides
and will point the agent at a laptop.
Branch on exit codes, not on output. §4.3. In particular keep 2 distinct: it means the estate
was not touched, and it usually means the group holds a production database and the invocation is
missing --yes.
Branch on errors[].code, not on message text. The prose is rendered per face and may be
reworded; the code is a contract.
Keep stdout clean when capturing JSON. Under --json everything is in one envelope on stdout,
and refusals do not leak into it. Redirect stderr separately if you want the human text for a log:
sqlmc list coverage --list "All Prod" --yes --json > coverage.json 2> coverage.log