Files
gstack/test/land-and-deploy-command-trigger.test.ts
T
50d020ad9d v1.91.85.0 fix(cso,deploy): /cso on Windows Git 2.56 and macOS Docker, zsh-safe loops, honest deploy stops (Wave 9 Lane D) (#3134)
/cso sets GIT_CONFIG_GLOBAL=/dev/null on every platform (Git for Windows 2.56
rejects NUL), shared by childEnvironment and the eval and producer Git
environments, with a Windows-safe test that `git config --global --list` is
empty. On macOS the local Docker socket resolves without opening it when Bun's
realpathSync throws EOPNOTSUPP; Linux admission and the local-Unix-only rule
are unchanged. /test-audit and /ship loop over file lists zsh does not
word-split, with a static test against `for x in $VAR` in generated bash.
/setup-deploy stops and writes nothing when nothing is deployed yet;
/land-and-deploy runs a recorded command trigger only with explicit approval
before claiming revision proof. TODOS.md records the open P2/P3 bugs by area,
the Wave 9 parked items and the feature themes.

Closes #3082. Adopts #3094, #3095, #3096 and #3109.

Co-authored-by: marcode <244097767+vilano93@users.noreply.github.com>
Co-authored-by: Nathan <196341+nathanshox@users.noreply.github.com>
Co-authored-by: mikehasa <91774998+mikehasa@users.noreply.github.com>
Co-authored-by: Andrey <95643518+Alfabit7@users.noreply.github.com>
2026-10-11 15:43:33 +00:00

36 lines
1.9 KiB
TypeScript

import { describe, expect, test } from 'bun:test';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
const root = join(import.meta.dir, '..');
const source = (name: string) => readFileSync(join(root, 'land-and-deploy', name), 'utf8');
describe('land-and-deploy handles a recorded command deploy trigger', () => {
test('Step 5 routes a recorded command trigger before URL polling', () => {
const merge = source('sections/merge-and-deploy.md');
const route = merge.indexOf('2. Recorded command trigger');
expect(route).toBeGreaterThanOrEqual(0);
expect(route).toBeLessThan(merge.indexOf('Explicit `VERIFY_URL`'));
expect(route).toBeLessThan(merge.indexOf('Otherwise use configured production URL/status checks'));
const body = merge.slice(route, merge.indexOf('3. Explicit `VERIFY_URL`')).replace(/\s+/g, ' ');
expect(body).toContain('production has not moved yet');
expect(body).toContain('only with their explicit approval');
expect(body).toContain('a zero exit is not revision proof');
});
test('a pending workflow or platform trigger is not mistaken for a command trigger', () => {
const merge = source('sections/merge-and-deploy.md');
expect(merge.replace(/\s+/g, ' ')).toContain('A configured workflow or platform trigger whose run has not appeared remains pending');
});
test('Strategy D points at the route and still demands revision proof', () => {
const main = source('SKILL.md');
const start = main.indexOf('### Strategy D: Custom deploy hooks');
expect(start).toBeGreaterThanOrEqual(0);
const body = main.slice(start, main.indexOf('### Common: Timing and failure handling')).replace(/\s+/g, ' ');
expect(body).toContain('A recorded command trigger follows Step 5 route 2');
expect(body).toContain('only with their explicit approval');
expect(body).toContain('not revision proof on its own');
});
});