sela-core 1.0.7 → 1.0.9

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.
Files changed (146) hide show
  1. package/README.md +27 -17
  2. package/dist/cli/ErrorHandler.d.ts +1 -1
  3. package/dist/cli/ErrorHandler.js +14 -14
  4. package/dist/cli/commands/bulk.d.ts +1 -1
  5. package/dist/cli/commands/bulk.d.ts.map +1 -1
  6. package/dist/cli/commands/bulk.js +51 -33
  7. package/dist/cli/commands/init.d.ts +1 -1
  8. package/dist/cli/commands/init.d.ts.map +1 -1
  9. package/dist/cli/commands/init.js +26 -18
  10. package/dist/cli/commands/merge.d.ts +13 -0
  11. package/dist/cli/commands/merge.d.ts.map +1 -0
  12. package/dist/cli/commands/merge.js +119 -0
  13. package/dist/cli/commands/showReport.d.ts +1 -1
  14. package/dist/cli/commands/showReport.d.ts.map +1 -1
  15. package/dist/cli/commands/showReport.js +12 -10
  16. package/dist/cli/commands/status.d.ts +1 -1
  17. package/dist/cli/commands/status.d.ts.map +1 -1
  18. package/dist/cli/commands/status.js +8 -8
  19. package/dist/cli/commands/sync.d.ts +1 -1
  20. package/dist/cli/commands/sync.d.ts.map +1 -1
  21. package/dist/cli/commands/sync.js +38 -30
  22. package/dist/cli/index.js +12 -9
  23. package/dist/cli/ui/DnaTable.d.ts +1 -1
  24. package/dist/cli/ui/DnaTable.d.ts.map +1 -1
  25. package/dist/cli/ui/DnaTable.js +23 -16
  26. package/dist/cli/ui/RefactorWizard.d.ts +3 -3
  27. package/dist/cli/ui/RefactorWizard.d.ts.map +1 -1
  28. package/dist/cli/ui/RefactorWizard.js +108 -82
  29. package/dist/config/ConfigLoader.d.ts +2 -2
  30. package/dist/config/ConfigLoader.d.ts.map +1 -1
  31. package/dist/config/ConfigLoader.js +15 -15
  32. package/dist/config/DryRunGuard.d.ts +1 -1
  33. package/dist/config/DryRunGuard.js +7 -7
  34. package/dist/config/SelaConfig.d.ts +13 -17
  35. package/dist/config/SelaConfig.d.ts.map +1 -1
  36. package/dist/config/SelaConfig.js +32 -26
  37. package/dist/engine/HealingRegistry.d.ts +1 -1
  38. package/dist/engine/HealingRegistry.js +3 -3
  39. package/dist/engine/SelaEngine.d.ts +1 -1
  40. package/dist/engine/SelaEngine.d.ts.map +1 -1
  41. package/dist/engine/SelaEngine.js +117 -51
  42. package/dist/errors/SelaError.d.ts +8 -1
  43. package/dist/errors/SelaError.d.ts.map +1 -1
  44. package/dist/errors/SelaError.js +14 -7
  45. package/dist/fixtures/expectProxy.d.ts +2 -2
  46. package/dist/fixtures/expectProxy.js +16 -16
  47. package/dist/fixtures/index.d.ts +18 -2
  48. package/dist/fixtures/index.d.ts.map +1 -1
  49. package/dist/fixtures/index.js +47 -27
  50. package/dist/fixtures/moduleExpect.js +7 -7
  51. package/dist/fixtures/proxyTag.d.ts +1 -1
  52. package/dist/fixtures/proxyTag.js +4 -4
  53. package/dist/index.d.ts +8 -8
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +4 -4
  56. package/dist/reporter/SelaReporter.d.ts +45 -12
  57. package/dist/reporter/SelaReporter.d.ts.map +1 -1
  58. package/dist/reporter/SelaReporter.js +139 -39
  59. package/dist/services/ASTSourceUpdater.d.ts +48 -3
  60. package/dist/services/ASTSourceUpdater.d.ts.map +1 -1
  61. package/dist/services/ASTSourceUpdater.js +283 -105
  62. package/dist/services/AnchorResolver.d.ts +157 -0
  63. package/dist/services/AnchorResolver.d.ts.map +1 -0
  64. package/dist/services/AnchorResolver.js +289 -0
  65. package/dist/services/ArgumentTypeAnalyzer.js +7 -7
  66. package/dist/services/BlastRadiusAnalyzer.d.ts.map +1 -1
  67. package/dist/services/BlastRadiusAnalyzer.js +5 -2
  68. package/dist/services/ChainValidator.js +22 -22
  69. package/dist/services/CrossFileHealer.js +7 -7
  70. package/dist/services/DecisionEngine.d.ts +51 -0
  71. package/dist/services/DecisionEngine.d.ts.map +1 -0
  72. package/dist/services/DecisionEngine.js +260 -0
  73. package/dist/services/DefinitionTracer.d.ts +1 -1
  74. package/dist/services/DefinitionTracer.d.ts.map +1 -1
  75. package/dist/services/DefinitionTracer.js +28 -13
  76. package/dist/services/DnaEditorService.d.ts +2 -2
  77. package/dist/services/DnaEditorService.d.ts.map +1 -1
  78. package/dist/services/DnaEditorService.js +81 -62
  79. package/dist/services/DnaIndexService.d.ts +1 -1
  80. package/dist/services/DnaIndexService.d.ts.map +1 -1
  81. package/dist/services/DnaIndexService.js +14 -14
  82. package/dist/services/HealReportService.d.ts +31 -55
  83. package/dist/services/HealReportService.d.ts.map +1 -1
  84. package/dist/services/HealReportService.js +864 -1240
  85. package/dist/services/HealingAdvisory.d.ts +9 -1
  86. package/dist/services/HealingAdvisory.d.ts.map +1 -1
  87. package/dist/services/HealingAdvisory.js +9 -1
  88. package/dist/services/HealingCacheService.d.ts +8 -8
  89. package/dist/services/HealingCacheService.d.ts.map +1 -1
  90. package/dist/services/HealingCacheService.js +24 -24
  91. package/dist/services/HealthReportService.d.ts +1 -1
  92. package/dist/services/HealthReportService.d.ts.map +1 -1
  93. package/dist/services/HealthReportService.js +25 -25
  94. package/dist/services/InitializerUpdater.d.ts.map +1 -1
  95. package/dist/services/InitializerUpdater.js +12 -2
  96. package/dist/services/IntentAuditor.d.ts.map +1 -1
  97. package/dist/services/IntentAuditor.js +32 -21
  98. package/dist/services/InteractiveReview.d.ts +8 -17
  99. package/dist/services/InteractiveReview.d.ts.map +1 -1
  100. package/dist/services/InteractiveReview.js +34 -124
  101. package/dist/services/LLMService.d.ts +1 -1
  102. package/dist/services/LLMService.js +16 -16
  103. package/dist/services/MutationApplier.d.ts +55 -0
  104. package/dist/services/MutationApplier.d.ts.map +1 -0
  105. package/dist/services/MutationApplier.js +322 -0
  106. package/dist/services/PRAutomationService.d.ts +2 -2
  107. package/dist/services/PRAutomationService.d.ts.map +1 -1
  108. package/dist/services/PRAutomationService.js +43 -39
  109. package/dist/services/PendingPromptLedger.d.ts +9 -2
  110. package/dist/services/PendingPromptLedger.d.ts.map +1 -1
  111. package/dist/services/PendingPromptLedger.js +31 -6
  112. package/dist/services/ReportGenerator.d.ts +116 -30
  113. package/dist/services/ReportGenerator.d.ts.map +1 -1
  114. package/dist/services/ReportGenerator.js +149 -62
  115. package/dist/services/ReportMergeService.d.ts +95 -0
  116. package/dist/services/ReportMergeService.d.ts.map +1 -0
  117. package/dist/services/ReportMergeService.js +0 -0
  118. package/dist/services/SafetyGuard.d.ts +4 -7
  119. package/dist/services/SafetyGuard.d.ts.map +1 -1
  120. package/dist/services/SafetyGuard.js +29 -106
  121. package/dist/services/SelectorSanitizer.d.ts +52 -0
  122. package/dist/services/SelectorSanitizer.d.ts.map +1 -0
  123. package/dist/services/SelectorSanitizer.js +318 -0
  124. package/dist/services/SnapshotService.js +6 -6
  125. package/dist/services/SourceLinkService.d.ts +2 -2
  126. package/dist/services/SourceLinkService.d.ts.map +1 -1
  127. package/dist/services/SourceLinkService.js +31 -22
  128. package/dist/services/SourceUpdater.d.ts +1 -1
  129. package/dist/services/SourceUpdater.d.ts.map +1 -1
  130. package/dist/services/SourceUpdater.js +44 -26
  131. package/dist/services/TemplateDiffService.d.ts.map +1 -1
  132. package/dist/services/TemplateDiffService.js +18 -15
  133. package/dist/services/TraceBackEngine.d.ts +67 -0
  134. package/dist/services/TraceBackEngine.d.ts.map +1 -0
  135. package/dist/services/TraceBackEngine.js +672 -0
  136. package/dist/services/WorkspaceSnapshotService.d.ts +6 -6
  137. package/dist/services/WorkspaceSnapshotService.d.ts.map +1 -1
  138. package/dist/services/WorkspaceSnapshotService.js +10 -12
  139. package/dist/types/index.d.ts +1 -1
  140. package/dist/utils/DOMUtils.d.ts +18 -2
  141. package/dist/utils/DOMUtils.d.ts.map +1 -1
  142. package/dist/utils/DOMUtils.js +335 -49
  143. package/dist/utils/IsolatedDiff.d.ts +2 -2
  144. package/dist/utils/IsolatedDiff.d.ts.map +1 -1
  145. package/dist/utils/IsolatedDiff.js +13 -10
  146. package/package.json +2 -2
@@ -2,7 +2,7 @@ import type { Reporter, TestCase, TestResult, FullConfig, Suite, FullResult } fr
2
2
  import { HealReportService } from "../services/HealReportService.js";
3
3
  import type { SelaEngine } from "../engine/SelaEngine.js";
4
4
  import { type PendingPromptEntry } from "../services/PendingPromptLedger.js";
5
- import { type InteractiveReviewOutcome } from "../services/InteractiveReview.js";
5
+ import { type PrintReviewDeps } from "../services/InteractiveReview.js";
6
6
  export interface ReporterEngine {
7
7
  commitUpdates(): Promise<void>;
8
8
  }
@@ -27,22 +27,34 @@ export interface SelaReporterOpts {
27
27
  /** Override cwd used to locate the pending-prompts ledger. Defaults to process.cwd(). */
28
28
  cwd?: string;
29
29
  /**
30
- * Inject the ledger reader tests stub this so they don't have to
30
+ * Inject the ledger reader - tests stub this so they don't have to
31
31
  * touch the real filesystem.
32
32
  */
33
33
  readLedger?: (cwd: string) => PendingPromptEntry[];
34
34
  /** Inject the ledger cleaner. */
35
35
  clearLedger?: (cwd: string) => void;
36
36
  /**
37
- * Inject the interactive review runner. Tests stub this to assert that
38
- * the reporter wires the ledger entries through unchanged.
37
+ * Inject the review printer. Tests stub this to assert that the
38
+ * reporter wires the ledger entries + HTML report path through unchanged.
39
39
  */
40
- runReview?: (entries: PendingPromptEntry[]) => Promise<InteractiveReviewOutcome[]>;
40
+ printReview?: (deps: PrintReviewDeps) => void;
41
41
  /**
42
- * Override the CI detection true means "behave as CI" (skip the
43
- * interactive review). Defaults to checking `process.env.CI`.
42
+ * Override the resolution of the HTML report path. Returns `null` when
43
+ * no report exists. Defaults to `<cwd>/sela-report.html` when the file
44
+ * is on disk.
45
+ */
46
+ resolveReportPath?: (cwd: string) => string | null;
47
+ /**
48
+ * Override the CI detection - true means "behave as CI" (skip the
49
+ * post-run notify). Defaults to checking `process.env.CI`.
44
50
  */
45
51
  isCi?: () => boolean;
52
+ /**
53
+ * Install process-level SIGINT/SIGTERM handlers in onBegin. Defaults
54
+ * to true. Tests pass `false` so vitest's own signal lifecycle isn't
55
+ * polluted by leftover handlers between cases.
56
+ */
57
+ installSignalHandlers?: boolean;
46
58
  }
47
59
  export declare class SelaReporter implements Reporter {
48
60
  private readonly engine;
@@ -52,8 +64,12 @@ export declare class SelaReporter implements Reporter {
52
64
  private readonly cwd;
53
65
  private readonly readLedger;
54
66
  private readonly clearLedger;
55
- private readonly runReview;
67
+ private readonly printReview;
68
+ private readonly resolveReportPath;
56
69
  private readonly isCi;
70
+ private readonly shouldInstallSignalHandlers;
71
+ private shutdownHandler;
72
+ private shuttingDown;
57
73
  /**
58
74
  * Screenshots that arrived before a matching FailedEvent existed in
59
75
  * the shared report. Re-flushed once at onEnd time so worker-crash
@@ -73,19 +89,36 @@ export declare class SelaReporter implements Reporter {
73
89
  onBegin(_config?: FullConfig, _suite?: Suite): void;
74
90
  onTestEnd(test: TestCase, result: TestResult): void;
75
91
  onEnd(_result?: FullResult): Promise<void>;
76
- /** Reporter prints nothing of its own Playwright stdio stays clean. */
92
+ /** Reporter prints nothing of its own - Playwright stdio stays clean. */
77
93
  printsToStdio(): boolean;
94
+ /**
95
+ * Install the SIGINT/SIGTERM listener once per reporter. First signal
96
+ * triggers an orderly drain; second signal hard-exits with code 130
97
+ * (SIGINT) / 143 (SIGTERM) so the user can always escape if the drain
98
+ * itself wedges (e.g. a stuck LLM call).
99
+ */
100
+ private installShutdownHandler;
101
+ private uninstallShutdownHandler;
102
+ /**
103
+ * Best-effort drain on signal. Mirrors the orderly onEnd path but
104
+ * swallows every error - we never want to throw inside a signal
105
+ * handler because Node prints raw stack traces otherwise.
106
+ *
107
+ * Exposed for tests so they can drive the shutdown without raising
108
+ * a real signal in the vitest process.
109
+ */
110
+ gracefulShutdown(): Promise<void>;
78
111
  /**
79
112
  * Walk every buffered pending screenshot and try to attach it to a
80
113
  * now-existing FailedEvent. Successfully-attached entries are
81
114
  * removed; unmatched entries are dropped (the matching FailedEvent
82
- * never arrived most likely worker crashed before the engine
115
+ * never arrived - most likely worker crashed before the engine
83
116
  * could record one).
84
117
  *
85
118
  * Returns the number of FailedEvents touched.
86
119
  */
87
120
  flushPendingScreenshots(): number;
88
- /** Test hook read-only snapshot of recorded failures. */
121
+ /** Test hook - read-only snapshot of recorded failures. */
89
122
  getRecordedFailures(): ReadonlyArray<{
90
123
  sourceFile: string;
91
124
  sourceLine?: number;
@@ -93,7 +126,7 @@ export declare class SelaReporter implements Reporter {
93
126
  status: string;
94
127
  hasScreenshot: boolean;
95
128
  }>;
96
- /** Test hook number of screenshots still waiting for a FailedEvent. */
129
+ /** Test hook - number of screenshots still waiting for a FailedEvent. */
97
130
  getPendingScreenshotCount(): number;
98
131
  private pendingKey;
99
132
  private normalisePath;
@@ -1 +1 @@
1
- {"version":3,"file":"SelaReporter.d.ts","sourceRoot":"","sources":["../../src/reporter/SelaReporter.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,KAAK,EACL,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAEL,iBAAiB,EAElB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAO1C,MAAM,WAAW,cAAc;IAC7B,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uDAAuD;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+1,30 @@
1
1
  "use strict";
2
2
  // src/reporter/SelaReporter.ts
3
3
  //
4
- // SelaReporter Playwright Reporter implementation that drives the
4
+ // SelaReporter - Playwright Reporter implementation that drives the
5
5
  // Sela heal-and-report pipeline at the reporter layer instead of the
6
6
  // fixture teardown layer. The fixture path remains the primary trigger
7
7
  // for in-test heals; this reporter is the SAFETY NET for worker crashes,
8
8
  // timeouts, and any failure mode that skips fixture teardown.
9
9
  //
10
10
  // Responsibilities:
11
- // 1. onBegin flips SELA_REPORTER_ACTIVE so future fixture-aware code
12
- // can detect that a reporter is present.
13
- // 2. onTestEnd extracts the first PNG screenshot from
11
+ // 1. onBegin - flips SELA_REPORTER_ACTIVE, installs SIGINT/SIGTERM
12
+ // graceful-shutdown handlers.
13
+ // 2. onTestEnd - extracts the first PNG screenshot from
14
14
  // TestResult.attachments and converts it to Base64 IMMEDIATELY.
15
15
  // Playwright's temp folder is cleaned up between runs, so the
16
16
  // bytes MUST be captured into memory before the reporter loop ends.
17
- // 3. onEnd checks for ANTHROPIC_API_KEY (surfaces a friendly
18
- // SelaError(LLMService, NO_API_KEY) when missing instead of
19
- // crashing), flushes pending screenshots onto matching FAILED
20
- // events, and invokes SelaEngine.commitUpdates() so the HTML
21
- // report + PR automation still fire even when the fixture
22
- // teardown never ran.
17
+ // 3. onEnd - checks for ANTHROPIC_API_KEY, flushes pending screenshots,
18
+ // runs SelaEngine.commitUpdates(), then prints a *non-blocking*
19
+ // write-and-notify summary (unified diff per healed file +
20
+ // vscode://file deeplink + sela-report.html deeplink). MVP flow -
21
+ // no Y/N prompt, no rollback. Mutations are already on disk by the
22
+ // time we reach this hook.
23
+ // 4. SIGINT / SIGTERM - runs gracefulShutdown() once, second signal
24
+ // hard-exits. Prevents stranded child processes from showing raw
25
+ // Node unhandledRejection stack traces on Ctrl+C.
23
26
  //
24
- // Clean Architecture: zero business logic IO + aggregation only.
27
+ // Clean Architecture: zero business logic - IO + aggregation only.
25
28
  // Heal decisions live in SelaEngine, validation in ReportGenerator,
26
29
  // rendering in HealReportService.
27
30
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -77,8 +80,12 @@ class SelaReporter {
77
80
  cwd;
78
81
  readLedger;
79
82
  clearLedger;
80
- runReview;
83
+ printReview;
84
+ resolveReportPath;
81
85
  isCi;
86
+ shouldInstallSignalHandlers;
87
+ shutdownHandler = null;
88
+ shuttingDown = false;
82
89
  /**
83
90
  * Screenshots that arrived before a matching FailedEvent existed in
84
91
  * the shared report. Re-flushed once at onEnd time so worker-crash
@@ -106,10 +113,10 @@ class SelaReporter {
106
113
  this.cwd = opts.cwd ?? process.cwd();
107
114
  this.readLedger = opts.readLedger ?? PendingPromptLedger_js_1.readPendingPromptsLedger;
108
115
  this.clearLedger = opts.clearLedger ?? PendingPromptLedger_js_1.clearPendingPromptsLedger;
109
- this.runReview =
110
- opts.runReview ??
111
- ((entries) => (0, InteractiveReview_js_1.runInteractiveReview)({ entries }));
116
+ this.printReview = opts.printReview ?? InteractiveReview_js_1.printHealReview;
117
+ this.resolveReportPath = opts.resolveReportPath ?? defaultResolveReportPath;
112
118
  this.isCi = opts.isCi ?? defaultIsCi;
119
+ this.shouldInstallSignalHandlers = opts.installSignalHandlers ?? true;
113
120
  }
114
121
  // ─────────────────────────────────────────────────────────────
115
122
  // Playwright Reporter API
@@ -119,6 +126,9 @@ class SelaReporter {
119
126
  // finalisation. Today the fixture still calls engine.commitUpdates()
120
127
  // itself; the env flag is reserved for the planned dedup guard.
121
128
  process.env.SELA_REPORTER_ACTIVE = "1";
129
+ if (this.shouldInstallSignalHandlers) {
130
+ this.installShutdownHandler();
131
+ }
122
132
  }
123
133
  onTestEnd(test, result) {
124
134
  if (result.status !== "failed" && result.status !== "timedOut")
@@ -128,12 +138,12 @@ class SelaReporter {
128
138
  const testTitle = test.title;
129
139
  const base64Png = this.extractScreenshotBase64(result);
130
140
  if (base64Png) {
131
- // First try to attach immediately the engine may have already
141
+ // First try to attach immediately - the engine may have already
132
142
  // recorded the FailedEvent during fixture teardown for in-test
133
143
  // heal failures. This is the happy path.
134
144
  const matched = this.report.attachFailureScreenshot({ sourceFile: this.normalisePath(sourceFile), testTitle }, base64Png);
135
145
  if (matched === 0) {
136
- // No matching FailedEvent yet buffer for the onEnd retry. This
146
+ // No matching FailedEvent yet - buffer for the onEnd retry. This
137
147
  // covers worker-crash and fixture-skip cases where the engine
138
148
  // never got a chance to record the FailedEvent in-flight.
139
149
  const key = this.pendingKey(sourceFile, testTitle);
@@ -149,11 +159,14 @@ class SelaReporter {
149
159
  });
150
160
  }
151
161
  async onEnd(_result) {
162
+ // Detach signal handlers first - a natural onEnd is the orderly path,
163
+ // so we don't want a late SIGINT to double-invoke shutdown logic.
164
+ this.uninstallShutdownHandler();
152
165
  if (!this.skipApiKeyCheck && !process.env.ANTHROPIC_API_KEY) {
153
166
  const err = new SelaError_js_1.SelaError({
154
167
  subsystem: "LLMService",
155
168
  code: SelaError_js_1.LLM_SERVICE_CODES.NO_API_KEY,
156
- reason: "ANTHROPIC_API_KEY not set SelaReporter cannot drive the heal pipeline. " +
169
+ reason: "ANTHROPIC_API_KEY not set - SelaReporter cannot drive the heal pipeline. " +
157
170
  "Set the env var (or remove the reporter entry from playwright.config.ts).",
158
171
  });
159
172
  // Graceful degradation: surface the error and continue flushing
@@ -169,36 +182,34 @@ class SelaReporter {
169
182
  const msg = err instanceof Error ? err.message : String(err);
170
183
  this.logger.error(`[Sela] reporter commitUpdates failed: ${msg}`);
171
184
  }
172
- // ── Local DX Interactive review drain ──────────────────────
185
+ // ── Local DX - Write-and-notify summary ─────────────────────
173
186
  //
174
187
  // Workers serialise their mutated FileSnapshots to
175
- // `<cwd>/.sela/pending-prompts/*.json` because they have no TTY.
176
- // The reporter (main process, has stdin/stdout) drains that ledger
177
- // here, prompts the developer for each fix, then deletes the dir.
188
+ // `<cwd>/.sela/pending-prompts/*.json`. The reporter drains that
189
+ // ledger here and prints a non-blocking summary (diff + vscode
190
+ // deeplink + HTML report deeplink). No Y/N prompt - the files are
191
+ // already mutated on disk by the time we get here.
178
192
  //
179
- // CI runs skip this entirely PR automation already handled the
180
- // mutations on its isolated branch.
193
+ // CI runs skip the notify entirely - PR automation already handled
194
+ // the mutations on its isolated branch.
181
195
  if (!this.isCi()) {
182
196
  try {
183
197
  const entries = this.readLedger(this.cwd);
184
- if (entries.length > 0) {
185
- // Banner on stderr so Playwright's stdout summary cannot
186
- // mask it. Visible to the developer even if the readline
187
- // prompt itself races with terminal redraws.
188
- process.stderr.write(`\n[Sela] 🔧 Local DX review starting (${entries.length} fix${entries.length > 1 ? "es" : ""} pending)\n`);
189
- await this.runReview(entries);
198
+ const reportHtmlPath = this.resolveReportPath(this.cwd);
199
+ if (entries.length > 0 || reportHtmlPath) {
200
+ this.printReview({ entries, reportHtmlPath });
190
201
  }
191
202
  }
192
203
  catch (err) {
193
204
  const msg = err instanceof Error ? err.message : String(err);
194
- this.logger.error(`[Sela] interactive review failed: ${msg}`);
205
+ this.logger.error(`[Sela] review summary failed: ${msg}`);
195
206
  }
196
207
  finally {
197
208
  try {
198
209
  this.clearLedger(this.cwd);
199
210
  }
200
211
  catch {
201
- // Cleanup failures are non-fatal the next run will overwrite.
212
+ // Cleanup failures are non-fatal - the next run will overwrite.
202
213
  }
203
214
  }
204
215
  }
@@ -213,19 +224,98 @@ class SelaReporter {
213
224
  }
214
225
  }
215
226
  }
216
- /** Reporter prints nothing of its own Playwright stdio stays clean. */
227
+ /** Reporter prints nothing of its own - Playwright stdio stays clean. */
217
228
  printsToStdio() {
218
229
  return false;
219
230
  }
220
231
  // ─────────────────────────────────────────────────────────────
221
- // Internals (exposed for testing prefixed underscore is the
232
+ // Graceful shutdown - SIGINT / SIGTERM
233
+ // ─────────────────────────────────────────────────────────────
234
+ /**
235
+ * Install the SIGINT/SIGTERM listener once per reporter. First signal
236
+ * triggers an orderly drain; second signal hard-exits with code 130
237
+ * (SIGINT) / 143 (SIGTERM) so the user can always escape if the drain
238
+ * itself wedges (e.g. a stuck LLM call).
239
+ */
240
+ installShutdownHandler() {
241
+ if (this.shutdownHandler)
242
+ return;
243
+ const handler = (signal) => {
244
+ if (this.shuttingDown) {
245
+ process.stderr.write(`\n[Sela] ⏹ Force exit on second ${signal}.\n`);
246
+ process.exit(signal === "SIGTERM" ? 143 : 130);
247
+ return;
248
+ }
249
+ this.shuttingDown = true;
250
+ process.stderr.write(`\n[Sela] 🛑 ${signal} received - flushing state and shutting down...\n`);
251
+ this.gracefulShutdown()
252
+ .catch((err) => {
253
+ const msg = err instanceof Error ? err.message : String(err);
254
+ process.stderr.write(`[Sela] Shutdown error: ${msg}\n`);
255
+ })
256
+ .finally(() => {
257
+ process.stderr.write(`[Sela] 👋 Goodbye.\n`);
258
+ process.exit(signal === "SIGTERM" ? 143 : 130);
259
+ });
260
+ };
261
+ this.shutdownHandler = handler;
262
+ process.on("SIGINT", handler);
263
+ process.on("SIGTERM", handler);
264
+ }
265
+ uninstallShutdownHandler() {
266
+ if (!this.shutdownHandler)
267
+ return;
268
+ process.off("SIGINT", this.shutdownHandler);
269
+ process.off("SIGTERM", this.shutdownHandler);
270
+ this.shutdownHandler = null;
271
+ }
272
+ /**
273
+ * Best-effort drain on signal. Mirrors the orderly onEnd path but
274
+ * swallows every error - we never want to throw inside a signal
275
+ * handler because Node prints raw stack traces otherwise.
276
+ *
277
+ * Exposed for tests so they can drive the shutdown without raising
278
+ * a real signal in the vitest process.
279
+ */
280
+ async gracefulShutdown() {
281
+ try {
282
+ this.flushPendingScreenshots();
283
+ }
284
+ catch {
285
+ // ignore
286
+ }
287
+ try {
288
+ await this.engine.commitUpdates();
289
+ }
290
+ catch {
291
+ // ignore
292
+ }
293
+ try {
294
+ const entries = this.isCi() ? [] : this.readLedger(this.cwd);
295
+ const reportHtmlPath = this.resolveReportPath(this.cwd);
296
+ if (entries.length > 0 || reportHtmlPath) {
297
+ this.printReview({ entries, reportHtmlPath });
298
+ }
299
+ }
300
+ catch {
301
+ // ignore
302
+ }
303
+ try {
304
+ this.clearLedger(this.cwd);
305
+ }
306
+ catch {
307
+ // ignore
308
+ }
309
+ }
310
+ // ─────────────────────────────────────────────────────────────
311
+ // Internals (exposed for testing - prefixed underscore is the
222
312
  // convention used elsewhere in the codebase for proxy back-doors).
223
313
  // ─────────────────────────────────────────────────────────────
224
314
  /**
225
315
  * Walk every buffered pending screenshot and try to attach it to a
226
316
  * now-existing FailedEvent. Successfully-attached entries are
227
317
  * removed; unmatched entries are dropped (the matching FailedEvent
228
- * never arrived most likely worker crashed before the engine
318
+ * never arrived - most likely worker crashed before the engine
229
319
  * could record one).
230
320
  *
231
321
  * Returns the number of FailedEvents touched.
@@ -248,11 +338,11 @@ class SelaReporter {
248
338
  }
249
339
  return total;
250
340
  }
251
- /** Test hook read-only snapshot of recorded failures. */
341
+ /** Test hook - read-only snapshot of recorded failures. */
252
342
  getRecordedFailures() {
253
343
  return this.failures.slice();
254
344
  }
255
- /** Test hook number of screenshots still waiting for a FailedEvent. */
345
+ /** Test hook - number of screenshots still waiting for a FailedEvent. */
256
346
  getPendingScreenshotCount() {
257
347
  return this.pendingScreenshots.size;
258
348
  }
@@ -287,7 +377,7 @@ class SelaReporter {
287
377
  const contentType = (att.contentType ?? "").toLowerCase();
288
378
  const looksLikePng = contentType.includes("png") ||
289
379
  (att.name ?? "").toLowerCase().includes("screenshot") ||
290
- ((att.path ?? "").toLowerCase().endsWith(".png"));
380
+ (att.path ?? "").toLowerCase().endsWith(".png");
291
381
  if (!looksLikePng)
292
382
  continue;
293
383
  // Playwright >= 1.46 sometimes inlines the body for small images.
@@ -303,7 +393,7 @@ class SelaReporter {
303
393
  return bytes.toString("base64");
304
394
  }
305
395
  catch {
306
- // Temp file already gone nothing we can do.
396
+ // Temp file already gone - nothing we can do.
307
397
  }
308
398
  }
309
399
  }
@@ -323,6 +413,16 @@ function defaultIsCi() {
323
413
  const v = String(raw).trim().toLowerCase();
324
414
  return v !== "" && v !== "0" && v !== "false";
325
415
  }
416
+ /**
417
+ * Default HTML report locator. Returns the absolute path when
418
+ * `<cwd>/sela-report.html` exists on disk after `commitUpdates()` has
419
+ * had its chance to flush, otherwise null so the printer can skip the
420
+ * "Insights report:" footer entirely.
421
+ */
422
+ function defaultResolveReportPath(cwd) {
423
+ const candidate = path.join(cwd, "sela-report.html");
424
+ return fs.existsSync(candidate) ? candidate : null;
425
+ }
326
426
  // Default export so Playwright can resolve `reporter: [['sela-core/reporter']]`
327
427
  // without needing the consumer to spell out the named import.
328
428
  exports.default = SelaReporter;
@@ -1,6 +1,9 @@
1
1
  import { SelectorSegment } from "./LLMService";
2
2
  import { AdvisoryBuffer } from "./HealingAdvisory";
3
3
  import type { SmartChainSegment } from "./LLMService";
4
+ import { TraceOutcome } from "./TraceBackEngine";
5
+ import { Decision } from "./DecisionEngine";
6
+ import { FileBatch, ApplyOutcome, ApplyOptions } from "./MutationApplier";
4
7
  export interface ASTUpdateResult {
5
8
  success: boolean;
6
9
  reason: string;
@@ -21,14 +24,55 @@ interface CallerContext {
21
24
  filePath: string;
22
25
  line: number;
23
26
  }
27
+ export interface ComposeHealInput {
28
+ filePath: string;
29
+ /** 1-based line of the failing call-site. */
30
+ line: number;
31
+ /** 0-based column; when omitted the first non-whitespace char of the line is used. */
32
+ column?: number;
33
+ /**
34
+ * Healed locator EXPRESSION text, e.g. `page.locator(".btn-v2")`. When
35
+ * omitted, it is BUILT from `newSelector` + the traced target's root
36
+ * receiver (internal selectors → idiomatic method form).
37
+ */
38
+ newLocatorExpr?: string;
39
+ /** Raw healed selector string (may be an `internal:` engine selector). */
40
+ newSelector?: string;
41
+ /** Runtime: only the failing test needs the new selector. */
42
+ contextSpecific?: boolean;
43
+ /** Runtime: selector rot is global across all consumers. */
44
+ globalCorrect?: boolean;
45
+ /** When true, write the result via MutationApplier (with the gate). */
46
+ apply?: boolean;
47
+ applyOptions?: ApplyOptions;
48
+ }
49
+ export interface ComposeHealResult {
50
+ kind: "decision" | "abort";
51
+ trace: TraceOutcome;
52
+ decision?: Decision;
53
+ batch?: FileBatch;
54
+ outcome?: ApplyOutcome;
55
+ /** 1-based line of the mutated target node (for report/diff). */
56
+ writtenLine?: number;
57
+ }
24
58
  export declare class ASTSourceUpdater {
25
59
  private project;
26
60
  readonly advisoryBuffer: AdvisoryBuffer;
27
61
  flushAdvisories(): void;
62
+ /**
63
+ * Trace the failing call-site back to its source declaration, decide the
64
+ * mutation strategy (in-place / fork / prompt), and — when `apply` is set —
65
+ * write it to disk through the type-safety gate.
66
+ */
67
+ static composeHeal(input: ComposeHealInput): ComposeHealResult;
68
+ /** Drain-loop entry: apply pre-built batches through the write gate. */
69
+ static applyMutationBatches(batches: FileBatch[], opts?: ApplyOptions): ApplyOutcome[];
70
+ /** Convert a DecisionEngine result into an anchored MutationApplier batch. */
71
+ static decisionToBatch(filePath: string, decision: Decision): FileBatch;
28
72
  /**
29
73
  * Centralised write hook for every ts-morph `saveSync` call in this class.
30
74
  * When `SELA_DRY_RUN` is active the AST mutation stays in memory but the
31
- * on-disk file is left untouched the heal pipeline can still compute a
75
+ * on-disk file is left untouched - the heal pipeline can still compute a
32
76
  * candidate diff via `sourceFile.getFullText()` and the report layer
33
77
  * tags the event with `dryRun: true`.
34
78
  */
@@ -39,7 +83,7 @@ export declare class ASTSourceUpdater {
39
83
  matchedLine?: number;
40
84
  };
41
85
  /**
42
- * Convenience helper runs `scanFailFastDirective` and throws the
86
+ * Convenience helper - runs `scanFailFastDirective` and throws the
43
87
  * canonical SelaError when the directive is present. Used by SelaEngine
44
88
  * as the very first gate inside `heal()`.
45
89
  */
@@ -67,7 +111,7 @@ export declare class ASTSourceUpdater {
67
111
  /**
68
112
  * Guard: returns false when replacing oldNode with proposedNewText would
69
113
  * substitute a hardcoded string literal for an Identifier or
70
- * PropertyAccessExpression which is the definition-site mutation bug.
114
+ * PropertyAccessExpression - which is the definition-site mutation bug.
71
115
  * All other replacements are allowed.
72
116
  */
73
117
  private static isSafeReplacement;
@@ -86,6 +130,7 @@ export declare class ASTSourceUpdater {
86
130
  private lineToOffset;
87
131
  resolveFilePath(raw: string): string | null;
88
132
  private semanticDispatch;
133
+ private applyDefinitionSiteHeal;
89
134
  private handleIdentifierArg;
90
135
  private handlePropertyAccessArg;
91
136
  private handleTemplateLiteralArg;
@@ -1 +1 @@
1
- {"version":3,"file":"ASTSourceUpdater.d.ts","sourceRoot":"","sources":["../../src/services/ASTSourceUpdater.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ/C,OAAO,EAAE,cAAc,EAAgB,MAAM,mBAAmB,CAAC;AAOjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMtD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kGAAkG;IAClG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wEAAwE;IACxE,cAAc,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AA66DD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAU;IACzB,QAAQ,CAAC,cAAc,iBAAwB;IAE/C,eAAe,IAAI,IAAI;IAIvB;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAqBvB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG;QAC5C,QAAQ,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB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