mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 14:34:42 +01:00
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>
This commit is contained in:
1 parent
962efcf247
commit
cab5d9561d
1 file changed
+5
-1
+5
-1
@@ -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 ?? []);
|
||||
|
||||
Reference in new issue
Block a user