mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 01:45:29 +02:00
* feat: add a restricted and supervised Claude Code runner Preserve configured authentication and models while enforcing tool access, strict completion JSON, bounded output and process cleanup. Cover argv, failure handling, session metadata and Windows process containment. * feat: route outside reviews by harness and migrate wrapper installs Use Claude Code from Codex and Codex from other supported hosts, with shared invocation rendering, positive gate validation and per-phase provenance. Rename /claude to /claude-code, repair managed shared and copied installations safely, and generate native Kiro skills. Add installed-workflow, failure-injection and live cross-harness regression coverage. * test: recognize CEO mode labels without terminal spacing The paid workflow rendered SCOPEEXPANSION at option 4, but its driver required a literal space. Match the leading mode title without cursor-spacing artifacts and ignore adjacent preview text. Preserve missing-target failures and downstream posture assertions. * test: isolate plan-count fixtures before starting review workflows Seed the complete test plan in a private git repository before launching Claude, so a bare slash command cannot review the live workspace while a delayed fixture message remains queued. Preserve count thresholds, parsers and budgets. Add initial-context and installed-discovery tests, and retain startup/terminal diagnostics on failed evaluations. * test: stabilize review fixtures and Claude eval startup Preserve source boundaries in workflow judge inputs, isolate CEO mode plans, and wait for interactive trust input readiness. Keep startup failure evidence and retain existing models, budgets, and assertions. Co-Authored-By: OpenAI Codex <noreply@openai.com> * test: classify collapsed review modes and isolate seeded findings Keep review questions out of the setup count when terminal cursor positioning removes spaces. State existing webhook safeguards so the five-finding control measures its seeded defects without accidental extra security and concurrency gaps. Preserve question bands and the paired control. Co-Authored-By: OpenAI Codex <noreply@openai.com> * test: isolate browser daemon state across free shards Co-Authored-By: OpenAI Codex <noreply@openai.com> * test: stabilize native review counting and interactive navigation Co-Authored-By: OpenAI Codex <noreply@openai.com> * chore: prepare v1.82.0.0 release Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: eliminate browser and process-cleanup test flakes Pin every CI surface to Bun 1.4.0 to avoid extra-stdio finalizers closing reused live sockets. Add an isolated GC/listener regression that fails on Bun 1.3.13, and prevent coordinated rollback to an affected CI runtime. Check renderer cleanup against the render's own staging directory so concurrent renders cannot invalidate the assertion. Make the no-pgrep process-tree walk tolerate disappearing /proc entries, and synchronize its test fixture through child readiness and pipe EOF instead of sleeps. Validation: 9,157 passed, 31 skipped, zero failures across 556 files with retries disabled. Build, all-host generation freshness, and skill checks passed. All three races have failing-before/passing-after regressions. * fix: count completed native review questions in evals * fix: drive review navigation from confirmed native choices * fix: require complete section-loading eval reports * test: isolate telemetry HTTP transport from local assertions * fix: keep review input on the active native question * test: let tunnel revocation daemon choose an available port * test: allocate available ports for pairing and watchdog fixtures * fix: stabilize planning eval navigation and phase reporting * test: isolate installed runtime paths in planning evals * test: stabilize review evidence and concurrent refresh fixtures * fix: resolve design findings before editing the plan * fix: honor and persist disabled outside plan reviews * fix: preserve planning decisions and terminal evidence Load installed host reviews at autoplan phase entry and wait for completed reviewers and saved artifacts. Reuse approved remedies while preserving individual finding decisions. Drive interactive evals from the current terminal viewport, bind native questions across scrolling, and require complete native report evidence. Cover captured stale menus, permission lifecycles, setup classification, and disabled-review tool availability with deterministic regressions. Advance release metadata and the upgrade migration to the unclaimed 1.83.0.0 slot. * fix: drive native review questions and preserve current plans Use the native single-choice keyboard protocol and current terminal viewport, with per-question navigation inside packets and completed-call coverage. Keep permissions, multi-select menus, and Submit controls distinct. Send Autoplan reviewers the amended implementation plan, keep its review record separate, and supply retained application contracts in the chain fixture. Clarify individual DevEx decisions and complete CEO fix options; use one active plan destination for the section-loading report. * fix: preserve complete plan-review decisions * fix: recognize native plan dialogs and reviewer controls * fix: preserve review decisions and phase completion * fix: recognize completed reviews without losing findings * fix: preserve review continuity and native eval completion * test: fix native review completion and eval retry isolation * test: handle native review menus and complete eval fixtures * test: fix native review setup, completion, and isolation failures * test: limit native skill discovery to runtime assets * fix: bind Autoplan reviews to full ordered phase inputs * test: fix planning eval routing, counting, and timeout handling * chore: advance queued release to v1.84.0.0 * fix: preserve complete review inputs and planning decisions * fix: reconcile review approvals and preserve phase obligations * fix: preserve review obligations and unblock eval permissions Carry recorded Autoplan requirements into blind phase inputs, require Eng review approvals before exit, and exercise combined asynchronous flows in CEO reviews. Correct native finding and handoff classification and unblock repeated report edits using scoped request identities. * fix: retain plan requirements and complete native review dialogs * fix: complete native review prompts and retain plan references * fix: preserve review inputs and classify native eval evidence * fix: check competing completion orders in CEO reviews * fix: recognize review decisions and require phase methodology Require the current phase methodology before Autoplan snapshots. Correct substantive decision, closed handoff, and cache-finding classification, and honor the recommended implementation approach in native review dialogs. Add captured-transcript regressions without changing review thresholds, provider models, retries, or deadlines. * test: bind native review decisions and close completed handoffs * fix: complete review dialogs and verify methodology delivery * fix: preserve review evidence and unblock native eval prompts * fix: handle native review question completions * fix: recognize native review narration and controls * fix: count native review decisions and isolate eval fixtures * test: verify seeded review coverage and current artifact permissions * test: isolate model and brain-aware skill renders * fix: repair native workflow evaluation and clarify review steps * fix: stabilize workflow eval evidence and review guidance * test: repair native workflow observation and fixture isolation * fix: recognize completed workflow evidence and owned skill reads * test: repair seeded workflow delivery and completion evidence * test: recognize current review evidence across native forms * test: handle native review variants and permission redraws * fix: honor review preferences and recognize native eval evidence * test: recognize completed review decisions and queued permissions * test: match current review contracts and partial-line edits * test: recognize completed workflow evidence and bounded human waits * fix: preserve review entry gates and native eval interactions * fix: recognize native workflow evidence and preserve review gates * test: recognize current review evidence and preconfigure workflow fixtures * test: recognize completed review findings and scoped artifact permissions * fix: stabilize native workflow review and permission evidence * fix: recognize current review evidence and scoped edit confirmations Clarify Design and engineering review entry instructions and Design scoring. Recognize required legacy coverage and public Autoplan completion recaps. Bind the pending Edit confirmation to its exact file, ordered digest, and one-request approval when a preceding command display remains visible. Keep reviews within their existing size limits and preserve scope gates when extracting workflow fixtures from either supported preamble header. Keep failure outcomes, review thresholds, provider choices, and eval budgets. * fix: recover review workflow progress and eval evidence * fix: recognize valid review evidence and scope selection * test: fix review evidence parsing and repeated artifact prompts * test: recognize valid review decisions and pending native cards * fix(plan-eng-review): keep final navigation consistent with approved tasks * test: recognize valid review evidence and bind legacy diff requests * fix: stabilize review eval evidence and harness repair guidance * docs: update project documentation for v1.85.0.0 Co-Authored-By: OpenAI Codex <noreply@openai.com> * test: fix Windows CI fixtures and credential scan Rebase captured JSON values and filesystem evidence using the appropriate path convention. Compile native fake CLIs on Windows and synchronize pipe holder readiness, with cleanup retained when assertions fail. Assemble synthetic credential fixtures at runtime so the added-line scan keeps enforcing the same gate without flagging its own rejection controls. Discover generated skills directly for the empty-find regression check, avoiding a recursive scan through saved evaluation artifacts and dependencies. * fix: preserve source renders on Windows Compare canonical generator paths using native separators so an output sidecar pointing at the source cannot overwrite its skill or metadata. Keep the regression fixture isolated from the real checkout and expose freshness diagnostics before asserting subprocess status. Detach Windows drain-test pipe holders from the fake provider's automatic child cleanup while preserving the enclosing runner job and its assertions. * fix: clarify outside review fallback and CEO decisions Render one applicable own-harness fallback path and retain native review, disabled policy, and missing-coverage semantics. Align report field names and mode labels, and make the existing per-cut scope approval explicit. Regenerate skill outputs and keep the workflow judge's model, thresholds, and retry policy unchanged. * chore: move release to free version slot (v1.86.0.0) PR #2852 now claims v1.85.0.0. Align the release metadata and rename migration so upgrades from that version still receive it. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: include engineering review prerequisites and restore branch context * fix: recognize coverage diagrams and clarify design review instructions * fix: preserve file identities and join Windows test processes --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
246 lines
16 KiB
TypeScript
246 lines
16 KiB
TypeScript
import { expect, test } from 'bun:test';
|
|
import { ceoFirstReviewAUQ, type AskUserQuestionFingerprint } from './helpers/claude-pty-runner';
|
|
import fixture from './fixtures/ceo-contract-question-an.json';
|
|
import sectionFixture from './fixtures/ceo-section-finding-an.json';
|
|
import contractFixture from './fixtures/ceo-current-contract-an.json';
|
|
import { E2E_TOUCHFILES } from './helpers/touchfiles-data';
|
|
|
|
const calls = fixture.fingerprints as AskUserQuestionFingerprint[];
|
|
const findings = calls.slice(2);
|
|
const sectionCalls = sectionFixture.fingerprints as AskUserQuestionFingerprint[];
|
|
const sectionFindings = sectionCalls.slice(4, 6);
|
|
function change(fp: AskUserQuestionFingerprint, edit: (q: any, call: any, fp: any) => void) {
|
|
const copy = structuredClone(fp), call = copy.nativeCall!, q = call.questions[0]!;
|
|
const answerIndex = q.options.findIndex(o => o.label === call.answers?.[q.question]);
|
|
edit(q, call, copy);
|
|
call.answers = { [q.question]: q.options[answerIndex]?.label ?? '' };
|
|
copy.options = q.options.map((o, i) => ({ index: i + 1, label: o.label }));
|
|
return copy;
|
|
}
|
|
test('both actual completed contract questions start review; routing and test layout remain setup', () => {
|
|
expect(calls.map(ceoFirstReviewAUQ)).toEqual([false, false, true, true]);
|
|
});
|
|
test('the decision ordinal, punctuation and form of the remedy question do not carry the finding', () => {
|
|
for (const fp of findings) for (const title of [
|
|
'd19 — Test 1 checks only truthiness; what should the exact assertion verify?',
|
|
'D4 - Test 1 asserts only truthiness. How should the test check the full contract?',
|
|
'D7 — Test 1 checks only truthiness: assert the contract or keep this check?',
|
|
]) {
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.question = q.question.replace(q.question.split('\n')[0], title);
|
|
q.header = 'Test contract';
|
|
}))).toBe(true);
|
|
}
|
|
});
|
|
test('a competing test header or explicit foreign issue cannot borrow a test assertion', () => {
|
|
for (const header of ['Test 99 assert', 'Finding 3', 'Issue 1'])
|
|
expect(ceoFirstReviewAUQ(change(findings[0]!, q => { q.header = header; }))).toBe(false);
|
|
});
|
|
test('a title alone or an administrative response does not establish a review finding', () => {
|
|
for (const fp of findings) {
|
|
expect(ceoFirstReviewAUQ({ ...fp, nativeCall: undefined })).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.options = [
|
|
{ label: 'A) Keep the current assertion (recommended)', description: 'Leave the test unchanged.' },
|
|
{ label: 'B) Archive the review', description: 'Save the existing report without changing tests.' },
|
|
];
|
|
}))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => { q.header = 'Approach'; }))).toBe(false);
|
|
}
|
|
});
|
|
test('the full native identity, selected answer and completed result remain required', () => {
|
|
for (const fp of findings) {
|
|
for (const edit of [
|
|
(_q: any, c: any) => { c.answered = false; },
|
|
(_q: any, c: any) => { c.failed = true; },
|
|
(_q: any, c: any) => { c.unansweredQuestionIndices = [0]; },
|
|
(_q: any, _c: any, f: any) => { f.signature = 'foreign:tool'; },
|
|
(q: any) => { q.multiSelect = true; },
|
|
]) expect(ceoFirstReviewAUQ(change(fp, edit))).toBe(false);
|
|
const answer = change(fp, () => {}); answer.nativeCall!.answers = {};
|
|
expect(ceoFirstReviewAUQ(answer)).toBe(false);
|
|
const menu = change(fp, () => {}); menu.options[0]!.label = 'Foreign selection';
|
|
expect(ceoFirstReviewAUQ(menu)).toBe(false);
|
|
}
|
|
});
|
|
test('source and conditional frames cannot own the current assertion assessment', () => {
|
|
for (const intro of ['Source:', 'Example:', 'Earlier review assessment:', 'The following assessment is hypothetical.'])
|
|
expect(ceoFirstReviewAUQ(change(findings[0]!, q => { q.question = q.question.replace('\nELI10:', '\n' + intro + '\nELI10:'); }))).toBe(false);
|
|
for (const intro of ['Source excerpt: ', 'Previously, ', 'If approved, ', 'The following is a hypothetical example. '])
|
|
expect(ceoFirstReviewAUQ(change(findings[0]!, q => { q.question = q.question.replace('ELI10: ', 'ELI10: ' + intro); }))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(findings[0]!, q => { q.question = q.question.replace('Project/branch/task: ', 'Project/branch/task: If approved, '); }))).toBe(false);
|
|
});
|
|
test('literal titles and withdrawn current findings supply no first-review credit', () => {
|
|
for (const fp of findings) {
|
|
expect(ceoFirstReviewAUQ(change(fp, q => { const lines = q.question.split('\n'); lines[0] = '`' + lines[0] + '`'; q.question = lines.join('\n'); }))).toBe(false);
|
|
for (const statement of [
|
|
'Correction: this finding is withdrawn.',
|
|
'Correction: this finding is "withdrawn".',
|
|
'Correction: this explanation is not current.',
|
|
'There is no current gap.',
|
|
]) expect(ceoFirstReviewAUQ(change(fp, q => { q.question += '\n' + statement; }))).toBe(false);
|
|
}
|
|
});
|
|
test('quoted historical notes cannot withdraw the current finding', () => {
|
|
expect(ceoFirstReviewAUQ(change(findings[0]!, q => {
|
|
q.question = q.question.replace('\nELI10:', '\nArchive note: "Source: this finding is withdrawn."\nELI10:');
|
|
}))).toBe(true);
|
|
});
|
|
test('uniform recommendation and option identities remain required', () => {
|
|
for (const edit of [
|
|
(q: any) => { q.question = q.question.replace('Recommendation: A', 'Recommendation: Z'); },
|
|
(q: any) => { q.options[1].label = q.options[1].label.replace('B)', '9B)'); },
|
|
(q: any) => { q.options[1].label = q.options[1].label.replace('B)', 'A)'); },
|
|
]) expect(ceoFirstReviewAUQ(change(findings[0]!, edit))).toBe(false);
|
|
});
|
|
test('the new regression inputs belong only to the dense CEO finding owner', () => {
|
|
for (const name of ['test/ceo-contract-question-an.test.ts', 'test/fixtures/ceo-contract-question-an.json', 'test/fixtures/ceo-section-finding-an.json', 'test/fixtures/ceo-current-contract-an.json'])
|
|
expect(Object.entries(E2E_TOUCHFILES).filter(([, paths]) => paths.includes(name)).map(([owner]) => owner)).toEqual(['plan-ceo-finding-count']);
|
|
const paths = E2E_TOUCHFILES['plan-ceo-finding-count']!;
|
|
for (let i = 0; i < paths.length; i++) {
|
|
expect(Object.hasOwn(paths, i)).toBe(true);
|
|
expect(typeof paths[i]).toBe('string');
|
|
}
|
|
});
|
|
test('owned Section finding briefs establish review through their current defect and remedy', () => {
|
|
expect(sectionCalls.map(ceoFirstReviewAUQ)).toEqual([false, false, false, false, true, true, false]);
|
|
for (const fp of sectionFindings) for (const separator of [':', '—', '-']) {
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.question = q.question.replace(/^D\d+ — Section 2 finding (\d):/, `d19 — Section 7 finding $1 ${separator}`);
|
|
q.header = 'Section 7';
|
|
}))).toBe(true);
|
|
}
|
|
expect(ceoFirstReviewAUQ(change(sectionFindings[0]!, q => {
|
|
q.question = q.question.replace('the lookup reads request.params.userId into a raw SQL fragment', 'the query reads payload.accountId into a raw SQL string');
|
|
}))).toBe(true);
|
|
for (const term of ['“no error handling”', "'no error handling'", 'no error handling'])
|
|
expect(ceoFirstReviewAUQ(change(sectionFindings[1]!, q => {
|
|
q.question = q.question.replace('"no error handling"', term);
|
|
}))).toBe(true);
|
|
});
|
|
test('Section dispatch requires an exact completed native question and consistent finding identity', () => {
|
|
for (const fp of sectionFindings) for (const edit of [
|
|
(_q: any, c: any) => { delete c.answeredAt; },
|
|
(_q: any, c: any) => { c.answeredAt = 'not-a-time'; },
|
|
(_q: any, _c: any, f: any) => { f.nativeQuestionIndex = 1; },
|
|
(_q: any, c: any) => { c.answered = false; },
|
|
(_q: any, c: any) => { c.failed = true; },
|
|
(_q: any, _c: any, f: any) => { f.signature = 'foreign:call'; },
|
|
(q: any) => { q.header = 'Section 8'; },
|
|
(q: any) => { q.header = 'Finding 99'; },
|
|
(q: any) => { q.header = 'Section 2 finding 99'; },
|
|
(q: any) => { q.question = q.question.replace('Recommendation: A', 'Recommendation: 99A'); },
|
|
]) expect(ceoFirstReviewAUQ(change(fp, edit))).toBe(false);
|
|
});
|
|
test('Section declarations cannot borrow source, historical, conditional or negated defects', () => {
|
|
for (const fp of sectionFindings) for (const prefix of ['Source: ', 'Previously, ', 'If approved, ', 'The hypothetical example: ', 'Earlier review assessment: ', 'For historical context, ']) {
|
|
expect(ceoFirstReviewAUQ(change(fp, q => { q.question = q.question.replace(/(Section 2 finding \d: )/, '$1' + prefix); }))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => { q.question = q.question.replace('ELI10: ', 'ELI10: ' + prefix); }))).toBe(false);
|
|
}
|
|
for (const fp of sectionFindings) for (const prefix of ['Source:', 'Earlier review assessment:', 'The following is a hypothetical example.'])
|
|
expect(ceoFirstReviewAUQ(change(fp, q => { q.question = q.question.replace('\nELI10:', '\n' + prefix + '\nELI10:'); }))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(sectionFindings[0]!, q => {
|
|
q.question = q.question.replace('the lookup reads', 'the lookup no longer reads');
|
|
}))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(sectionFindings[1]!, q => {
|
|
q.question = q.question.replace('the receipt email has "no error handling"', 'the receipt email no longer has "no error handling"');
|
|
}))).toBe(false);
|
|
});
|
|
test('Section review requires a current offered amendment and an unwithdrawn assessment', () => {
|
|
for (const fp of sectionFindings) {
|
|
for (const status of ['This finding is withdrawn.', 'Correction: this finding is "withdrawn".', 'This explanation is not current.', 'There is no current gap.'])
|
|
expect(ceoFirstReviewAUQ(change(fp, q => { q.question += '\n' + status; }))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.options = [
|
|
{ label: 'A) Keep the existing implementation', description: 'Leave all behavior unchanged.' },
|
|
{ label: 'B) Archive the report', description: 'Export the report.' },
|
|
];
|
|
}))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
for (const option of q.options) option.description = 'Source excerpt: ' + option.description;
|
|
}))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
for (const option of q.options) option.description += '\nThis amendment is withdrawn.';
|
|
}))).toBe(false);
|
|
for (const status of [' This amendment is withdrawn.', ' This remedy is a historical example, not the current option.'])
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
for (const option of q.options) option.description += status;
|
|
}))).toBe(false);
|
|
for (const prefix of ['Source excerpt: ', 'If approved later: '])
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
for (const option of q.options) option.label = option.label.replace(/^([A-C]\)) /, '$1 ' + prefix);
|
|
}))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.question = q.question.replace('\nELI10:', '\nArchive note: "Source: this finding is withdrawn."\nELI10:');
|
|
}))).toBe(true);
|
|
}
|
|
});
|
|
test('the current plan contract can establish the gap in a later ELI10 sentence', () => {
|
|
const fp = contractFixture.fingerprints[2] as AskUserQuestionFingerprint;
|
|
expect(ceoFirstReviewAUQ(fp)).toBe(true);
|
|
for (const clause of [
|
|
"The current plan states 'no error handling on the email leg'.",
|
|
'The plan specifies “no error handling on the email leg”.',
|
|
'This plan requires "no error handling on the email leg".',
|
|
'The plan says no error handling on the email leg.',
|
|
]) expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.question = q.question.replace("The plan says 'no error handling on the email leg'.", clause);
|
|
}))).toBe(true);
|
|
});
|
|
test('later contract declarations retain source, currentness and remedy ownership', () => {
|
|
const fp = contractFixture.fingerprints[2] as AskUserQuestionFingerprint;
|
|
for (const clause of [
|
|
"The old plan said 'no error handling on the email leg'.",
|
|
"If approved, the plan says 'no error handling on the email leg'.",
|
|
"Source excerpt: the plan says 'no error handling on the email leg'.",
|
|
'"The plan says no error handling on the email leg."',
|
|
"The plan no longer says 'no error handling on the email leg'.",
|
|
"The plan says 'no error handling on the email leg' only in a historical example.",
|
|
"The plan says 'no error handling on the email leg”.",
|
|
]) expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.question = q.question.replace("The plan says 'no error handling on the email leg'.", clause);
|
|
}))).toBe(false);
|
|
for (const edit of [
|
|
(q: any) => { q.question = q.question.replace('ELI10: ', 'ELI10: Earlier review assessment: '); },
|
|
(q: any) => { q.question = q.question.replace('Project/branch/task: ', 'Project/branch/task: Source excerpt: '); },
|
|
(q: any) => { q.question += '\nThis finding is "withdrawn".'; },
|
|
(q: any) => { for (const o of q.options) o.description += ' This amendment is withdrawn.'; },
|
|
(q: any) => { for (const o of q.options) o.description = 'Source excerpt: ' + o.description; },
|
|
(_q: any, c: any) => { delete c.answeredAt; },
|
|
(_q: any, _c: any, f: any) => { f.nativeQuestionIndex = 1; },
|
|
(q: any) => { q.header = 'Finding 99'; },
|
|
(q: any) => { q.question = q.question.replace("The plan says 'no error handling", "Source excerpt follows. The plan says 'no error handling"); },
|
|
(q: any) => { q.question = q.question.replace("The plan says 'no error handling", "Earlier review assessment follows. The plan says 'no error handling"); },
|
|
(q: any) => { q.question = q.question.replace("The plan says 'no error handling", "If approved later. The plan says 'no error handling"); },
|
|
(q: any) => { q.question = q.question.replace("'no error handling on the email leg'.", "'no error handling on the email leg'. This no-error-handling contract is withdrawn."); },
|
|
(q: any) => { q.question = q.question.replace("'no error handling on the email leg'.", "'no error handling on the email leg'. This contract is a historical example, not the current plan."); },
|
|
(q: any) => { q.question += '\nThis finding is "resolved".'; },
|
|
(q: any) => { for (const o of q.options) o.description += '\nThis amendment is "closed".'; },
|
|
(q: any) => { for (const o of q.options) o.description += ' This amendment is "closed".'; },
|
|
]) expect(ceoFirstReviewAUQ(change(fp, edit))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(fp, q => {
|
|
q.question += '\nArchive note: "This finding is withdrawn."';
|
|
}))).toBe(true);
|
|
});
|
|
test('the assertion assessment and strengthening action retain their own current authority', () => {
|
|
for (const edit of [
|
|
(_q: any, c: any) => { delete c.answeredAt; },
|
|
(_q: any, c: any) => { c.answeredAt = 'invalid'; },
|
|
(_q: any, _c: any, f: any) => { f.nativeQuestionIndex = 1; },
|
|
(q: any) => { q.question = q.question.replace('ELI10: The plan states', 'ELI10: The historical plan stated'); },
|
|
(q: any) => { q.question = q.question.replace('But the planned test only checks', 'But the planned test no longer only checks'); },
|
|
(q: any) => { q.options[0].label = q.options[0].label.replace('Assert deep equality with', 'Assert truthiness for'); },
|
|
(q: any) => { q.options[0].description = 'Source excerpt:\n' + q.options[0].description; },
|
|
(q: any) => { q.options[0].description = 'Earlier review assessment:\n' + q.options[0].description; },
|
|
(q: any) => { q.options[0].description += '\nThis amendment is withdrawn.'; },
|
|
(q: any) => { q.options[0].description += '\nThis amendment is "withdrawn".'; },
|
|
(q: any) => { q.options[0].description += '\nThis amendment is “withdrawn”.'; },
|
|
(q: any) => { q.options[0].description += '\nThis remedy is a historical example, not the current option.'; },
|
|
(q: any) => { q.question = q.question.replace('ELI10: ', 'ELI10: Earlier review assessment: '); },
|
|
(q: any) => { q.question = q.question.replace('ELI10: ', 'ELI10: For historical context, '); },
|
|
]) expect(ceoFirstReviewAUQ(change(findings[0]!, edit))).toBe(false);
|
|
expect(ceoFirstReviewAUQ(change(findings[0]!, q => {
|
|
q.options[1] = { label: 'B) Export documentation', description: 'Export the report.' };
|
|
}))).toBe(true);
|
|
});
|