From cab5d9561d4036d7c3e41945c3fa6d10e8667fb5 Mon Sep 17 00:00:00 2001 From: garrytan Date: Fri, 30 Oct 2026 16:58:51 +0000 Subject: [PATCH] fix(ship-budget): return releases an open step reservation under the estimate meter instead of booking its projection; measured meters still settle it (GSTA-167 replay 7e) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- lib/ship-handoff.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ship-handoff.ts b/lib/ship-handoff.ts index 5ecc277f4..e50af160b 100644 --- a/lib/ship-handoff.ts +++ b/lib/ship-handoff.ts @@ -218,7 +218,11 @@ export function cmdReturn(argv: string[], ctx: Ctx): Outcome { return mutateLedger(ledgerFileFor({ run: str(o, 'run') }, ctx.env), ctx.env, l => { if (l.role !== 'child' || !l.parent) throw usageError(`run ${l.run} is not a child run`); readMeter(l, o, false); - for (const r of l.reservations) if (r.kind === 'step' && r.state === 'open') settleIn(l, r); + for (const r of l.reservations) { + if (r.kind !== 'step' || r.state !== 'open') continue; + if (l.meter.contract.meter === 'estimate') r.state = 'released'; + else settleIn(l, r); + } const head = git(ctx.cwd, ['rev-parse', 'HEAD']); const tree = pinsNow(ctx.cwd, 'HEAD', ctx.env).wtree; const accepted = new Set((l as any).accepted_skips as string[] | undefined ?? []);