leerness 1.9.394 → 1.9.395
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 +16 -0
- package/README.md +5 -5
- package/bin/harness.js +2 -1
- package/package.json +1 -1
- package/scripts/e2e.js +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.395 — 2026-06-06 — 행위검증 회귀가드: audit FP/FN + canonical 파이프 round-trip (UR-0096)
|
|
4
|
+
|
|
5
|
+
**🛡 광범위 행위검증으로 실 버그 탐색 — 신규 버그 0(성숙·견고 확인) + 가드 없던 2영역에 net-new 회귀 가드 추가.**
|
|
6
|
+
|
|
7
|
+
### 배경 (whats-new 버그 발견의 후속 — 행위검증 확대)
|
|
8
|
+
1.9.393 의 whats-new 버그가 행위검증의 실익을 보여줘, audit/version/canonical 핵심 로직을 구성된 시나리오로 광범위 검증:
|
|
9
|
+
- audit README배지 mismatch / current-state stale (FP/FN) · compareVer(multi-digit 6종) · parseHarnessVersion(계약) · decisions/lessons round-trip(파이프/em-dash/콜론) — **모두 정상, 신규 버그 0**.
|
|
10
|
+
|
|
11
|
+
### 구현 (정직: no-op/가짜수정 안 만듦 — 미가드 영역 보강만)
|
|
12
|
+
- **e2e B(1.9.395)**: audit `readme_version_mismatch`(불일치 감지 + 일치 시 FP 0) + `current_state_stale`(2020 감지 + 오늘 FP 0) — 종전 전용 e2e 가드 부재였던 검증.
|
|
13
|
+
- **selftest**: decisions/lessons canonical round-trip 엣지문자(파이프 `|`=테이블 구분자/em-dash/콜론) 무손상 + idempotent — 데이터 손상 회귀 가드.
|
|
14
|
+
|
|
15
|
+
### 검증 (회귀 0)
|
|
16
|
+
- **selftest 140→141 PASS** · **E2E 333→334 PASS**.
|
|
17
|
+
- compareVer 17곳 기존 가드 + 신규 2가드 = audit/canonical 커버리지 보강.
|
|
18
|
+
|
|
3
19
|
## 1.9.394 — 2026-06-06 — UR-0025: whatsNewCmd → lib/diagnostics.js (whats-new 완결) + 파서 형제버그 감사
|
|
4
20
|
|
|
5
21
|
**🧩 whats-new 핸들러를 lib/diagnostics.js 로 분리 — whats-new 서브시스템 완전 모듈화. + /m `$` 절단 버그 클래스 전수 감사(클린).**
|
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
|
-
[](https://www.npmjs.com/package/leerness) [](https://www.npmjs.com/package/leerness) []() []() []() []() []() []()
|
|
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.
|
|
474
|
+
이 프로젝트는 Leerness v1.9.395 하네스를 사용합니다. 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.
|
|
528
|
+
Leerness v1.9.395는 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.394는 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.
|
|
549
|
+
현재 누적: **70 라운드 (1.9.40 → 1.9.395)** · 매 라운드 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.
|
|
587
|
+
Last synced by Leerness v1.9.395: 2026-06-06
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/harness.js
CHANGED
|
@@ -31,7 +31,7 @@ const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInG
|
|
|
31
31
|
// 1.9.295 (UR-0025 4단계): 정적 데이터 카탈로그 모듈 분리 (비파괴, require-based).
|
|
32
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 포함)
|
|
33
33
|
|
|
34
|
-
const VERSION = '1.9.
|
|
34
|
+
const VERSION = '1.9.395';
|
|
35
35
|
|
|
36
36
|
// 1.9.290 (UR-0037, Codex gpt-5.5 #4 수렴): CLI 전용 부작용은 require 시 실행하지 않는다.
|
|
37
37
|
// 이전: warning listener 제거 / NODE_OPTIONS 변경 / chcp IIFE 가 top-level 즉시 실행 → require('harness') 시 호스트 프로세스 오염.
|
|
@@ -2999,6 +2999,7 @@ function _selfTestCases() {
|
|
|
2999
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
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; } },
|
|
3001
3001
|
{ name: 'UR-0025 whats-new 완결: whatsNewCmd → lib/diagnostics.js + DI 위임 + 동작 (1.9.394)', run: () => { const m = require('../lib/diagnostics'); const expOk = typeof m.whatsNewCmd === 'function'; const src = read(__filename); const delegated = src.includes('_diag.whatsNewCmd(root,'); const diagSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'diagnostics.js')); const movedToLib = diagSrc.includes('leerness whats-new') && diagSrc.includes('_parseChangelogBetween'); let behavOk = false; const tmp = fs.mkdtempSync(path.join(os.tmpdir(), '__leerness_wn_')); const save = process.argv; const _w = process.stdout.write; let out = ''; try { fs.mkdirSync(path.join(tmp, '.harness'), { recursive: true }); fs.writeFileSync(path.join(tmp, 'CHANGELOG.md'), '## 1.9.50 — 2026-06-06 — A\n- `leerness x`\n\n## 1.9.49 — 2026-06-05 — B\n- old\n'); process.argv = ['node', 'h', 'whats-new', tmp, '--from', '1.9.49', '--to', '1.9.50', '--json']; process.stdout.write = s => { out += s; return true; }; whatsNewCmd(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.from === '1.9.49' && j.to === '1.9.50' && Array.isArray(j.versions) && j.versions.length === 1 && j.versions[0].version === '1.9.50'; } catch {} return expOk && delegated && movedToLib && behavOk; } },
|
|
3002
|
+
{ name: '회귀가드: decisions/lessons canonical round-trip 엣지문자(pipe/dash/colon) 무손상 + idempotent (1.9.395)', run: () => { const m = require('../lib/pure-utils'); const d = [{ date: '2026-06-06', title: 'A | pipe', decision: 'use X | Y', reason: 'r—dash', alternatives: 'alt: colon', impact: 'i' }]; const dback = m._decisionsFromMd(m._renderDecisionsMd(d)); const dOk = dback.length === 1 && dback[0].title === 'A | pipe' && dback[0].decision === 'use X | Y' && dback[0].reason === 'r—dash'; const dIdem = JSON.stringify(dback) === JSON.stringify(m._decisionsFromMd(m._renderDecisionsMd(dback))); const l = [{ date: '2026-06-06', text: 'lesson | with — chars: ok', tag: 't' }]; const lback = m._parseLessonEntries(m._renderLessonsMd(l)); const lOk = lback.length === 1 && lback[0].text === 'lesson | with — chars: ok'; const lIdem = JSON.stringify(lback) === JSON.stringify(m._parseLessonEntries(m._renderLessonsMd(lback))); return dOk && dIdem && lOk && lIdem; } },
|
|
3002
3003
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3003
3004
|
];
|
|
3004
3005
|
}
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -5468,5 +5468,35 @@ total++;
|
|
|
5468
5468
|
if (!ok) failed++;
|
|
5469
5469
|
}
|
|
5470
5470
|
|
|
5471
|
+
// 1.9.395 회귀가드 (행위검증): audit README 배지 mismatch + current-state stale 의 FP/FN — 종전 전용 e2e 가드 부재
|
|
5472
|
+
total++;
|
|
5473
|
+
{
|
|
5474
|
+
let ok = false;
|
|
5475
|
+
try {
|
|
5476
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-auditchk-'));
|
|
5477
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
5478
|
+
const kinds = (root) => { const r = cp.spawnSync(process.execPath, [CLI, 'audit', root, '--json', '--no-npm-audit'], { encoding: 'utf8', timeout: 20000 }); try { return (JSON.parse(r.stdout).findings || []).map(f => f.kind); } catch { return null; } };
|
|
5479
|
+
const readme = path.join(d, 'README.md'), pkg = path.join(d, 'package.json'), csp = path.join(d, '.harness', 'current-state.md');
|
|
5480
|
+
// ① README 배지(1.0.0) ≠ package.json(2.0.0) → readme_version_mismatch
|
|
5481
|
+
fs.writeFileSync(readme, '# T\n\n');
|
|
5482
|
+
fs.writeFileSync(pkg, '{"name":"t","version":"2.0.0"}\n');
|
|
5483
|
+
const mismatchOk = (kinds(d) || []).includes('readme_version_mismatch');
|
|
5484
|
+
// ② 배지 일치(2.0.0) → mismatch 없어야 (FP 0)
|
|
5485
|
+
fs.writeFileSync(readme, '# T\n\n');
|
|
5486
|
+
const matchOk = !(kinds(d) || ['x']).includes('readme_version_mismatch');
|
|
5487
|
+
// ③ current-state 오래됨(2020) → current_state_stale
|
|
5488
|
+
fs.writeFileSync(csp, '# CS\nUpdated: 2020-01-01\n');
|
|
5489
|
+
const staleOk = (kinds(d) || []).includes('current_state_stale');
|
|
5490
|
+
// ④ current-state 오늘 → stale 없어야 (FP 0)
|
|
5491
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
5492
|
+
fs.writeFileSync(csp, '# CS\nUpdated: ' + today + '\n');
|
|
5493
|
+
const freshOk = !(kinds(d) || ['x']).includes('current_state_stale');
|
|
5494
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5495
|
+
ok = mismatchOk && matchOk && staleOk && freshOk;
|
|
5496
|
+
} catch {}
|
|
5497
|
+
console.log(ok ? '✓ B(1.9.395) 회귀가드: audit README배지 mismatch + current-state stale FP/FN (행위검증)' : '✗ audit 체크 FP/FN 가드 실패');
|
|
5498
|
+
if (!ok) failed++;
|
|
5499
|
+
}
|
|
5500
|
+
|
|
5471
5501
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
5472
5502
|
if (failed > 0) process.exit(1);
|