leerness 1.9.392 → 1.9.393

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.393 — 2026-06-06 — whats-new 파서 BUG-fix + _parseChangelogBetween → pure-utils (UR-0025/UR-0094)
4
+
5
+ **🐞 `whats-new` 가 현재 CHANGELOG 형식(`## X — DATE — title`)에서 0건 반환하던 버그 수정 + 파서를 lib/pure-utils.js 로 추출.**
6
+
7
+ ### 배경 (UR-0025 모듈화 중 실사용 버그 발견)
8
+ whats-new 의 순수 파서 `_parseChangelogBetween` 를 pure-utils 로 추출하려다 자체 검증에서 **실사용 버그 2건** 발견(추출은 byte-identical 이라 회귀 아님 — 기존부터 깨져 있었음):
9
+ 1. **헤더 미파싱**: 헤더 꼬리 정규식 `\s*\n` 이 `## X — DATE — title` 의 ` — title` 를 소비 못 해 현재 CHANGELOG 형식에서 **0개 섹션** 반환(`whats-new --from 1.9.388` → 0 versions).
10
+ 2. **body 첫줄 절단**: body 캡처 `([\s\S]*?)(?=^##…|$)` 의 `$` 가 `/m` 모드에서 **줄 끝**과 매칭 → body 가 첫 줄로 잘림(①이 헤더를 막아 가려져 있던 잠재 버그).
11
+
12
+ ### 구현
13
+ - `_parseChangelogBetween` 를 `_parseFeatureGraph` 식 **위치 기반 분할**로 재작성: 헤더 정규식으로 위치 수집 → 다음 헤더(또는 끝)까지 body 전체 slice. `## X` / `## X — DATE` / `## X — DATE — title` 모두 매칭, 다중줄 body 보존.
14
+ - pure-utils 로 추출(738 update 경로 + whats-new 공유) + harness 인라인 제거 + import.
15
+
16
+ ### 검증 (회귀 0)
17
+ - **selftest 138→139 PASS** (reference-equality + `## X — DATE — title` 파싱 + 명령/플래그/파일 추출 + 제목없음 헤더 + 인라인 제거).
18
+ - **E2E 332→333 PASS** (실제 CHANGELOG whats-new `--from 1.9.388` ≥1 versions + 제목있음/없음 헤더 + 다중줄 body).
19
+ - 실측: whats-new --from 1.9.388 = **0 → 4 versions**(1.9.389~392), body 17줄 전체 캡처.
20
+
3
21
  ## 1.9.392 — 2026-06-06 — UR-0025 큰 핸들러 모듈화 4번째: doctor/which → lib/diagnostics.js (DI)
4
22
 
5
23
  **🧩 네 번째 핸들러 모듈 — 진단 명령(doctor/which)을 lib/diagnostics.js 로 분리.**
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > **AI 코딩 에이전트의 거짓 완료·중복·망각·충돌을 막아주는 검수·기억·협업 CLI 하네스.**
4
4
  > **A CLI harness that stops AI coding agents from faking completion, duplicating work, forgetting context, and colliding.**
5
5
 
6
- [![npm](https://img.shields.io/badge/npm-leerness-blue)](https://www.npmjs.com/package/leerness) [![version](https://img.shields.io/badge/version-1.9.392-green)]() [![tests](https://img.shields.io/badge/e2e-332%2F332-success)]() [![selftest](https://img.shields.io/badge/selftest-138-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-85-brightgreen)]() [![providers](https://img.shields.io/badge/AI_providers-10-brightgreen)]() [![license](https://img.shields.io/badge/license-MIT-lightgrey)]()
6
+ [![npm](https://img.shields.io/badge/npm-leerness-blue)](https://www.npmjs.com/package/leerness) [![version](https://img.shields.io/badge/version-1.9.393-green)]() [![tests](https://img.shields.io/badge/e2e-333%2F333-success)]() [![selftest](https://img.shields.io/badge/selftest-139-success)]() [![mcp](https://img.shields.io/badge/MCP--tools-85-brightgreen)]() [![providers](https://img.shields.io/badge/AI_providers-10-brightgreen)]() [![license](https://img.shields.io/badge/license-MIT-lightgrey)]()
7
7
 
8
8
  ```
9
9
  ╔══════════════════════════════════════════════════════════════╗
@@ -471,7 +471,7 @@ MIT — © leerness contributors
471
471
  <!-- leerness:project-readme:start -->
472
472
  ## Leerness Project Harness
473
473
 
474
- 이 프로젝트는 Leerness v1.9.392 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
474
+ 이 프로젝트는 Leerness v1.9.393 하네스를 사용합니다. AI 에이전트는 작업 전 `leerness handoff`로 컨텍스트를 적재하고, 작업 후 `leerness check`/`leerness audit`/`leerness session close`를 수행해야 합니다.
475
475
 
476
476
  ### 정체성 — AI 에이전트 운영 레이어 (UR-0030)
477
477
 
@@ -525,7 +525,7 @@ leerness memory restore decision <date|title>
525
525
 
526
526
  ### MCP server (외부 AI 통합)
527
527
 
528
- Leerness v1.9.392는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **85개 도구**를 노출:
528
+ Leerness v1.9.393는 stdio JSON-RPC MCP server를 내장합니다 — Claude Code · Cursor · Codex CLI 등 외부 AI에 **85개 도구**를 노출:
529
529
 
530
530
  ```jsonc
531
531
  // 카테고리별
@@ -546,7 +546,7 @@ Leerness v1.9.392는 stdio JSON-RPC MCP server를 내장합니다 — Claude Cod
546
546
  `<<autonomous-loop-dynamic>>` 신호만 보내면 AI가:
547
547
  1) 다음 라운드 후보 선정 → 2) 코드 변경 → 3) stress-v* 신규 작성 + 누적 회귀 → 4) e2e 219/219 → 5) npm pack + git tag + GitHub release → 6) main 자동 push (1.9.140+) → 7) session close → 8) 다음 라운드 예약.
548
548
 
549
- 현재 누적: **70 라운드 (1.9.40 → 1.9.392)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
549
+ 현재 누적: **70 라운드 (1.9.40 → 1.9.393)** · 매 라운드 GitHub release/태그 생성 · _reports/는 비공개 보존.
550
550
 
551
551
  ### 성능 가이드 (1.9.140 측정)
552
552
 
@@ -584,6 +584,6 @@ leerness release pack --close --auto-main-push
584
584
  - `.harness/session-handoff.md`: 다음 세션 인수인계 (자동 작성)
585
585
  - `.harness/lessons.md` / `decisions.md` / `rules.md`: 영구 메모리 (5 surface)
586
586
 
587
- Last synced by Leerness v1.9.392: 2026-06-06
587
+ Last synced by Leerness v1.9.393: 2026-06-06
588
588
  <!-- leerness:project-readme:end -->
589
589
 
package/bin/harness.js CHANGED
@@ -24,13 +24,14 @@ const { _isSecretKey, _isPlaceholderSecret, _looksSecretLike, _mergeLines, _merg
24
24
  _decisionsFromMd, _renderDecisionsMd, _renderLessonsMd,
25
25
  _withBuiltinSource, _esc, _roadmapTokenStyles, _parseSkillMd,
26
26
  _migrationGuideText, _parseContractSpec, _gitignoreMatch,
27
- _featureGraphTemplate, _parseFeatureGraph, _nextFeatureId, _featureBlock, _featureImpactBfs } = require('../lib/pure-utils'); // 1.9.318~391 (UR-0025/0053/0075/0086/0087): 순수 유틸 모듈 분리
27
+ _featureGraphTemplate, _parseFeatureGraph, _nextFeatureId, _featureBlock, _featureImpactBfs,
28
+ _parseChangelogBetween } = require('../lib/pure-utils'); // 1.9.318~393 (UR-0025/0053/0075/0086/0087): 순수 유틸 모듈 분리
28
29
  // 1.9.304 (UR-0025): 순수 분석/검증 함수 모듈 분리.
29
30
  const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInGit, _epistemicHonestyCheck } = require('../lib/analyzers');
30
31
  // 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
31
32
  const { CAPABILITY_SURFACE, POWERFUL_COMMANDS, ADAPTERS, REUSE_CATEGORIES, REUSE_CHECKLIST, _DEFAULT_PLATFORM_CONSTRAINTS, _DEFAULT_DOMAIN_CATALOG, _LSP_LANG_PATTERNS, OPTIMISM_PATTERNS, BUILT_IN_PERSONAS, STRINGS, BUILTIN_CATALOG, ROADMAP_STATUS_LABEL, ROADMAP_STATUS_COLOR, SECRET_PATTERNS, MERGE_OVERWRITE_FILES, MINIMAL_SKIP_KEYS, REQUIRED_WORKSPACE_FILES, KEYWORD_STOPWORDS, SKILL_CATALOG_PRESETS } = require('../lib/catalogs'); // 1.9.344/368/369 (UR-0025): catalog 분리 (MERGE_OVERWRITE_FILES/MINIMAL_SKIP_KEYS 포함)
32
33
 
33
- const VERSION = '1.9.392';
34
+ const VERSION = '1.9.393';
34
35
 
35
36
  // 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
36
37
  // 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
@@ -2996,6 +2997,7 @@ function _selfTestCases() {
2996
2997
  { name: 'UR-0025: feature-graph 순수 코어(_featureGraphTemplate/_parseFeatureGraph/_nextFeatureId/_featureBlock) → pure-utils + round-trip (1.9.390)', run: () => { const m = require('../lib/pure-utils'); const refOk = m._parseFeatureGraph === _parseFeatureGraph && m._featureGraphTemplate === _featureGraphTemplate && m._nextFeatureId === _nextFeatureId && m._featureBlock === _featureBlock; const tmpl = m._featureGraphTemplate(); const tmplOk = tmpl.includes('Feature Graph') && tmpl.includes('## Nodes'); const nodes = m._parseFeatureGraph('## F-0001 Auth\n- depends-on: F-0002\n- affects: F-0003\n- files: a.js\n'); const parseOk = nodes.length === 1 && nodes[0].id === 'F-0001' && nodes[0].title === 'Auth' && nodes[0].dependsOn[0] === 'F-0002' && nodes[0].affects[0] === 'F-0003' && nodes[0].files[0] === 'a.js'; const idOk = m._nextFeatureId(nodes) === 'F-0002'; const rt = m._parseFeatureGraph(m._featureBlock(nodes[0])); const rtOk = rt.length === 1 && rt[0].id === 'F-0001' && rt[0].dependsOn[0] === 'F-0002'; const src = read(__filename); const moved = src.includes("require('../lib/pure-utils')") && !/^function _parseFeatureGraph\(text\) \{/m.test(src) && !/^function _featureBlock\(node\) \{/m.test(src); return refOk && tmplOk && parseOk && idOk && rtOk && moved; } },
2997
2998
  { name: 'UR-0025 큰핸들러 모듈화: feature add/link/impact/list/show → lib/feature.js + DI + _featureImpactBfs pure 공유 (1.9.391)', run: () => { const m = require('../lib/feature'); const p = require('../lib/pure-utils'); const expOk = ['featureAddCmd', 'featureLinkCmd', 'featureImpactCmd', 'featureListCmd', 'featureShowCmd'].every(k => typeof m[k] === 'function'); const bfsRefOk = p._featureImpactBfs === _featureImpactBfs; const nodes = [{ id: 'F-0001', title: 'A', affects: ['F-0002'], dependsOn: [], coChangesWith: [] }, { id: 'F-0002', title: 'B', affects: [], dependsOn: [], coChangesWith: [] }]; const r = p._featureImpactBfs(nodes, 'F-0001'); const bfsWork = r.length === 1 && r[0].id === 'F-0002' && r[0].via === 'affects'; const src = read(__filename); const delegated = src.includes("require('../lib/feature')") && src.includes('_feature.featureImpactCmd(root, fromId, _featureDeps())'); const featSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'feature.js')); const movedToLib = featSrc.includes("require('./pure-utils')") && featSrc.includes('feature added:'); let behavOk = false; const tmp = fs.mkdtempSync(path.join(os.tmpdir(), '__leerness_ft_')); const save = process.argv; const _w = process.stdout.write; let out = ''; try { fs.mkdirSync(path.join(tmp, '.harness'), { recursive: true }); process.argv = ['node', 'h', 'feature', 'list', '--json']; process.stdout.write = s => { out += s; return true; }; featureListCmd(tmp); } catch {} finally { process.stdout.write = _w; process.argv = save; try { fs.rmSync(tmp, { recursive: true, force: true }); } catch {} } try { const j = JSON.parse(out); behavOk = j.total === 0 && Array.isArray(j.features); } catch {} return expOk && bfsRefOk && bfsWork && delegated && movedToLib && behavOk; } },
2998
2999
  { name: 'UR-0025 큰핸들러 모듈화: doctor/which → lib/diagnostics.js + DI 위임 + 동작 (1.9.392)', run: () => { const m = require('../lib/diagnostics'); const expOk = typeof m.doctorCmd === 'function' && typeof m.whichCmd === 'function'; const src = read(__filename); const delegated = src.includes("require('../lib/diagnostics')") && src.includes('_diag.doctorCmd(opts,') && src.includes('_diag.whichCmd('); const diagSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'diagnostics.js')); const movedToLib = diagSrc.includes('leerness doctor') && diagSrc.includes('_selfTestCases'); let behavOk = false; const _w = process.stdout.write; const savedExit = process.exitCode; try { process.stdout.write = () => true; const rep = m.doctorCmd({ json: true }, { VERSION, _selfTestCases: () => [], _detectShellCtx: () => ({ shell: 'test', psVersion: null }), _mcpToolCount: () => 7, has: () => true, harnessPath: 'h.js' }); behavOk = !!rep && rep.version === VERSION && rep.selftest.total === 0 && rep.healthy === true && rep.mcpTools === 7; } catch {} finally { process.stdout.write = _w; process.exitCode = savedExit; } return expOk && delegated && movedToLib && behavOk; } },
3000
+ { name: 'UR-0025/whats-new BUG-fix: _parseChangelogBetween pure 추출 + "## X — DATE — title" 헤더 파싱 (1.9.393)', run: () => { const m = require('../lib/pure-utils'); if (m._parseChangelogBetween !== _parseChangelogBetween) return false; const cl = '## 1.9.393 — 2026-06-06 — Title\n- `leerness foo`\n- `--flagx`\n- `.harness/x.md`\n\n## 1.9.392 — 2026-06-05 — Y\n- y\n\n## 1.9.391 — 2026-06-04 — Z\n- z\n'; const r = m._parseChangelogBetween(cl, '1.9.391', '1.9.393'); const rangeOk = r.length === 2 && r[0].version === '1.9.393' && r[1].version === '1.9.392'; const extractOk = r[0].newCommands.includes('foo') && r[0].newFlags.includes('--flagx') && r[0].newFiles.includes('.harness/x.md'); const titlelessOk = m._parseChangelogBetween('## 1.9.50\n- a\n## 1.9.49\n- b\n', '1.9.49', '1.9.50').length === 1; const src = read(__filename); const moved = src.includes("require('../lib/pure-utils')") && !/function _parseChangelogBetween\(changelogText/.test(src); return rangeOk && extractOk && titlelessOk && moved; } },
2999
3001
  { name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
3000
3002
  ];
3001
3003
  }
@@ -15377,45 +15379,6 @@ function _bumpMcpUsage(root, toolName) {
15377
15379
 
15378
15380
  // 1.9.41: CHANGELOG.md를 파싱하여 from → to 사이 버전 차분 추출
15379
15381
  // 반환: [{ version, date, body, newCommands, newFlags, newFiles }]
15380
- function _parseChangelogBetween(changelogText, fromV, toV) {
15381
- // ## 1.9.X — YYYY-MM-DD 헤더 사이의 텍스트 추출
15382
- const sections = [];
15383
- const re = /^## (\d+\.\d+\.\d+)(?:\s+—\s+(\d{4}-\d{2}-\d{2}))?\s*\n([\s\S]*?)(?=^## \d+\.\d+\.\d+|$)/gm;
15384
- let m;
15385
- while ((m = re.exec(changelogText)) !== null) {
15386
- sections.push({ version: m[1], date: m[2] || null, body: m[3].trim() });
15387
- }
15388
- // from < V <= to 만 (fromV 자체는 이미 적용된 버전이므로 제외)
15389
- const ranged = sections.filter(s => {
15390
- const cmp = (v1, v2) => {
15391
- const a = v1.split('.').map(Number), b = v2.split('.').map(Number);
15392
- for (let i = 0; i < 3; i++) { if (a[i] !== b[i]) return a[i] - b[i]; }
15393
- return 0;
15394
- };
15395
- return cmp(s.version, fromV) > 0 && cmp(s.version, toV) <= 0;
15396
- });
15397
- // 각 섹션에서 신규 명령/플래그/파일 추출
15398
- for (const s of ranged) {
15399
- s.newCommands = [];
15400
- s.newFlags = [];
15401
- s.newFiles = [];
15402
- // `leerness X [...]` 또는 backtick에 싸인 leerness 명령
15403
- for (const cm of s.body.matchAll(/`leerness\s+([a-z][\w-]*(?:\s+[a-z][\w-]*)?)/g)) {
15404
- const cmd = cm[1].trim();
15405
- if (!s.newCommands.includes(cmd)) s.newCommands.push(cmd);
15406
- }
15407
- // `--xxx` 플래그
15408
- for (const fm of s.body.matchAll(/`(--[a-z][\w-]*)`/g)) {
15409
- if (!s.newFlags.includes(fm[1])) s.newFlags.push(fm[1]);
15410
- }
15411
- // .harness/X.md 같은 신규 파일
15412
- for (const ff of s.body.matchAll(/`(\.harness\/[\w./-]+\.(?:md|json|jsonl))`/g)) {
15413
- if (!s.newFiles.includes(ff[1])) s.newFiles.push(ff[1]);
15414
- }
15415
- }
15416
- return ranged;
15417
- }
15418
-
15419
15382
  // 1.9.41: leerness whats-new [--from V] — 현재 워크스페이스 버전 → leerness latest 차분
15420
15383
  // 1.9.48: cross-platform archive 생성 — tar → PowerShell Compress-Archive → 7z 순 fallback
15421
15384
  // outPath의 확장자(tgz/zip)에 따라 tar 또는 zip. tar 실패 시 .zip으로 자동 전환.
package/lib/pure-utils.js CHANGED
@@ -933,7 +933,9 @@ module.exports = {
933
933
  // 1.9.390 (UR-0025): feature-graph 순수 코어 (템플릿/파서/ID/블록)
934
934
  _featureGraphTemplate, _parseFeatureGraph, _nextFeatureId, _featureBlock,
935
935
  // 1.9.391 (UR-0025): feature 영향 BFS (순수, 공유)
936
- _featureImpactBfs
936
+ _featureImpactBfs,
937
+ // 1.9.393 (UR-0025): CHANGELOG 버전 구간 차분 파서 (순수, 공유)
938
+ _parseChangelogBetween
937
939
  };
938
940
 
939
941
  // 1.9.355 (UR-0075 Phase A): AI 에이전트용 크로스버전 마이그레이션 안전 워크플로 가이드 (순수 텍스트). 임시설치 + --path + 백업 + diff 검증.
@@ -1120,3 +1122,48 @@ function _featureImpactBfs(nodes, startId) {
1120
1122
  }
1121
1123
  return result;
1122
1124
  }
1125
+ // 1.9.393 (UR-0025): CHANGELOG 버전 구간 차분 파서 — from < V <= to 섹션 + 신규 명령/플래그/파일 추출. 순수. harness(update/whats-new) 공유.
1126
+ // BUG-fix(1.9.393): (1) 헤더 꼬리가 '## X — DATE — title' 의 ' — title' 를 소비 못 해 0건 반환 → 헤더에 '[^\n]*' 허용.
1127
+ // (2) 기존 본문 캡처 '([\s\S]*?)(?=^##…|$)' 가 /m 모드 '$'(줄 끝) 때문에 본문을 첫 줄로 절단 → _parseFeatureGraph 식 '위치 기반 분할'로 교체.
1128
+ // '## X'(제목 없음) / '## X — DATE' / '## X — DATE — title' 모두 매칭, 본문은 다음 헤더(또는 끝)까지 전체 캡처.
1129
+ function _parseChangelogBetween(changelogText, fromV, toV) {
1130
+ const text = changelogText || '';
1131
+ const headerRe = /^## (\d+\.\d+\.\d+)(?:\s+—\s+(\d{4}-\d{2}-\d{2}))?[^\n]*$/gm;
1132
+ const positions = [];
1133
+ let hm;
1134
+ while ((hm = headerRe.exec(text)) !== null) positions.push({ version: hm[1], date: hm[2] || null, start: hm.index, bodyStart: hm.index + hm[0].length });
1135
+ const sections = [];
1136
+ for (let i = 0; i < positions.length; i++) {
1137
+ const end = i + 1 < positions.length ? positions[i + 1].start : text.length;
1138
+ sections.push({ version: positions[i].version, date: positions[i].date, body: text.slice(positions[i].bodyStart, end).trim() });
1139
+ }
1140
+ // from < V <= to 만 (fromV 자체는 이미 적용된 버전이므로 제외)
1141
+ const ranged = sections.filter(s => {
1142
+ const cmp = (v1, v2) => {
1143
+ const a = v1.split('.').map(Number), b = v2.split('.').map(Number);
1144
+ for (let i = 0; i < 3; i++) { if (a[i] !== b[i]) return a[i] - b[i]; }
1145
+ return 0;
1146
+ };
1147
+ return cmp(s.version, fromV) > 0 && cmp(s.version, toV) <= 0;
1148
+ });
1149
+ // 각 섹션에서 신규 명령/플래그/파일 추출
1150
+ for (const s of ranged) {
1151
+ s.newCommands = [];
1152
+ s.newFlags = [];
1153
+ s.newFiles = [];
1154
+ // `leerness X [...]` 또는 backtick에 싸인 leerness 명령
1155
+ for (const cm of s.body.matchAll(/`leerness\s+([a-z][\w-]*(?:\s+[a-z][\w-]*)?)/g)) {
1156
+ const cmd = cm[1].trim();
1157
+ if (!s.newCommands.includes(cmd)) s.newCommands.push(cmd);
1158
+ }
1159
+ // `--xxx` 플래그
1160
+ for (const fm of s.body.matchAll(/`(--[a-z][\w-]*)`/g)) {
1161
+ if (!s.newFlags.includes(fm[1])) s.newFlags.push(fm[1]);
1162
+ }
1163
+ // .harness/X.md 같은 신규 파일
1164
+ for (const ff of s.body.matchAll(/`(\.harness\/[\w./-]+\.(?:md|json|jsonl))`/g)) {
1165
+ if (!s.newFiles.includes(ff[1])) s.newFiles.push(ff[1]);
1166
+ }
1167
+ }
1168
+ return ranged;
1169
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leerness",
3
- "version": "1.9.392",
3
+ "version": "1.9.393",
4
4
  "description": "Leerness: 비파괴 마이그레이션, 자동 버전 감지·업데이트, 계획/진행/핸드오프 자동화, 게으름·시크릿·인코딩 자동 가드, Claude Code 슬래시 통합을 갖춘 한국어 우선 AI 개발 하네스.",
5
5
  "keywords": [
6
6
  "leerness",
package/scripts/e2e.js CHANGED
@@ -5448,5 +5448,25 @@ total++;
5448
5448
  if (!ok) failed++;
5449
5449
  }
5450
5450
 
5451
+ // 1.9.393 회귀 (UR-0025 + whats-new BUG-fix): _parseChangelogBetween 가 "## X — DATE — title" 헤더를 파싱 (종전 0건 반환 버그)
5452
+ total++;
5453
+ {
5454
+ let ok = false;
5455
+ try {
5456
+ const pkgRoot = path.resolve(__dirname, '..');
5457
+ const r = cp.spawnSync(process.execPath, [CLI, 'whats-new', pkgRoot, '--from', '1.9.388', '--json'], { encoding: 'utf8', timeout: 15000 });
5458
+ const j = JSON.parse(r.stdout);
5459
+ // 실제 CHANGELOG(## X — DATE — title 형식)에서 1.9.388 초과 버전이 1건 이상 파싱돼야 함
5460
+ const versOk = Array.isArray(j.versions) && j.versions.length >= 1 && j.versions.every(v => /^\d+\.\d+\.\d+$/.test(v.version));
5461
+ // 순수 함수 직접: 제목 있는 헤더 + 제목 없는 헤더 모두 매칭
5462
+ const pu = require(path.resolve(pkgRoot, 'lib', 'pure-utils'));
5463
+ const titled = pu._parseChangelogBetween('## 1.9.20 — 2026-01-01 — T\n- a\n## 1.9.19 — 2026-01-01 — U\n- b\n', '1.9.19', '1.9.20').length === 1;
5464
+ const titleless = pu._parseChangelogBetween('## 1.9.20\n- a\n## 1.9.19\n- b\n', '1.9.19', '1.9.20').length === 1;
5465
+ ok = versOk && titled && titleless;
5466
+ } catch {}
5467
+ console.log(ok ? '✓ B(1.9.393) whats-new BUG-fix: "## X — DATE — title" 헤더 파싱 (_parseChangelogBetween pure 추출, UR-0025)' : '✗ whats-new 헤더 파싱 실패');
5468
+ if (!ok) failed++;
5469
+ }
5470
+
5451
5471
  console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
5452
5472
  if (failed > 0) process.exit(1);