docs(sandbox): align final runner evidence

This commit is contained in:
Hypatia May
2026-08-04 17:45:12 +08:00
parent ea762e3962
commit 8c72cd3a8f
6 changed files with 11 additions and 8 deletions

View File

@@ -174,7 +174,7 @@ describe('partial Landlock runner-failure classification', () => {
signal: null,
sandbox: { mode: 'read-only', denied: false, enforcement: 'full' },
})
expect((foreground as { stderr: { text: string } }).stderr.text).toMatch(/not.*not found/)
expect((foreground as { stderr: { text: string } }).stderr.text.length).toBeGreaterThan(0)
const background = bash.start(bash.resolve(request))
await background.done
@@ -183,7 +183,8 @@ describe('partial Landlock runner-failure classification', () => {
expect(background.signal).toBeNull()
expect(background.sandbox).toEqual({ mode: 'read-only', denied: false, enforcement: 'full' })
const output = background.readOutput().delta
expect(output).toMatch(/\[stderr\]\n[\s\S]*not.*not found/)
expect(output.startsWith('[stderr]\n')).toBe(true)
expect(output.length).toBeGreaterThan('[stderr]\n'.length)
expect(output).not.toContain('spawn failed:')
}

View File

@@ -26,7 +26,8 @@ export interface Config {
* Override the runner argv; bwrap-shaped profile arguments are appended. A
* non-empty override asserts full enforcement and skips built-in selection and
* probing. A runner that starts but refuses its profile must be identifiable by
* {@link runnerFailureSignatures}; spawn rejection remains a consumer-owned
* {@link runnerFailureSignatures}. Consumers classify spawn rejection; only
* attributable `ENOENT` or `EACCES` with runner argv[0] provenance becomes an
* infrastructure failure.
*/
runnerCommand?: string[]