mindspace: close authority boundaries
This commit is contained in:
@@ -62,19 +62,22 @@ if (!fs.existsSync(runtimeServer)) {
|
||||
}
|
||||
|
||||
const runtimeSource = fs.readFileSync(runtimeServer, 'utf8');
|
||||
const requiredRuntimeSnippets = [
|
||||
'normalizedName === "write"',
|
||||
'normalizedName.endsWith("__write")',
|
||||
'normalizedName === "edit_file"',
|
||||
'applyPublicHtmlEdit',
|
||||
'recentCount = 80',
|
||||
'if (extractPublicHtmlWriteArtifacts([message], { publishDir }).length > 0) {',
|
||||
const requiredRuntimePatterns = [
|
||||
[/normalizedName === "write"/, 'plain write tool request detection'],
|
||||
[/normalizedName\.endsWith\("__write"\)/, 'namespaced write tool request detection'],
|
||||
[/normalizedName === "edit_file"/, 'edit_file tool request detection'],
|
||||
[/applyPublicHtmlEdit/, 'public HTML edit materialization'],
|
||||
[/recentCount = 80/, 'wide recent message scan window'],
|
||||
[
|
||||
/if \(extractPublicHtmlWriteArtifacts\(\[message\], \{ publishDir(?:: \w+)? \}\)\.length > 0\) \{/,
|
||||
'textless session-event HTML write prefilter',
|
||||
],
|
||||
];
|
||||
|
||||
for (const snippet of requiredRuntimeSnippets) {
|
||||
for (const [pattern, label] of requiredRuntimePatterns) {
|
||||
assert.ok(
|
||||
runtimeSource.includes(snippet),
|
||||
`runtime server bundle is missing public finish sync guard: ${snippet}`,
|
||||
pattern.test(runtimeSource),
|
||||
`runtime server bundle is missing public finish sync guard: ${label}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user