mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-13 16:38:56 +02:00
test: align cross-cutting pins with the wave's contracts
Three suites pinned pre-wave behavior: browse's gstack-config test asserted the old unknown-key ''/exit-0 shape (#2611 made it exit 1); the Windows-paths suite pinned O_APPEND enqueue atomicity (the spool design satisfies the same invariant via tmp + os.replace, one file per record — pinned in its new form); and nine carve-guard skeleton ceilings absorbed the #2402 unconditional-learnings prose (~450B per skill), bumped with measured values per the guard's own protocol. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
8c9e81d242
commit
a54802dc6e
@@ -48,11 +48,15 @@ describe('gstack-brain-sync — Windows path/exec invariants', () => {
|
||||
expect(SRC.indexOf(CR_STRIP)).toBeLessThan(SRC.indexOf('add -f -- "$p"'));
|
||||
});
|
||||
|
||||
test('inline enqueue appends one atomic record at a time (codex P2 #1)', () => {
|
||||
expect(SRC).toContain('os.O_APPEND');
|
||||
expect(SRC).toContain('os.write(fd');
|
||||
// No buffered batch write to the queue (the interleave-corruption shape).
|
||||
test('inline enqueue writes one atomic record at a time (codex P2 #1, spool form)', () => {
|
||||
// The invariant is per-record write atomicity (no interleave corruption).
|
||||
// Pre-spool this was O_APPEND on the shared queue file; the spool design
|
||||
// satisfies it more strongly: one FILE per record, tmp write + atomic
|
||||
// os.replace — nothing shared to interleave.
|
||||
expect(SRC).toContain('os.replace(tmp');
|
||||
// No shared-file append anywhere (the interleave-corruption shape).
|
||||
expect(SRC).not.toContain('open(queue_path, "a"');
|
||||
expect(SRC).not.toContain('os.O_APPEND');
|
||||
});
|
||||
|
||||
test('skip-list is normalized on BOTH discover and drain sides (codex P2 #2)', () => {
|
||||
|
||||
Reference in New Issue
Block a user