sela-core 1.0.7 → 1.0.8

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 (114) hide show
  1. package/dist/cli/ErrorHandler.d.ts +1 -1
  2. package/dist/cli/ErrorHandler.js +14 -14
  3. package/dist/cli/commands/bulk.d.ts +1 -1
  4. package/dist/cli/commands/bulk.d.ts.map +1 -1
  5. package/dist/cli/commands/bulk.js +51 -33
  6. package/dist/cli/commands/init.d.ts +1 -1
  7. package/dist/cli/commands/init.d.ts.map +1 -1
  8. package/dist/cli/commands/init.js +26 -18
  9. package/dist/cli/commands/showReport.d.ts +1 -1
  10. package/dist/cli/commands/showReport.d.ts.map +1 -1
  11. package/dist/cli/commands/showReport.js +12 -10
  12. package/dist/cli/commands/status.d.ts +1 -1
  13. package/dist/cli/commands/status.d.ts.map +1 -1
  14. package/dist/cli/commands/status.js +8 -8
  15. package/dist/cli/commands/sync.d.ts +1 -1
  16. package/dist/cli/commands/sync.d.ts.map +1 -1
  17. package/dist/cli/commands/sync.js +38 -30
  18. package/dist/cli/index.js +9 -9
  19. package/dist/cli/ui/DnaTable.d.ts +1 -1
  20. package/dist/cli/ui/DnaTable.d.ts.map +1 -1
  21. package/dist/cli/ui/DnaTable.js +23 -16
  22. package/dist/cli/ui/RefactorWizard.d.ts +3 -3
  23. package/dist/cli/ui/RefactorWizard.d.ts.map +1 -1
  24. package/dist/cli/ui/RefactorWizard.js +108 -82
  25. package/dist/config/ConfigLoader.d.ts +2 -2
  26. package/dist/config/ConfigLoader.d.ts.map +1 -1
  27. package/dist/config/ConfigLoader.js +15 -15
  28. package/dist/config/DryRunGuard.d.ts +1 -1
  29. package/dist/config/DryRunGuard.js +7 -7
  30. package/dist/config/SelaConfig.d.ts +12 -16
  31. package/dist/config/SelaConfig.d.ts.map +1 -1
  32. package/dist/config/SelaConfig.js +32 -26
  33. package/dist/engine/HealingRegistry.d.ts +1 -1
  34. package/dist/engine/HealingRegistry.js +3 -3
  35. package/dist/engine/SelaEngine.d.ts +1 -1
  36. package/dist/engine/SelaEngine.d.ts.map +1 -1
  37. package/dist/engine/SelaEngine.js +63 -49
  38. package/dist/errors/SelaError.d.ts +0 -1
  39. package/dist/errors/SelaError.d.ts.map +1 -1
  40. package/dist/errors/SelaError.js +6 -7
  41. package/dist/fixtures/expectProxy.d.ts +1 -1
  42. package/dist/fixtures/expectProxy.js +11 -11
  43. package/dist/fixtures/index.js +14 -14
  44. package/dist/fixtures/proxyTag.d.ts +1 -1
  45. package/dist/fixtures/proxyTag.js +3 -3
  46. package/dist/index.d.ts +8 -8
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +4 -4
  49. package/dist/reporter/SelaReporter.d.ts +45 -12
  50. package/dist/reporter/SelaReporter.d.ts.map +1 -1
  51. package/dist/reporter/SelaReporter.js +139 -39
  52. package/dist/services/ASTSourceUpdater.d.ts +3 -3
  53. package/dist/services/ASTSourceUpdater.d.ts.map +1 -1
  54. package/dist/services/ASTSourceUpdater.js +92 -68
  55. package/dist/services/ArgumentTypeAnalyzer.js +7 -7
  56. package/dist/services/BlastRadiusAnalyzer.d.ts.map +1 -1
  57. package/dist/services/BlastRadiusAnalyzer.js +5 -2
  58. package/dist/services/ChainValidator.js +22 -22
  59. package/dist/services/CrossFileHealer.js +7 -7
  60. package/dist/services/DefinitionTracer.d.ts +1 -1
  61. package/dist/services/DefinitionTracer.d.ts.map +1 -1
  62. package/dist/services/DefinitionTracer.js +28 -13
  63. package/dist/services/DnaEditorService.d.ts +2 -2
  64. package/dist/services/DnaEditorService.d.ts.map +1 -1
  65. package/dist/services/DnaEditorService.js +81 -62
  66. package/dist/services/DnaIndexService.d.ts +1 -1
  67. package/dist/services/DnaIndexService.d.ts.map +1 -1
  68. package/dist/services/DnaIndexService.js +14 -14
  69. package/dist/services/HealReportService.d.ts +6 -6
  70. package/dist/services/HealReportService.d.ts.map +1 -1
  71. package/dist/services/HealReportService.js +33 -29
  72. package/dist/services/HealingAdvisory.js +1 -1
  73. package/dist/services/HealingCacheService.d.ts +8 -8
  74. package/dist/services/HealingCacheService.d.ts.map +1 -1
  75. package/dist/services/HealingCacheService.js +24 -24
  76. package/dist/services/HealthReportService.d.ts +1 -1
  77. package/dist/services/HealthReportService.d.ts.map +1 -1
  78. package/dist/services/HealthReportService.js +25 -25
  79. package/dist/services/InitializerUpdater.js +2 -2
  80. package/dist/services/IntentAuditor.d.ts.map +1 -1
  81. package/dist/services/IntentAuditor.js +32 -21
  82. package/dist/services/InteractiveReview.d.ts +8 -17
  83. package/dist/services/InteractiveReview.d.ts.map +1 -1
  84. package/dist/services/InteractiveReview.js +31 -124
  85. package/dist/services/LLMService.d.ts +1 -1
  86. package/dist/services/LLMService.js +16 -16
  87. package/dist/services/PRAutomationService.d.ts +2 -2
  88. package/dist/services/PRAutomationService.d.ts.map +1 -1
  89. package/dist/services/PRAutomationService.js +43 -39
  90. package/dist/services/PendingPromptLedger.d.ts +2 -2
  91. package/dist/services/PendingPromptLedger.js +6 -6
  92. package/dist/services/ReportGenerator.d.ts +2 -2
  93. package/dist/services/ReportGenerator.d.ts.map +1 -1
  94. package/dist/services/ReportGenerator.js +5 -5
  95. package/dist/services/SafetyGuard.d.ts +3 -6
  96. package/dist/services/SafetyGuard.d.ts.map +1 -1
  97. package/dist/services/SafetyGuard.js +29 -106
  98. package/dist/services/SnapshotService.js +5 -5
  99. package/dist/services/SourceLinkService.d.ts +2 -2
  100. package/dist/services/SourceLinkService.d.ts.map +1 -1
  101. package/dist/services/SourceLinkService.js +31 -22
  102. package/dist/services/SourceUpdater.d.ts +1 -1
  103. package/dist/services/SourceUpdater.d.ts.map +1 -1
  104. package/dist/services/SourceUpdater.js +27 -26
  105. package/dist/services/TemplateDiffService.d.ts.map +1 -1
  106. package/dist/services/TemplateDiffService.js +18 -15
  107. package/dist/services/WorkspaceSnapshotService.d.ts +6 -6
  108. package/dist/services/WorkspaceSnapshotService.d.ts.map +1 -1
  109. package/dist/services/WorkspaceSnapshotService.js +10 -12
  110. package/dist/types/index.d.ts +1 -1
  111. package/dist/utils/IsolatedDiff.d.ts +2 -2
  112. package/dist/utils/IsolatedDiff.d.ts.map +1 -1
  113. package/dist/utils/IsolatedDiff.js +13 -10
  114. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"PRAutomationService.d.ts","sourceRoot":"","sources":["../../src/services/PRAutomationService.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AAUpC,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,UAAU,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,EAAE,kBAAkB,GAAG,gBAAgB,GAAG,aAAa,GAAG,IAAI,CAAC;IAC9E;;;;OAIG;IACH,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,6EAA6E;IAC7E,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AA2ED,wBAAgB,YAAY,CAAC,GAAG,GAAE,MAAsB,GAAG,UAAU,CA8EpE;AAMD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,oBAAoB,EACzB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,EAAE,WA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 +93,7 @@ function isSelaHealBranch(branch) {
93
93
  * Resolve the repo's default integration branch.
94
94
  * 1. origin/HEAD symbolic-ref (set by `git clone`).
95
95
  * 2. First existing local ref among: main, master, develop, dev.
96
- * Returns null if none found caller must handle that.
96
+ * Returns null if none found - caller must handle that.
97
97
  */
98
98
  function findDefaultBranch(cwd) {
99
99
  const headRef = sh("git symbolic-ref refs/remotes/origin/HEAD", cwd);
@@ -124,7 +124,7 @@ function detectBranch(cwd = process.cwd()) {
124
124
  const ghRefName = process.env.GITHUB_REF_NAME; // current branch on push, or "<n>/merge" on PR
125
125
  const ghEventName = process.env.GITHUB_EVENT_NAME;
126
126
  const ghRef = process.env.GITHUB_REF; // "refs/pull/123/merge"
127
- // Prefer HEAD_REF on PRs REF_NAME is the synthetic merge ref.
127
+ // Prefer HEAD_REF on PRs - REF_NAME is the synthetic merge ref.
128
128
  if (ghHeadRef && ghHeadRef.length > 0 && !isSelaHealBranch(ghHeadRef)) {
129
129
  const prNumber = (() => {
130
130
  const m = ghRef?.match(/refs\/pull\/(\d+)\//);
@@ -175,11 +175,11 @@ function detectBranch(cwd = process.cwd()) {
175
175
  if (isSelaHealBranch(localBranch)) {
176
176
  const fallback = findDefaultBranch(cwd);
177
177
  if (fallback) {
178
- console.warn(`[Sela PR] ⚠️ HEAD is on '${localBranch}' (sela patch branch) ` +
178
+ console.warn(`[Sela PR] ⚠️ HEAD is on '${localBranch}' (sela patch branch) - ` +
179
179
  `using '${fallback}' as PR base instead.`);
180
180
  return { branch: fallback, isPR: false, prNumber: null, source: "git" };
181
181
  }
182
- console.warn(`[Sela PR] ⚠️ HEAD is on '${localBranch}' and no default branch found ` +
182
+ console.warn(`[Sela PR] ⚠️ HEAD is on '${localBranch}' and no default branch found - ` +
183
183
  `skipping PR automation to avoid self-targeting.`);
184
184
  return { branch: null, isPR: false, prNumber: null, source: "none" };
185
185
  }
@@ -190,7 +190,7 @@ function detectBranch(cwd = process.cwd()) {
190
190
  // ═══════════════════════════════════════════════════════════════════
191
191
  function decideEffectiveStrategy(cfg, branch, heals) {
192
192
  // Compute MIN across only the heals that reported a finite numeric
193
- // confidence. When *no* heal carried one, the result is `undefined`
193
+ // confidence. When *no* heal carried one, the result is `undefined` -
194
194
  // surfaced as "n/a" in reports rather than synthesised as 100% (which
195
195
  // would silently mask the absence of evidence) or 0% (which would
196
196
  // incorrectly force a downgrade for every clean run on Sonnet).
@@ -219,7 +219,7 @@ function decideEffectiveStrategy(cfg, branch, heals) {
219
219
  downgradeReason: "PROTECTED_BRANCH",
220
220
  };
221
221
  }
222
- // Rule 2: low AI confidence only triggers when the measured min is
222
+ // Rule 2: low AI confidence - only triggers when the measured min is
223
223
  // actually below the threshold. Missing confidence is "unknown", not
224
224
  // "zero", so we do NOT downgrade purely on absence.
225
225
  if (cfg.reviewThresholds.minConfidenceForDirectCommit > 0 &&
@@ -231,7 +231,7 @@ function decideEffectiveStrategy(cfg, branch, heals) {
231
231
  downgradeReason: "LOW_CONFIDENCE",
232
232
  };
233
233
  }
234
- // Rule 3: low auditor score same "absence ≠ zero" rule as Rule 2.
234
+ // Rule 3: low auditor score - same "absence ≠ zero" rule as Rule 2.
235
235
  if (cfg.reviewThresholds.minAuditorScoreForDirectCommit > 0 &&
236
236
  typeof minAud === "number" &&
237
237
  minAud < cfg.reviewThresholds.minAuditorScoreForDirectCommit) {
@@ -285,7 +285,7 @@ function stripDiffPreamble(raw) {
285
285
  }
286
286
  function buildDefaultBody(heals, branchInfo, reportLink, decision) {
287
287
  const lines = [];
288
- lines.push(`# 🤖 Sela Insights Automation Suite Healed!`);
288
+ lines.push(`# 🤖 Sela Insights - Automation Suite Healed!`);
289
289
  lines.push("");
290
290
  lines.push(`Sela kept your pipeline running by healing ${heals.length} broken locator(s).`);
291
291
  lines.push("");
@@ -301,12 +301,12 @@ function buildDefaultBody(heals, branchInfo, reportLink, decision) {
301
301
  lines.push(`## 💻 Per-Heal Diff`);
302
302
  for (const h of heals) {
303
303
  const lineRef = h.newLineNumber ?? h.sourceLine;
304
- lines.push(`### \`${h.sourceFile}:${lineRef}\` ${h.testTitle ?? "(no test title)"}`);
304
+ lines.push(`### \`${h.sourceFile}:${lineRef}\` - ${h.testTitle ?? "(no test title)"}`);
305
305
  lines.push("");
306
306
  lines.push("```diff");
307
307
  if (h.gitUnifiedDiff && h.gitUnifiedDiff.trim().length > 0) {
308
308
  // Emit the real git diff verbatim. This natively handles cross-file
309
- // healing, multi-line edits, and template-literal changes none of
309
+ // healing, multi-line edits, and template-literal changes - none of
310
310
  // which the legacy single-line -/+ pair could represent.
311
311
  lines.push(stripDiffPreamble(h.gitUnifiedDiff));
312
312
  }
@@ -333,14 +333,14 @@ function buildDefaultBody(heals, branchInfo, reportLink, decision) {
333
333
  * Clean-Room execution lifecycle.
334
334
  *
335
335
  * The legacy flow committed the developer's whole dirty working tree onto
336
- * the PR branch polluting reviewers with `test.only`, commented debug
336
+ * the PR branch - polluting reviewers with `test.only`, commented debug
337
337
  * blocks, etc. This refactor isolates Sela's specific AST changes onto an
338
338
  * ephemeral branch, leaves the developer's local workspace byte-identical
339
339
  * to its pre-Sela state, and is wrapped in a try/finally that restores
340
340
  * the workspace even on mid-flight crashes.
341
341
  */
342
342
  async function execute(cfg, decision, heals, branchInfo, ctx,
343
- /** Injectable for tests defaults to the module singleton. */
343
+ /** Injectable for tests - defaults to the module singleton. */
344
344
  workspace = WorkspaceSnapshotService_1.sharedWorkspaceSnapshot) {
345
345
  const result = {
346
346
  effective: decision.effective,
@@ -349,33 +349,33 @@ workspace = WorkspaceSnapshotService_1.sharedWorkspaceSnapshot) {
349
349
  errors: [],
350
350
  };
351
351
  if (decision.effective === "readOnly") {
352
- console.log(`[Sela PR] 🛡️ readOnly no git operations performed.`);
352
+ console.log(`[Sela PR] 🛡️ readOnly - no git operations performed.`);
353
353
  if (ctx.reportHtmlPath) {
354
354
  console.log(`[Sela PR] Report artifact: ${ctx.reportHtmlPath}`);
355
355
  }
356
356
  return result;
357
357
  }
358
358
  if (heals.length === 0) {
359
- console.log(`[Sela PR] No HEALED events skipping git operations.`);
359
+ console.log(`[Sela PR] No HEALED events - skipping git operations.`);
360
360
  return result;
361
361
  }
362
362
  if (!gitAvailable(ctx.cwd)) {
363
363
  result.errors.push("git CLI not available");
364
- console.warn(`[Sela PR] ⚠️ git CLI not available skipping.`);
364
+ console.warn(`[Sela PR] ⚠️ git CLI not available - skipping.`);
365
365
  return result;
366
366
  }
367
367
  if (isDetachedHead(ctx.cwd)) {
368
368
  result.errors.push("detached HEAD");
369
- console.warn(`[Sela PR] ⚠️ Detached HEAD skipping git operations.`);
369
+ console.warn(`[Sela PR] ⚠️ Detached HEAD - skipping git operations.`);
370
370
  return result;
371
371
  }
372
372
  const mutatedSnaps = workspace.getMutatedSnapshots();
373
373
  if (mutatedSnaps.length === 0) {
374
374
  result.errors.push("no mutated files tracked");
375
- console.warn(`[Sela PR] ⚠️ WorkspaceSnapshotService reports no mutated files skipping.`);
375
+ console.warn(`[Sela PR] ⚠️ WorkspaceSnapshotService reports no mutated files - skipping.`);
376
376
  return result;
377
377
  }
378
- // Render title / body up front needed by all branches below.
378
+ // Render title / body up front - needed by all branches below.
379
379
  const first = heals[0];
380
380
  const titleVars = {
381
381
  testName: first.testTitle ?? "automation",
@@ -410,7 +410,7 @@ workspace = WorkspaceSnapshotService_1.sharedWorkspaceSnapshot) {
410
410
  if (decision.effective === "pr" || decision.effective === "draftPR") {
411
411
  if (!ghAvailable(ctx.cwd)) {
412
412
  result.errors.push("gh CLI not available");
413
- console.warn(`[Sela PR] ⚠️ gh CLI not installed cannot open PR. Run \`gh auth login\` after install.`);
413
+ console.warn(`[Sela PR] ⚠️ gh CLI not installed - cannot open PR. Run \`gh auth login\` after install.`);
414
414
  return result;
415
415
  }
416
416
  return runCleanRoom({
@@ -428,25 +428,25 @@ workspace = WorkspaceSnapshotService_1.sharedWorkspaceSnapshot) {
428
428
  return result;
429
429
  }
430
430
  async function runCleanRoom(args) {
431
- const { mode, cfg, ctx, mutatedSnaps, title, body, branchInfo, decision, result } = args;
431
+ const { mode, cfg, ctx, mutatedSnaps, title, body, branchInfo, decision, result, } = args;
432
432
  const id = String(Date.now());
433
433
  const stashLabel = `sela:clean-room-${id}`;
434
434
  const originalBranch = currentBranch(ctx.cwd);
435
435
  const targetBranch = mode === "directCommit"
436
436
  ? originalBranch
437
437
  : render(cfg.branchNameTemplate, { id, timestamp: id });
438
- // Lifecycle state used by the finally{} restoration block.
438
+ // Lifecycle state - used by the finally{} restoration block.
439
439
  let didRestoreOriginal = false;
440
440
  let didStash = false;
441
441
  let didSwitchToTarget = false;
442
442
  let didCommit = false;
443
443
  try {
444
- // 1. State Checkpoint rewind developer's mutated files to pre-Sela
444
+ // 1. State Checkpoint - rewind developer's mutated files to pre-Sela
445
445
  // state on disk. Other dirty files (unrelated to Sela) stay where
446
446
  // they are; the subsequent stash will sweep them up.
447
447
  workspaceRestoreOriginal(mutatedSnaps);
448
448
  didRestoreOriginal = true;
449
- // 2. Branch Isolation stash everything (tracked + untracked) so the
449
+ // 2. Branch Isolation - stash everything (tracked + untracked) so the
450
450
  // worktree mirrors HEAD when we switch / branch off.
451
451
  const stash = sh(`git stash push -u -m ${shellQuote(stashLabel)}`, ctx.cwd);
452
452
  if (stash.ok) {
@@ -463,7 +463,7 @@ async function runCleanRoom(args) {
463
463
  }
464
464
  didSwitchToTarget = true;
465
465
  }
466
- // 3. Targeted Hunk Patching apply ONLY Sela's blocks to each file's
466
+ // 3. Targeted Hunk Patching - apply ONLY Sela's blocks to each file's
467
467
  // clean HEAD content. Refuses to write if dirty edits collide with
468
468
  // Sela's mutation site (block not found / not unique).
469
469
  for (const snap of mutatedSnaps) {
@@ -517,7 +517,7 @@ async function runCleanRoom(args) {
517
517
  console.warn(`[Sela PR] ⚠️ Clean-room flow failed: ${err?.message ?? err}`);
518
518
  }
519
519
  finally {
520
- // 6. Workspace Restoration ALWAYS attempt, even on mid-flight crash.
520
+ // 6. Workspace Restoration - ALWAYS attempt, even on mid-flight crash.
521
521
  // Order matters:
522
522
  // a) Switch back to the developer's original branch (if we left it).
523
523
  // b) Pop the stash to restore the dirty pre-Sela working tree.
@@ -537,7 +537,7 @@ async function runCleanRoom(args) {
537
537
  }
538
538
  }
539
539
  if (didRestoreOriginal) {
540
- // Belt-and-braces every tracked snapshot back to its dirty
540
+ // Belt-and-braces - every tracked snapshot back to its dirty
541
541
  // pre-Sela state. No-op if stash pop already did the job.
542
542
  workspaceRestoreOriginal(mutatedSnaps);
543
543
  }
@@ -565,7 +565,9 @@ function openPullRequest(args) {
565
565
  ? cfg.labels.map((l) => `--label ${shellQuote(l)}`).join(" ")
566
566
  : "";
567
567
  const draftFlag = mode === "draftPR" ? "--draft" : "";
568
- const baseFlag = branchInfo.branch ? `--base ${shellQuote(branchInfo.branch)}` : "";
568
+ const baseFlag = branchInfo.branch
569
+ ? `--base ${shellQuote(branchInfo.branch)}`
570
+ : "";
569
571
  const prCmd = `gh pr create ${draftFlag} ${baseFlag} ` +
570
572
  `--title ${shellQuote(title)} ` +
571
573
  `--body-file ${shellQuote(bodyFile)} ` +
@@ -614,16 +616,16 @@ function workspaceRestoreOriginal(snaps) {
614
616
  function applyMutationToClean(snap) {
615
617
  const after = snap.contentAfter ?? "";
616
618
  // File didn't exist on HEAD (created by Sela or untracked). Write the
617
- // post-mutation content directly there's no clean base to merge into.
619
+ // post-mutation content directly - there's no clean base to merge into.
618
620
  if (snap.headContent === null) {
619
621
  return { ok: true, result: after };
620
622
  }
621
- // No dirty edits `headContent === contentBefore`, so the mutation
623
+ // No dirty edits - `headContent === contentBefore`, so the mutation
622
624
  // applies cleanly as a 1:1 string equivalence.
623
625
  if (snap.headContent === snap.contentBefore) {
624
626
  return { ok: true, result: after };
625
627
  }
626
- // Dirty edits present extract Sela's specific change blocks and
628
+ // Dirty edits present - extract Sela's specific change blocks and
627
629
  // re-apply them against the clean HEAD content via unique substring
628
630
  // replacement. Fails loudly when the dirty edits overlap Sela's site.
629
631
  const blocks = (0, IsolatedDiff_1.extractChangeBlocks)(snap.contentBefore, after);
@@ -636,7 +638,7 @@ function applyMutationToClean(snap) {
636
638
  * CI adapters (GitHub Actions, GitLab, Jenkins) often run with no global
637
639
  * git identity. `git commit` then fails with `Please tell me who you are`,
638
640
  * tanking the whole heal pipeline. Plant a sela bot identity for THIS
639
- * commit only when no `user.email` / `user.name` is configured never
641
+ * commit only when no `user.email` / `user.name` is configured - never
640
642
  * overwrite an existing identity.
641
643
  */
642
644
  function configureGitIdentityForCI(cwd) {
@@ -662,18 +664,18 @@ function configureGitIdentityForCI(cwd) {
662
664
  async function handleBugDetected(action, events, branchInfo, ctx) {
663
665
  if (events.length === 0)
664
666
  return;
665
- console.warn(`\n[Sela Protection] ⚠️ ${events.length} potential regression(s) detected auto-fix blocked.`);
667
+ console.warn(`\n[Sela Protection] ⚠️ ${events.length} potential regression(s) detected - auto-fix blocked.`);
666
668
  for (const e of events) {
667
- console.warn(` • ${e.sourceFile}:${e.sourceLine} ${e.reason} (auditor: ${e.auditor?.verdict ?? "n/a"})`);
669
+ console.warn(` • ${e.sourceFile}:${e.sourceLine} - ${e.reason} (auditor: ${e.auditor?.verdict ?? "n/a"})`);
668
670
  }
669
671
  if (action === "failCI") {
670
- console.warn(`[Sela Protection] 🔴 onBugDetected='failCI' setting process.exitCode = 1`);
672
+ console.warn(`[Sela Protection] 🔴 onBugDetected='failCI' - setting process.exitCode = 1`);
671
673
  process.exitCode = 1;
672
674
  return;
673
675
  }
674
676
  if (action === "createIssue") {
675
677
  if (!ghAvailable(ctx.cwd)) {
676
- console.warn(`[Sela Protection] ⚠️ gh CLI unavailable cannot create issue.`);
678
+ console.warn(`[Sela Protection] ⚠️ gh CLI unavailable - cannot create issue.`);
677
679
  return;
678
680
  }
679
681
  for (const e of events) {
@@ -706,7 +708,9 @@ async function handleBugDetected(action, events, branchInfo, ctx) {
706
708
  try {
707
709
  fs.unlinkSync(bodyFile);
708
710
  }
709
- catch { /* ignore */ }
711
+ catch {
712
+ /* ignore */
713
+ }
710
714
  if (!r.ok) {
711
715
  console.warn(`[Sela Protection] ⚠️ gh issue create failed: ${r.stderr}`);
712
716
  }
@@ -718,11 +722,11 @@ async function handleBugDetected(action, events, branchInfo, ctx) {
718
722
  }
719
723
  if (action === "labelOnly") {
720
724
  if (!ghAvailable(ctx.cwd)) {
721
- console.warn(`[Sela Protection] ⚠️ gh CLI unavailable cannot label PR.`);
725
+ console.warn(`[Sela Protection] ⚠️ gh CLI unavailable - cannot label PR.`);
722
726
  return;
723
727
  }
724
728
  if (!branchInfo.isPR || !branchInfo.prNumber) {
725
- console.warn(`[Sela Protection] ⚠️ Not running on a PR labelOnly skipped.`);
729
+ console.warn(`[Sela Protection] ⚠️ Not running on a PR - labelOnly skipped.`);
726
730
  return;
727
731
  }
728
732
  const labelCmd = `gh pr edit ${branchInfo.prNumber} --add-label sela-bug-detected`;
@@ -742,7 +746,7 @@ async function handleBugDetected(action, events, branchInfo, ctx) {
742
746
  }
743
747
  }
744
748
  // ═══════════════════════════════════════════════════════════════════
745
- // SHELL QUOTING cross-platform (POSIX single-quote escape;
749
+ // SHELL QUOTING - cross-platform (POSIX single-quote escape;
746
750
  // on Windows execSync uses cmd.exe which handles double-quotes natively).
747
751
  // ═══════════════════════════════════════════════════════════════════
748
752
  function shellQuote(s) {
@@ -17,7 +17,7 @@ export interface PendingPromptEntry {
17
17
  export declare function ledgerDir(cwd: string): string;
18
18
  /**
19
19
  * Persist this worker's mutated snapshots to a fresh JSON file under
20
- * `<cwd>/.sela/pending-prompts/`. Idempotent within a single worker
20
+ * `<cwd>/.sela/pending-prompts/`. Idempotent within a single worker -
21
21
  * subsequent calls in the same process append a NEW file (rare in
22
22
  * practice but keeps the contract simple).
23
23
  *
@@ -33,7 +33,7 @@ export declare function writePendingPromptsLedger(opts: {
33
33
  /**
34
34
  * Drain every per-worker JSON file under the ledger directory and merge
35
35
  * their entries into a single de-duplicated list (keyed by absolutePath).
36
- * The most-recent contentAfter wins on collision that's the disk truth.
36
+ * The most-recent contentAfter wins on collision - that's the disk truth.
37
37
  *
38
38
  * The directory is NOT deleted here so the reporter can inspect entries
39
39
  * before calling `clearPendingPromptsLedger()`.
@@ -11,10 +11,10 @@
11
11
  // Solution: each worker SERIALISES its mutated FileSnapshots to a JSON
12
12
  // file under `<cwd>/.sela/pending-prompts/`, one file per worker process
13
13
  // (keyed by pid + monotonic timestamp). The reporter's onEnd hook reads
14
- // every file in that directory, drives `runInteractiveReview()` against
15
- // the merged list, then deletes the directory.
14
+ // every file in that directory, prints a non-blocking summary via
15
+ // `printHealReview()`, then deletes the directory.
16
16
  //
17
- // CRITICAL: workers MUST NOT call `readline` / block on stdin they have
17
+ // CRITICAL: workers MUST NOT call `readline` / block on stdin - they have
18
18
  // no TTY attached. Blocking the event loop here causes the Playwright
19
19
  // test timeout to fire. This ledger is the boundary between silent
20
20
  // worker-side execution and TTY-bound reporter-side prompting.
@@ -69,7 +69,7 @@ function ledgerDir(cwd) {
69
69
  }
70
70
  /**
71
71
  * Persist this worker's mutated snapshots to a fresh JSON file under
72
- * `<cwd>/.sela/pending-prompts/`. Idempotent within a single worker
72
+ * `<cwd>/.sela/pending-prompts/`. Idempotent within a single worker -
73
73
  * subsequent calls in the same process append a NEW file (rare in
74
74
  * practice but keeps the contract simple).
75
75
  *
@@ -92,7 +92,7 @@ function writePendingPromptsLedger(opts) {
92
92
  /**
93
93
  * Drain every per-worker JSON file under the ledger directory and merge
94
94
  * their entries into a single de-duplicated list (keyed by absolutePath).
95
- * The most-recent contentAfter wins on collision that's the disk truth.
95
+ * The most-recent contentAfter wins on collision - that's the disk truth.
96
96
  *
97
97
  * The directory is NOT deleted here so the reporter can inspect entries
98
98
  * before calling `clearPendingPromptsLedger()`.
@@ -120,7 +120,7 @@ function readPendingPromptsLedger(cwd) {
120
120
  }
121
121
  }
122
122
  catch {
123
- // Corrupt ledger file skip rather than crashing the whole review.
123
+ // Corrupt ledger file - skip rather than crashing the whole review.
124
124
  }
125
125
  }
126
126
  return Array.from(merged.values());
@@ -12,7 +12,7 @@ export interface ReportStats {
12
12
  /**
13
13
  * The canonical JSON payload embedded into sela-report.html and
14
14
  * mirrored verbatim into sela-report.json. Treat this as a public
15
- * contract additive changes only.
15
+ * contract - additive changes only.
16
16
  */
17
17
  export interface ReportData {
18
18
  generatedAt: string;
@@ -44,7 +44,7 @@ export declare class ReportGenerator {
44
44
  */
45
45
  static validateAll(events: ReadonlyArray<unknown>): HealEvent[];
46
46
  /**
47
- * Pure stats computation. No clock, no IO easy to pin in tests.
47
+ * Pure stats computation. No clock, no IO - easy to pin in tests.
48
48
  */
49
49
  static computeStats(events: ReadonlyArray<HealEvent>): ReportStats;
50
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ReportGenerator.d.ts","sourceRoot":"","sources":["../../src/services/ReportGenerator.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EAId,MAAM,qBAAqB,CAAC;AAM7B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,EAAE,WAAW,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAmCX,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CACpD,aAAa,EACb,aAAa,CAAC,MAAM,CAAC,CACtB,CAIA,CAAC;AAsBF,qBAAa,eAAe;IAC1B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MAAM,oBAAoB;;;;CAIvB,CAAC;AAmCX,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAC7C,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAK7C,CAAC;AA0BF,qBAAa,eAAe;IAC1B;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,SAAS;IAuChE;;;OAGG;IACH,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE;IAK/D;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,GAAG,WAAW;IA4BlE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CACb,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAC9B,IAAI,GAAE;QACJ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;KACb,GACL,UAAU;IAYb;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;CAOhD"}
@@ -8,13 +8,13 @@
8
8
  //
9
9
  // Design goals:
10
10
  // 1. SCHEMA ENFORCED. Every event passed through ReportGenerator
11
- // is validated against MANDATORY_FIELDS_BY_KIND a SelaError
11
+ // is validated against MANDATORY_FIELDS_BY_KIND - a SelaError
12
12
  // with subsystem="Report" is thrown for any malformed input.
13
13
  // The HTML template never sees a partial event.
14
14
  //
15
15
  // 2. CONFIDENCE NEVER LEAKS. formatConfidence() and the rendered
16
16
  // `confidenceLabel` field always produce either a "<n>%" string
17
- // or "n/a" never `undefined`, `null`, or a stringified
17
+ // or "n/a" - never `undefined`, `null`, or a stringified
18
18
  // "undefined". The JS embedded in HealReportService already
19
19
  // uses fmtPct() for the same reason; this module is the
20
20
  // authoritative implementation.
@@ -38,7 +38,7 @@ exports.TIME_SAVED_CONSTANTS = {
38
38
  PER_FAILED: 4,
39
39
  };
40
40
  // ───────────────────────────────────────────────────────────────────
41
- // Field manifests mandatory for each event kind
41
+ // Field manifests - mandatory for each event kind
42
42
  //
43
43
  // "Mandatory" = the HTML template will render an unintelligible card
44
44
  // without this field. Anything optional belongs in the interface
@@ -99,7 +99,7 @@ class ReportGenerator {
99
99
  }
100
100
  const ev = event;
101
101
  if (!ev.kind || !VALID_KINDS.has(ev.kind)) {
102
- throwReport(SelaError_1.REPORT_CODES.UNKNOWN_KIND, `Unknown event.kind "${String(ev.kind)}" must be HEALED|FAILED|PROTECTED`, { stableId: ev.stableId });
102
+ throwReport(SelaError_1.REPORT_CODES.UNKNOWN_KIND, `Unknown event.kind "${String(ev.kind)}" - must be HEALED|FAILED|PROTECTED`, { stableId: ev.stableId });
103
103
  }
104
104
  const required = exports.MANDATORY_FIELDS_BY_KIND[ev.kind];
105
105
  for (const field of required) {
@@ -123,7 +123,7 @@ class ReportGenerator {
123
123
  return events;
124
124
  }
125
125
  /**
126
- * Pure stats computation. No clock, no IO easy to pin in tests.
126
+ * Pure stats computation. No clock, no IO - easy to pin in tests.
127
127
  */
128
128
  static computeStats(events) {
129
129
  let healed = 0;
@@ -11,7 +11,7 @@ export interface HealContext {
11
11
  }
12
12
  export interface AIFixSummary {
13
13
  /**
14
- * Raw AI confidence 0-100. `undefined` when the LLM omitted the field
14
+ * Raw AI confidence 0-100. `undefined` when the LLM omitted the field -
15
15
  * SafetyGuard's hard-stop / review-threshold logic treats absence as the
16
16
  * conservative worst case (0) so unverified heals are NOT silently let
17
17
  * through, while downstream report renderers display "n/a".
@@ -24,9 +24,9 @@ export interface AIFixSummary {
24
24
  explanation?: string;
25
25
  /** Live innerText of the new selector fetched directly from the browser. */
26
26
  liveText?: string;
27
- /** Baseline text from the DNA snapshot what the element showed before. */
27
+ /** Baseline text from the DNA snapshot - what the element showed before. */
28
28
  dnaBaselineText?: string;
29
- /** ARIA role from the DNA snapshot used by the Intent Auditor. */
29
+ /** ARIA role from the DNA snapshot - used by the Intent Auditor. */
30
30
  dnaRole?: string;
31
31
  /** Visibility info captured from the candidate element (new selector). */
32
32
  liveVisibility?: VisibilityInfo;
@@ -89,9 +89,6 @@ export declare class SafetyGuard {
89
89
  evaluate(context: HealContext, aiFix: AIFixSummary): Promise<SafetyDecision>;
90
90
  private isSemanticOpposite;
91
91
  classifyFunctionalRole(text: string): FunctionalRole;
92
- computeSemanticSimilarity(a: string, b: string): number;
93
- private levenshteinDistance;
94
- private jaccardSimilarity;
95
92
  }
96
93
  export {};
97
94
  //# sourceMappingURL=SafetyGuard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SafetyGuard.d.ts","sourceRoot":"","sources":["../../src/services/SafetyGuard.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAsB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM1E,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA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