test(W7h): delete validateOfficeHoursSpecSummary left unused by the retirement

Dead-code follow-up to the office-hours-spec-review retirement:
validateOfficeHoursSpecSummary in test/helpers/office-hours-completion.ts graded
only that paid case's model-written summary. Deletes it and its free
describe block in test/office-hours-completion.test.ts ('office-hours
spec-review summary completion'); every other validator and test in both
files is unchanged.

Retirement card:
- detects: a summary missing five dimensions, the Agent dispatch, the 3
  iteration cap or the four metrics.
- non_test_callers: none.
- replacement: the facts it graded are pinned free on the generated text by
  gen-skill-docs.test.ts 'SPEC_REVIEW_LOOP resolver' (round-3 cap and loop
  wiring); see the retirement commit's control.
- validation: bun test test/office-hours-completion.test.ts.
This commit is contained in:
garrytan committed 2026-10-03 01:48:29 +00:00
1 parent ca395095a1
commit 56e4fa201a
2 files changed
+1 -66

No files matched your search

-25
View File
@@ -454,28 +454,3 @@ ${JSON.stringify({
throw new Error(`Office-hours review preservation: incomplete; missing=${JSON.stringify(result.missing)}; unsupported=${JSON.stringify(result.unsupported)}; ${result.reasoning}`);
}
}
/** Completion contract for the existing spec-review explanation fixture. */
export function validateOfficeHoursSpecSummary(exitReason: string, summary: string | null): void {
const fail = (message: string): never => { throw new Error(`Office-hours spec summary: ${message}`); };
if (exitReason !== 'success') fail(`execution failed: ${exitReason}`);
if (summary === null) fail('requested summary file was not written');
const text = summary!.replace(/\*\*/g, '').toLowerCase();
const dimensions = ['completeness', 'consistency', 'clarity', 'scope', 'feasibility'];
if (!/\b(?:5|five)\b.*dimension|dimension.*\b(?:5|five)\b/.test(text)
&& !dimensions.every(dimension => new RegExp(`\\b${dimension}\\b`).test(text))) {
fail('summary lacks the five review dimensions');
}
if (!/\b(?:agent|subagent)\b/.test(text)) fail('summary lacks the Agent reviewer dispatch');
if (!/\b(?:3|three)\b.*iteration|iteration.*\b(?:3|three)\b|maximum.*\b(?:3|three)\b/.test(text)) {
fail('summary lacks the three-iteration limit');
}
for (const [label, pattern] of [
['issues found', /\bfound\b|\bissues_found\b/],
['issues fixed', /\bfixed\b|\bissues_fixed\b/],
['remaining issues', /\b(?:remaining|unresolved)\b/],
['quality score', /\bquality[\s_-]+score\b/],
] as const) {
if (!pattern.test(text)) fail(`summary lacks the ${label} metric`);
}
}
+1 -41
View File
@@ -3,7 +3,7 @@ import { describe, expect, test } from 'bun:test';
import * as fs from 'node:fs';
import * as path from 'node:path';
import * as os from 'node:os';
import { validateOfficeHoursCompletion, validateOfficeHoursDesignDraft, validateOfficeHoursReviewerHandoffs, validateOfficeHoursReviewArtifacts, validateOfficeHoursReviewPreservation, validateOfficeHoursSpecSummary, type OfficeHoursCompletionEvidence } from './helpers/office-hours-completion';
import { validateOfficeHoursCompletion, validateOfficeHoursDesignDraft, validateOfficeHoursReviewerHandoffs, validateOfficeHoursReviewArtifacts, validateOfficeHoursReviewPreservation, type OfficeHoursCompletionEvidence } from './helpers/office-hours-completion';
import { E2E_TOUCHFILES } from './helpers/touchfiles-data';
import { selectTests } from './helpers/test-selection';
@@ -703,46 +703,6 @@ describe('office-hours completion eval selection', () => {
});
});
describe('office-hours spec-review summary completion', () => {
const summary = `The Agent dispatches an independent reviewer across five dimensions:
Completeness, Consistency, Clarity, Scope, and Feasibility. Maximum 3 iterations.
Metrics track iterations, issues found, issues fixed, remaining issues, and quality score.`;
test('accepts a successful written explanation of the loop and metrics', () => {
expect(() => validateOfficeHoursSpecSummary('success', summary)).not.toThrow();
});
test.each(['timeout', 'error_max_turns', 'error_api'])('rejects %s even with a complete summary file', reason => {
expect(() => validateOfficeHoursSpecSummary(reason, summary)).toThrow(`execution failed: ${reason}`);
});
test('requires the actual summary file', () => {
expect(() => validateOfficeHoursSpecSummary('success', null)).toThrow('summary file was not written');
});
test('rejects incomplete dimensions, dispatch, and iteration explanations', () => {
expect(() => validateOfficeHoursSpecSummary('success', summary.replace(/five dimensions:[\s\S]*?Feasibility/, 'one dimension: Completeness')))
.toThrow('five review dimensions');
expect(() => validateOfficeHoursSpecSummary('success', summary.replace('Agent', 'model'))).toThrow('Agent reviewer dispatch');
expect(() => validateOfficeHoursSpecSummary('success', summary.replace('Maximum 3 iterations', 'Maximum 4 iterations')))
.toThrow('three-iteration limit');
});
test('15 dimensions does not satisfy the five-dimension count', () => {
const incorrect = summary.replace(/five dimensions:[\s\S]*?Feasibility/, '15 dimensions');
expect(() => validateOfficeHoursSpecSummary('success', incorrect)).toThrow('five review dimensions');
});
test('13 iterations does not satisfy the three-iteration limit', () => {
expect(() => validateOfficeHoursSpecSummary('success', summary.replace('Maximum 3 iterations', 'Maximum 13 iterations')))
.toThrow('three-iteration limit');
});
test.each(['issues found', 'issues fixed', 'remaining issues', 'quality score'])('requires the %s metric', metric => {
expect(() => validateOfficeHoursSpecSummary('success', summary.replace(metric, ''))).toThrow('metric');
});
});
describe('office-hours mechanical review evidence', () => {
// The six actual obligations from evidence-final, including Clarity 3 which
// disappeared from both the prose report and the judge's accepted inventory.