mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-02 23:14:33 +01:00
fix: no test edit skips review; guard packet writes; exclusive attempt state
A test-only edit with no gate tag gets the scoped fix-check of its test hunks instead of a lanes-only rerun. Packet write failures print a STOP or RECEIPT_CARRY_REFUSED. attempt's allowance uses an exclusive create. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
f6d6e23e7b
commit
e70da9bf4a
7 files changed
+70
-16
No files matched your search
@@ -186,7 +186,12 @@ function main(argv: string[]): void {
|
||||
process.exit(3);
|
||||
}
|
||||
fs.mkdirSync(path.dirname(path.resolve(state)), { recursive: true });
|
||||
fs.writeFileSync(state, JSON.stringify({ not_counted: seen + 1 }) + '\n', { mode: 0o600 });
|
||||
try { fs.writeFileSync(state, JSON.stringify({ not_counted: 1 }) + '\n', { mode: 0o600, flag: 'wx' }); } catch (e) {
|
||||
if ((e as NodeJS.ErrnoException).code !== 'EEXIST') throw e;
|
||||
console.log('ATTEMPT: counted (another launch in this invocation already used the allowance)');
|
||||
console.log(`STOP: run the install fix (${install}) and confirm its gstack: ok trailer before another launch`);
|
||||
process.exit(3);
|
||||
}
|
||||
console.log(`ATTEMPT: not-counted (install refused: ${install})`);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user