leerness 1.9.438 → 1.9.439
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 +11 -0
- package/README.md +5 -5
- package/bin/leerness.js +8 -1
- package/lib/drift.js +32 -29
- package/package.json +1 -1
- package/scripts/e2e.js +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.439 — 2026-06-08 — drift --auto-fix --json 순수성 (10th 외부평가 Codex P1, UR-0135 완결)
|
|
4
|
+
|
|
5
|
+
**📐 `drift check --auto-fix --json` 이 dirty 워크스페이스에서 진행로그를 stdout 에 섞던 비-순수 JSON 해소.**
|
|
6
|
+
|
|
7
|
+
### 변경
|
|
8
|
+
- **`lib/drift.js`**: `--json` 시 auto-fix 진행로그(보안회복/인코딩/delivered/idempotency/release ~28건)를 `afLog`(no-op)로 무음화. depth 가드(1.9.432)로 재귀가 auto-fix 블록을 건너뛰고 최종 JSON 만 출력 → stdout 순수 JSON 보장. 텍스트 모드는 진행로그 그대로 유지(최종 JSON 출력 `log()` 는 불변).
|
|
9
|
+
|
|
10
|
+
### 검증 (회귀 0)
|
|
11
|
+
- dirty WS(보안 신호 발화) `drift --auto-fix --json` → 순수 JSON 파싱 성공. 텍스트 모드 진행로그 3건 유지.
|
|
12
|
+
- **selftest 183→184** + **E2E 신규 B(1.9.439)**. → 10th 외부평가 Codex P1(--json 전 경로 순수성) 완결.
|
|
13
|
+
|
|
3
14
|
## 1.9.438 — 2026-06-08 — contract impl ESM re-export 인식 (11th 외부평가 Sonnet P3, UR-0139 완결)
|
|
4
15
|
|
|
5
16
|
**🧩 `export { default as X } from './m'` 재export 의 별칭 X 를 named export 로 인식.**
|
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.439 하네스를 사용합니다. 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.439는 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.438는 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.439)** · 매 라운드 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.439: 2026-06-07
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/leerness.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.439';
|
|
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') 시 호스트 프로세스 오염.
|
|
@@ -3291,6 +3291,13 @@ function _selfTestCases() {
|
|
|
3291
3291
|
const noDefault = JSON.stringify(m._parseImplExports('export default function x(){}')) === JSON.stringify([]);
|
|
3292
3292
|
return reexp && named && noDefault;
|
|
3293
3293
|
} },
|
|
3294
|
+
{ name: '10th 외부평가 Codex P1 (UR-0135): drift --auto-fix --json 진행로그 억제(순수 JSON) (1.9.439)', run: () => {
|
|
3295
|
+
const modSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'drift.js'));
|
|
3296
|
+
const afLogDef = modSrc.includes("const afLog = has('--json') ? () => {} : log;");
|
|
3297
|
+
const usesAfLog = (modSrc.match(/afLog\(/g) || []).length >= 10; // auto-fix 진행로그 다수 afLog 화
|
|
3298
|
+
const jsonStillLog = modSrc.includes('log(JSON.stringify({ root, score'); // 최종 JSON 출력은 log 유지
|
|
3299
|
+
return afLogDef && usesAfLog && jsonStillLog;
|
|
3300
|
+
} },
|
|
3294
3301
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3295
3302
|
];
|
|
3296
3303
|
}
|
package/lib/drift.js
CHANGED
|
@@ -163,25 +163,28 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
163
163
|
// 1.9.432 (10th 외부평가 Opus latent, UR-0131 잔여): depth 가드 — 재귀 호출(_noAutoFix)은 auto-fix 재진입 금지.
|
|
164
164
|
// 기존엔 autoFix=has('--auto-fix')가 전역 argv 재독→재귀도 auto-fix 분기 재진입, 종료는 'audit이 보안신호를 지운다'는 취약 불변식에 의존(미래 신호 타입이 비가역이면 무한재귀). 명시 1회 보장.
|
|
165
165
|
const autoFix = has('--auto-fix') && !opts._noAutoFix;
|
|
166
|
+
// 1.9.439 (10th 외부평가 Codex P1, UR-0135): --json 모드면 auto-fix 진행로그 억제(stdout 순수 JSON 보장).
|
|
167
|
+
// 재귀(_noAutoFix)는 auto-fix 블록을 건너뛰고 마지막 JSON(아래 has('--json') 블록)만 출력 → afLog 로 첫 패스 진행로그만 무음화.
|
|
168
|
+
const afLog = has('--json') ? () => {} : log;
|
|
166
169
|
// 1.9.82: 보안 신호가 fired에 있으면 우선 audit --fix 호출
|
|
167
170
|
const hasSecurityFired = fired.some(f => /보안 위험 \(1\.9\.78\)/.test(f.label));
|
|
168
171
|
if (autoFix && hasSecurityFired) {
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
afLog('');
|
|
173
|
+
afLog(`🔒 --auto-fix 활성 (1.9.82) — 보안 신호 회복: audit --fix 자동 실행 중...`);
|
|
171
174
|
try {
|
|
172
175
|
const r = cp.spawnSync(process.execPath, [harnessPath, 'audit', root, '--fix'],
|
|
173
176
|
{ encoding: 'utf8', timeout: 30000, env: { ...process.env, LEERNESS_INTERNAL: '1', LEERNESS_NO_PROMPT: '1', LEERNESS_NO_DRIFT_CHECK: '1' } });
|
|
174
177
|
if (r.status === 0) {
|
|
175
|
-
|
|
178
|
+
afLog(`✓ audit --fix 완료 — .gitignore + .env.example 동기화`);
|
|
176
179
|
// 재검사 (보안 신호 회복 확인)
|
|
177
|
-
|
|
178
|
-
|
|
180
|
+
afLog('');
|
|
181
|
+
afLog(`재검사 중...`);
|
|
179
182
|
return driftCheckCmd(root, { ...opts, _noAutoFix: true }, deps); // 재귀 1회 (auto-fix 없이, 1.9.432 depth 가드)
|
|
180
183
|
} else {
|
|
181
|
-
|
|
184
|
+
afLog(`⚠ audit --fix 실패 (exit ${r.status}) — 수동 \`leerness audit --fix\` 권장`);
|
|
182
185
|
}
|
|
183
186
|
} catch (e) {
|
|
184
|
-
|
|
187
|
+
afLog(`⚠ auto-fix 보안 회복 오류: ${e.message}`);
|
|
185
188
|
}
|
|
186
189
|
}
|
|
187
190
|
// 1.9.242: drift check --auto-fix 에 env encoding BOM 자동 추가 통합 (사용자 명시 UR-0014 2단계)
|
|
@@ -190,8 +193,8 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
190
193
|
try {
|
|
191
194
|
const encScan = _scanShellScriptsEncoding(root);
|
|
192
195
|
if (encScan.atRisk && encScan.atRisk.length > 0) {
|
|
193
|
-
|
|
194
|
-
|
|
196
|
+
afLog('');
|
|
197
|
+
afLog(`🌐 --auto-fix 활성 (1.9.242) — 셸 스크립트 인코딩 위험 ${encScan.atRisk.length}건 BOM 자동 추가 중...`);
|
|
195
198
|
let ok = 0;
|
|
196
199
|
for (const r of encScan.atRisk) {
|
|
197
200
|
try {
|
|
@@ -203,10 +206,10 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
203
206
|
ok++;
|
|
204
207
|
} catch {}
|
|
205
208
|
}
|
|
206
|
-
|
|
209
|
+
afLog(`✓ UTF-8 BOM 추가 ${ok}/${encScan.atRisk.length}건 (1.9.242 UR-0014)`);
|
|
207
210
|
}
|
|
208
211
|
} catch (e) {
|
|
209
|
-
|
|
212
|
+
afLog(`⚠ env encoding auto-fix 오류 (1.9.242): ${e.message}`);
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
// 1.9.225: drift check --auto-fix 에 delivered 패턴 자동 적용 통합 (1.9.223/224 시스템 회수)
|
|
@@ -216,17 +219,17 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
216
219
|
try {
|
|
217
220
|
const delivered = _detectDeliveredRequests(root);
|
|
218
221
|
if (delivered.candidates && delivered.candidates.length > 0) {
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
afLog('');
|
|
223
|
+
afLog(`📥 --auto-fix 활성 (1.9.225) — delivered 패턴 ${delivered.candidates.length}건 자동 완료 중...`);
|
|
221
224
|
let ok = 0;
|
|
222
225
|
for (const c of delivered.candidates) {
|
|
223
226
|
const u = _updateUserRequest(root, c.id, { status: 'completed', autoCompletedAt: new Date().toISOString(), autoCompleteReason: 'drift-auto-fix-1.9.225' });
|
|
224
227
|
if (u) ok++;
|
|
225
228
|
}
|
|
226
|
-
|
|
229
|
+
afLog(`✓ delivered 자동 완료 ${ok}/${delivered.candidates.length}건`);
|
|
227
230
|
}
|
|
228
231
|
} catch (e) {
|
|
229
|
-
|
|
232
|
+
afLog(`⚠ delivered auto-apply 오류 (1.9.225): ${e.message}`);
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
235
|
// 1.9.293: drift check --auto-fix 에 idempotency task/user-request 중복 자동 정리 통합
|
|
@@ -236,11 +239,11 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
236
239
|
const idemFixes = _autoFixIdempotency(root);
|
|
237
240
|
const totalFixed = idemFixes.reduce((n, f) => n + (f.removedExact || 0) + (f.droppedSameText || 0) + (f.count || 0), 0);
|
|
238
241
|
if (totalFixed > 0) {
|
|
239
|
-
|
|
240
|
-
|
|
242
|
+
afLog('');
|
|
243
|
+
afLog(`🔁 --auto-fix 활성 (1.9.293) — idempotency 중복 ${totalFixed}건 자동 정리 (task/user-request dedup)`);
|
|
241
244
|
}
|
|
242
245
|
} catch (e) {
|
|
243
|
-
|
|
246
|
+
afLog(`⚠ idempotency auto-fix 오류 (1.9.293): ${e.message}`);
|
|
244
247
|
}
|
|
245
248
|
}
|
|
246
249
|
// 1.9.236: drift check --auto-fix 에 release cleanup 통합 (1.9.235 회수)
|
|
@@ -255,8 +258,8 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
255
258
|
.map(l => l.replace(/^\*?\s+/, '').trim())
|
|
256
259
|
.filter(l => l && /^release\/\d+\.\d+\.\d+$/.test(l));
|
|
257
260
|
if (merged.length > 50) {
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
afLog('');
|
|
262
|
+
afLog(`🗑 --auto-fix 활성 (1.9.236) — release/* merged ${merged.length}개 (50+) 자동 정리 (keep 10)...`);
|
|
260
263
|
// 정렬 (semver desc)
|
|
261
264
|
merged.sort((a, b) => {
|
|
262
265
|
const va = a.replace('release/', '').split('.').map(n => parseInt(n, 10) || 0);
|
|
@@ -272,20 +275,20 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
272
275
|
const r = cp.spawnSync('git', ['branch', '-d', b], { cwd: root, encoding: 'utf8' });
|
|
273
276
|
if (r.status === 0) ok++;
|
|
274
277
|
}
|
|
275
|
-
|
|
278
|
+
afLog(`✓ release cleanup 자동 완료 ${ok}/${toDelete.length}건 (keep 10)`);
|
|
276
279
|
}
|
|
277
280
|
}
|
|
278
281
|
} catch (e) {
|
|
279
|
-
|
|
282
|
+
afLog(`⚠ release cleanup auto-fix 오류 (1.9.236): ${e.message}`);
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
285
|
if (autoFix && level === '🔴 critical' && !hasSecurityFired) {
|
|
283
|
-
|
|
284
|
-
|
|
286
|
+
afLog('');
|
|
287
|
+
afLog(`🔧 --auto-fix 활성 — session close 자동 실행 중...`);
|
|
285
288
|
try {
|
|
286
289
|
const r = cp.spawnSync(process.execPath, [harnessPath, 'session', 'close', root], { encoding: 'utf8', timeout: 60000, env: { ...process.env, LEERNESS_INTERNAL: '1' } });
|
|
287
290
|
if (r.status === 0) {
|
|
288
|
-
|
|
291
|
+
afLog(`✓ session close 자동 완료`);
|
|
289
292
|
// autoResolved 카운트
|
|
290
293
|
const stats = _readUsageStats(root);
|
|
291
294
|
stats.drift = stats.drift || {};
|
|
@@ -294,14 +297,14 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
294
297
|
mkdirp(path.dirname(p));
|
|
295
298
|
writeUtf8(p, JSON.stringify(stats, null, 2) + '\n');
|
|
296
299
|
// 재검사
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
afLog('');
|
|
301
|
+
afLog(`재검사 중...`);
|
|
299
302
|
return driftCheckCmd(root, { ...opts, _noAutoFix: true }, deps); // 재귀 1회 (auto-fix 없이, 1.9.432 depth 가드)
|
|
300
303
|
} else {
|
|
301
|
-
|
|
304
|
+
afLog(`⚠ session close 실패 (exit ${r.status}) — 수동 실행 필요`);
|
|
302
305
|
}
|
|
303
306
|
} catch (e) {
|
|
304
|
-
|
|
307
|
+
afLog(`⚠ auto-fix 오류: ${e.message}`);
|
|
305
308
|
}
|
|
306
309
|
}
|
|
307
310
|
if (has('--json')) {
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -6073,5 +6073,23 @@ total++;
|
|
|
6073
6073
|
if (!ok) failed++;
|
|
6074
6074
|
}
|
|
6075
6075
|
|
|
6076
|
+
// 1.9.439 (10th 외부평가 Codex P1, UR-0135): drift --auto-fix --json 은 dirty WS 에서도 stdout 순수 JSON.
|
|
6077
|
+
total++;
|
|
6078
|
+
{
|
|
6079
|
+
let ok = false;
|
|
6080
|
+
try {
|
|
6081
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-djson-'));
|
|
6082
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
6083
|
+
fs.writeFileSync(path.join(d, '.env'), 'API_KEY=sk-test-1234567890abcdefghijklmnopqrstuvwxyz\n');
|
|
6084
|
+
fs.writeFileSync(path.join(d, '.gitignore'), 'node_modules/\n'); // .env 누락 → 보안 신호 발화 → auto-fix 진행로그
|
|
6085
|
+
const r = cp.spawnSync(process.execPath, [CLI, 'drift', 'check', d, '--auto-fix', '--json'], { encoding: 'utf8', timeout: 30000 });
|
|
6086
|
+
let pure = false; try { const j = JSON.parse(r.stdout); pure = typeof j.score === 'number'; } catch {}
|
|
6087
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
6088
|
+
ok = pure;
|
|
6089
|
+
} catch {}
|
|
6090
|
+
console.log(ok ? '✓ B(1.9.439) UR-0135: drift --auto-fix --json 순수 JSON(dirty WS 진행로그 억제)' : '✗ drift --auto-fix --json 비순수');
|
|
6091
|
+
if (!ok) failed++;
|
|
6092
|
+
}
|
|
6093
|
+
|
|
6076
6094
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
6077
6095
|
if (failed > 0) process.exit(1);
|