ccqa 1.58.0 → 1.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/ccqa.mjs CHANGED
@@ -8710,16 +8710,14 @@ function rulesReview(guides) {
8710
8710
  ""
8711
8711
  ])
8712
8712
  ],
8713
- answerShape: "{ \"findings\": [ { \"stepId\": \"step-05\", \"problem\": \"…\" } ], \"ruleViolations\": [ { \"file\": \"…\", \"guide\": \"…\", \"rule\": \"…\", \"code\": \"…\", \"severity\": \"blocking\" } ] }",
8713
+ answerShape: "{ \"findings\": [ { \"stepId\": \"step-05\", \"problem\": \"…\" } ], \"ruleViolations\": [ { \"file\": \"…\", \"guide\": \"…\", \"rule\": \"…\", \"code\": \"…\" } ] }",
8714
8714
  answerNote: [
8715
8715
  "",
8716
8716
  "In `ruleViolations`: `file` is the file's path in this repository, and `code`",
8717
8717
  "the lines that break the rule. `guide` and `rule` are where the rule comes",
8718
8718
  "from and what it says — the document's path and its own words when you can",
8719
8719
  "quote one; otherwise the path of a file you read that shows the convention,",
8720
- "and what you counted (\"N of M files under <dir> do X\"). `severity` is",
8721
- "\"blocking\" when you would hold the change until it is fixed, and \"advisory\"",
8722
- "when it is worth saying but you would approve anyway. An empty",
8720
+ "and what you counted (\"N of M files under <dir> do X\"). An empty",
8723
8721
  "`ruleViolations` means every file follows every rule you could quote or",
8724
8722
  "count — write the key either way."
8725
8723
  ]
@@ -9150,8 +9148,7 @@ const ViolationSchema = z.object({
9150
9148
  file: z.string(),
9151
9149
  guide: z.string(),
9152
9150
  rule: z.string(),
9153
- code: z.string(),
9154
- severity: z.enum(["blocking", "advisory"]).catch("blocking")
9151
+ code: z.string()
9155
9152
  });
9156
9153
  const ViolationsSchema = z.object({ ruleViolations: z.array(z.unknown()) });
9157
9154
  /**
@@ -9239,14 +9236,11 @@ function formatFinding(finding, labels = evidenceLabels()) {
9239
9236
  }
9240
9237
  /**
9241
9238
  * The warning a rule violation becomes: the file, the rule in the words it was
9242
- * judged by, and where that came from. An advisory one says so — a reader must
9243
- * be able to tell a line that was worth a fix round from one that was not. The
9244
- * offending code is left out: it is what the fix pass needs, not what a reader
9245
- * scanning a log does.
9239
+ * judged by, and where that came from. The offending code is left out: it is
9240
+ * what the fix pass needs, not what a reader scanning a log does.
9246
9241
  */
9247
9242
  function formatViolation(violation) {
9248
- const advisory = violation.severity === "advisory" ? ", advisory" : "";
9249
- return `${violation.file}: ${violation.rule} (${violation.guide}${advisory})`;
9243
+ return `${violation.file}: ${violation.rule} (${violation.guide})`;
9250
9244
  }
9251
9245
  /**
9252
9246
  * Hand the written files to a reviewer who knows nothing about where they came
@@ -15179,13 +15173,12 @@ function uncheckedSteps(review, alreadyAsked = /* @__PURE__ */ new Set()) {
15179
15173
  * arrived. Absent violations are absent either way — there is nothing here to
15180
15174
  * act on when that half never came.
15181
15175
  *
15182
- * Only what the reviewer would hold the change for. It is asked to sort its
15183
- * own violations, because the alternative is a round spent on a line it would
15184
- * have approved anyway. Every violation is still reported: `warnings` carries
15185
- * the advisory ones too, marked as such.
15176
+ * Every violation the reviewer reports: a rule the project wrote down, or a
15177
+ * convention its files share, is the project's decision, not the reviewer's to
15178
+ * waive.
15186
15179
  */
15187
15180
  function guideViolations(review, alreadyAsked = /* @__PURE__ */ new Set()) {
15188
- const violations = (review?.ruleViolations ?? []).filter((v) => v.severity === "blocking" && !alreadyAsked.has(violationKey(v)));
15181
+ const violations = (review?.ruleViolations ?? []).filter((v) => !alreadyAsked.has(violationKey(v)));
15189
15182
  if (violations.length === 0) return null;
15190
15183
  return {
15191
15184
  exitCode: 1,
@@ -15464,7 +15457,7 @@ const JUDGE_CALL = "judgeByLlm";
15464
15457
  * would notice.
15465
15458
  */
15466
15459
  function headerPreserveRule(header, titleSuffix) {
15467
- const parts = [header ? `the comment block at the top of the draft, verbatim` : "", titleSuffix ? `the \`${titleSuffix.trim()}\` suffix on the test's name` : ""].filter(Boolean);
15460
+ const parts = [header ? `the comment block right below the draft's imports, verbatim` : "", titleSuffix ? `the \`${titleSuffix.trim()}\` suffix on the test's name` : ""].filter(Boolean);
15468
15461
  return `**Keep ${parts.join(" and ")}.** Written from the case's own record, not decided per test; do not reword, move, or drop ${parts.length > 1 ? "either" : "it"}.`;
15469
15462
  }
15470
15463
  /**
@@ -15554,11 +15547,11 @@ function emitPlaywrightDraft(input) {
15554
15547
  ] : []
15555
15548
  ];
15556
15549
  const source = [
15557
- ...input.header ? [input.header.trimEnd(), ""] : [],
15558
15550
  `import { test, expect } from "@playwright/test";`,
15559
15551
  ...judgements.length > 0 ? [`import { ${JUDGE_CALL} } from ${j(JUDGE_MODULE)};`] : [],
15560
15552
  ...runId ? [runId.import] : [],
15561
15553
  "",
15554
+ ...input.header ? [input.header.trimEnd(), ""] : [],
15562
15555
  ...declaration,
15563
15556
  ""
15564
15557
  ].join("\n");
@@ -16208,7 +16201,7 @@ function injectedCallGaps(corpus, { markers, judgements, header, titleSuffix })
16208
16201
  warnings.push(`step ${stepId}: the generated test no longer opens that step with the \`test.step\` title the draft wrote. The evidence table, the run's screenshots and the spec review read it back to attribute assertions, so a reshaped one makes all three report the step as deciding nothing. Keep the title unchanged.`);
16209
16202
  }
16210
16203
  const firstHeaderLine = stamped.header.split("\n")[0]?.trim() ?? "";
16211
- if (firstHeaderLine && !corpus.includes(firstHeaderLine)) warnings.push("the generated test no longer opens with the configured header — a rewrite pass dropped it, so the file does not say which case it came from");
16204
+ if (firstHeaderLine && !corpus.includes(firstHeaderLine)) warnings.push("the generated test no longer carries the configured header — a rewrite pass dropped it, so the file does not say which case it came from");
16212
16205
  if (stamped.titleSuffix && !corpus.includes(stamped.titleSuffix.trim())) warnings.push(`the generated test's name no longer ends with "${stamped.titleSuffix.trim()}" — a rewrite pass dropped the tag, and whatever selects tests by it will skip this one`);
16213
16206
  for (const { step } of judgements) {
16214
16207
  if (judgeCall(step).pattern.test(corpus)) continue;
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
35
35
  running: "running";
36
36
  }>;
37
37
  kind: z.ZodDefault<z.ZodEnum<{
38
+ record: "record";
38
39
  run: "run";
39
40
  drift: "drift";
40
- record: "record";
41
41
  }>>;
42
42
  drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
43
43
  specs: z.ZodNumber;
@@ -831,9 +831,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
831
831
  declare const RunReportDataSchema: z.ZodObject<{
832
832
  schemaVersion: z.ZodLiteral<1>;
833
833
  kind: z.ZodDefault<z.ZodEnum<{
834
+ record: "record";
834
835
  run: "run";
835
836
  drift: "drift";
836
- record: "record";
837
837
  }>>;
838
838
  createdAt: z.ZodString;
839
839
  runId: z.ZodNullable<z.ZodString>;
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
35
35
  running: "running";
36
36
  }>;
37
37
  kind: z.ZodDefault<z.ZodEnum<{
38
+ record: "record";
38
39
  run: "run";
39
40
  drift: "drift";
40
- record: "record";
41
41
  }>>;
42
42
  drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
43
43
  specs: z.ZodNumber;
@@ -831,9 +831,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
831
831
  declare const RunReportDataSchema: z.ZodObject<{
832
832
  schemaVersion: z.ZodLiteral<1>;
833
833
  kind: z.ZodDefault<z.ZodEnum<{
834
+ record: "record";
834
835
  run: "run";
835
836
  drift: "drift";
836
- record: "record";
837
837
  }>>;
838
838
  createdAt: z.ZodString;
839
839
  runId: z.ZodNullable<z.ZodString>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.58.0",
3
+ "version": "1.58.2",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.58.0",
3
+ "version": "1.58.2",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {