mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-22 12:50:50 +02:00
v1.87.5.0 perf: remove idle waits from tests and CI planning (#2897)
* v1.87.5.0 perf: remove idle waits from tests and CI planning * fix: settle split PTY redraws before routing input * docs: record final burst-safe test benchmarks * fix: keep cold-setup snapshot metadata dependency-free * fix: avoid early-reader pipe races in artifact URL parsing * fix: preserve safety matches for multiline command payloads * fix: recognize concurrent CSO publication removal * test: preload the UI design-review target before invocation * docs: record validation blocker fixes * fix: bind plan observer rejection to the invoked command * fix: count only native design decisions in the UI gate * docs: clarify UI-positive eval evidence requirements * test: recognize native UI decisions without weakening finding counts * test: decouple native UI evidence from question punctuation * test: recognize concrete native UI decisions independently of prose format * fix: retain failed eval logs under the hidden CI cache * test: await telemetry completion instead of racing disk writes
This commit is contained in:
@@ -287,6 +287,23 @@ describe('check-careful.sh', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test.each([
|
||||
['rm -rf node_modules\nrm -rf /', 'recursive delete'],
|
||||
['rm${IFS}-rf${IFS}/', 'obfuscation'],
|
||||
['psql -c "DROP DATABASE production"', 'SQL DROP'],
|
||||
['psql -c "TRUNCATE users"', 'SQL TRUNCATE'],
|
||||
['git push --force origin feature', 'force-push'],
|
||||
['git reset --hard', 'reset --hard'],
|
||||
['git restore .', 'uncommitted changes'],
|
||||
['kubectl delete pod app', 'kubectl delete'],
|
||||
['docker system prune', 'Docker'],
|
||||
])('keeps %s visible before large multiline content', (command, reason) => {
|
||||
const { exitCode, output } = runHook(CAREFUL_SCRIPT, carefulInput(`${command}\n# ${'x'.repeat(100_000)}`));
|
||||
expect(exitCode).toBe(0);
|
||||
expect(output.hookSpecificOutput?.permissionDecision).toBe('ask');
|
||||
expect(output.hookSpecificOutput?.permissionDecisionReason).toContain(reason);
|
||||
});
|
||||
|
||||
// --- Shell obfuscation ---
|
||||
|
||||
describe('shell obfuscation', () => {
|
||||
@@ -681,6 +698,16 @@ describe('check-careful.sh', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('a project pattern matches before large multiline content', () => {
|
||||
withPatternFile('terraform\\s+destroy\n', (gstackHome) => {
|
||||
const { exitCode, output } = runHook(CAREFUL_SCRIPT,
|
||||
carefulInput(`terraform destroy\n# ${'x'.repeat(100_000)}`), { GSTACK_HOME: gstackHome });
|
||||
expect(exitCode).toBe(0);
|
||||
expect(output.hookSpecificOutput?.permissionDecision).toBe('ask');
|
||||
expect(output.hookSpecificOutput?.permissionDecisionReason).toContain('Project rule');
|
||||
});
|
||||
});
|
||||
|
||||
test('a garbage pattern file cannot suppress a baseline match (additive invariant)', () => {
|
||||
withPatternFile('# override: allow everything\nallow-everything\nignore baseline\n', (gstackHome) => {
|
||||
const { exitCode, output } = runHook(CAREFUL_SCRIPT, carefulInput('rm -rf /var/data'), { GSTACK_HOME: gstackHome });
|
||||
|
||||
Reference in New Issue
Block a user