fix(qa): number the qa value-bar questions from 1 and say reproduced bugs already answer the first two

This commit is contained in:
garrytan committed 2026-09-30 13:31:29 +00:00
1 parent 2b76634831
commit 53c5b7505d
3 files changed
+9 -9

No files matched your search

+3 -3
View File
@@ -554,10 +554,10 @@ Preserve the initial charters under **Charters** after that metadata, before fin
Each proposed test carries a value card; propose it only when it passes this bar: Each proposed test carries a value card; propose it only when it passes this bar:
**Test value bar.** Before writing the test (the reproduced bug answers what it protects and what makes it fail): **Test value bar.** Before writing or proposing a test, the reproduced bug already answers what it protects and what makes it fail; also answer:
3. Why does existing coverage not already catch that? Prefer adding a row to an existing table-driven test or shared fixture over a near-duplicate. 1. Why does existing coverage not already catch that? Prefer adding a row to an existing table-driven test or shared fixture over a near-duplicate.
4. Does it need a production seam (export, flag, wrapper, injection hook) that no production caller needs? If yes, test at the real boundary instead. 2. Does it need a production seam (export, flag, wrapper, injection hook) that no production caller needs? If yes, test at the real boundary instead.
Value card: `Value: protects=<...>; fails_when=<...>; why_new=<...>; seam=none` (seam: `none` or its name); each field at most 160 UTF-8 bytes here (clamp to 157 plus `...`; JSON keeps full values). Put it in the 8e.5 record (/qa) or under each proposed test (/qa-only). A missing upstream card never blocks: derive it; ignore unknown fields. Value card: `Value: protects=<...>; fails_when=<...>; why_new=<...>; seam=none` (seam: `none` or its name); each field at most 160 UTF-8 bytes here (clamp to 157 plus `...`; JSON keeps full values). Put it in the 8e.5 record (/qa) or under each proposed test (/qa-only). A missing upstream card never blocks: derive it; ignore unknown fields.
+3 -3
View File
@@ -643,10 +643,10 @@ and unclear contracts never authorize repair.
### 8a.5. Regression test before repair ### 8a.5. Regression test before repair
**Test value bar.** Before writing the test (the reproduced bug answers what it protects and what makes it fail): **Test value bar.** Before writing or proposing a test, the reproduced bug already answers what it protects and what makes it fail; also answer:
3. Why does existing coverage not already catch that? Prefer adding a row to an existing table-driven test or shared fixture over a near-duplicate. 1. Why does existing coverage not already catch that? Prefer adding a row to an existing table-driven test or shared fixture over a near-duplicate.
4. Does it need a production seam (export, flag, wrapper, injection hook) that no production caller needs? If yes, test at the real boundary instead. 2. Does it need a production seam (export, flag, wrapper, injection hook) that no production caller needs? If yes, test at the real boundary instead.
Value card: `Value: protects=<...>; fails_when=<...>; why_new=<...>; seam=none` (seam: `none` or its name); each field at most 160 UTF-8 bytes here (clamp to 157 plus `...`; JSON keeps full values). Put it in the 8e.5 record (/qa) or under each proposed test (/qa-only). A missing upstream card never blocks: derive it; ignore unknown fields. Value card: `Value: protects=<...>; fails_when=<...>; why_new=<...>; seam=none` (seam: `none` or its name); each field at most 160 UTF-8 bytes here (clamp to 157 plus `...`; JSON keeps full values). Put it in the 8e.5 record (/qa) or under each proposed test (/qa-only). A missing upstream card never blocks: derive it; ignore unknown fields.
+3 -3
View File
@@ -118,8 +118,8 @@ const EXAMPLE_CARD = renderValueCard({
const EXAMPLE_REJECTED = 'Rejected (covered_elsewhere): "checkout renders"; checkout.e2e.ts:15 covers it, so extend that test.'; const EXAMPLE_REJECTED = 'Rejected (covered_elsewhere): "checkout renders"; checkout.e2e.ts:15 covers it, so extend that test.';
function questionList(mode: TestValueBarMode): string { function questionList(mode: TestValueBarMode): string {
const numbered = QUESTIONS.map((question, index) => `${index + 1}. ${question}`); const questions = mode === 'qa' ? QUESTIONS.slice(2) : QUESTIONS;
return mode === 'qa' ? numbered.slice(2).join('\n') : numbered.join('\n'); return questions.map((question, index) => `${index + 1}. ${question}`).join('\n');
} }
function cardRules(mode: TestValueBarMode): string { function cardRules(mode: TestValueBarMode): string {
@@ -154,7 +154,7 @@ export function generateTestValueBar(_ctx: TemplateContext, args?: string[]): st
const mode = args?.[0] as TestValueBarMode; const mode = args?.[0] as TestValueBarMode;
if (!TEST_VALUE_BAR_MODES.includes(mode)) throw new Error(MESSAGES.unknownMode.message.replace('<x>', String(args?.[0]))); if (!TEST_VALUE_BAR_MODES.includes(mode)) throw new Error(MESSAGES.unknownMode.message.replace('<x>', String(args?.[0])));
const parts = [ const parts = [
`**Test value bar.** ${mode === 'qa' ? 'Before writing the test (the reproduced bug answers what it protects and what makes it fail):' : 'Propose or write a test only with all four answers; otherwise extend an existing test or drop it:'}`, `**Test value bar.** ${mode === 'qa' ? 'Before writing or proposing a test, the reproduced bug already answers what it protects and what makes it fail; also answer:' : 'Propose or write a test only with all four answers; otherwise extend an existing test or drop it:'}`,
questionList(mode), questionList(mode),
cardRules(mode), cardRules(mode),
]; ];