mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-03 15:27:56 +01:00
* test(free): split files over the 60 s seed ceiling and the Windows doctor file Eight free test files the fresh recordings put over the seed ratchet's 60 s ceiling, and test/gstack-doctor.test.ts (343 s on Windows), are split by describe block or test with shared helpers moved to test/helpers/. Test bodies are unchanged. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(todos): note the GSTA-151 seed-ceiling splits Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(free): reseed both duration seeds at this head Recorded by free-durations-record.yml (open_pr=false) run 40818261447 atec6faf1: 1,416 Linux files on ubicloud-standard-8 and the 795 curated Windows files on windows-latest. test/setup-codex-scope.test.ts fell to 49 s and leaves the seed allowlist. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: changelog entry for the GSTA-151 seed-ceiling splits (unreleased) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(free): split test/ubicloud-runner.test.ts over the 60 s seed ceiling; keep setup-codex-scope allowlisted The reseed at the main merge (free-durations-record run 41226501374,221320e) put test/ubicloud-runner.test.ts, which main added after this branch's first reseed, at 127 s and test/setup-codex-scope.test.ts back at 66 s. The fake-API cases move into four parts by describe topic with their shared fake VM in test/helpers/ubi-runner-fake-vm.ts (46 tests before and after). The allowlist keeps main's setup-codex-scope entry. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(free): reseed both duration seeds at the main merge; changelog fragment Recorded by free-durations-record.yml (open_pr=false) run 41229924108 at4f5bd2d: 1,470 Linux files on ubicloud-standard-8 and 822 curated Windows files. The Windows recorder was red on browse/test/cookie-import-native-job.test.ts (known Edge leak) and test/hook-scripts.test.ts, plus test/free-seed-ratchet.test.ts on both OSes against the pre-reseed seed; their durations are kept. The CHANGELOG entry moves to changelog.d/ now that main runs on fragments. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: correct the seed-ceiling TODO and the ubicloud-runner test paths after the split Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
38 lines
1.7 KiB
TypeScript
38 lines
1.7 KiB
TypeScript
import { existsSync, lstatSync, rmSync, symlinkSync } from 'node:fs';
|
|
import { join } from 'node:path';
|
|
import { expect } from 'bun:test';
|
|
import { fixtureWriteFileSync, fixtureMkdirSync, tree, fixture, install } from './install-fixture';
|
|
|
|
/** F13: a Claude-only setup run twice leaves a cyclic foreign ownership link at `target` and the rest of the global tree untouched. */
|
|
export function claudeOnlySetupPreservesCyclicLink(target: string): void {
|
|
const f = fixture('ordinary');
|
|
rmSync(join(f.global, 'gstack-retired'));
|
|
for (const rel of ['bin', 'lib']) {
|
|
const asset = join(f.global, 'gstack', rel);
|
|
rmSync(asset);
|
|
symlinkSync(join(f.source, rel), asset, 'dir');
|
|
}
|
|
const old = join(f.global, 'gstack-claude');
|
|
rmSync(old, { recursive: true });
|
|
const oldRender = join(f.source, '.agents/skills/gstack-claude');
|
|
fixtureMkdirSync(oldRender, { recursive: true });
|
|
fixtureWriteFileSync(join(oldRender, 'SKILL.md'), '<!-- AUTO-GENERATED from SKILL.md.tmpl -->\n<!-- Regenerate: bun run gen:skill-docs -->\nPrior legacy render.\n');
|
|
symlinkSync(oldRender, old, 'dir');
|
|
const link = target === 'legacy' ? old
|
|
: target === 'replacement' ? join(f.global, 'gstack-claude-code')
|
|
: target === 'legacy-skill' ? join(old, 'SKILL.md')
|
|
: target === 'runtime' ? join(f.global, 'gstack')
|
|
: join(f.global, 'gstack', target === 'runtime-bin' ? 'bin' : 'lib');
|
|
if (target === 'legacy-skill') {
|
|
rmSync(old);
|
|
fixtureMkdirSync(old);
|
|
}
|
|
if (existsSync(link) || lstatSync(link, { throwIfNoEntry: false })) rmSync(link, { recursive: true });
|
|
symlinkSync(link, link);
|
|
const before = tree(f.global);
|
|
for (let run = 0; run < 2; run++) {
|
|
install(f, '--host claude');
|
|
expect(tree(f.global)).toEqual(before);
|
|
}
|
|
}
|