fix(land): deepen a shallow clone before comparing against the base
The first production land run (cloud#5806, lr_18053aba) failed in stage A at step run-12: hosted runs clone the land ref shallow, so after fetching the base branch git merge-base <base> HEAD found no common ancestor and the following git diff got an empty revision (fatal: ambiguous argument '').
Fix: unshallow the checkout first when git rev-parse --is-shallow-repository is true.
This exact file is already deployed as the workspace's land flow (version 2) so the end-to-end run can continue; this PR keeps the repo in step. flows check passes.
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes two failures in the hosted land flow: shallow clones breaking the base-branch diff, and the timestamp helper failing under dash.
- The base-branch fetch now deepens the checkout via a shell conditional (
--unshallowonly whengit rev-parse --is-shallow-repositoryreports a shallow clone), instead of a separate unshallow step. Folding it into the explicit base refspec fetch also means a deleted land ref can't fail a baregit fetch originbefore the supersession check. - Quoted the
node -pexpression in the timestamp helper; previouslyDate.now()was parsed as shell syntax by/bin/shand aborted the run. - Added a test that verifies the unshallow switch against real shallow and full clones, and updated the flow test fake for the new fetch and quoting.
Agent Relay sessions
claudesessiona71ff4c9· opened viagh pr create· last active 2026-10-30