leerness 1.9.401 → 1.9.403
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 +33 -0
- package/README.md +5 -5
- package/bin/harness.js +9 -7
- package/lib/pure-utils.js +10 -4
- package/package.json +1 -1
- package/scripts/e2e.js +42 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.403 — 2026-06-07 — api-skill 에러 exit code 1 (7번째 버그헌트 P2, UR-0107)
|
|
4
|
+
|
|
5
|
+
**🚦 api-skill show/drop 의 실패가 성공(exit 0)으로 보고되던 것 수정 — AI 에이전트의 exit-code 게이트 신뢰성.**
|
|
6
|
+
|
|
7
|
+
### 배경 (7번째 버그헌트 P2 · 비판검토 후 선별)
|
|
8
|
+
버그헌트가 여러 exit-code 비일관을 지적. 직접 재현 + **비판 판단**:
|
|
9
|
+
- **수정(명확)**: api-skill show/drop 없는 ID + 인자 누락이 `✗ ...` 출력하면서 exit 0 → 실패를 성공으로 오판(데이터 op 에러). exit 1 로 수정.
|
|
10
|
+
- **미수정(by-design 판단)**: roles/policy/state 의 unknown-subcommand 가 catalog(default list)를 보여주며 exit 0 → `cmd`(no sub)와 동일한 lenient-default 라 defensible. 과엄격 변경 위험으로 제외. web/pc check 의 "미설치" exit 0 도 opt-in 정보성이라 정당(미수정).
|
|
11
|
+
|
|
12
|
+
### 구현
|
|
13
|
+
- api-skill show(id 누락/not-found), drop(id 누락/not-found), add(url 누락) 에러에 `process.exitCode = 1` 추가. 정상 list/show 는 exit 0 보존.
|
|
14
|
+
|
|
15
|
+
### 검증 (회귀 0)
|
|
16
|
+
- **selftest 148→149 PASS** (api-skill show/drop/add 에러 exit-code 와이어).
|
|
17
|
+
- **E2E 341→342 PASS** (show/drop NOPE + show id누락 → exit1, list → exit0).
|
|
18
|
+
|
|
19
|
+
## 1.9.402 — 2026-06-07 — decisions/lessons MD projection 개행 주입 차단 (7번째 버그헌트 P1-A 잔여, UR-0108)
|
|
20
|
+
|
|
21
|
+
**🛡 데이터 무결성 완결 — decision/lesson 텍스트의 개행이 decisions.md/lessons.md projection 에 위조 블록을 주입하던 것 차단(테이블셀 injection 클러스터 마무리).**
|
|
22
|
+
|
|
23
|
+
### 배경
|
|
24
|
+
1.9.399 가 progress-tracker/rules(파이프 테이블)를 보호. decisions/lessons 는 canonical JSON(raw 안전) + MD projection(`### date — title` / `- field:`) 인데, title/text 의 개행이 MD projection 에 가짜 `### ` 블록을 주입 → JSON 부재(MD-fallback) 시 위조 결정/레슨 증식. 직접 재현 확인(### 4개).
|
|
25
|
+
|
|
26
|
+
### 구현
|
|
27
|
+
- **`_lineSafe(s)`** 순수 헬퍼(개행→공백, 파이프는 보존 — 표 아님): `_renderDecisionsMd`/`_renderLessonsMd` 의 head + 각 필드에 적용. canonical JSON 은 raw 유지(다줄 보존), MD projection 만 단일라인화 → 위조 블록 주입 차단.
|
|
28
|
+
|
|
29
|
+
### 검증 (회귀 0)
|
|
30
|
+
- **selftest 147→148 PASS** (_lineSafe + 개행 title 렌더→reparse 1개 + 별도 ### 헤더 부재 + lessons 동일).
|
|
31
|
+
- **E2E 340→341 PASS** (decision add 개행 → decisions.md 별도 ### 2099 헤더 없음 + MD-fallback context 결정 1개).
|
|
32
|
+
- 실측: ### 4→2(위조 0), reparse 1개, title 'a\\nb'→'a b'.
|
|
33
|
+
|
|
34
|
+
### 테이블셀 injection 클러스터(UR-0104/0108) 완결: task/rule(파이프+개행) + decisions/lessons(개행).
|
|
35
|
+
|
|
3
36
|
## 1.9.401 — 2026-06-07 — 시크릿 스캐너 FN 2종: gitignore 부정(!) + placeholder substring 정밀화 (7번째 버그헌트 P1-C, UR-0106)
|
|
4
37
|
|
|
5
38
|
**🔐 보안 — 커밋되는 파일의 실제 시크릿을 놓치던 false-negative 2종 수정.**
|
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.403 하네스를 사용합니다. 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.403는 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.401는 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.403)** · 매 라운드 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.403: 2026-06-06
|
|
588
588
|
<!-- leerness:project-readme:end -->
|
|
589
589
|
|
package/bin/harness.js
CHANGED
|
@@ -25,13 +25,13 @@ const { _isSecretKey, _isPlaceholderSecret, _looksSecretLike, _mergeLines, _merg
|
|
|
25
25
|
_withBuiltinSource, _esc, _roadmapTokenStyles, _parseSkillMd,
|
|
26
26
|
_migrationGuideText, _parseContractSpec, _gitignoreMatch,
|
|
27
27
|
_featureGraphTemplate, _parseFeatureGraph, _nextFeatureId, _featureBlock, _featureImpactBfs,
|
|
28
|
-
_parseChangelogBetween, _cellSafe, _cellUnescape } = require('../lib/pure-utils'); // 1.9.318~399 (UR-0025/0053/0075/0086/0087/0104): 순수 유틸 모듈 분리
|
|
28
|
+
_parseChangelogBetween, _cellSafe, _cellUnescape, _lineSafe } = require('../lib/pure-utils'); // 1.9.318~399 (UR-0025/0053/0075/0086/0087/0104): 순수 유틸 모듈 분리
|
|
29
29
|
// 1.9.304 (UR-0025): 순수 분석/검증 함수 모듈 분리.
|
|
30
30
|
const { _evidenceQuality, _parseEvidenceStats, _shellGuardAnalyze, _claimFileInGit, _epistemicHonestyCheck } = require('../lib/analyzers');
|
|
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.403';
|
|
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') 시 호스트 프로세스 오염.
|
|
@@ -3006,6 +3006,8 @@ function _selfTestCases() {
|
|
|
3006
3006
|
{ name: '7번째 버그헌트 P1-A (UR-0104): 테이블셀 안전화 _cellSafe/_cellUnescape (파이프/개행 injection 차단) (1.9.399)', run: () => { const m = require('../lib/pure-utils'); if (m._cellSafe !== _cellSafe || m._cellUnescape !== _cellUnescape) return false; const safe = _cellSafe('fix | bug\nrow2'); const noRaw = !/(?<!\\)\|/.test(safe) && !/[\r\n]/.test(safe); const pipeRt = _cellUnescape(_cellSafe('a | b | c')) === 'a | b | c'; const nlGone = _cellSafe('a\nb') === 'a b'; const src = read(__filename); const wired = src.includes('_cellSafe(r.request)') && src.includes('_cellSafe(r.rule)'); return noRaw && pipeRt && nlGone && wired; } },
|
|
3007
3007
|
{ name: '7번째 버그헌트 P1-B (UR-0105): verify-claim/optimism-check/honesty-check --json 에러 구조화 (1.9.400)', run: () => { const src = read(__filename); const vc = /function verifyClaimCmd[\s\S]{0,400}?failJson\(_j, 'not_found'/.test(src); const oc = /function optimismCheckCmd[\s\S]{0,400}?failJson\(_j, 'not_found'/.test(src); const hc = /function honestyCheckCmd[\s\S]{0,900}?failJson\(has\('--json'\), 'not_found'/.test(src); return vc && oc && hc; } },
|
|
3008
3008
|
{ name: '7번째 버그헌트 P1-C (UR-0106): 시크릿 FN — gitignore 부정(!) + placeholder substring 정밀화 (1.9.401)', run: () => { const m = require('../lib/pure-utils'); const gm = m._gitignoreMatch; const negOk = gm('*.example\n!.env.example', '.env.example') === false && gm('*.log', 'a.log') === true && gm('a.log\n!a.log', 'a.log') === false && gm('.env', '.env') === true; const ph = m._isPlaceholderSecret; const phOk = ph('sk-EXAMPLEab12cd34ef56gh78ij90kl') === false && ph('sk-proj-realKEYexample9988776655') === false && ph('your-key-here') === true && ph('changeme') === true && ph('example') === true && ph('xxxxxxxxxxxxxxxxxxxxxxxxxxxx') === true; return negOk && phOk; } },
|
|
3009
|
+
{ name: '7번째 버그헌트 P1-A 잔여 (UR-0108): decisions/lessons MD projection 개행 주입 차단 _lineSafe (1.9.402)', run: () => { const m = require('../lib/pure-utils'); if (m._lineSafe !== _lineSafe) return false; const lsOk = _lineSafe('a\nb\r\nc') === 'a b c'; const md = m._renderDecisionsMd([{ date: '2026-06-07', title: 'real\n### 2099-01-01 — FAKE\n- Decision: forged', decision: 'd', reason: 'r' }]); const re = m._decisionsFromMd(md); const noInject = re.length === 1 && !/^### 2099-01-01 — FAKE/m.test(md); const lmd = m._renderLessonsMd([{ date: '2026-06-07', text: 'l1\n### FAKE\n- Lesson: x', tag: 't' }]); const lre = m._parseLessonEntries(lmd); const lNoInject = lre.length === 1; return lsOk && noInject && lNoInject; } },
|
|
3010
|
+
{ name: '7번째 버그헌트 P2 (UR-0107): api-skill show/drop 에러 exit code 1 (1.9.403)', run: () => { const src = read(__filename); const showId = src.includes("api-skill show <id>')); process.exitCode = 1"); const dropId = src.includes("api-skill drop <id>')); process.exitCode = 1"); const addUrl = src.includes("api-skill add <url> [--direction") && src.includes('process.exitCode = 1'); return showId && dropId && addUrl; } },
|
|
3009
3011
|
{ name: 'VERSION 형식 (x.y.z)', run: () => /^\d+\.\d+\.\d+$/.test(VERSION) }
|
|
3010
3012
|
];
|
|
3011
3013
|
}
|
|
@@ -3368,9 +3370,9 @@ async function apiSkillCmd(root, sub) {
|
|
|
3368
3370
|
};
|
|
3369
3371
|
if (sub === 'show') {
|
|
3370
3372
|
const id = arg('--id') || _positionalAfterSub();
|
|
3371
|
-
if (!id) { log(rd('id 필요: leerness api-skill show <id>')); return; }
|
|
3373
|
+
if (!id) { log(rd('id 필요: leerness api-skill show <id>')); process.exitCode = 1; return; }
|
|
3372
3374
|
const s = _loadAPISkill(root, id);
|
|
3373
|
-
if (!s) { log(rd(`api-skill 없음: ${id}`)); return; }
|
|
3375
|
+
if (!s) { log(rd(`api-skill 없음: ${id}`)); process.exitCode = 1; return; }
|
|
3374
3376
|
if (has('--json')) { log(JSON.stringify(s, null, 2)); return; }
|
|
3375
3377
|
log(fs.readFileSync(path.join(dir, id + '.md'), 'utf8'));
|
|
3376
3378
|
return;
|
|
@@ -3389,16 +3391,16 @@ async function apiSkillCmd(root, sub) {
|
|
|
3389
3391
|
}
|
|
3390
3392
|
if (sub === 'drop') {
|
|
3391
3393
|
const id = arg('--id') || _positionalAfterSub();
|
|
3392
|
-
if (!id) { log(rd('id 필요: leerness api-skill drop <id>')); return; }
|
|
3394
|
+
if (!id) { log(rd('id 필요: leerness api-skill drop <id>')); process.exitCode = 1; return; }
|
|
3393
3395
|
const fp = path.join(dir, id + '.md');
|
|
3394
|
-
if (!fs.existsSync(fp)) { log(rd(`없음: ${id}`)); return; }
|
|
3396
|
+
if (!fs.existsSync(fp)) { log(rd(`없음: ${id}`)); process.exitCode = 1; return; }
|
|
3395
3397
|
fs.unlinkSync(fp);
|
|
3396
3398
|
log(gr(`✓ 삭제: ${id}`));
|
|
3397
3399
|
return;
|
|
3398
3400
|
}
|
|
3399
3401
|
if (sub === 'add') {
|
|
3400
3402
|
const url = arg('--url') || _positionalAfterSub();
|
|
3401
|
-
if (!url) { log(rd('URL 필요: leerness api-skill add <url> [--direction "..."]')); return; }
|
|
3403
|
+
if (!url) { log(rd('URL 필요: leerness api-skill add <url> [--direction "..."]')); process.exitCode = 1; return; }
|
|
3402
3404
|
const direction = arg('--direction', '');
|
|
3403
3405
|
const name = arg('--name', '');
|
|
3404
3406
|
const noCrawl = has('--no-crawl');
|
package/lib/pure-utils.js
CHANGED
|
@@ -391,7 +391,8 @@ function _parseLessonEntries(text) {
|
|
|
391
391
|
function _renderLessonsMd(lessons) {
|
|
392
392
|
const preamble = '# Lessons (1.9.112)\n\n과거 실수/통찰/패턴 영구 기록 — handoff 자동 회수와 통합.\n';
|
|
393
393
|
const body = (lessons || []).map(l =>
|
|
394
|
-
|
|
394
|
+
// 1.9.402 (UR-0108): text/tag 개행 → 공백(MD projection 라인 위조 차단). canonical JSON 은 raw 유지.
|
|
395
|
+
`\n### ${_lineSafe(l.date)}\n- Lesson: ${_lineSafe(l.text)}\n${l.tag ? `- Tag: ${_lineSafe(l.tag)}\n` : ''}`
|
|
395
396
|
).join('');
|
|
396
397
|
return preamble + body;
|
|
397
398
|
}
|
|
@@ -609,8 +610,9 @@ function _renderDecisionsMd(decisions) {
|
|
|
609
610
|
const preamble = '# Decisions\n\n## Template (예시 — 실제 결정은 아래 코드블록 밖에 추가)\n\n'
|
|
610
611
|
+ '```md\n### YYYY-MM-DD — Decision 제목\n- Decision:\n- Reason:\n- Alternatives:\n- Impact:\n```\n';
|
|
611
612
|
const body = (decisions || []).map(d => {
|
|
612
|
-
|
|
613
|
-
|
|
613
|
+
// 1.9.402 (UR-0108): 필드 개행 → 공백(MD projection '### '/'- field:' 라인 위조 블록 주입 차단). canonical JSON 은 raw 유지.
|
|
614
|
+
const head = d.date ? `${_lineSafe(d.date)} — ${_lineSafe(d.title)}` : _lineSafe(d.title);
|
|
615
|
+
return `\n### ${head}\n- Decision: ${_lineSafe(d.decision || '')}\n- Reason: ${_lineSafe(d.reason || '')}\n- Alternatives: ${_lineSafe(d.alternatives || '')}\n- Impact: ${_lineSafe(d.impact || '')}\n`;
|
|
614
616
|
}).join('');
|
|
615
617
|
return preamble + body;
|
|
616
618
|
}
|
|
@@ -943,7 +945,9 @@ module.exports = {
|
|
|
943
945
|
// 1.9.393 (UR-0025): CHANGELOG 버전 구간 차분 파서 (순수, 공유)
|
|
944
946
|
_parseChangelogBetween,
|
|
945
947
|
// 1.9.399 (7번째 버그헌트 P1-A, UR-0104): markdown 테이블 셀 안전화(파이프/개행 injection 차단)
|
|
946
|
-
_cellSafe, _cellUnescape
|
|
948
|
+
_cellSafe, _cellUnescape,
|
|
949
|
+
// 1.9.402 (7번째 버그헌트 P1-A 잔여, UR-0108): MD projection 라인 안전화(개행→공백)
|
|
950
|
+
_lineSafe
|
|
947
951
|
};
|
|
948
952
|
|
|
949
953
|
// 1.9.355 (UR-0075 Phase A): AI 에이전트용 크로스버전 마이그레이션 안전 워크플로 가이드 (순수 텍스트). 임시설치 + --path + 백업 + diff 검증.
|
|
@@ -1185,3 +1189,5 @@ function _parseChangelogBetween(changelogText, fromV, toV) {
|
|
|
1185
1189
|
// table 파서는 split(/(?<!\\)\|/) 로 비이스케이프 파이프에서만 분리 → 사용자 텍스트의 파이프/개행이 데이터 손상·가짜행 주입을 못 일으킴.
|
|
1186
1190
|
function _cellSafe(s) { return String(s == null ? '' : s).replace(/\r\n|\r|\n/g, ' ').replace(/\|/g, '\\|'); }
|
|
1187
1191
|
function _cellUnescape(s) { return String(s == null ? '' : s).replace(/\\\|/g, '|'); }
|
|
1192
|
+
// 1.9.402 (7번째 버그헌트 P1-A 잔여, UR-0108): 라인 안전화 — 개행만 공백으로(파이프 보존). decisions/lessons MD projection 의 '### '/'- field:' 라인 개행 주입 차단(canonical JSON 은 raw 유지).
|
|
1193
|
+
function _lineSafe(s) { return String(s == null ? '' : s).replace(/\r\n|\r|\n/g, ' '); }
|
package/package.json
CHANGED
package/scripts/e2e.js
CHANGED
|
@@ -5625,5 +5625,47 @@ total++;
|
|
|
5625
5625
|
if (!ok) failed++;
|
|
5626
5626
|
}
|
|
5627
5627
|
|
|
5628
|
+
// 1.9.402 회귀 (7번째 버그헌트 P1-A 잔여, UR-0108): decision/lesson 텍스트 개행이 MD projection 위조 블록 주입 차단
|
|
5629
|
+
total++;
|
|
5630
|
+
{
|
|
5631
|
+
let ok = false;
|
|
5632
|
+
try {
|
|
5633
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-mdinj-'));
|
|
5634
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
5635
|
+
cp.spawnSync(process.execPath, [CLI, 'decision', 'add', 'realdec\n### 2099-01-01 — FAKE\n- Decision: forged', '--reason', 'r', '--path', d], { encoding: 'utf8', timeout: 15000 });
|
|
5636
|
+
const md = fs.readFileSync(path.join(d, '.harness', 'decisions.md'), 'utf8');
|
|
5637
|
+
const noFakeBlock = !/^### 2099-01-01 — FAKE/m.test(md); // 개행 공백화 → 별도 ### 헤더 라인 안 생김(인라인 텍스트는 무관)
|
|
5638
|
+
const hasReal = md.includes('realdec'); // 실 결정은 기록됨
|
|
5639
|
+
// MD-fallback 재파싱: 위조 결정 미증식(실 결정 1개만, template 제외)
|
|
5640
|
+
const pu = require(path.resolve(__dirname, '..', 'lib', 'pure-utils'));
|
|
5641
|
+
const reparsed = pu._decisionsFromMd(md);
|
|
5642
|
+
const noInject = reparsed.length === 1; // 위조 결정 미주입(1개만)
|
|
5643
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5644
|
+
ok = noFakeBlock && hasReal && noInject;
|
|
5645
|
+
} catch {}
|
|
5646
|
+
console.log(ok ? '✓ B(1.9.402) 7th버그헌트 P1-A잔여: decision/lesson MD projection 개행 위조블록 주입 차단 (UR-0108)' : '✗ MD projection 개행 주입 차단 실패');
|
|
5647
|
+
if (!ok) failed++;
|
|
5648
|
+
}
|
|
5649
|
+
|
|
5650
|
+
// 1.9.403 회귀 (7번째 버그헌트 P2, UR-0107): api-skill show/drop 의 missing-id/not-found 에러가 exit 1(성공 오판 방지)
|
|
5651
|
+
total++;
|
|
5652
|
+
{
|
|
5653
|
+
let ok = false;
|
|
5654
|
+
try {
|
|
5655
|
+
const d = fs.mkdtempSync(path.join(os.tmpdir(), 'leerness-apiskillexit-'));
|
|
5656
|
+
cp.spawnSync(process.execPath, [CLI, 'init', d, '--yes', '--language', 'ko'], { encoding: 'utf8', timeout: 30000 });
|
|
5657
|
+
const ex = (args) => cp.spawnSync(process.execPath, [CLI, ...args, '--path', d], { encoding: 'utf8', timeout: 15000 }).status;
|
|
5658
|
+
const showNf = ex(['api-skill', 'show', 'NOPE']) === 1;
|
|
5659
|
+
const dropNf = ex(['api-skill', 'drop', 'NOPE']) === 1;
|
|
5660
|
+
const showNoId = ex(['api-skill', 'show']) === 1;
|
|
5661
|
+
// 정상 list 는 exit 0 보존
|
|
5662
|
+
const listOk = ex(['api-skill', 'list']) === 0;
|
|
5663
|
+
fs.rmSync(d, { recursive: true, force: true });
|
|
5664
|
+
ok = showNf && dropNf && showNoId && listOk;
|
|
5665
|
+
} catch {}
|
|
5666
|
+
console.log(ok ? '✓ B(1.9.403) 7th버그헌트 P2: api-skill show/drop 에러 exit1(성공오판 방지) + list 정상 (UR-0107)' : '✗ api-skill exit-code 실패');
|
|
5667
|
+
if (!ok) failed++;
|
|
5668
|
+
}
|
|
5669
|
+
|
|
5628
5670
|
console.log(`\nE2E result: ${total - failed}/${total} passed · ${((Date.now() - _e2eStart) / 1000).toFixed(0)}s`);
|
|
5629
5671
|
if (failed > 0) process.exit(1);
|