mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-03 01:46:55 +02:00
test: accept 'review mode = X' auto-decide declarations and parenthetical scope exclusions in the shared-libs actor
auto-decide-preserved: the product auto-decided HOLD SCOPE and said "Decision: review mode = HOLD SCOPE"; the grammar knew only "is" and ":". shared-libs-plan-callers: the recommended option said "(no hardening)" and the actor read "hardening" as an expansion. Both replay the captured text, keep negative controls, and passed focused paid runs.
This commit is contained in:
1 parent
12ab3b3c54
commit
a18e6cf655
6 files changed
+83
-5
No files matched your search
@@ -51,7 +51,7 @@ function modeField(line: string): { value: string; completed: boolean } | null {
|
||||
// unfinished and unknown statuses also invalidate an earlier declaration.
|
||||
const { label, status, value: rawValue } = match.groups!;
|
||||
const completeStatus = !status || /^(?:done|complete|completed)$/i.test(status.trim());
|
||||
const explicitMode = /^(?:the )?(?:review )?mode\b(?:\s+is\b|:)?\s*/i;
|
||||
const explicitMode = /^(?:the )?(?:review )?mode\b(?:\s+is\b|:|\s*=(?!=))?\s*/i;
|
||||
// An unqualified Decision field owns a review mode only when its value
|
||||
// names that vocabulary. Keep unrelated decisions out of withdrawal checks;
|
||||
// partial/negated mode names still own a field and therefore fail closed.
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { SharedQuestionSelector } from './shared-libs-eval-fixture';
|
||||
/** Separate explicit exclusions from proposals; do not erase a following "but" clause. */
|
||||
function affirmativeCommitments(text: string): string {
|
||||
return text.split(/\n|;|(?<=[.!?])\s+|\s+but\s+|\s+however,?\s+/i).map(raw => {
|
||||
let clause = raw.replace(/^[✅❌\s]+/, '').trim();
|
||||
let clause = raw.replace(/^[✅❌\s]+/, '').replace(/\s*\((?:no|not|without|never)\b[^()]*\)/gi, '').trim();
|
||||
if (/^(?:do not|don't|never|no\b|without\b)/i.test(clause)) return '';
|
||||
if (/\b(?:is|are|remains?)\s+(?:outside\b|out of scope\b|excluded\b|not part\b)/i.test(clause)) return '';
|
||||
clause = clause.replace(/\b(?:without|do not|don't|never)\b.*$/i, '');
|
||||
|
||||
Reference in new issue
Block a user