mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-08 12:21:26 +02:00
test(outside-plan-disabled): bind quoted prior-record values by their sentence, not phrase order
The parent obeyed the off switch and twice named the seeded completed record as pre-existing, once with the quotation after its owner and once with slash separators; the order-specific stripper counted both as current completion. Timestamp, location, current-claim and value-match controls still reject.
This commit is contained in:
1 parent
75b22463f3
commit
2bf97ab077
3 files changed
+82
-2
No files matched your search
@@ -409,3 +409,28 @@ describe('AX pre-run log record with an explicit current-coverage exclusion', ()
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Census 36597762183: the parent obeyed the off switch and named the seeded
|
||||
// record as pre-existing twice, with the quotation before or after its owner.
|
||||
describe('36597762183 pre-existing record quoted around its owner', () => {
|
||||
const captured = require('./fixtures/disabled-plan-attribution-36597762183.json');
|
||||
const prior = captured.reviewRecords[0];
|
||||
const evaluate = (output: string) => {
|
||||
const result = completed(); result.output = output; result.transcript.at(-1).result = output;
|
||||
return disabledPlanReviewEvidence(result, '', captured.reviewRecords.map((record: any) => JSON.stringify(record)).join('\n'), prior);
|
||||
};
|
||||
test('the retained failing verdict is unchanged and the actual output now passes', () => {
|
||||
expect(captured.provenance.originalVerdict).toMatchObject({ passed: false, falseCompletion: true, persistedDisabled: true });
|
||||
expect(evaluate(captured.output)).toMatchObject({ passed: true, falseCompletion: false, persistedDisabled: true });
|
||||
});
|
||||
test.each([
|
||||
['foreign timestamp', (o: string) => o.replace('(timestamp `16:32:22`', '(timestamp `11:11:11`')],
|
||||
['current claim in the owning sentence', (o: string) => o.replace('predates this run and is inconsistent', 'is now the current result and is inconsistent')],
|
||||
['conditional history', (o: string) => o.replace('predates this run and', 'predates this run if approved and')],
|
||||
['unowned quotation', (o: string) => o.replace('the stale `', 'the `').replace('pre-existing entry', 'entry')],
|
||||
['changed source value', (o: string) => o.replaceAll('source: codex', 'source: in-host')],
|
||||
['separate current claim', (o: string) => o + '\nCurrent outside_status: completed.'],
|
||||
])('%s still counts as completion', (_name, mutate) => {
|
||||
expect(evaluate(mutate(captured.output)).falseCompletion).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user