docs(plan): Handover 4, the planner and the template follow decisions 29 to 31
Operator decisions 28 to 31 (13.10 and 14.10). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a70f082f6e
commit
f746f27788
4 changed files with 58 additions and 9 deletions
|
|
@ -222,6 +222,53 @@ test('Handover 4 code table: the PLAN_STEP_PATH_NOT_A_PATH row names placeholder
|
|||
assert.match(m[0], /mixed-case/, `the row names mixed-case bare names: ${JSON.stringify(m[0])}`);
|
||||
});
|
||||
|
||||
// Second remediation, Step 8: the docs follow operator decisions 29 to 31
|
||||
// (14.10). Decision 29: in 1.9 a wrapped line keeps its paths only when the
|
||||
// entry so far ends with a comma; otherwise it is description, and a `File:`
|
||||
// line with nothing after it takes its first wrapped line. Decision 31: below
|
||||
// 1.9 the run of test files goes on past a note in brackets and the words
|
||||
// and, plus and +. Decision 30: red proof reads the list from the plan, the
|
||||
// documented call passes no `--tests`, and an unreadable plan is
|
||||
// `plan-unreadable`.
|
||||
|
||||
// A blockquote's text without its `> ` markers, so a phrase wrapped across two
|
||||
// quoted lines reads as one.
|
||||
const unquote = (text) => text.replace(/\n>[ \t]?/g, '\n');
|
||||
|
||||
test('Handover 4 invariant 8, the Files bullet: operator decision 29, "ends with a comma", "takes its first wrapped line"', () => {
|
||||
const b = bullet(handover4(), /the entries of a step's `Files:` field/, 'invariant 8 Files bullet');
|
||||
assert.match(b, /\boperator decision 29\b/, `the Files bullet names operator decision 29: ${JSON.stringify(b)}`);
|
||||
assert.match(b, /ends\s+with\s+a\s+comma/, `the Files bullet says a wrapped line keeps its paths when the entry ends with a comma: ${JSON.stringify(b)}`);
|
||||
assert.match(b, /takes\s+its\s+first\s+wrapped\s+line/, `the Files bullet says an empty entry takes its first wrapped line: ${JSON.stringify(b)}`);
|
||||
});
|
||||
|
||||
test('Handover 4 invariant 7 names operator decisions 30 and 31, plan-unreadable and plus', () => {
|
||||
const inv7 = invariant7();
|
||||
assert.match(inv7, /\boperator decision 30\b/, `invariant 7 names operator decision 30: ${JSON.stringify(inv7)}`);
|
||||
assert.match(inv7, /\boperator decision 31\b/, `invariant 7 names operator decision 31: ${JSON.stringify(inv7)}`);
|
||||
assert.ok(inv7.includes('plan-unreadable'), `invariant 7 names \`plan-unreadable\`: ${JSON.stringify(inv7)}`);
|
||||
assert.match(inv7, /`plus`/, `invariant 7 names the word \`plus\`: ${JSON.stringify(inv7)}`);
|
||||
});
|
||||
|
||||
test('Handover 4 invariant 7: "This holds at every plan_version" comes before "Below plan_version 1.9"', () => {
|
||||
const inv7 = invariant7();
|
||||
const every = inv7.indexOf('This holds at every plan_version');
|
||||
const below = inv7.indexOf('Below plan_version 1.9');
|
||||
assert.ok(every >= 0, `invariant 7 says "This holds at every plan_version": ${JSON.stringify(inv7)}`);
|
||||
assert.ok(below >= 0, `invariant 7 says "Below plan_version 1.9": ${JSON.stringify(inv7)}`);
|
||||
assert.ok(every < below, 'the every-plan_version sentence stands before the below-1.9 sentence');
|
||||
});
|
||||
|
||||
for (const [label, slice] of [['the /trekplan 1.9 block', trekplan19Block], ['the template 1.9 paragraph', template19Paragraph]]) {
|
||||
test(`${label} follows operator decision 29: a wrapped line is description unless the entry ends with a comma`, () => {
|
||||
const text = unquote(slice());
|
||||
assert.match(text, /entry\s+so\s+far\s+does\s+not\s+end\s+with\s+a\s+comma[^.]*description/,
|
||||
`${label} says a wrapped line is description once the entry so far does not end with a comma: ${JSON.stringify(text)}`);
|
||||
assert.match(text, /takes\s+its\s+first\s+wrapped\s+line/,
|
||||
`${label} says a \`File:\` line with nothing after it takes its first wrapped line: ${JSON.stringify(text)}`);
|
||||
});
|
||||
}
|
||||
|
||||
for (const [label, slice] of [['the /trekplan 1.9 block', trekplan19Block], ['the template 1.9 paragraph', template19Paragraph]]) {
|
||||
test(`${label} names the placeholders, \`./Name\` and both nones`, () => {
|
||||
const text = slice();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue