executable-stories-formatters 1.14.0 → 1.15.0

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/index.d.cts CHANGED
@@ -2801,6 +2801,8 @@ interface CheckArgs {
2801
2801
  testCases: TestCaseResult[];
2802
2802
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
2803
2803
  baseline?: Map<string, TestStatus>;
2804
+ /** Per-scenario time budget. Scenarios above it are named (see {@link CheckSlow}). */
2805
+ maxDurationMs?: number;
2804
2806
  format: "text" | "json";
2805
2807
  }
2806
2808
  type CheckDeps = Record<string, never>;
@@ -2839,6 +2841,17 @@ interface CheckTurnedOff {
2839
2841
  status: "skipped" | "pending";
2840
2842
  tickets: string[];
2841
2843
  }
2844
+ /**
2845
+ * A scenario that took longer than the budget. A slow suite is usually two or
2846
+ * three scenarios, and nobody knows which until something names them.
2847
+ */
2848
+ interface CheckSlow {
2849
+ id: string;
2850
+ scenario: string;
2851
+ /** `sourceFile:sourceLine` */
2852
+ location: string;
2853
+ durationMs: number;
2854
+ }
2842
2855
  interface CheckReport {
2843
2856
  summary: {
2844
2857
  total: number;
@@ -2850,6 +2863,10 @@ interface CheckReport {
2850
2863
  failures: CheckFailure[];
2851
2864
  /** Scenarios switched off — named, not just counted (see {@link CheckTurnedOff}). */
2852
2865
  turnedOff: CheckTurnedOff[];
2866
+ /** Scenarios over `--max-duration`, longest first. Empty without a budget. */
2867
+ overBudget: CheckSlow[];
2868
+ /** The budget those scenarios broke, for the message that names it. */
2869
+ maxDurationMs?: number;
2853
2870
  /** Count of scenarios that went passed → failed vs. the baseline. */
2854
2871
  regressed: number;
2855
2872
  /** Count of scenarios that went failed → passed vs. the baseline. */
@@ -2925,6 +2942,22 @@ type GoalDeps = Record<string, never>;
2925
2942
  declare function buildGoal(args: GoalArgs, _deps?: GoalDeps): GoalReport;
2926
2943
  declare function renderGoal(report: GoalReport, format: "text" | "json"): string;
2927
2944
 
2945
+ /**
2946
+ * CODEOWNERS parsing, so a failing scenario can name the team that fixes it.
2947
+ *
2948
+ * A red run that belongs to everyone belongs to nobody until someone
2949
+ * volunteers. `triage --by-owner` groups the worklist the way the repo already
2950
+ * divides responsibility, using the file every GitHub repo already has.
2951
+ *
2952
+ * Supports the common CODEOWNERS subset — leading `/`, trailing `/`,
2953
+ * `*`, `**`, and bare extension globs. Character classes, `?`, and negation are
2954
+ * not implemented; swap in a gitignore-grade matcher if a repo needs them.
2955
+ */
2956
+ interface CodeownersRule {
2957
+ pattern: string;
2958
+ owners: string[];
2959
+ }
2960
+
2928
2961
  /**
2929
2962
  * `triage` — the discovery-phase worklist for an agent loop.
2930
2963
  *
@@ -2945,6 +2978,8 @@ interface TriageItem {
2945
2978
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
2946
2979
  covers: string[];
2947
2980
  tickets: string[];
2981
+ /** CODEOWNERS entries for the code this scenario covers. Empty = unclaimed. */
2982
+ owners: string[];
2948
2983
  errorMessage?: string;
2949
2984
  /** Passed in the baseline, failing now. Ranked first. */
2950
2985
  regressed: boolean;
@@ -2963,10 +2998,16 @@ interface TriageArgs {
2963
2998
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
2964
2999
  baseline?: Map<string, TestStatus>;
2965
3000
  format: "text" | "json";
3001
+ /** Parsed CODEOWNERS. Without it every item is unowned. */
3002
+ codeowners?: readonly CodeownersRule[];
2966
3003
  }
2967
3004
  type TriageDeps = Record<string, never>;
2968
3005
  declare function buildTriage(args: TriageArgs, _deps?: TriageDeps): TriageReport;
2969
- declare function renderTriage(report: TriageReport, format: "text" | "json"): string;
3006
+ interface RenderTriageOptions {
3007
+ /** Group the text worklist under each CODEOWNERS owner. */
3008
+ byOwner?: boolean;
3009
+ }
3010
+ declare function renderTriage(report: TriageReport, format: "text" | "json", options?: RenderTriageOptions): string;
2970
3011
 
2971
3012
  /**
2972
3013
  * ReportGenerator — turns a canonical TestRunResult into report files.
package/dist/index.d.ts CHANGED
@@ -2801,6 +2801,8 @@ interface CheckArgs {
2801
2801
  testCases: TestCaseResult[];
2802
2802
  /** Baseline scenario statuses keyed by scenario id, for regressed/fixed deltas. */
2803
2803
  baseline?: Map<string, TestStatus>;
2804
+ /** Per-scenario time budget. Scenarios above it are named (see {@link CheckSlow}). */
2805
+ maxDurationMs?: number;
2804
2806
  format: "text" | "json";
2805
2807
  }
2806
2808
  type CheckDeps = Record<string, never>;
@@ -2839,6 +2841,17 @@ interface CheckTurnedOff {
2839
2841
  status: "skipped" | "pending";
2840
2842
  tickets: string[];
2841
2843
  }
2844
+ /**
2845
+ * A scenario that took longer than the budget. A slow suite is usually two or
2846
+ * three scenarios, and nobody knows which until something names them.
2847
+ */
2848
+ interface CheckSlow {
2849
+ id: string;
2850
+ scenario: string;
2851
+ /** `sourceFile:sourceLine` */
2852
+ location: string;
2853
+ durationMs: number;
2854
+ }
2842
2855
  interface CheckReport {
2843
2856
  summary: {
2844
2857
  total: number;
@@ -2850,6 +2863,10 @@ interface CheckReport {
2850
2863
  failures: CheckFailure[];
2851
2864
  /** Scenarios switched off — named, not just counted (see {@link CheckTurnedOff}). */
2852
2865
  turnedOff: CheckTurnedOff[];
2866
+ /** Scenarios over `--max-duration`, longest first. Empty without a budget. */
2867
+ overBudget: CheckSlow[];
2868
+ /** The budget those scenarios broke, for the message that names it. */
2869
+ maxDurationMs?: number;
2853
2870
  /** Count of scenarios that went passed → failed vs. the baseline. */
2854
2871
  regressed: number;
2855
2872
  /** Count of scenarios that went failed → passed vs. the baseline. */
@@ -2925,6 +2942,22 @@ type GoalDeps = Record<string, never>;
2925
2942
  declare function buildGoal(args: GoalArgs, _deps?: GoalDeps): GoalReport;
2926
2943
  declare function renderGoal(report: GoalReport, format: "text" | "json"): string;
2927
2944
 
2945
+ /**
2946
+ * CODEOWNERS parsing, so a failing scenario can name the team that fixes it.
2947
+ *
2948
+ * A red run that belongs to everyone belongs to nobody until someone
2949
+ * volunteers. `triage --by-owner` groups the worklist the way the repo already
2950
+ * divides responsibility, using the file every GitHub repo already has.
2951
+ *
2952
+ * Supports the common CODEOWNERS subset — leading `/`, trailing `/`,
2953
+ * `*`, `**`, and bare extension globs. Character classes, `?`, and negation are
2954
+ * not implemented; swap in a gitignore-grade matcher if a repo needs them.
2955
+ */
2956
+ interface CodeownersRule {
2957
+ pattern: string;
2958
+ owners: string[];
2959
+ }
2960
+
2928
2961
  /**
2929
2962
  * `triage` — the discovery-phase worklist for an agent loop.
2930
2963
  *
@@ -2945,6 +2978,8 @@ interface TriageItem {
2945
2978
  /** Product-code paths to fix. Empty when the scenario declared no `covers`. */
2946
2979
  covers: string[];
2947
2980
  tickets: string[];
2981
+ /** CODEOWNERS entries for the code this scenario covers. Empty = unclaimed. */
2982
+ owners: string[];
2948
2983
  errorMessage?: string;
2949
2984
  /** Passed in the baseline, failing now. Ranked first. */
2950
2985
  regressed: boolean;
@@ -2963,10 +2998,16 @@ interface TriageArgs {
2963
2998
  /** Baseline statuses by scenario id, to flag regressions and rank them first. */
2964
2999
  baseline?: Map<string, TestStatus>;
2965
3000
  format: "text" | "json";
3001
+ /** Parsed CODEOWNERS. Without it every item is unowned. */
3002
+ codeowners?: readonly CodeownersRule[];
2966
3003
  }
2967
3004
  type TriageDeps = Record<string, never>;
2968
3005
  declare function buildTriage(args: TriageArgs, _deps?: TriageDeps): TriageReport;
2969
- declare function renderTriage(report: TriageReport, format: "text" | "json"): string;
3006
+ interface RenderTriageOptions {
3007
+ /** Group the text worklist under each CODEOWNERS owner. */
3008
+ byOwner?: boolean;
3009
+ }
3010
+ declare function renderTriage(report: TriageReport, format: "text" | "json", options?: RenderTriageOptions): string;
2970
3011
 
2971
3012
  /**
2972
3013
  * ReportGenerator — turns a canonical TestRunResult into report files.