test(W7h): pin the CEO /office-hours prerequisite structure free

Replacement check for the plan-ceo-review-benefits paid retirement (t14 F7).
The paid case had a model summarize plan-ceo-review/SKILL.md and grep the
summary for "office hours" and "design doc". The rendered text is static, so
this free test checks it directly: the Prerequisite Skill Offer triggers on
the design-doc check's "No design doc found", offers
'A) Run /office-hours now' and 'B) Skip — proceed with standard review', does
not re-offer later in the session, and Mid-session detection (0A) offers
`/office-hours`. Per the Eng Retirements item, CEO invariants become
periodic-only once this gate case retires, so they keep this structural
free check.

Control (scratch worktree, generated plan-ceo-review/SKILL.md): removing the
/office-hours option, the no-design-doc trigger, the mid-session offer or the
no-re-offer rule goes red; rewording the pitch stays green (5/5). Log:
.context/mutation-ceo-benefits.md.
This commit is contained in:
garrytan committed 2026-10-03 01:47:06 +00:00
1 parent d3491c1734
commit 51f1d947ee
1 file changed
+11
+11
View File
@@ -1859,6 +1859,17 @@ describe('BENEFITS_FROM resolver', () => {
expect(ceoContent).toContain('/office-hours');
});
test('plan-ceo-review offers /office-hours when no design doc exists and detects a lost user mid-session', () => {
const offer = extractMarkdownSection(ceoContent, '## Prerequisite Skill Offer');
expect(offer.replace(/\s+/g, ' ')).toMatch(/when the design doc check above prints "No design doc found,?"/i);
expect(offer).toContain('A) Run /office-hours now');
expect(offer).toContain('B) Skip — proceed with standard review');
expect(offer).toMatch(/do not re-offer later in the session/i);
expect(ceoContent).toContain('**Mid-session detection (0A):**');
const midSession = ceoContent.indexOf('**Mid-session detection (0A):**');
expect(ceoContent.slice(midSession, midSession + 300)).toMatch(/offer `\/office-hours`/);
});
test('plan-eng-review contains prerequisite skill offer', () => {
expect(engContent).toContain('Prerequisite Skill Offer');
expect(engContent).toContain('/office-hours');