mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-12 11:40:51 +01:00
fix(captain): review pass 1: 'do it' parses as rec, READY template matches the tool's lines, slot-2 and freeze wording, mergeChangelogs named, parameter lists and doc numbers aligned
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
30caa1fd71
commit
02ac865411
16 files changed
+79
-46
No files matched your search
@@ -10,7 +10,7 @@ import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import { capyRelayLine, renderCaptainBrief } from '../lib/captain-brief';
|
||||
import { recHash, type GateList } from '../lib/gate-list';
|
||||
import { parseReply, recHash, type GateList } from '../lib/gate-list';
|
||||
import { findSection, headings } from '../lib/markdown-sections';
|
||||
import { loadBriefInputs } from '../lib/owner-brief';
|
||||
|
||||
@@ -108,6 +108,13 @@ describe('renderCaptainBrief', () => {
|
||||
expect(b.text).toContain('_Not written for this plan yet._');
|
||||
});
|
||||
|
||||
test('"do it", the advertised closing reply, parses as rec', () => {
|
||||
const gate = JSON.parse(fs.readFileSync(path.join(run(FULL_PLAN), 'gate.json'), 'utf8')) as GateList;
|
||||
const parsed = parseReply('do it', gate, gate.gate_rev);
|
||||
expect(parsed.valid).toBe(true);
|
||||
expect(parsed.mode).toBe('rec');
|
||||
});
|
||||
|
||||
test('an answered gate says nothing is pending; urgent findings come first', () => {
|
||||
expect(brief(run(FULL_PLAN, { answered: true })).text).toStartWith('**Nothing pending.** Already decided on 2026-10-20: approved with the recommended plan changes (“rec”).');
|
||||
expect(brief(run(FULL_PLAN, { urgent: true })).text).toStartWith('## URGENT, outside this plan');
|
||||
|
||||
@@ -55,7 +55,7 @@ describe('/captain skill', () => {
|
||||
for (const h of ['## Needs you', '## New', '## In progress']) expect(digest).toContain(h);
|
||||
const report = read('captain/templates/report.md');
|
||||
for (const h of ['## Outcome', '## PR', '## Needs', '## Cost', '## Lesson', '## Approvals']) expect(report).toContain(h);
|
||||
expect(read('captain/templates/READY.md')).toContain('SHIP_RECEIPT: pr=<n> head=<sha40>');
|
||||
expect(read('captain/templates/READY.md')).toContain('SHIP_RECEIPT: pr=<n> head=<sha12>');
|
||||
expect(read('captain/templates/slot-call.md')).toContain('STAMP_VERSION=<X>');
|
||||
expect(read('captain/templates/flaky-ledger.md')).toMatch(/## Open[\s\S]*## Fixed[\s\S]*## Won't fix/);
|
||||
expect(read('captain/templates/CREW.md')).toMatch(/^22\. /m);
|
||||
|
||||
Reference in new issue
Block a user