leerness 1.9.431 → 1.9.433
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 +36 -0
- package/README.md +5 -5
- package/bin/leerness.js +18 -2
- package/lib/drift.js +5 -3
- package/lib/pure-utils.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.433 — 2026-06-08 — 11번째 외부평가: contract verify backtick-bullet 강선언 FN 수정 (UR-0136~0139)
|
|
4
|
+
|
|
5
|
+
**🔍 11번째 외부 멀티모델 리뷰(Codex/Sonnet/Opus, README 미참조, 1.9.432). 5개 회귀항목 전부 정상 확인 + contract verify P1 신규 적발.**
|
|
6
|
+
|
|
7
|
+
### 수정 (확정·맹신 X 직접 재현)
|
|
8
|
+
- **[P1] contract verify backtick-bullet 강선언 우회(FN)** (Codex+Opus 교차확인): CLI 자체 관례인 `` - `name()` 필요 `` / `` - `field`: 설명 `` 표기가 **약언급(mentioned)으로 분류돼 누락검사 우회** → 구현에 없어도 ok:true/exit 0. `_parseContractSpec` 의 강선언 bullet regex(함수·필드)에 **bullet 시작 backtick 허용**. 인라인 산문 backtick 은 약언급 유지(관대성), 공백+괄호 산문(`- result (total)`) FP 가드 유지.
|
|
9
|
+
|
|
10
|
+
### 검증 (회귀 0)
|
|
11
|
+
- **selftest 177→178 PASS** (backtick 함수/필드 강선언 + 산문 약언급 + FP 가드). contract verify e2e: 누락 함수/필드 → ok:false/exit 1.
|
|
12
|
+
- **E2E 무회귀**.
|
|
13
|
+
|
|
14
|
+
### 5개 회귀항목 독립 검증 — 전부 정상
|
|
15
|
+
health memorySurface(STATUSES) · check/plan show/review-request --json 순수성 · contract 멀티라인/ESM · health 보안 exit 1 · drift 재귀 종료성.
|
|
16
|
+
|
|
17
|
+
### 맹신 X — 기각 2건 (직접 재현으로 반증)
|
|
18
|
+
- Sonnet "동시 task add 데이터 유실(P1)" → node 정밀 재현 **3/3 무손실·dup 0**(bash `&` 아티팩트). e2e B(1.9.303) + CPU포화 5/5 와 일치.
|
|
19
|
+
- Sonnet "GitHub 토큰(ghp_/github_pat_) 미탐지(P2)" → **정상 탐지·exit 1** 확인.
|
|
20
|
+
|
|
21
|
+
### 후속 백로그 (UR-0136~0139)
|
|
22
|
+
nonexistent path exit 통일 · agents dispatch flag bleed(_parseAddTitle) · --json 에러 전역화 · ESM re-export/encoding CRLF/AKIA placeholder.
|
|
23
|
+
|
|
24
|
+
## 1.9.432 — 2026-06-08 — drift --auto-fix 재귀 depth 가드 (10th 외부평가 Opus latent, UR-0131 잔여)
|
|
25
|
+
|
|
26
|
+
**🛡️ drift --auto-fix 재귀의 잠재적 무한재귀 방어(방어적 — 현재 신호 타입에선 미발현 확인).**
|
|
27
|
+
|
|
28
|
+
### 변경
|
|
29
|
+
- **`lib/drift.js`**: `autoFix = has('--auto-fix') && !opts._noAutoFix`. 두 재귀점이 `{ ...opts, _noAutoFix: true }` 전달 → 재귀는 auto-fix 블록 재진입 금지(명시 1회 보장).
|
|
30
|
+
- 기존엔 재귀가 `has('--auto-fix')`(전역 argv)를 재독해 auto-fix 분기에 재진입, 종료가 "audit --fix가 보안 신호를 항상 지운다"는 취약 불변식에 의존. 미래에 audit이 못 고치는 신호 타입이 추가되면 무한재귀 위험.
|
|
31
|
+
|
|
32
|
+
### 검증 (맹신 X)
|
|
33
|
+
- Opus의 "infinite recursion" 우려를 직접 재현 시도 → **현재 미발현**(보안 신호는 gitignore 기반이라 audit --fix가 항상 해소). 그러나 불변식 의존은 취약 → 방어적 가드는 정당.
|
|
34
|
+
- **selftest 176→177 PASS**(depth 가드 소스 + 기존 1.9.422 재귀 케이스 갱신) · 발화 케이스 정상 종료(exit 0) 확인 · **E2E 무회귀**.
|
|
35
|
+
|
|
36
|
+
### 분리 (UR-0135)
|
|
37
|
+
drift --auto-fix --json 비순수(dirty WS 진행로그)는 재귀가 auto-fix 블록 내부라 stdout 캡처 재구조화 필요 → 신중한 별도 라운드로 분리.
|
|
38
|
+
|
|
3
39
|
## 1.9.431 — 2026-06-08 — health exit code 정책: 보안 CRITICAL CI 게이트 (10th 외부평가 UR-0130)
|
|
4
40
|
|
|
5
41
|
> 1.9.430(npm 게시)에서 e2e 테스트 픽스처가 `sk_live_` 패턴(Stripe 실키 형태)이라 GitHub push-protection에 막혀 git 미반영. 픽스처를 코드베이스 관례인 `sk-test-`(GitHub-safe + leerness 탐지)로 교체하고 1.9.431로 정리(git=npm=tag 정합). 동작 동일.
|
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.433 하네스를 사용합니다. 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.433는 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.431는 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.433)** · 매 라운드 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.433: 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.433';
|
|
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,22 @@ 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
|
+
} },
|
|
3253
|
+
{ name: '11th 외부평가 Codex/Opus P1: contract spec backtick-bullet 함수/필드 강선언 인식 (1.9.433)', run: () => {
|
|
3254
|
+
const m = require('../lib/pure-utils');
|
|
3255
|
+
const f = m._parseContractSpec('## Functions\n- `subtract(a,b)` 필요\n- createUser()\n## Fields\n- `version`: 모듈명\n- plainField\n');
|
|
3256
|
+
const fn = [...f.declared].sort().join(',') === 'createUser,subtract';
|
|
3257
|
+
const fld = [...f.fields].sort().join(',') === 'plainField,version';
|
|
3258
|
+
// 인라인 산문 backtick 은 약언급 유지(declared 아님)
|
|
3259
|
+
const prose = m._parseContractSpec('산문에서 `helperFn()` 언급.');
|
|
3260
|
+
const proseOk = [...prose.declared].length === 0 && [...prose.mentioned].join(',') === 'helperFn';
|
|
3261
|
+
return fn && fld && proseOk;
|
|
3262
|
+
} },
|
|
3247
3263
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3248
3264
|
];
|
|
3249
3265
|
}
|
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/lib/pure-utils.js
CHANGED
|
@@ -1053,7 +1053,8 @@ function _parseContractSpec(specText) {
|
|
|
1053
1053
|
const mentioned = new Set();
|
|
1054
1054
|
const fields = new Set();
|
|
1055
1055
|
for (const m of s.matchAll(/function\s+([A-Za-z_$][\w$]*)\s*\(/g)) declared.add(m[1]);
|
|
1056
|
-
|
|
1056
|
+
// 1.9.433 (11th 외부평가 Opus P1): bullet 시작 backtick 허용 — `- ` + ` `name()` `(CLI 자체 관례)도 강선언. 인라인 산문 backtick(아래)은 약언급 유지.
|
|
1057
|
+
for (const m of s.matchAll(/^\s*(?:[-*+]|\d+\.)\s+`?([A-Za-z_$][\w$]*)\(/gm)) declared.add(m[1]);
|
|
1057
1058
|
for (const m of s.matchAll(/`([A-Za-z_$][\w$]*)\s*\(/g)) mentioned.add(m[1]);
|
|
1058
1059
|
for (const m of s.matchAll(/tick\.([A-Za-z_$][\w$]*)/g)) fields.add(m[1]);
|
|
1059
1060
|
// 1.9.417 (9th 외부평가 Opus, UR-0123): `## Fields`(또는 `## 필드`) 섹션 불릿도 필드로 인식.
|
|
@@ -1066,7 +1067,8 @@ function _parseContractSpec(specText) {
|
|
|
1066
1067
|
const h = line.match(/^#{1,6}\s+(.+?)\s*$/);
|
|
1067
1068
|
if (h) { const t = h[1].trim().toLowerCase(); inFields = t === 'fields' || t.startsWith('fields ') || h[1].trim().startsWith('필드'); continue; }
|
|
1068
1069
|
if (!inFields) continue;
|
|
1069
|
-
|
|
1070
|
+
// 1.9.433 (11th 외부평가 Codex P2): bullet 시작 backtick 허용 — `- ` + ` `name`: desc `(설명 붙은 필드 관용 표기)도 필드로 인식.
|
|
1071
|
+
const b = line.match(/^\s*(?:[-*+]|\d+\.)\s+`?([A-Za-z_$][\w$]*)`?\s*(?::|\s|$)/);
|
|
1070
1072
|
if (b) fields.add(b[1]);
|
|
1071
1073
|
}
|
|
1072
1074
|
}
|