mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-18 02:42:25 +02:00
fix(test): update four main-side assertions to the T3 installer contracts
Integration drift from the T3 lane: three static assertions pinned the OLD implementation shapes that T3 legitimately replaced — the gbrain-refresh branch no longer self-documents a reset --hard cycle (#2569 renders to an untracked out-dir instead; the test now pins THAT), setup's regen block renamed to the render form (re-anchored, same exit-code-propagation invariant), and sections/ linking generalized into _link_skill_runtime_assets (the _link_or_copy routing assertion moved into the helper). Fourth: the uninstall neutral-target test asserted against os.tmpdir(), which reads $TMPDIR at call time — a shard neighbor can leave it gstack-containing, making the "neutral" symlink target match the provenance substring; the test now falls back to a fixed neutral root and asserts neutrality explicitly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d889453686
commit
5b65f91a8c
@@ -45,16 +45,19 @@ describe('setup: gen:skill-docs:user exit-code propagation (pipe-masking fix)',
|
||||
expect(r.stdout).not.toContain('LOG: warning');
|
||||
});
|
||||
|
||||
test('setup: the live gbrain regen block has no pipe before the || guard', () => {
|
||||
test('setup: the live gbrain render block has no pipe masking its exit code', () => {
|
||||
// Slice the exact block from setup and confirm the fix is in place
|
||||
// without resorting to a fragile line-number check.
|
||||
const start = SETUP_SRC.indexOf('gbrain detected — regenerating');
|
||||
// without resorting to a fragile line-number check. (#2569 renamed the
|
||||
// block from "regenerating" to "rendering ... into $_GSTACK_RENDER_DIR" —
|
||||
// the exit-code-propagation invariant is unchanged.)
|
||||
const start = SETUP_SRC.indexOf('gbrain detected — rendering');
|
||||
expect(start).toBeGreaterThan(-1);
|
||||
const end = SETUP_SRC.indexOf('|| log', start);
|
||||
const end = SETUP_SRC.indexOf('warning: gen:skill-docs:user failed', start);
|
||||
expect(end).toBeGreaterThan(start);
|
||||
const block = SETUP_SRC.slice(start, end);
|
||||
expect(block).toContain('bun_cmd run gen:skill-docs:user --host claude');
|
||||
// The bug shape: `... | tail -N` between the call and the `|| log` guard.
|
||||
// The bug shape: `... | tail -N` between the call and the failure guard —
|
||||
// a pipe would replace the render's exit code with tail's.
|
||||
expect(block).not.toMatch(/gen:skill-docs:user[^\n]*\|\s*tail/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user