leerness 1.9.430 → 1.9.432
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 +20 -1
- package/README.md +5 -5
- package/bin/leerness.js +8 -2
- package/lib/drift.js +5 -3
- package/package.json +1 -1
- package/scripts/e2e.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.9.
|
|
3
|
+
## 1.9.432 — 2026-06-08 — drift --auto-fix 재귀 depth 가드 (10th 외부평가 Opus latent, UR-0131 잔여)
|
|
4
|
+
|
|
5
|
+
**🛡️ drift --auto-fix 재귀의 잠재적 무한재귀 방어(방어적 — 현재 신호 타입에선 미발현 확인).**
|
|
6
|
+
|
|
7
|
+
### 변경
|
|
8
|
+
- **`lib/drift.js`**: `autoFix = has('--auto-fix') && !opts._noAutoFix`. 두 재귀점이 `{ ...opts, _noAutoFix: true }` 전달 → 재귀는 auto-fix 블록 재진입 금지(명시 1회 보장).
|
|
9
|
+
- 기존엔 재귀가 `has('--auto-fix')`(전역 argv)를 재독해 auto-fix 분기에 재진입, 종료가 "audit --fix가 보안 신호를 항상 지운다"는 취약 불변식에 의존. 미래에 audit이 못 고치는 신호 타입이 추가되면 무한재귀 위험.
|
|
10
|
+
|
|
11
|
+
### 검증 (맹신 X)
|
|
12
|
+
- Opus의 "infinite recursion" 우려를 직접 재현 시도 → **현재 미발현**(보안 신호는 gitignore 기반이라 audit --fix가 항상 해소). 그러나 불변식 의존은 취약 → 방어적 가드는 정당.
|
|
13
|
+
- **selftest 176→177 PASS**(depth 가드 소스 + 기존 1.9.422 재귀 케이스 갱신) · 발화 케이스 정상 종료(exit 0) 확인 · **E2E 무회귀**.
|
|
14
|
+
|
|
15
|
+
### 분리 (UR-0135)
|
|
16
|
+
drift --auto-fix --json 비순수(dirty WS 진행로그)는 재귀가 auto-fix 블록 내부라 stdout 캡처 재구조화 필요 → 신중한 별도 라운드로 분리.
|
|
17
|
+
|
|
18
|
+
## 1.9.431 — 2026-06-08 — health exit code 정책: 보안 CRITICAL CI 게이트 (10th 외부평가 UR-0130)
|
|
19
|
+
|
|
20
|
+
> 1.9.430(npm 게시)에서 e2e 테스트 픽스처가 `sk_live_` 패턴(Stripe 실키 형태)이라 GitHub push-protection에 막혀 git 미반영. 픽스처를 코드베이스 관례인 `sk-test-`(GitHub-safe + leerness 탐지)로 교체하고 1.9.431로 정리(git=npm=tag 정합). 동작 동일.
|
|
21
|
+
|
|
22
|
+
### 변경 (1.9.430 + 픽스처 패턴 수정)
|
|
4
23
|
|
|
5
24
|
**🚦 health 를 CI 게이트로 쓸 때 하드코딩 시크릿을 놓치던 문제 — exit code 정책 명확화.**
|
|
6
25
|
|
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.432 하네스를 사용합니다. 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.432는 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.430는 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.432)** · 매 라운드 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.432: 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.432';
|
|
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') 시 호스트 프로세스 오염.
|
|
@@ -3130,7 +3130,7 @@ function _selfTestCases() {
|
|
|
3130
3130
|
const delegated = src.includes("require('../lib/drift')") && src.includes('_drift.driftCheckCmd(root, opts,');
|
|
3131
3131
|
const modSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'drift.js'));
|
|
3132
3132
|
const bodyMarker = 'auto-fix 활성 ' + '(1.9.82)'; // drift 본문 고유(split-literal 자기참조 회피)
|
|
3133
|
-
const recursionWired = modSrc.includes('driftCheckCmd(root, opts, deps)'); // 재귀에 deps 전달
|
|
3133
|
+
const recursionWired = modSrc.includes('driftCheckCmd(root, { ...opts, _noAutoFix: true }, deps)'); // 재귀에 deps 전달 + depth 가드(1.9.432)
|
|
3134
3134
|
const movedToLib = modSrc.includes("require('./io')") && recursionWired && modSrc.includes(bodyMarker) && !src.includes(bodyMarker);
|
|
3135
3135
|
let behavOk = false;
|
|
3136
3136
|
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), '__leerness_drift_'));
|
|
@@ -3244,6 +3244,12 @@ function _selfTestCases() {
|
|
|
3244
3244
|
const modSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'health.js'));
|
|
3245
3245
|
return modSrc.includes('const criticalSecurity =') && modSrc.includes("has('--strict') && !out.healthy) || criticalSecurity") && modSrc.includes('out.criticalSecurity = criticalSecurity');
|
|
3246
3246
|
} },
|
|
3247
|
+
{ name: '10th 외부평가 UR-0131 잔여: drift --auto-fix 재귀 depth 가드(_noAutoFix) — 무한재귀 방지 (1.9.432)', run: () => {
|
|
3248
|
+
const modSrc = read(path.join(path.dirname(__filename), '..', 'lib', 'drift.js'));
|
|
3249
|
+
const guard = modSrc.includes("has('--auto-fix') && !opts._noAutoFix");
|
|
3250
|
+
const recurseGuarded = (modSrc.match(/driftCheckCmd\(root, \{ \.\.\.opts, _noAutoFix: true \}, deps\)/g) || []).length === 2;
|
|
3251
|
+
return guard && recurseGuarded;
|
|
3252
|
+
} },
|
|
3247
3253
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3248
3254
|
];
|
|
3249
3255
|
}
|
package/lib/drift.js
CHANGED
|
@@ -158,7 +158,9 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
158
158
|
} catch {}
|
|
159
159
|
// 1.9.39: --auto-fix — critical 시 session close 자동 실행
|
|
160
160
|
// 1.9.82: --auto-fix가 보안 신호도 자동 회복 (audit --fix 호출)
|
|
161
|
-
|
|
161
|
+
// 1.9.432 (10th 외부평가 Opus latent, UR-0131 잔여): depth 가드 — 재귀 호출(_noAutoFix)은 auto-fix 재진입 금지.
|
|
162
|
+
// 기존엔 autoFix=has('--auto-fix')가 전역 argv 재독→재귀도 auto-fix 분기 재진입, 종료는 'audit이 보안신호를 지운다'는 취약 불변식에 의존(미래 신호 타입이 비가역이면 무한재귀). 명시 1회 보장.
|
|
163
|
+
const autoFix = has('--auto-fix') && !opts._noAutoFix;
|
|
162
164
|
// 1.9.82: 보안 신호가 fired에 있으면 우선 audit --fix 호출
|
|
163
165
|
const hasSecurityFired = fired.some(f => /보안 위험 \(1\.9\.78\)/.test(f.label));
|
|
164
166
|
if (autoFix && hasSecurityFired) {
|
|
@@ -172,7 +174,7 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
172
174
|
// 재검사 (보안 신호 회복 확인)
|
|
173
175
|
log('');
|
|
174
176
|
log(`재검사 중...`);
|
|
175
|
-
return driftCheckCmd(root, opts, deps); // 재귀 1회 (auto-fix
|
|
177
|
+
return driftCheckCmd(root, { ...opts, _noAutoFix: true }, deps); // 재귀 1회 (auto-fix 없이, 1.9.432 depth 가드)
|
|
176
178
|
} else {
|
|
177
179
|
log(`⚠ audit --fix 실패 (exit ${r.status}) — 수동 \`leerness audit --fix\` 권장`);
|
|
178
180
|
}
|
|
@@ -292,7 +294,7 @@ function driftCheckCmd(root, opts = {}, deps = {}) {
|
|
|
292
294
|
// 재검사
|
|
293
295
|
log('');
|
|
294
296
|
log(`재검사 중...`);
|
|
295
|
-
return driftCheckCmd(root, opts, deps); // 재귀 1회 (auto-fix
|
|
297
|
+
return driftCheckCmd(root, { ...opts, _noAutoFix: true }, deps); // 재귀 1회 (auto-fix 없이, 1.9.432 depth 가드)
|
|
296
298
|
} else {
|
|
297
299
|
log(`⚠ session close 실패 (exit ${r.status}) — 수동 실행 필요`);
|
|
298
300
|
}
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -6047,7 +6047,7 @@ total++;
|
|
|
6047
6047
|
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-hexit-'));
|
|
6048
6048
|
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
6049
6049
|
const clean = cp.spawnSync(process.execPath, [CLI, 'health', d], { encoding: 'utf8', timeout: 20000 });
|
|
6050
|
-
fs.writeFileSync(path.join(d, 'leak.js'), '
|
|
6050
|
+
fs.writeFileSync(path.join(d, 'leak.js'), 'module.exports={apiKey:"sk-test-1234567890abcdefghijklmnopqrstuvwxyz"};'); // GitHub push-protection 안전 패턴(sk-test-, 코드베이스 관례) — leerness 는 탐지
|
|
6051
6051
|
const dirty = cp.spawnSync(process.execPath, [CLI, 'health', d], { encoding: 'utf8', timeout: 20000 });
|
|
6052
6052
|
fs.rmSync(d, { recursive: true, force: true });
|
|
6053
6053
|
ok = clean.status === 0 && dirty.status === 1;
|