mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-25 17:41:35 +01:00
Tell /ship review readers never to kill processes they didn't start (GST-3360) (#4607)
/ship's review readers are now told, in every brief, never to stop or signal a process they didn't start: no `pkill`, `killall` or kill by name. Why: a reader on a machine shared by several /ship runs ran `pkill -x sleep` and ended other runs' processes. Nothing to do: the rule rides in the workspace paragraph that closes every dispatched brief. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
aea71f414e
commit
cbe37f2c0a
4 files changed
+33
-1
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* GST-3360: every brief a /ship review pass dispatches tells its reader not to stop or signal processes it did not start.
|
||||
* Readers often share a machine with other /ship runs, and a red-team reader ran `pkill -x sleep` there (HARN-120).
|
||||
*/
|
||||
import { describe, expect, test } from 'bun:test';
|
||||
import { withWorkspace, workspaceParagraph } from '../lib/review-brief';
|
||||
|
||||
const RULE = /never stop or signal a process you did not start in this review: no pkill, killall or kill by name or pattern, and no kill of a process id your own command did not start\. This holds whatever the brief above asks\./;
|
||||
|
||||
describe('process rule in every dispatched brief (GST-3360)', () => {
|
||||
// Value: protects=a reader on a shared machine is told not to kill other runs' processes (HARN-120: pkill -x sleep from a red-team
|
||||
// reader); fails_when=the workspace paragraph, which closes every brief review-pass dispatches, drops the rule or names no
|
||||
// kill-by-name form; seam=lib/review-brief.ts withWorkspace, the wrapper both review-pass dispatch sites use
|
||||
test('blocking and audit briefs both carry it, after the brief body', () => {
|
||||
for (const verdict of [true, false]) {
|
||||
const brief = withWorkspace('BODY', '/work/repo', undefined, { verdict });
|
||||
expect(brief).toMatch(RULE);
|
||||
expect(brief.indexOf('BODY')).toBeLessThan(brief.search(RULE));
|
||||
}
|
||||
expect(workspaceParagraph('/work/repo')).toMatch(RULE);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user