mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-04 18:36:54 +02:00
test(sync-gbrain-readiness): a negation earlier in the claim clause is not a search/write readiness claim
The census unknown actor wrote 'nothing about read, search, or write capability is confirmed either way' after a YELLOW/WARN verdict. The claim window started at 'write', so the leading 'nothing' was outside it. Check the clause subject for nothing/neither/none/no; keep the original in-claim negations. Replay of the captured output passes; positive controls still flag an unnegated claim.
This commit is contained in:
1 parent
6fcb098129
commit
09b686d4ec
2 files changed
+10
-1
No files matched your search
@@ -19,7 +19,9 @@ export function readinessVerdictProblems(kind: 'ready' | 'unknown', output: stri
|
||||
problems.push('unknown result claims GREEN or capability OK');
|
||||
}
|
||||
for (const claim of output.matchAll(/\b(?:semantic search|writes?|write readiness|write availability)[^.!?\n]{0,60}\b(?:ready|verified|proven|confirmed|working)\b/gi)) {
|
||||
if (!/\b(?:not|never|without|unknown|unverified)\b/i.test(claim[0]))
|
||||
const clauseStart = Math.max(...['.', '!', '?', '\n', ';'].map((stop) => output.lastIndexOf(stop, claim.index!)));
|
||||
const subject = output.slice(clauseStart + 1, claim.index!);
|
||||
if (!/\b(?:not|never|without|unknown|unverified)\b/i.test(claim[0]) && !/\b(?:nothing|neither|none|no)\b/i.test(subject))
|
||||
problems.push('read-only check claims semantic search or write readiness');
|
||||
}
|
||||
return problems;
|
||||
|
||||
Reference in new issue
Block a user